• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/securitycenter/v1/security_health_analytics_custom_module.proto
18 
19 package com.google.cloud.securitycenter.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents an instance of a Security Health Analytics custom module,
26  * including its full module name, display name, enablement state, and last
27  * updated time. You can create a custom module at the organization, folder, or
28  * project level. Custom modules that you create at the organization or folder
29  * level are inherited by the child folders and projects.
30  * </pre>
31  *
32  * Protobuf type {@code google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule}
33  */
34 public final class SecurityHealthAnalyticsCustomModule
35     extends com.google.protobuf.GeneratedMessageV3
36     implements
37     // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule)
38     SecurityHealthAnalyticsCustomModuleOrBuilder {
39   private static final long serialVersionUID = 0L;
40   // Use SecurityHealthAnalyticsCustomModule.newBuilder() to construct.
SecurityHealthAnalyticsCustomModule( com.google.protobuf.GeneratedMessageV3.Builder<?> builder)41   private SecurityHealthAnalyticsCustomModule(
42       com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
43     super(builder);
44   }
45 
SecurityHealthAnalyticsCustomModule()46   private SecurityHealthAnalyticsCustomModule() {
47     name_ = "";
48     displayName_ = "";
49     enablementState_ = 0;
50     lastEditor_ = "";
51     ancestorModule_ = "";
52   }
53 
54   @java.lang.Override
55   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)56   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
57     return new SecurityHealthAnalyticsCustomModule();
58   }
59 
60   @java.lang.Override
getUnknownFields()61   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
62     return this.unknownFields;
63   }
64 
getDescriptor()65   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
66     return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto
67         .internal_static_google_cloud_securitycenter_v1_SecurityHealthAnalyticsCustomModule_descriptor;
68   }
69 
70   @java.lang.Override
71   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()72       internalGetFieldAccessorTable() {
73     return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto
74         .internal_static_google_cloud_securitycenter_v1_SecurityHealthAnalyticsCustomModule_fieldAccessorTable
75         .ensureFieldAccessorsInitialized(
76             com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.class,
77             com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.Builder.class);
78   }
79 
80   /**
81    *
82    *
83    * <pre>
84    * Possible enablement states of a custom module.
85    * </pre>
86    *
87    * Protobuf enum {@code
88    * google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState}
89    */
90   public enum EnablementState implements com.google.protobuf.ProtocolMessageEnum {
91     /**
92      *
93      *
94      * <pre>
95      * Unspecified enablement state.
96      * </pre>
97      *
98      * <code>ENABLEMENT_STATE_UNSPECIFIED = 0;</code>
99      */
100     ENABLEMENT_STATE_UNSPECIFIED(0),
101     /**
102      *
103      *
104      * <pre>
105      * The module is enabled at the given CRM resource.
106      * </pre>
107      *
108      * <code>ENABLED = 1;</code>
109      */
110     ENABLED(1),
111     /**
112      *
113      *
114      * <pre>
115      * The module is disabled at the given CRM resource.
116      * </pre>
117      *
118      * <code>DISABLED = 2;</code>
119      */
120     DISABLED(2),
121     /**
122      *
123      *
124      * <pre>
125      * State is inherited from an ancestor module. The module will either
126      * be effectively ENABLED or DISABLED based on its closest non-inherited
127      * ancestor module in the CRM hierarchy.
128      * </pre>
129      *
130      * <code>INHERITED = 3;</code>
131      */
132     INHERITED(3),
133     UNRECOGNIZED(-1),
134     ;
135 
136     /**
137      *
138      *
139      * <pre>
140      * Unspecified enablement state.
141      * </pre>
142      *
143      * <code>ENABLEMENT_STATE_UNSPECIFIED = 0;</code>
144      */
145     public static final int ENABLEMENT_STATE_UNSPECIFIED_VALUE = 0;
146     /**
147      *
148      *
149      * <pre>
150      * The module is enabled at the given CRM resource.
151      * </pre>
152      *
153      * <code>ENABLED = 1;</code>
154      */
155     public static final int ENABLED_VALUE = 1;
156     /**
157      *
158      *
159      * <pre>
160      * The module is disabled at the given CRM resource.
161      * </pre>
162      *
163      * <code>DISABLED = 2;</code>
164      */
165     public static final int DISABLED_VALUE = 2;
166     /**
167      *
168      *
169      * <pre>
170      * State is inherited from an ancestor module. The module will either
171      * be effectively ENABLED or DISABLED based on its closest non-inherited
172      * ancestor module in the CRM hierarchy.
173      * </pre>
174      *
175      * <code>INHERITED = 3;</code>
176      */
177     public static final int INHERITED_VALUE = 3;
178 
getNumber()179     public final int getNumber() {
180       if (this == UNRECOGNIZED) {
181         throw new java.lang.IllegalArgumentException(
182             "Can't get the number of an unknown enum value.");
183       }
184       return value;
185     }
186 
187     /**
188      * @param value The numeric wire value of the corresponding enum entry.
189      * @return The enum associated with the given numeric wire value.
190      * @deprecated Use {@link #forNumber(int)} instead.
191      */
192     @java.lang.Deprecated
valueOf(int value)193     public static EnablementState valueOf(int value) {
194       return forNumber(value);
195     }
196 
197     /**
198      * @param value The numeric wire value of the corresponding enum entry.
199      * @return The enum associated with the given numeric wire value.
200      */
forNumber(int value)201     public static EnablementState forNumber(int value) {
202       switch (value) {
203         case 0:
204           return ENABLEMENT_STATE_UNSPECIFIED;
205         case 1:
206           return ENABLED;
207         case 2:
208           return DISABLED;
209         case 3:
210           return INHERITED;
211         default:
212           return null;
213       }
214     }
215 
internalGetValueMap()216     public static com.google.protobuf.Internal.EnumLiteMap<EnablementState> internalGetValueMap() {
217       return internalValueMap;
218     }
219 
220     private static final com.google.protobuf.Internal.EnumLiteMap<EnablementState>
221         internalValueMap =
222             new com.google.protobuf.Internal.EnumLiteMap<EnablementState>() {
223               public EnablementState findValueByNumber(int number) {
224                 return EnablementState.forNumber(number);
225               }
226             };
227 
getValueDescriptor()228     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
229       if (this == UNRECOGNIZED) {
230         throw new java.lang.IllegalStateException(
231             "Can't get the descriptor of an unrecognized enum value.");
232       }
233       return getDescriptor().getValues().get(ordinal());
234     }
235 
getDescriptorForType()236     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
237       return getDescriptor();
238     }
239 
getDescriptor()240     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
241       return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.getDescriptor()
242           .getEnumTypes()
243           .get(0);
244     }
245 
246     private static final EnablementState[] VALUES = values();
247 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)248     public static EnablementState valueOf(
249         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
250       if (desc.getType() != getDescriptor()) {
251         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
252       }
253       if (desc.getIndex() == -1) {
254         return UNRECOGNIZED;
255       }
256       return VALUES[desc.getIndex()];
257     }
258 
259     private final int value;
260 
EnablementState(int value)261     private EnablementState(int value) {
262       this.value = value;
263     }
264 
265     // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState)
266   }
267 
268   public static final int NAME_FIELD_NUMBER = 1;
269 
270   @SuppressWarnings("serial")
271   private volatile java.lang.Object name_ = "";
272   /**
273    *
274    *
275    * <pre>
276    * Immutable. The resource name of the custom module.
277    * Its format is
278    * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
279    * or
280    * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
281    * or
282    * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
283    * The id {customModule} is server-generated and is not user settable.
284    * It will be a numeric id containing 1-20 digits.
285    * </pre>
286    *
287    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
288    *
289    * @return The name.
290    */
291   @java.lang.Override
getName()292   public java.lang.String getName() {
293     java.lang.Object ref = name_;
294     if (ref instanceof java.lang.String) {
295       return (java.lang.String) ref;
296     } else {
297       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
298       java.lang.String s = bs.toStringUtf8();
299       name_ = s;
300       return s;
301     }
302   }
303   /**
304    *
305    *
306    * <pre>
307    * Immutable. The resource name of the custom module.
308    * Its format is
309    * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
310    * or
311    * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
312    * or
313    * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
314    * The id {customModule} is server-generated and is not user settable.
315    * It will be a numeric id containing 1-20 digits.
316    * </pre>
317    *
318    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
319    *
320    * @return The bytes for name.
321    */
322   @java.lang.Override
getNameBytes()323   public com.google.protobuf.ByteString getNameBytes() {
324     java.lang.Object ref = name_;
325     if (ref instanceof java.lang.String) {
326       com.google.protobuf.ByteString b =
327           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
328       name_ = b;
329       return b;
330     } else {
331       return (com.google.protobuf.ByteString) ref;
332     }
333   }
334 
335   public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
336 
337   @SuppressWarnings("serial")
338   private volatile java.lang.Object displayName_ = "";
339   /**
340    *
341    *
342    * <pre>
343    * The display name of the Security Health Analytics custom module. This
344    * display name becomes the finding category for all findings that are
345    * returned by this custom module. The display name must be between 1 and
346    * 128 characters, start with a lowercase letter, and contain alphanumeric
347    * characters or underscores only.
348    * </pre>
349    *
350    * <code>string display_name = 2;</code>
351    *
352    * @return The displayName.
353    */
354   @java.lang.Override
getDisplayName()355   public java.lang.String getDisplayName() {
356     java.lang.Object ref = displayName_;
357     if (ref instanceof java.lang.String) {
358       return (java.lang.String) ref;
359     } else {
360       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
361       java.lang.String s = bs.toStringUtf8();
362       displayName_ = s;
363       return s;
364     }
365   }
366   /**
367    *
368    *
369    * <pre>
370    * The display name of the Security Health Analytics custom module. This
371    * display name becomes the finding category for all findings that are
372    * returned by this custom module. The display name must be between 1 and
373    * 128 characters, start with a lowercase letter, and contain alphanumeric
374    * characters or underscores only.
375    * </pre>
376    *
377    * <code>string display_name = 2;</code>
378    *
379    * @return The bytes for displayName.
380    */
381   @java.lang.Override
getDisplayNameBytes()382   public com.google.protobuf.ByteString getDisplayNameBytes() {
383     java.lang.Object ref = displayName_;
384     if (ref instanceof java.lang.String) {
385       com.google.protobuf.ByteString b =
386           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
387       displayName_ = b;
388       return b;
389     } else {
390       return (com.google.protobuf.ByteString) ref;
391     }
392   }
393 
394   public static final int ENABLEMENT_STATE_FIELD_NUMBER = 4;
395   private int enablementState_ = 0;
396   /**
397    *
398    *
399    * <pre>
400    * The enablement state of the custom module.
401    * </pre>
402    *
403    * <code>
404    * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
405    * </code>
406    *
407    * @return The enum numeric value on the wire for enablementState.
408    */
409   @java.lang.Override
getEnablementStateValue()410   public int getEnablementStateValue() {
411     return enablementState_;
412   }
413   /**
414    *
415    *
416    * <pre>
417    * The enablement state of the custom module.
418    * </pre>
419    *
420    * <code>
421    * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
422    * </code>
423    *
424    * @return The enablementState.
425    */
426   @java.lang.Override
427   public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
getEnablementState()428       getEnablementState() {
429     com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState result =
430         com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
431             .forNumber(enablementState_);
432     return result == null
433         ? com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
434             .UNRECOGNIZED
435         : result;
436   }
437 
438   public static final int UPDATE_TIME_FIELD_NUMBER = 5;
439   private com.google.protobuf.Timestamp updateTime_;
440   /**
441    *
442    *
443    * <pre>
444    * Output only. The time at which the custom module was last updated.
445    * </pre>
446    *
447    * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
448    * </code>
449    *
450    * @return Whether the updateTime field is set.
451    */
452   @java.lang.Override
hasUpdateTime()453   public boolean hasUpdateTime() {
454     return updateTime_ != null;
455   }
456   /**
457    *
458    *
459    * <pre>
460    * Output only. The time at which the custom module was last updated.
461    * </pre>
462    *
463    * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
464    * </code>
465    *
466    * @return The updateTime.
467    */
468   @java.lang.Override
getUpdateTime()469   public com.google.protobuf.Timestamp getUpdateTime() {
470     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
471   }
472   /**
473    *
474    *
475    * <pre>
476    * Output only. The time at which the custom module was last updated.
477    * </pre>
478    *
479    * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
480    * </code>
481    */
482   @java.lang.Override
getUpdateTimeOrBuilder()483   public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
484     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
485   }
486 
487   public static final int LAST_EDITOR_FIELD_NUMBER = 6;
488 
489   @SuppressWarnings("serial")
490   private volatile java.lang.Object lastEditor_ = "";
491   /**
492    *
493    *
494    * <pre>
495    * Output only. The editor that last updated the custom module.
496    * </pre>
497    *
498    * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
499    *
500    * @return The lastEditor.
501    */
502   @java.lang.Override
getLastEditor()503   public java.lang.String getLastEditor() {
504     java.lang.Object ref = lastEditor_;
505     if (ref instanceof java.lang.String) {
506       return (java.lang.String) ref;
507     } else {
508       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
509       java.lang.String s = bs.toStringUtf8();
510       lastEditor_ = s;
511       return s;
512     }
513   }
514   /**
515    *
516    *
517    * <pre>
518    * Output only. The editor that last updated the custom module.
519    * </pre>
520    *
521    * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
522    *
523    * @return The bytes for lastEditor.
524    */
525   @java.lang.Override
getLastEditorBytes()526   public com.google.protobuf.ByteString getLastEditorBytes() {
527     java.lang.Object ref = lastEditor_;
528     if (ref instanceof java.lang.String) {
529       com.google.protobuf.ByteString b =
530           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
531       lastEditor_ = b;
532       return b;
533     } else {
534       return (com.google.protobuf.ByteString) ref;
535     }
536   }
537 
538   public static final int ANCESTOR_MODULE_FIELD_NUMBER = 7;
539 
540   @SuppressWarnings("serial")
541   private volatile java.lang.Object ancestorModule_ = "";
542   /**
543    *
544    *
545    * <pre>
546    * Output only. If empty, indicates that the custom module was created in the
547    * organization, folder, or project in which you are viewing the custom
548    * module. Otherwise, `ancestor_module` specifies the organization or folder
549    * from which the custom module is inherited.
550    * </pre>
551    *
552    * <code>
553    * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
554    * </code>
555    *
556    * @return The ancestorModule.
557    */
558   @java.lang.Override
getAncestorModule()559   public java.lang.String getAncestorModule() {
560     java.lang.Object ref = ancestorModule_;
561     if (ref instanceof java.lang.String) {
562       return (java.lang.String) ref;
563     } else {
564       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
565       java.lang.String s = bs.toStringUtf8();
566       ancestorModule_ = s;
567       return s;
568     }
569   }
570   /**
571    *
572    *
573    * <pre>
574    * Output only. If empty, indicates that the custom module was created in the
575    * organization, folder, or project in which you are viewing the custom
576    * module. Otherwise, `ancestor_module` specifies the organization or folder
577    * from which the custom module is inherited.
578    * </pre>
579    *
580    * <code>
581    * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
582    * </code>
583    *
584    * @return The bytes for ancestorModule.
585    */
586   @java.lang.Override
getAncestorModuleBytes()587   public com.google.protobuf.ByteString getAncestorModuleBytes() {
588     java.lang.Object ref = ancestorModule_;
589     if (ref instanceof java.lang.String) {
590       com.google.protobuf.ByteString b =
591           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
592       ancestorModule_ = b;
593       return b;
594     } else {
595       return (com.google.protobuf.ByteString) ref;
596     }
597   }
598 
599   public static final int CUSTOM_CONFIG_FIELD_NUMBER = 8;
600   private com.google.cloud.securitycenter.v1.CustomConfig customConfig_;
601   /**
602    *
603    *
604    * <pre>
605    * The user specified custom configuration for the module.
606    * </pre>
607    *
608    * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
609    *
610    * @return Whether the customConfig field is set.
611    */
612   @java.lang.Override
hasCustomConfig()613   public boolean hasCustomConfig() {
614     return customConfig_ != null;
615   }
616   /**
617    *
618    *
619    * <pre>
620    * The user specified custom configuration for the module.
621    * </pre>
622    *
623    * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
624    *
625    * @return The customConfig.
626    */
627   @java.lang.Override
getCustomConfig()628   public com.google.cloud.securitycenter.v1.CustomConfig getCustomConfig() {
629     return customConfig_ == null
630         ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()
631         : customConfig_;
632   }
633   /**
634    *
635    *
636    * <pre>
637    * The user specified custom configuration for the module.
638    * </pre>
639    *
640    * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
641    */
642   @java.lang.Override
getCustomConfigOrBuilder()643   public com.google.cloud.securitycenter.v1.CustomConfigOrBuilder getCustomConfigOrBuilder() {
644     return customConfig_ == null
645         ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()
646         : customConfig_;
647   }
648 
649   private byte memoizedIsInitialized = -1;
650 
651   @java.lang.Override
isInitialized()652   public final boolean isInitialized() {
653     byte isInitialized = memoizedIsInitialized;
654     if (isInitialized == 1) return true;
655     if (isInitialized == 0) return false;
656 
657     memoizedIsInitialized = 1;
658     return true;
659   }
660 
661   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)662   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
663     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
664       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
665     }
666     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
667       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
668     }
669     if (enablementState_
670         != com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
671             .ENABLEMENT_STATE_UNSPECIFIED
672             .getNumber()) {
673       output.writeEnum(4, enablementState_);
674     }
675     if (updateTime_ != null) {
676       output.writeMessage(5, getUpdateTime());
677     }
678     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastEditor_)) {
679       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, lastEditor_);
680     }
681     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ancestorModule_)) {
682       com.google.protobuf.GeneratedMessageV3.writeString(output, 7, ancestorModule_);
683     }
684     if (customConfig_ != null) {
685       output.writeMessage(8, getCustomConfig());
686     }
687     getUnknownFields().writeTo(output);
688   }
689 
690   @java.lang.Override
getSerializedSize()691   public int getSerializedSize() {
692     int size = memoizedSize;
693     if (size != -1) return size;
694 
695     size = 0;
696     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
697       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
698     }
699     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
700       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
701     }
702     if (enablementState_
703         != com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
704             .ENABLEMENT_STATE_UNSPECIFIED
705             .getNumber()) {
706       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, enablementState_);
707     }
708     if (updateTime_ != null) {
709       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime());
710     }
711     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastEditor_)) {
712       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, lastEditor_);
713     }
714     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ancestorModule_)) {
715       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, ancestorModule_);
716     }
717     if (customConfig_ != null) {
718       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCustomConfig());
719     }
720     size += getUnknownFields().getSerializedSize();
721     memoizedSize = size;
722     return size;
723   }
724 
725   @java.lang.Override
equals(final java.lang.Object obj)726   public boolean equals(final java.lang.Object obj) {
727     if (obj == this) {
728       return true;
729     }
730     if (!(obj instanceof com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule)) {
731       return super.equals(obj);
732     }
733     com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule other =
734         (com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) obj;
735 
736     if (!getName().equals(other.getName())) return false;
737     if (!getDisplayName().equals(other.getDisplayName())) return false;
738     if (enablementState_ != other.enablementState_) return false;
739     if (hasUpdateTime() != other.hasUpdateTime()) return false;
740     if (hasUpdateTime()) {
741       if (!getUpdateTime().equals(other.getUpdateTime())) return false;
742     }
743     if (!getLastEditor().equals(other.getLastEditor())) return false;
744     if (!getAncestorModule().equals(other.getAncestorModule())) return false;
745     if (hasCustomConfig() != other.hasCustomConfig()) return false;
746     if (hasCustomConfig()) {
747       if (!getCustomConfig().equals(other.getCustomConfig())) return false;
748     }
749     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
750     return true;
751   }
752 
753   @java.lang.Override
hashCode()754   public int hashCode() {
755     if (memoizedHashCode != 0) {
756       return memoizedHashCode;
757     }
758     int hash = 41;
759     hash = (19 * hash) + getDescriptor().hashCode();
760     hash = (37 * hash) + NAME_FIELD_NUMBER;
761     hash = (53 * hash) + getName().hashCode();
762     hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
763     hash = (53 * hash) + getDisplayName().hashCode();
764     hash = (37 * hash) + ENABLEMENT_STATE_FIELD_NUMBER;
765     hash = (53 * hash) + enablementState_;
766     if (hasUpdateTime()) {
767       hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
768       hash = (53 * hash) + getUpdateTime().hashCode();
769     }
770     hash = (37 * hash) + LAST_EDITOR_FIELD_NUMBER;
771     hash = (53 * hash) + getLastEditor().hashCode();
772     hash = (37 * hash) + ANCESTOR_MODULE_FIELD_NUMBER;
773     hash = (53 * hash) + getAncestorModule().hashCode();
774     if (hasCustomConfig()) {
775       hash = (37 * hash) + CUSTOM_CONFIG_FIELD_NUMBER;
776       hash = (53 * hash) + getCustomConfig().hashCode();
777     }
778     hash = (29 * hash) + getUnknownFields().hashCode();
779     memoizedHashCode = hash;
780     return hash;
781   }
782 
parseFrom( java.nio.ByteBuffer data)783   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
784       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
785     return PARSER.parseFrom(data);
786   }
787 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)788   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
789       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
790       throws com.google.protobuf.InvalidProtocolBufferException {
791     return PARSER.parseFrom(data, extensionRegistry);
792   }
793 
parseFrom( com.google.protobuf.ByteString data)794   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
795       com.google.protobuf.ByteString data)
796       throws com.google.protobuf.InvalidProtocolBufferException {
797     return PARSER.parseFrom(data);
798   }
799 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)800   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
801       com.google.protobuf.ByteString data,
802       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
803       throws com.google.protobuf.InvalidProtocolBufferException {
804     return PARSER.parseFrom(data, extensionRegistry);
805   }
806 
parseFrom( byte[] data)807   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
808       byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
809     return PARSER.parseFrom(data);
810   }
811 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)812   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
813       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
814       throws com.google.protobuf.InvalidProtocolBufferException {
815     return PARSER.parseFrom(data, extensionRegistry);
816   }
817 
parseFrom( java.io.InputStream input)818   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
819       java.io.InputStream input) throws java.io.IOException {
820     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
821   }
822 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)823   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
824       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
825       throws java.io.IOException {
826     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
827         PARSER, input, extensionRegistry);
828   }
829 
830   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
parseDelimitedFrom(java.io.InputStream input)831       parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
832     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
833   }
834 
835   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)836       parseDelimitedFrom(
837           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
838           throws java.io.IOException {
839     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
840         PARSER, input, extensionRegistry);
841   }
842 
parseFrom( com.google.protobuf.CodedInputStream input)843   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
844       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
845     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
846   }
847 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)848   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule parseFrom(
849       com.google.protobuf.CodedInputStream input,
850       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
851       throws java.io.IOException {
852     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
853         PARSER, input, extensionRegistry);
854   }
855 
856   @java.lang.Override
newBuilderForType()857   public Builder newBuilderForType() {
858     return newBuilder();
859   }
860 
newBuilder()861   public static Builder newBuilder() {
862     return DEFAULT_INSTANCE.toBuilder();
863   }
864 
newBuilder( com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule prototype)865   public static Builder newBuilder(
866       com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule prototype) {
867     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
868   }
869 
870   @java.lang.Override
toBuilder()871   public Builder toBuilder() {
872     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
873   }
874 
875   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)876   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
877     Builder builder = new Builder(parent);
878     return builder;
879   }
880   /**
881    *
882    *
883    * <pre>
884    * Represents an instance of a Security Health Analytics custom module,
885    * including its full module name, display name, enablement state, and last
886    * updated time. You can create a custom module at the organization, folder, or
887    * project level. Custom modules that you create at the organization or folder
888    * level are inherited by the child folders and projects.
889    * </pre>
890    *
891    * Protobuf type {@code google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule}
892    */
893   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
894       implements
895       // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule)
896       com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleOrBuilder {
getDescriptor()897     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
898       return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto
899           .internal_static_google_cloud_securitycenter_v1_SecurityHealthAnalyticsCustomModule_descriptor;
900     }
901 
902     @java.lang.Override
903     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()904         internalGetFieldAccessorTable() {
905       return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto
906           .internal_static_google_cloud_securitycenter_v1_SecurityHealthAnalyticsCustomModule_fieldAccessorTable
907           .ensureFieldAccessorsInitialized(
908               com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.class,
909               com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.Builder.class);
910     }
911 
912     // Construct using
913     // com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.newBuilder()
Builder()914     private Builder() {}
915 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)916     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
917       super(parent);
918     }
919 
920     @java.lang.Override
clear()921     public Builder clear() {
922       super.clear();
923       bitField0_ = 0;
924       name_ = "";
925       displayName_ = "";
926       enablementState_ = 0;
927       updateTime_ = null;
928       if (updateTimeBuilder_ != null) {
929         updateTimeBuilder_.dispose();
930         updateTimeBuilder_ = null;
931       }
932       lastEditor_ = "";
933       ancestorModule_ = "";
934       customConfig_ = null;
935       if (customConfigBuilder_ != null) {
936         customConfigBuilder_.dispose();
937         customConfigBuilder_ = null;
938       }
939       return this;
940     }
941 
942     @java.lang.Override
getDescriptorForType()943     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
944       return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto
945           .internal_static_google_cloud_securitycenter_v1_SecurityHealthAnalyticsCustomModule_descriptor;
946     }
947 
948     @java.lang.Override
949     public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
getDefaultInstanceForType()950         getDefaultInstanceForType() {
951       return com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
952           .getDefaultInstance();
953     }
954 
955     @java.lang.Override
build()956     public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule build() {
957       com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule result =
958           buildPartial();
959       if (!result.isInitialized()) {
960         throw newUninitializedMessageException(result);
961       }
962       return result;
963     }
964 
965     @java.lang.Override
buildPartial()966     public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule buildPartial() {
967       com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule result =
968           new com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule(this);
969       if (bitField0_ != 0) {
970         buildPartial0(result);
971       }
972       onBuilt();
973       return result;
974     }
975 
buildPartial0( com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule result)976     private void buildPartial0(
977         com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule result) {
978       int from_bitField0_ = bitField0_;
979       if (((from_bitField0_ & 0x00000001) != 0)) {
980         result.name_ = name_;
981       }
982       if (((from_bitField0_ & 0x00000002) != 0)) {
983         result.displayName_ = displayName_;
984       }
985       if (((from_bitField0_ & 0x00000004) != 0)) {
986         result.enablementState_ = enablementState_;
987       }
988       if (((from_bitField0_ & 0x00000008) != 0)) {
989         result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
990       }
991       if (((from_bitField0_ & 0x00000010) != 0)) {
992         result.lastEditor_ = lastEditor_;
993       }
994       if (((from_bitField0_ & 0x00000020) != 0)) {
995         result.ancestorModule_ = ancestorModule_;
996       }
997       if (((from_bitField0_ & 0x00000040) != 0)) {
998         result.customConfig_ =
999             customConfigBuilder_ == null ? customConfig_ : customConfigBuilder_.build();
1000       }
1001     }
1002 
1003     @java.lang.Override
clone()1004     public Builder clone() {
1005       return super.clone();
1006     }
1007 
1008     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1009     public Builder setField(
1010         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1011       return super.setField(field, value);
1012     }
1013 
1014     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1015     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1016       return super.clearField(field);
1017     }
1018 
1019     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1020     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1021       return super.clearOneof(oneof);
1022     }
1023 
1024     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1025     public Builder setRepeatedField(
1026         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1027       return super.setRepeatedField(field, index, value);
1028     }
1029 
1030     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1031     public Builder addRepeatedField(
1032         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1033       return super.addRepeatedField(field, value);
1034     }
1035 
1036     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1037     public Builder mergeFrom(com.google.protobuf.Message other) {
1038       if (other instanceof com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) {
1039         return mergeFrom(
1040             (com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) other);
1041       } else {
1042         super.mergeFrom(other);
1043         return this;
1044       }
1045     }
1046 
mergeFrom( com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule other)1047     public Builder mergeFrom(
1048         com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule other) {
1049       if (other
1050           == com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
1051               .getDefaultInstance()) return this;
1052       if (!other.getName().isEmpty()) {
1053         name_ = other.name_;
1054         bitField0_ |= 0x00000001;
1055         onChanged();
1056       }
1057       if (!other.getDisplayName().isEmpty()) {
1058         displayName_ = other.displayName_;
1059         bitField0_ |= 0x00000002;
1060         onChanged();
1061       }
1062       if (other.enablementState_ != 0) {
1063         setEnablementStateValue(other.getEnablementStateValue());
1064       }
1065       if (other.hasUpdateTime()) {
1066         mergeUpdateTime(other.getUpdateTime());
1067       }
1068       if (!other.getLastEditor().isEmpty()) {
1069         lastEditor_ = other.lastEditor_;
1070         bitField0_ |= 0x00000010;
1071         onChanged();
1072       }
1073       if (!other.getAncestorModule().isEmpty()) {
1074         ancestorModule_ = other.ancestorModule_;
1075         bitField0_ |= 0x00000020;
1076         onChanged();
1077       }
1078       if (other.hasCustomConfig()) {
1079         mergeCustomConfig(other.getCustomConfig());
1080       }
1081       this.mergeUnknownFields(other.getUnknownFields());
1082       onChanged();
1083       return this;
1084     }
1085 
1086     @java.lang.Override
isInitialized()1087     public final boolean isInitialized() {
1088       return true;
1089     }
1090 
1091     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1092     public Builder mergeFrom(
1093         com.google.protobuf.CodedInputStream input,
1094         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1095         throws java.io.IOException {
1096       if (extensionRegistry == null) {
1097         throw new java.lang.NullPointerException();
1098       }
1099       try {
1100         boolean done = false;
1101         while (!done) {
1102           int tag = input.readTag();
1103           switch (tag) {
1104             case 0:
1105               done = true;
1106               break;
1107             case 10:
1108               {
1109                 name_ = input.readStringRequireUtf8();
1110                 bitField0_ |= 0x00000001;
1111                 break;
1112               } // case 10
1113             case 18:
1114               {
1115                 displayName_ = input.readStringRequireUtf8();
1116                 bitField0_ |= 0x00000002;
1117                 break;
1118               } // case 18
1119             case 32:
1120               {
1121                 enablementState_ = input.readEnum();
1122                 bitField0_ |= 0x00000004;
1123                 break;
1124               } // case 32
1125             case 42:
1126               {
1127                 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
1128                 bitField0_ |= 0x00000008;
1129                 break;
1130               } // case 42
1131             case 50:
1132               {
1133                 lastEditor_ = input.readStringRequireUtf8();
1134                 bitField0_ |= 0x00000010;
1135                 break;
1136               } // case 50
1137             case 58:
1138               {
1139                 ancestorModule_ = input.readStringRequireUtf8();
1140                 bitField0_ |= 0x00000020;
1141                 break;
1142               } // case 58
1143             case 66:
1144               {
1145                 input.readMessage(getCustomConfigFieldBuilder().getBuilder(), extensionRegistry);
1146                 bitField0_ |= 0x00000040;
1147                 break;
1148               } // case 66
1149             default:
1150               {
1151                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1152                   done = true; // was an endgroup tag
1153                 }
1154                 break;
1155               } // default:
1156           } // switch (tag)
1157         } // while (!done)
1158       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1159         throw e.unwrapIOException();
1160       } finally {
1161         onChanged();
1162       } // finally
1163       return this;
1164     }
1165 
1166     private int bitField0_;
1167 
1168     private java.lang.Object name_ = "";
1169     /**
1170      *
1171      *
1172      * <pre>
1173      * Immutable. The resource name of the custom module.
1174      * Its format is
1175      * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
1176      * or
1177      * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
1178      * or
1179      * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
1180      * The id {customModule} is server-generated and is not user settable.
1181      * It will be a numeric id containing 1-20 digits.
1182      * </pre>
1183      *
1184      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1185      *
1186      * @return The name.
1187      */
getName()1188     public java.lang.String getName() {
1189       java.lang.Object ref = name_;
1190       if (!(ref instanceof java.lang.String)) {
1191         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1192         java.lang.String s = bs.toStringUtf8();
1193         name_ = s;
1194         return s;
1195       } else {
1196         return (java.lang.String) ref;
1197       }
1198     }
1199     /**
1200      *
1201      *
1202      * <pre>
1203      * Immutable. The resource name of the custom module.
1204      * Its format is
1205      * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
1206      * or
1207      * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
1208      * or
1209      * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
1210      * The id {customModule} is server-generated and is not user settable.
1211      * It will be a numeric id containing 1-20 digits.
1212      * </pre>
1213      *
1214      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1215      *
1216      * @return The bytes for name.
1217      */
getNameBytes()1218     public com.google.protobuf.ByteString getNameBytes() {
1219       java.lang.Object ref = name_;
1220       if (ref instanceof String) {
1221         com.google.protobuf.ByteString b =
1222             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1223         name_ = b;
1224         return b;
1225       } else {
1226         return (com.google.protobuf.ByteString) ref;
1227       }
1228     }
1229     /**
1230      *
1231      *
1232      * <pre>
1233      * Immutable. The resource name of the custom module.
1234      * Its format is
1235      * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
1236      * or
1237      * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
1238      * or
1239      * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
1240      * The id {customModule} is server-generated and is not user settable.
1241      * It will be a numeric id containing 1-20 digits.
1242      * </pre>
1243      *
1244      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1245      *
1246      * @param value The name to set.
1247      * @return This builder for chaining.
1248      */
setName(java.lang.String value)1249     public Builder setName(java.lang.String value) {
1250       if (value == null) {
1251         throw new NullPointerException();
1252       }
1253       name_ = value;
1254       bitField0_ |= 0x00000001;
1255       onChanged();
1256       return this;
1257     }
1258     /**
1259      *
1260      *
1261      * <pre>
1262      * Immutable. The resource name of the custom module.
1263      * Its format is
1264      * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
1265      * or
1266      * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
1267      * or
1268      * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
1269      * The id {customModule} is server-generated and is not user settable.
1270      * It will be a numeric id containing 1-20 digits.
1271      * </pre>
1272      *
1273      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1274      *
1275      * @return This builder for chaining.
1276      */
clearName()1277     public Builder clearName() {
1278       name_ = getDefaultInstance().getName();
1279       bitField0_ = (bitField0_ & ~0x00000001);
1280       onChanged();
1281       return this;
1282     }
1283     /**
1284      *
1285      *
1286      * <pre>
1287      * Immutable. The resource name of the custom module.
1288      * Its format is
1289      * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
1290      * or
1291      * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
1292      * or
1293      * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
1294      * The id {customModule} is server-generated and is not user settable.
1295      * It will be a numeric id containing 1-20 digits.
1296      * </pre>
1297      *
1298      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1299      *
1300      * @param value The bytes for name to set.
1301      * @return This builder for chaining.
1302      */
setNameBytes(com.google.protobuf.ByteString value)1303     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1304       if (value == null) {
1305         throw new NullPointerException();
1306       }
1307       checkByteStringIsUtf8(value);
1308       name_ = value;
1309       bitField0_ |= 0x00000001;
1310       onChanged();
1311       return this;
1312     }
1313 
1314     private java.lang.Object displayName_ = "";
1315     /**
1316      *
1317      *
1318      * <pre>
1319      * The display name of the Security Health Analytics custom module. This
1320      * display name becomes the finding category for all findings that are
1321      * returned by this custom module. The display name must be between 1 and
1322      * 128 characters, start with a lowercase letter, and contain alphanumeric
1323      * characters or underscores only.
1324      * </pre>
1325      *
1326      * <code>string display_name = 2;</code>
1327      *
1328      * @return The displayName.
1329      */
getDisplayName()1330     public java.lang.String getDisplayName() {
1331       java.lang.Object ref = displayName_;
1332       if (!(ref instanceof java.lang.String)) {
1333         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1334         java.lang.String s = bs.toStringUtf8();
1335         displayName_ = s;
1336         return s;
1337       } else {
1338         return (java.lang.String) ref;
1339       }
1340     }
1341     /**
1342      *
1343      *
1344      * <pre>
1345      * The display name of the Security Health Analytics custom module. This
1346      * display name becomes the finding category for all findings that are
1347      * returned by this custom module. The display name must be between 1 and
1348      * 128 characters, start with a lowercase letter, and contain alphanumeric
1349      * characters or underscores only.
1350      * </pre>
1351      *
1352      * <code>string display_name = 2;</code>
1353      *
1354      * @return The bytes for displayName.
1355      */
getDisplayNameBytes()1356     public com.google.protobuf.ByteString getDisplayNameBytes() {
1357       java.lang.Object ref = displayName_;
1358       if (ref instanceof String) {
1359         com.google.protobuf.ByteString b =
1360             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1361         displayName_ = b;
1362         return b;
1363       } else {
1364         return (com.google.protobuf.ByteString) ref;
1365       }
1366     }
1367     /**
1368      *
1369      *
1370      * <pre>
1371      * The display name of the Security Health Analytics custom module. This
1372      * display name becomes the finding category for all findings that are
1373      * returned by this custom module. The display name must be between 1 and
1374      * 128 characters, start with a lowercase letter, and contain alphanumeric
1375      * characters or underscores only.
1376      * </pre>
1377      *
1378      * <code>string display_name = 2;</code>
1379      *
1380      * @param value The displayName to set.
1381      * @return This builder for chaining.
1382      */
setDisplayName(java.lang.String value)1383     public Builder setDisplayName(java.lang.String value) {
1384       if (value == null) {
1385         throw new NullPointerException();
1386       }
1387       displayName_ = value;
1388       bitField0_ |= 0x00000002;
1389       onChanged();
1390       return this;
1391     }
1392     /**
1393      *
1394      *
1395      * <pre>
1396      * The display name of the Security Health Analytics custom module. This
1397      * display name becomes the finding category for all findings that are
1398      * returned by this custom module. The display name must be between 1 and
1399      * 128 characters, start with a lowercase letter, and contain alphanumeric
1400      * characters or underscores only.
1401      * </pre>
1402      *
1403      * <code>string display_name = 2;</code>
1404      *
1405      * @return This builder for chaining.
1406      */
clearDisplayName()1407     public Builder clearDisplayName() {
1408       displayName_ = getDefaultInstance().getDisplayName();
1409       bitField0_ = (bitField0_ & ~0x00000002);
1410       onChanged();
1411       return this;
1412     }
1413     /**
1414      *
1415      *
1416      * <pre>
1417      * The display name of the Security Health Analytics custom module. This
1418      * display name becomes the finding category for all findings that are
1419      * returned by this custom module. The display name must be between 1 and
1420      * 128 characters, start with a lowercase letter, and contain alphanumeric
1421      * characters or underscores only.
1422      * </pre>
1423      *
1424      * <code>string display_name = 2;</code>
1425      *
1426      * @param value The bytes for displayName to set.
1427      * @return This builder for chaining.
1428      */
setDisplayNameBytes(com.google.protobuf.ByteString value)1429     public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
1430       if (value == null) {
1431         throw new NullPointerException();
1432       }
1433       checkByteStringIsUtf8(value);
1434       displayName_ = value;
1435       bitField0_ |= 0x00000002;
1436       onChanged();
1437       return this;
1438     }
1439 
1440     private int enablementState_ = 0;
1441     /**
1442      *
1443      *
1444      * <pre>
1445      * The enablement state of the custom module.
1446      * </pre>
1447      *
1448      * <code>
1449      * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
1450      * </code>
1451      *
1452      * @return The enum numeric value on the wire for enablementState.
1453      */
1454     @java.lang.Override
getEnablementStateValue()1455     public int getEnablementStateValue() {
1456       return enablementState_;
1457     }
1458     /**
1459      *
1460      *
1461      * <pre>
1462      * The enablement state of the custom module.
1463      * </pre>
1464      *
1465      * <code>
1466      * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
1467      * </code>
1468      *
1469      * @param value The enum numeric value on the wire for enablementState to set.
1470      * @return This builder for chaining.
1471      */
setEnablementStateValue(int value)1472     public Builder setEnablementStateValue(int value) {
1473       enablementState_ = value;
1474       bitField0_ |= 0x00000004;
1475       onChanged();
1476       return this;
1477     }
1478     /**
1479      *
1480      *
1481      * <pre>
1482      * The enablement state of the custom module.
1483      * </pre>
1484      *
1485      * <code>
1486      * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
1487      * </code>
1488      *
1489      * @return The enablementState.
1490      */
1491     @java.lang.Override
1492     public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
getEnablementState()1493         getEnablementState() {
1494       com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
1495           result =
1496               com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
1497                   .forNumber(enablementState_);
1498       return result == null
1499           ? com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
1500               .UNRECOGNIZED
1501           : result;
1502     }
1503     /**
1504      *
1505      *
1506      * <pre>
1507      * The enablement state of the custom module.
1508      * </pre>
1509      *
1510      * <code>
1511      * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
1512      * </code>
1513      *
1514      * @param value The enablementState to set.
1515      * @return This builder for chaining.
1516      */
setEnablementState( com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState value)1517     public Builder setEnablementState(
1518         com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState
1519             value) {
1520       if (value == null) {
1521         throw new NullPointerException();
1522       }
1523       bitField0_ |= 0x00000004;
1524       enablementState_ = value.getNumber();
1525       onChanged();
1526       return this;
1527     }
1528     /**
1529      *
1530      *
1531      * <pre>
1532      * The enablement state of the custom module.
1533      * </pre>
1534      *
1535      * <code>
1536      * .google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState enablement_state = 4;
1537      * </code>
1538      *
1539      * @return This builder for chaining.
1540      */
clearEnablementState()1541     public Builder clearEnablementState() {
1542       bitField0_ = (bitField0_ & ~0x00000004);
1543       enablementState_ = 0;
1544       onChanged();
1545       return this;
1546     }
1547 
1548     private com.google.protobuf.Timestamp updateTime_;
1549     private com.google.protobuf.SingleFieldBuilderV3<
1550             com.google.protobuf.Timestamp,
1551             com.google.protobuf.Timestamp.Builder,
1552             com.google.protobuf.TimestampOrBuilder>
1553         updateTimeBuilder_;
1554     /**
1555      *
1556      *
1557      * <pre>
1558      * Output only. The time at which the custom module was last updated.
1559      * </pre>
1560      *
1561      * <code>
1562      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1563      * </code>
1564      *
1565      * @return Whether the updateTime field is set.
1566      */
hasUpdateTime()1567     public boolean hasUpdateTime() {
1568       return ((bitField0_ & 0x00000008) != 0);
1569     }
1570     /**
1571      *
1572      *
1573      * <pre>
1574      * Output only. The time at which the custom module was last updated.
1575      * </pre>
1576      *
1577      * <code>
1578      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1579      * </code>
1580      *
1581      * @return The updateTime.
1582      */
getUpdateTime()1583     public com.google.protobuf.Timestamp getUpdateTime() {
1584       if (updateTimeBuilder_ == null) {
1585         return updateTime_ == null
1586             ? com.google.protobuf.Timestamp.getDefaultInstance()
1587             : updateTime_;
1588       } else {
1589         return updateTimeBuilder_.getMessage();
1590       }
1591     }
1592     /**
1593      *
1594      *
1595      * <pre>
1596      * Output only. The time at which the custom module was last updated.
1597      * </pre>
1598      *
1599      * <code>
1600      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1601      * </code>
1602      */
setUpdateTime(com.google.protobuf.Timestamp value)1603     public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
1604       if (updateTimeBuilder_ == null) {
1605         if (value == null) {
1606           throw new NullPointerException();
1607         }
1608         updateTime_ = value;
1609       } else {
1610         updateTimeBuilder_.setMessage(value);
1611       }
1612       bitField0_ |= 0x00000008;
1613       onChanged();
1614       return this;
1615     }
1616     /**
1617      *
1618      *
1619      * <pre>
1620      * Output only. The time at which the custom module was last updated.
1621      * </pre>
1622      *
1623      * <code>
1624      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1625      * </code>
1626      */
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)1627     public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
1628       if (updateTimeBuilder_ == null) {
1629         updateTime_ = builderForValue.build();
1630       } else {
1631         updateTimeBuilder_.setMessage(builderForValue.build());
1632       }
1633       bitField0_ |= 0x00000008;
1634       onChanged();
1635       return this;
1636     }
1637     /**
1638      *
1639      *
1640      * <pre>
1641      * Output only. The time at which the custom module was last updated.
1642      * </pre>
1643      *
1644      * <code>
1645      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1646      * </code>
1647      */
mergeUpdateTime(com.google.protobuf.Timestamp value)1648     public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
1649       if (updateTimeBuilder_ == null) {
1650         if (((bitField0_ & 0x00000008) != 0)
1651             && updateTime_ != null
1652             && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
1653           getUpdateTimeBuilder().mergeFrom(value);
1654         } else {
1655           updateTime_ = value;
1656         }
1657       } else {
1658         updateTimeBuilder_.mergeFrom(value);
1659       }
1660       bitField0_ |= 0x00000008;
1661       onChanged();
1662       return this;
1663     }
1664     /**
1665      *
1666      *
1667      * <pre>
1668      * Output only. The time at which the custom module was last updated.
1669      * </pre>
1670      *
1671      * <code>
1672      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1673      * </code>
1674      */
clearUpdateTime()1675     public Builder clearUpdateTime() {
1676       bitField0_ = (bitField0_ & ~0x00000008);
1677       updateTime_ = null;
1678       if (updateTimeBuilder_ != null) {
1679         updateTimeBuilder_.dispose();
1680         updateTimeBuilder_ = null;
1681       }
1682       onChanged();
1683       return this;
1684     }
1685     /**
1686      *
1687      *
1688      * <pre>
1689      * Output only. The time at which the custom module was last updated.
1690      * </pre>
1691      *
1692      * <code>
1693      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1694      * </code>
1695      */
getUpdateTimeBuilder()1696     public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
1697       bitField0_ |= 0x00000008;
1698       onChanged();
1699       return getUpdateTimeFieldBuilder().getBuilder();
1700     }
1701     /**
1702      *
1703      *
1704      * <pre>
1705      * Output only. The time at which the custom module was last updated.
1706      * </pre>
1707      *
1708      * <code>
1709      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1710      * </code>
1711      */
getUpdateTimeOrBuilder()1712     public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
1713       if (updateTimeBuilder_ != null) {
1714         return updateTimeBuilder_.getMessageOrBuilder();
1715       } else {
1716         return updateTime_ == null
1717             ? com.google.protobuf.Timestamp.getDefaultInstance()
1718             : updateTime_;
1719       }
1720     }
1721     /**
1722      *
1723      *
1724      * <pre>
1725      * Output only. The time at which the custom module was last updated.
1726      * </pre>
1727      *
1728      * <code>
1729      * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1730      * </code>
1731      */
1732     private com.google.protobuf.SingleFieldBuilderV3<
1733             com.google.protobuf.Timestamp,
1734             com.google.protobuf.Timestamp.Builder,
1735             com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder()1736         getUpdateTimeFieldBuilder() {
1737       if (updateTimeBuilder_ == null) {
1738         updateTimeBuilder_ =
1739             new com.google.protobuf.SingleFieldBuilderV3<
1740                 com.google.protobuf.Timestamp,
1741                 com.google.protobuf.Timestamp.Builder,
1742                 com.google.protobuf.TimestampOrBuilder>(
1743                 getUpdateTime(), getParentForChildren(), isClean());
1744         updateTime_ = null;
1745       }
1746       return updateTimeBuilder_;
1747     }
1748 
1749     private java.lang.Object lastEditor_ = "";
1750     /**
1751      *
1752      *
1753      * <pre>
1754      * Output only. The editor that last updated the custom module.
1755      * </pre>
1756      *
1757      * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1758      *
1759      * @return The lastEditor.
1760      */
getLastEditor()1761     public java.lang.String getLastEditor() {
1762       java.lang.Object ref = lastEditor_;
1763       if (!(ref instanceof java.lang.String)) {
1764         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1765         java.lang.String s = bs.toStringUtf8();
1766         lastEditor_ = s;
1767         return s;
1768       } else {
1769         return (java.lang.String) ref;
1770       }
1771     }
1772     /**
1773      *
1774      *
1775      * <pre>
1776      * Output only. The editor that last updated the custom module.
1777      * </pre>
1778      *
1779      * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1780      *
1781      * @return The bytes for lastEditor.
1782      */
getLastEditorBytes()1783     public com.google.protobuf.ByteString getLastEditorBytes() {
1784       java.lang.Object ref = lastEditor_;
1785       if (ref instanceof String) {
1786         com.google.protobuf.ByteString b =
1787             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1788         lastEditor_ = b;
1789         return b;
1790       } else {
1791         return (com.google.protobuf.ByteString) ref;
1792       }
1793     }
1794     /**
1795      *
1796      *
1797      * <pre>
1798      * Output only. The editor that last updated the custom module.
1799      * </pre>
1800      *
1801      * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1802      *
1803      * @param value The lastEditor to set.
1804      * @return This builder for chaining.
1805      */
setLastEditor(java.lang.String value)1806     public Builder setLastEditor(java.lang.String value) {
1807       if (value == null) {
1808         throw new NullPointerException();
1809       }
1810       lastEditor_ = value;
1811       bitField0_ |= 0x00000010;
1812       onChanged();
1813       return this;
1814     }
1815     /**
1816      *
1817      *
1818      * <pre>
1819      * Output only. The editor that last updated the custom module.
1820      * </pre>
1821      *
1822      * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1823      *
1824      * @return This builder for chaining.
1825      */
clearLastEditor()1826     public Builder clearLastEditor() {
1827       lastEditor_ = getDefaultInstance().getLastEditor();
1828       bitField0_ = (bitField0_ & ~0x00000010);
1829       onChanged();
1830       return this;
1831     }
1832     /**
1833      *
1834      *
1835      * <pre>
1836      * Output only. The editor that last updated the custom module.
1837      * </pre>
1838      *
1839      * <code>string last_editor = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1840      *
1841      * @param value The bytes for lastEditor to set.
1842      * @return This builder for chaining.
1843      */
setLastEditorBytes(com.google.protobuf.ByteString value)1844     public Builder setLastEditorBytes(com.google.protobuf.ByteString value) {
1845       if (value == null) {
1846         throw new NullPointerException();
1847       }
1848       checkByteStringIsUtf8(value);
1849       lastEditor_ = value;
1850       bitField0_ |= 0x00000010;
1851       onChanged();
1852       return this;
1853     }
1854 
1855     private java.lang.Object ancestorModule_ = "";
1856     /**
1857      *
1858      *
1859      * <pre>
1860      * Output only. If empty, indicates that the custom module was created in the
1861      * organization, folder, or project in which you are viewing the custom
1862      * module. Otherwise, `ancestor_module` specifies the organization or folder
1863      * from which the custom module is inherited.
1864      * </pre>
1865      *
1866      * <code>
1867      * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1868      * </code>
1869      *
1870      * @return The ancestorModule.
1871      */
getAncestorModule()1872     public java.lang.String getAncestorModule() {
1873       java.lang.Object ref = ancestorModule_;
1874       if (!(ref instanceof java.lang.String)) {
1875         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1876         java.lang.String s = bs.toStringUtf8();
1877         ancestorModule_ = s;
1878         return s;
1879       } else {
1880         return (java.lang.String) ref;
1881       }
1882     }
1883     /**
1884      *
1885      *
1886      * <pre>
1887      * Output only. If empty, indicates that the custom module was created in the
1888      * organization, folder, or project in which you are viewing the custom
1889      * module. Otherwise, `ancestor_module` specifies the organization or folder
1890      * from which the custom module is inherited.
1891      * </pre>
1892      *
1893      * <code>
1894      * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1895      * </code>
1896      *
1897      * @return The bytes for ancestorModule.
1898      */
getAncestorModuleBytes()1899     public com.google.protobuf.ByteString getAncestorModuleBytes() {
1900       java.lang.Object ref = ancestorModule_;
1901       if (ref instanceof String) {
1902         com.google.protobuf.ByteString b =
1903             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1904         ancestorModule_ = b;
1905         return b;
1906       } else {
1907         return (com.google.protobuf.ByteString) ref;
1908       }
1909     }
1910     /**
1911      *
1912      *
1913      * <pre>
1914      * Output only. If empty, indicates that the custom module was created in the
1915      * organization, folder, or project in which you are viewing the custom
1916      * module. Otherwise, `ancestor_module` specifies the organization or folder
1917      * from which the custom module is inherited.
1918      * </pre>
1919      *
1920      * <code>
1921      * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1922      * </code>
1923      *
1924      * @param value The ancestorModule to set.
1925      * @return This builder for chaining.
1926      */
setAncestorModule(java.lang.String value)1927     public Builder setAncestorModule(java.lang.String value) {
1928       if (value == null) {
1929         throw new NullPointerException();
1930       }
1931       ancestorModule_ = value;
1932       bitField0_ |= 0x00000020;
1933       onChanged();
1934       return this;
1935     }
1936     /**
1937      *
1938      *
1939      * <pre>
1940      * Output only. If empty, indicates that the custom module was created in the
1941      * organization, folder, or project in which you are viewing the custom
1942      * module. Otherwise, `ancestor_module` specifies the organization or folder
1943      * from which the custom module is inherited.
1944      * </pre>
1945      *
1946      * <code>
1947      * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1948      * </code>
1949      *
1950      * @return This builder for chaining.
1951      */
clearAncestorModule()1952     public Builder clearAncestorModule() {
1953       ancestorModule_ = getDefaultInstance().getAncestorModule();
1954       bitField0_ = (bitField0_ & ~0x00000020);
1955       onChanged();
1956       return this;
1957     }
1958     /**
1959      *
1960      *
1961      * <pre>
1962      * Output only. If empty, indicates that the custom module was created in the
1963      * organization, folder, or project in which you are viewing the custom
1964      * module. Otherwise, `ancestor_module` specifies the organization or folder
1965      * from which the custom module is inherited.
1966      * </pre>
1967      *
1968      * <code>
1969      * string ancestor_module = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1970      * </code>
1971      *
1972      * @param value The bytes for ancestorModule to set.
1973      * @return This builder for chaining.
1974      */
setAncestorModuleBytes(com.google.protobuf.ByteString value)1975     public Builder setAncestorModuleBytes(com.google.protobuf.ByteString value) {
1976       if (value == null) {
1977         throw new NullPointerException();
1978       }
1979       checkByteStringIsUtf8(value);
1980       ancestorModule_ = value;
1981       bitField0_ |= 0x00000020;
1982       onChanged();
1983       return this;
1984     }
1985 
1986     private com.google.cloud.securitycenter.v1.CustomConfig customConfig_;
1987     private com.google.protobuf.SingleFieldBuilderV3<
1988             com.google.cloud.securitycenter.v1.CustomConfig,
1989             com.google.cloud.securitycenter.v1.CustomConfig.Builder,
1990             com.google.cloud.securitycenter.v1.CustomConfigOrBuilder>
1991         customConfigBuilder_;
1992     /**
1993      *
1994      *
1995      * <pre>
1996      * The user specified custom configuration for the module.
1997      * </pre>
1998      *
1999      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2000      *
2001      * @return Whether the customConfig field is set.
2002      */
hasCustomConfig()2003     public boolean hasCustomConfig() {
2004       return ((bitField0_ & 0x00000040) != 0);
2005     }
2006     /**
2007      *
2008      *
2009      * <pre>
2010      * The user specified custom configuration for the module.
2011      * </pre>
2012      *
2013      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2014      *
2015      * @return The customConfig.
2016      */
getCustomConfig()2017     public com.google.cloud.securitycenter.v1.CustomConfig getCustomConfig() {
2018       if (customConfigBuilder_ == null) {
2019         return customConfig_ == null
2020             ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()
2021             : customConfig_;
2022       } else {
2023         return customConfigBuilder_.getMessage();
2024       }
2025     }
2026     /**
2027      *
2028      *
2029      * <pre>
2030      * The user specified custom configuration for the module.
2031      * </pre>
2032      *
2033      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2034      */
setCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value)2035     public Builder setCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value) {
2036       if (customConfigBuilder_ == null) {
2037         if (value == null) {
2038           throw new NullPointerException();
2039         }
2040         customConfig_ = value;
2041       } else {
2042         customConfigBuilder_.setMessage(value);
2043       }
2044       bitField0_ |= 0x00000040;
2045       onChanged();
2046       return this;
2047     }
2048     /**
2049      *
2050      *
2051      * <pre>
2052      * The user specified custom configuration for the module.
2053      * </pre>
2054      *
2055      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2056      */
setCustomConfig( com.google.cloud.securitycenter.v1.CustomConfig.Builder builderForValue)2057     public Builder setCustomConfig(
2058         com.google.cloud.securitycenter.v1.CustomConfig.Builder builderForValue) {
2059       if (customConfigBuilder_ == null) {
2060         customConfig_ = builderForValue.build();
2061       } else {
2062         customConfigBuilder_.setMessage(builderForValue.build());
2063       }
2064       bitField0_ |= 0x00000040;
2065       onChanged();
2066       return this;
2067     }
2068     /**
2069      *
2070      *
2071      * <pre>
2072      * The user specified custom configuration for the module.
2073      * </pre>
2074      *
2075      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2076      */
mergeCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value)2077     public Builder mergeCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value) {
2078       if (customConfigBuilder_ == null) {
2079         if (((bitField0_ & 0x00000040) != 0)
2080             && customConfig_ != null
2081             && customConfig_
2082                 != com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()) {
2083           getCustomConfigBuilder().mergeFrom(value);
2084         } else {
2085           customConfig_ = value;
2086         }
2087       } else {
2088         customConfigBuilder_.mergeFrom(value);
2089       }
2090       bitField0_ |= 0x00000040;
2091       onChanged();
2092       return this;
2093     }
2094     /**
2095      *
2096      *
2097      * <pre>
2098      * The user specified custom configuration for the module.
2099      * </pre>
2100      *
2101      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2102      */
clearCustomConfig()2103     public Builder clearCustomConfig() {
2104       bitField0_ = (bitField0_ & ~0x00000040);
2105       customConfig_ = null;
2106       if (customConfigBuilder_ != null) {
2107         customConfigBuilder_.dispose();
2108         customConfigBuilder_ = null;
2109       }
2110       onChanged();
2111       return this;
2112     }
2113     /**
2114      *
2115      *
2116      * <pre>
2117      * The user specified custom configuration for the module.
2118      * </pre>
2119      *
2120      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2121      */
getCustomConfigBuilder()2122     public com.google.cloud.securitycenter.v1.CustomConfig.Builder getCustomConfigBuilder() {
2123       bitField0_ |= 0x00000040;
2124       onChanged();
2125       return getCustomConfigFieldBuilder().getBuilder();
2126     }
2127     /**
2128      *
2129      *
2130      * <pre>
2131      * The user specified custom configuration for the module.
2132      * </pre>
2133      *
2134      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2135      */
getCustomConfigOrBuilder()2136     public com.google.cloud.securitycenter.v1.CustomConfigOrBuilder getCustomConfigOrBuilder() {
2137       if (customConfigBuilder_ != null) {
2138         return customConfigBuilder_.getMessageOrBuilder();
2139       } else {
2140         return customConfig_ == null
2141             ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()
2142             : customConfig_;
2143       }
2144     }
2145     /**
2146      *
2147      *
2148      * <pre>
2149      * The user specified custom configuration for the module.
2150      * </pre>
2151      *
2152      * <code>.google.cloud.securitycenter.v1.CustomConfig custom_config = 8;</code>
2153      */
2154     private com.google.protobuf.SingleFieldBuilderV3<
2155             com.google.cloud.securitycenter.v1.CustomConfig,
2156             com.google.cloud.securitycenter.v1.CustomConfig.Builder,
2157             com.google.cloud.securitycenter.v1.CustomConfigOrBuilder>
getCustomConfigFieldBuilder()2158         getCustomConfigFieldBuilder() {
2159       if (customConfigBuilder_ == null) {
2160         customConfigBuilder_ =
2161             new com.google.protobuf.SingleFieldBuilderV3<
2162                 com.google.cloud.securitycenter.v1.CustomConfig,
2163                 com.google.cloud.securitycenter.v1.CustomConfig.Builder,
2164                 com.google.cloud.securitycenter.v1.CustomConfigOrBuilder>(
2165                 getCustomConfig(), getParentForChildren(), isClean());
2166         customConfig_ = null;
2167       }
2168       return customConfigBuilder_;
2169     }
2170 
2171     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2172     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2173       return super.setUnknownFields(unknownFields);
2174     }
2175 
2176     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2177     public final Builder mergeUnknownFields(
2178         final com.google.protobuf.UnknownFieldSet unknownFields) {
2179       return super.mergeUnknownFields(unknownFields);
2180     }
2181 
2182     // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule)
2183   }
2184 
2185   // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule)
2186   private static final com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
2187       DEFAULT_INSTANCE;
2188 
2189   static {
2190     DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule();
2191   }
2192 
2193   public static com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
getDefaultInstance()2194       getDefaultInstance() {
2195     return DEFAULT_INSTANCE;
2196   }
2197 
2198   private static final com.google.protobuf.Parser<SecurityHealthAnalyticsCustomModule> PARSER =
2199       new com.google.protobuf.AbstractParser<SecurityHealthAnalyticsCustomModule>() {
2200         @java.lang.Override
2201         public SecurityHealthAnalyticsCustomModule parsePartialFrom(
2202             com.google.protobuf.CodedInputStream input,
2203             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2204             throws com.google.protobuf.InvalidProtocolBufferException {
2205           Builder builder = newBuilder();
2206           try {
2207             builder.mergeFrom(input, extensionRegistry);
2208           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2209             throw e.setUnfinishedMessage(builder.buildPartial());
2210           } catch (com.google.protobuf.UninitializedMessageException e) {
2211             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2212           } catch (java.io.IOException e) {
2213             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2214                 .setUnfinishedMessage(builder.buildPartial());
2215           }
2216           return builder.buildPartial();
2217         }
2218       };
2219 
parser()2220   public static com.google.protobuf.Parser<SecurityHealthAnalyticsCustomModule> parser() {
2221     return PARSER;
2222   }
2223 
2224   @java.lang.Override
getParserForType()2225   public com.google.protobuf.Parser<SecurityHealthAnalyticsCustomModule> getParserForType() {
2226     return PARSER;
2227   }
2228 
2229   @java.lang.Override
2230   public com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule
getDefaultInstanceForType()2231       getDefaultInstanceForType() {
2232     return DEFAULT_INSTANCE;
2233   }
2234 }
2235