• 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/iam/v1/policy.proto
18 
19 package com.google.iam.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * One delta entry for AuditConfig. Each individual change (only one
26  * exempted_member in each entry) to a AuditConfig will be a separate entry.
27  * </pre>
28  *
29  * Protobuf type {@code google.iam.v1.AuditConfigDelta}
30  */
31 public final class AuditConfigDelta extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.iam.v1.AuditConfigDelta)
34     AuditConfigDeltaOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use AuditConfigDelta.newBuilder() to construct.
AuditConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private AuditConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
AuditConfigDelta()41   private AuditConfigDelta() {
42     action_ = 0;
43     service_ = "";
44     exemptedMember_ = "";
45     logType_ = "";
46   }
47 
48   @java.lang.Override
49   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)50   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
51     return new AuditConfigDelta();
52   }
53 
54   @java.lang.Override
getUnknownFields()55   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56     return this.unknownFields;
57   }
58 
getDescriptor()59   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
60     return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfigDelta_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.iam.v1.PolicyProto
67         .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.iam.v1.AuditConfigDelta.class,
70             com.google.iam.v1.AuditConfigDelta.Builder.class);
71   }
72 
73   /**
74    *
75    *
76    * <pre>
77    * The type of action performed on an audit configuration in a policy.
78    * </pre>
79    *
80    * Protobuf enum {@code google.iam.v1.AuditConfigDelta.Action}
81    */
82   public enum Action implements com.google.protobuf.ProtocolMessageEnum {
83     /**
84      *
85      *
86      * <pre>
87      * Unspecified.
88      * </pre>
89      *
90      * <code>ACTION_UNSPECIFIED = 0;</code>
91      */
92     ACTION_UNSPECIFIED(0),
93     /**
94      *
95      *
96      * <pre>
97      * Addition of an audit configuration.
98      * </pre>
99      *
100      * <code>ADD = 1;</code>
101      */
102     ADD(1),
103     /**
104      *
105      *
106      * <pre>
107      * Removal of an audit configuration.
108      * </pre>
109      *
110      * <code>REMOVE = 2;</code>
111      */
112     REMOVE(2),
113     UNRECOGNIZED(-1),
114     ;
115 
116     /**
117      *
118      *
119      * <pre>
120      * Unspecified.
121      * </pre>
122      *
123      * <code>ACTION_UNSPECIFIED = 0;</code>
124      */
125     public static final int ACTION_UNSPECIFIED_VALUE = 0;
126     /**
127      *
128      *
129      * <pre>
130      * Addition of an audit configuration.
131      * </pre>
132      *
133      * <code>ADD = 1;</code>
134      */
135     public static final int ADD_VALUE = 1;
136     /**
137      *
138      *
139      * <pre>
140      * Removal of an audit configuration.
141      * </pre>
142      *
143      * <code>REMOVE = 2;</code>
144      */
145     public static final int REMOVE_VALUE = 2;
146 
getNumber()147     public final int getNumber() {
148       if (this == UNRECOGNIZED) {
149         throw new java.lang.IllegalArgumentException(
150             "Can't get the number of an unknown enum value.");
151       }
152       return value;
153     }
154 
155     /**
156      * @param value The numeric wire value of the corresponding enum entry.
157      * @return The enum associated with the given numeric wire value.
158      * @deprecated Use {@link #forNumber(int)} instead.
159      */
160     @java.lang.Deprecated
valueOf(int value)161     public static Action valueOf(int value) {
162       return forNumber(value);
163     }
164 
165     /**
166      * @param value The numeric wire value of the corresponding enum entry.
167      * @return The enum associated with the given numeric wire value.
168      */
forNumber(int value)169     public static Action forNumber(int value) {
170       switch (value) {
171         case 0:
172           return ACTION_UNSPECIFIED;
173         case 1:
174           return ADD;
175         case 2:
176           return REMOVE;
177         default:
178           return null;
179       }
180     }
181 
internalGetValueMap()182     public static com.google.protobuf.Internal.EnumLiteMap<Action> internalGetValueMap() {
183       return internalValueMap;
184     }
185 
186     private static final com.google.protobuf.Internal.EnumLiteMap<Action> internalValueMap =
187         new com.google.protobuf.Internal.EnumLiteMap<Action>() {
188           public Action findValueByNumber(int number) {
189             return Action.forNumber(number);
190           }
191         };
192 
getValueDescriptor()193     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
194       if (this == UNRECOGNIZED) {
195         throw new java.lang.IllegalStateException(
196             "Can't get the descriptor of an unrecognized enum value.");
197       }
198       return getDescriptor().getValues().get(ordinal());
199     }
200 
getDescriptorForType()201     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
202       return getDescriptor();
203     }
204 
getDescriptor()205     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
206       return com.google.iam.v1.AuditConfigDelta.getDescriptor().getEnumTypes().get(0);
207     }
208 
209     private static final Action[] VALUES = values();
210 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)211     public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
212       if (desc.getType() != getDescriptor()) {
213         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
214       }
215       if (desc.getIndex() == -1) {
216         return UNRECOGNIZED;
217       }
218       return VALUES[desc.getIndex()];
219     }
220 
221     private final int value;
222 
Action(int value)223     private Action(int value) {
224       this.value = value;
225     }
226 
227     // @@protoc_insertion_point(enum_scope:google.iam.v1.AuditConfigDelta.Action)
228   }
229 
230   public static final int ACTION_FIELD_NUMBER = 1;
231   private int action_ = 0;
232   /**
233    *
234    *
235    * <pre>
236    * The action that was performed on an audit configuration in a policy.
237    * Required
238    * </pre>
239    *
240    * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
241    *
242    * @return The enum numeric value on the wire for action.
243    */
244   @java.lang.Override
getActionValue()245   public int getActionValue() {
246     return action_;
247   }
248   /**
249    *
250    *
251    * <pre>
252    * The action that was performed on an audit configuration in a policy.
253    * Required
254    * </pre>
255    *
256    * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
257    *
258    * @return The action.
259    */
260   @java.lang.Override
getAction()261   public com.google.iam.v1.AuditConfigDelta.Action getAction() {
262     com.google.iam.v1.AuditConfigDelta.Action result =
263         com.google.iam.v1.AuditConfigDelta.Action.forNumber(action_);
264     return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result;
265   }
266 
267   public static final int SERVICE_FIELD_NUMBER = 2;
268 
269   @SuppressWarnings("serial")
270   private volatile java.lang.Object service_ = "";
271   /**
272    *
273    *
274    * <pre>
275    * Specifies a service that was configured for Cloud Audit Logging.
276    * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
277    * `allServices` is a special value that covers all services.
278    * Required
279    * </pre>
280    *
281    * <code>string service = 2;</code>
282    *
283    * @return The service.
284    */
285   @java.lang.Override
getService()286   public java.lang.String getService() {
287     java.lang.Object ref = service_;
288     if (ref instanceof java.lang.String) {
289       return (java.lang.String) ref;
290     } else {
291       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
292       java.lang.String s = bs.toStringUtf8();
293       service_ = s;
294       return s;
295     }
296   }
297   /**
298    *
299    *
300    * <pre>
301    * Specifies a service that was configured for Cloud Audit Logging.
302    * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
303    * `allServices` is a special value that covers all services.
304    * Required
305    * </pre>
306    *
307    * <code>string service = 2;</code>
308    *
309    * @return The bytes for service.
310    */
311   @java.lang.Override
getServiceBytes()312   public com.google.protobuf.ByteString getServiceBytes() {
313     java.lang.Object ref = service_;
314     if (ref instanceof java.lang.String) {
315       com.google.protobuf.ByteString b =
316           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
317       service_ = b;
318       return b;
319     } else {
320       return (com.google.protobuf.ByteString) ref;
321     }
322   }
323 
324   public static final int EXEMPTED_MEMBER_FIELD_NUMBER = 3;
325 
326   @SuppressWarnings("serial")
327   private volatile java.lang.Object exemptedMember_ = "";
328   /**
329    *
330    *
331    * <pre>
332    * A single identity that is exempted from "data access" audit
333    * logging for the `service` specified above.
334    * Follows the same format of Binding.members.
335    * </pre>
336    *
337    * <code>string exempted_member = 3;</code>
338    *
339    * @return The exemptedMember.
340    */
341   @java.lang.Override
getExemptedMember()342   public java.lang.String getExemptedMember() {
343     java.lang.Object ref = exemptedMember_;
344     if (ref instanceof java.lang.String) {
345       return (java.lang.String) ref;
346     } else {
347       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
348       java.lang.String s = bs.toStringUtf8();
349       exemptedMember_ = s;
350       return s;
351     }
352   }
353   /**
354    *
355    *
356    * <pre>
357    * A single identity that is exempted from "data access" audit
358    * logging for the `service` specified above.
359    * Follows the same format of Binding.members.
360    * </pre>
361    *
362    * <code>string exempted_member = 3;</code>
363    *
364    * @return The bytes for exemptedMember.
365    */
366   @java.lang.Override
getExemptedMemberBytes()367   public com.google.protobuf.ByteString getExemptedMemberBytes() {
368     java.lang.Object ref = exemptedMember_;
369     if (ref instanceof java.lang.String) {
370       com.google.protobuf.ByteString b =
371           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
372       exemptedMember_ = b;
373       return b;
374     } else {
375       return (com.google.protobuf.ByteString) ref;
376     }
377   }
378 
379   public static final int LOG_TYPE_FIELD_NUMBER = 4;
380 
381   @SuppressWarnings("serial")
382   private volatile java.lang.Object logType_ = "";
383   /**
384    *
385    *
386    * <pre>
387    * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
388    * enabled, and cannot be configured.
389    * Required
390    * </pre>
391    *
392    * <code>string log_type = 4;</code>
393    *
394    * @return The logType.
395    */
396   @java.lang.Override
getLogType()397   public java.lang.String getLogType() {
398     java.lang.Object ref = logType_;
399     if (ref instanceof java.lang.String) {
400       return (java.lang.String) ref;
401     } else {
402       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
403       java.lang.String s = bs.toStringUtf8();
404       logType_ = s;
405       return s;
406     }
407   }
408   /**
409    *
410    *
411    * <pre>
412    * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
413    * enabled, and cannot be configured.
414    * Required
415    * </pre>
416    *
417    * <code>string log_type = 4;</code>
418    *
419    * @return The bytes for logType.
420    */
421   @java.lang.Override
getLogTypeBytes()422   public com.google.protobuf.ByteString getLogTypeBytes() {
423     java.lang.Object ref = logType_;
424     if (ref instanceof java.lang.String) {
425       com.google.protobuf.ByteString b =
426           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
427       logType_ = b;
428       return b;
429     } else {
430       return (com.google.protobuf.ByteString) ref;
431     }
432   }
433 
434   private byte memoizedIsInitialized = -1;
435 
436   @java.lang.Override
isInitialized()437   public final boolean isInitialized() {
438     byte isInitialized = memoizedIsInitialized;
439     if (isInitialized == 1) return true;
440     if (isInitialized == 0) return false;
441 
442     memoizedIsInitialized = 1;
443     return true;
444   }
445 
446   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)447   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
448     if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) {
449       output.writeEnum(1, action_);
450     }
451     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
452       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, service_);
453     }
454     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exemptedMember_)) {
455       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, exemptedMember_);
456     }
457     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) {
458       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, logType_);
459     }
460     getUnknownFields().writeTo(output);
461   }
462 
463   @java.lang.Override
getSerializedSize()464   public int getSerializedSize() {
465     int size = memoizedSize;
466     if (size != -1) return size;
467 
468     size = 0;
469     if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) {
470       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_);
471     }
472     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
473       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, service_);
474     }
475     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exemptedMember_)) {
476       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, exemptedMember_);
477     }
478     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) {
479       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, logType_);
480     }
481     size += getUnknownFields().getSerializedSize();
482     memoizedSize = size;
483     return size;
484   }
485 
486   @java.lang.Override
equals(final java.lang.Object obj)487   public boolean equals(final java.lang.Object obj) {
488     if (obj == this) {
489       return true;
490     }
491     if (!(obj instanceof com.google.iam.v1.AuditConfigDelta)) {
492       return super.equals(obj);
493     }
494     com.google.iam.v1.AuditConfigDelta other = (com.google.iam.v1.AuditConfigDelta) obj;
495 
496     if (action_ != other.action_) return false;
497     if (!getService().equals(other.getService())) return false;
498     if (!getExemptedMember().equals(other.getExemptedMember())) return false;
499     if (!getLogType().equals(other.getLogType())) return false;
500     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
501     return true;
502   }
503 
504   @java.lang.Override
hashCode()505   public int hashCode() {
506     if (memoizedHashCode != 0) {
507       return memoizedHashCode;
508     }
509     int hash = 41;
510     hash = (19 * hash) + getDescriptor().hashCode();
511     hash = (37 * hash) + ACTION_FIELD_NUMBER;
512     hash = (53 * hash) + action_;
513     hash = (37 * hash) + SERVICE_FIELD_NUMBER;
514     hash = (53 * hash) + getService().hashCode();
515     hash = (37 * hash) + EXEMPTED_MEMBER_FIELD_NUMBER;
516     hash = (53 * hash) + getExemptedMember().hashCode();
517     hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER;
518     hash = (53 * hash) + getLogType().hashCode();
519     hash = (29 * hash) + getUnknownFields().hashCode();
520     memoizedHashCode = hash;
521     return hash;
522   }
523 
parseFrom(java.nio.ByteBuffer data)524   public static com.google.iam.v1.AuditConfigDelta parseFrom(java.nio.ByteBuffer data)
525       throws com.google.protobuf.InvalidProtocolBufferException {
526     return PARSER.parseFrom(data);
527   }
528 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)529   public static com.google.iam.v1.AuditConfigDelta parseFrom(
530       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
531       throws com.google.protobuf.InvalidProtocolBufferException {
532     return PARSER.parseFrom(data, extensionRegistry);
533   }
534 
parseFrom(com.google.protobuf.ByteString data)535   public static com.google.iam.v1.AuditConfigDelta parseFrom(com.google.protobuf.ByteString data)
536       throws com.google.protobuf.InvalidProtocolBufferException {
537     return PARSER.parseFrom(data);
538   }
539 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)540   public static com.google.iam.v1.AuditConfigDelta parseFrom(
541       com.google.protobuf.ByteString data,
542       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
543       throws com.google.protobuf.InvalidProtocolBufferException {
544     return PARSER.parseFrom(data, extensionRegistry);
545   }
546 
parseFrom(byte[] data)547   public static com.google.iam.v1.AuditConfigDelta parseFrom(byte[] data)
548       throws com.google.protobuf.InvalidProtocolBufferException {
549     return PARSER.parseFrom(data);
550   }
551 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)552   public static com.google.iam.v1.AuditConfigDelta parseFrom(
553       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
554       throws com.google.protobuf.InvalidProtocolBufferException {
555     return PARSER.parseFrom(data, extensionRegistry);
556   }
557 
parseFrom(java.io.InputStream input)558   public static com.google.iam.v1.AuditConfigDelta parseFrom(java.io.InputStream input)
559       throws java.io.IOException {
560     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
561   }
562 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)563   public static com.google.iam.v1.AuditConfigDelta parseFrom(
564       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
565       throws java.io.IOException {
566     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
567         PARSER, input, extensionRegistry);
568   }
569 
parseDelimitedFrom(java.io.InputStream input)570   public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom(java.io.InputStream input)
571       throws java.io.IOException {
572     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
573   }
574 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)575   public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom(
576       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
577       throws java.io.IOException {
578     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
579         PARSER, input, extensionRegistry);
580   }
581 
parseFrom( com.google.protobuf.CodedInputStream input)582   public static com.google.iam.v1.AuditConfigDelta parseFrom(
583       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
584     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
585   }
586 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)587   public static com.google.iam.v1.AuditConfigDelta parseFrom(
588       com.google.protobuf.CodedInputStream input,
589       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
590       throws java.io.IOException {
591     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
592         PARSER, input, extensionRegistry);
593   }
594 
595   @java.lang.Override
newBuilderForType()596   public Builder newBuilderForType() {
597     return newBuilder();
598   }
599 
newBuilder()600   public static Builder newBuilder() {
601     return DEFAULT_INSTANCE.toBuilder();
602   }
603 
newBuilder(com.google.iam.v1.AuditConfigDelta prototype)604   public static Builder newBuilder(com.google.iam.v1.AuditConfigDelta prototype) {
605     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
606   }
607 
608   @java.lang.Override
toBuilder()609   public Builder toBuilder() {
610     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
611   }
612 
613   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)614   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
615     Builder builder = new Builder(parent);
616     return builder;
617   }
618   /**
619    *
620    *
621    * <pre>
622    * One delta entry for AuditConfig. Each individual change (only one
623    * exempted_member in each entry) to a AuditConfig will be a separate entry.
624    * </pre>
625    *
626    * Protobuf type {@code google.iam.v1.AuditConfigDelta}
627    */
628   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
629       implements
630       // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditConfigDelta)
631       com.google.iam.v1.AuditConfigDeltaOrBuilder {
getDescriptor()632     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
633       return com.google.iam.v1.PolicyProto
634           .internal_static_google_iam_v1_AuditConfigDelta_descriptor;
635     }
636 
637     @java.lang.Override
638     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()639         internalGetFieldAccessorTable() {
640       return com.google.iam.v1.PolicyProto
641           .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable
642           .ensureFieldAccessorsInitialized(
643               com.google.iam.v1.AuditConfigDelta.class,
644               com.google.iam.v1.AuditConfigDelta.Builder.class);
645     }
646 
647     // Construct using com.google.iam.v1.AuditConfigDelta.newBuilder()
Builder()648     private Builder() {}
649 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)650     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
651       super(parent);
652     }
653 
654     @java.lang.Override
clear()655     public Builder clear() {
656       super.clear();
657       bitField0_ = 0;
658       action_ = 0;
659       service_ = "";
660       exemptedMember_ = "";
661       logType_ = "";
662       return this;
663     }
664 
665     @java.lang.Override
getDescriptorForType()666     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
667       return com.google.iam.v1.PolicyProto
668           .internal_static_google_iam_v1_AuditConfigDelta_descriptor;
669     }
670 
671     @java.lang.Override
getDefaultInstanceForType()672     public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() {
673       return com.google.iam.v1.AuditConfigDelta.getDefaultInstance();
674     }
675 
676     @java.lang.Override
build()677     public com.google.iam.v1.AuditConfigDelta build() {
678       com.google.iam.v1.AuditConfigDelta result = buildPartial();
679       if (!result.isInitialized()) {
680         throw newUninitializedMessageException(result);
681       }
682       return result;
683     }
684 
685     @java.lang.Override
buildPartial()686     public com.google.iam.v1.AuditConfigDelta buildPartial() {
687       com.google.iam.v1.AuditConfigDelta result = new com.google.iam.v1.AuditConfigDelta(this);
688       if (bitField0_ != 0) {
689         buildPartial0(result);
690       }
691       onBuilt();
692       return result;
693     }
694 
buildPartial0(com.google.iam.v1.AuditConfigDelta result)695     private void buildPartial0(com.google.iam.v1.AuditConfigDelta result) {
696       int from_bitField0_ = bitField0_;
697       if (((from_bitField0_ & 0x00000001) != 0)) {
698         result.action_ = action_;
699       }
700       if (((from_bitField0_ & 0x00000002) != 0)) {
701         result.service_ = service_;
702       }
703       if (((from_bitField0_ & 0x00000004) != 0)) {
704         result.exemptedMember_ = exemptedMember_;
705       }
706       if (((from_bitField0_ & 0x00000008) != 0)) {
707         result.logType_ = logType_;
708       }
709     }
710 
711     @java.lang.Override
clone()712     public Builder clone() {
713       return super.clone();
714     }
715 
716     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)717     public Builder setField(
718         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
719       return super.setField(field, value);
720     }
721 
722     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)723     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
724       return super.clearField(field);
725     }
726 
727     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)728     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
729       return super.clearOneof(oneof);
730     }
731 
732     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)733     public Builder setRepeatedField(
734         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
735       return super.setRepeatedField(field, index, value);
736     }
737 
738     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)739     public Builder addRepeatedField(
740         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
741       return super.addRepeatedField(field, value);
742     }
743 
744     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)745     public Builder mergeFrom(com.google.protobuf.Message other) {
746       if (other instanceof com.google.iam.v1.AuditConfigDelta) {
747         return mergeFrom((com.google.iam.v1.AuditConfigDelta) other);
748       } else {
749         super.mergeFrom(other);
750         return this;
751       }
752     }
753 
mergeFrom(com.google.iam.v1.AuditConfigDelta other)754     public Builder mergeFrom(com.google.iam.v1.AuditConfigDelta other) {
755       if (other == com.google.iam.v1.AuditConfigDelta.getDefaultInstance()) return this;
756       if (other.action_ != 0) {
757         setActionValue(other.getActionValue());
758       }
759       if (!other.getService().isEmpty()) {
760         service_ = other.service_;
761         bitField0_ |= 0x00000002;
762         onChanged();
763       }
764       if (!other.getExemptedMember().isEmpty()) {
765         exemptedMember_ = other.exemptedMember_;
766         bitField0_ |= 0x00000004;
767         onChanged();
768       }
769       if (!other.getLogType().isEmpty()) {
770         logType_ = other.logType_;
771         bitField0_ |= 0x00000008;
772         onChanged();
773       }
774       this.mergeUnknownFields(other.getUnknownFields());
775       onChanged();
776       return this;
777     }
778 
779     @java.lang.Override
isInitialized()780     public final boolean isInitialized() {
781       return true;
782     }
783 
784     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)785     public Builder mergeFrom(
786         com.google.protobuf.CodedInputStream input,
787         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
788         throws java.io.IOException {
789       if (extensionRegistry == null) {
790         throw new java.lang.NullPointerException();
791       }
792       try {
793         boolean done = false;
794         while (!done) {
795           int tag = input.readTag();
796           switch (tag) {
797             case 0:
798               done = true;
799               break;
800             case 8:
801               {
802                 action_ = input.readEnum();
803                 bitField0_ |= 0x00000001;
804                 break;
805               } // case 8
806             case 18:
807               {
808                 service_ = input.readStringRequireUtf8();
809                 bitField0_ |= 0x00000002;
810                 break;
811               } // case 18
812             case 26:
813               {
814                 exemptedMember_ = input.readStringRequireUtf8();
815                 bitField0_ |= 0x00000004;
816                 break;
817               } // case 26
818             case 34:
819               {
820                 logType_ = input.readStringRequireUtf8();
821                 bitField0_ |= 0x00000008;
822                 break;
823               } // case 34
824             default:
825               {
826                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
827                   done = true; // was an endgroup tag
828                 }
829                 break;
830               } // default:
831           } // switch (tag)
832         } // while (!done)
833       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
834         throw e.unwrapIOException();
835       } finally {
836         onChanged();
837       } // finally
838       return this;
839     }
840 
841     private int bitField0_;
842 
843     private int action_ = 0;
844     /**
845      *
846      *
847      * <pre>
848      * The action that was performed on an audit configuration in a policy.
849      * Required
850      * </pre>
851      *
852      * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
853      *
854      * @return The enum numeric value on the wire for action.
855      */
856     @java.lang.Override
getActionValue()857     public int getActionValue() {
858       return action_;
859     }
860     /**
861      *
862      *
863      * <pre>
864      * The action that was performed on an audit configuration in a policy.
865      * Required
866      * </pre>
867      *
868      * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
869      *
870      * @param value The enum numeric value on the wire for action to set.
871      * @return This builder for chaining.
872      */
setActionValue(int value)873     public Builder setActionValue(int value) {
874       action_ = value;
875       bitField0_ |= 0x00000001;
876       onChanged();
877       return this;
878     }
879     /**
880      *
881      *
882      * <pre>
883      * The action that was performed on an audit configuration in a policy.
884      * Required
885      * </pre>
886      *
887      * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
888      *
889      * @return The action.
890      */
891     @java.lang.Override
getAction()892     public com.google.iam.v1.AuditConfigDelta.Action getAction() {
893       com.google.iam.v1.AuditConfigDelta.Action result =
894           com.google.iam.v1.AuditConfigDelta.Action.forNumber(action_);
895       return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result;
896     }
897     /**
898      *
899      *
900      * <pre>
901      * The action that was performed on an audit configuration in a policy.
902      * Required
903      * </pre>
904      *
905      * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
906      *
907      * @param value The action to set.
908      * @return This builder for chaining.
909      */
setAction(com.google.iam.v1.AuditConfigDelta.Action value)910     public Builder setAction(com.google.iam.v1.AuditConfigDelta.Action value) {
911       if (value == null) {
912         throw new NullPointerException();
913       }
914       bitField0_ |= 0x00000001;
915       action_ = value.getNumber();
916       onChanged();
917       return this;
918     }
919     /**
920      *
921      *
922      * <pre>
923      * The action that was performed on an audit configuration in a policy.
924      * Required
925      * </pre>
926      *
927      * <code>.google.iam.v1.AuditConfigDelta.Action action = 1;</code>
928      *
929      * @return This builder for chaining.
930      */
clearAction()931     public Builder clearAction() {
932       bitField0_ = (bitField0_ & ~0x00000001);
933       action_ = 0;
934       onChanged();
935       return this;
936     }
937 
938     private java.lang.Object service_ = "";
939     /**
940      *
941      *
942      * <pre>
943      * Specifies a service that was configured for Cloud Audit Logging.
944      * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
945      * `allServices` is a special value that covers all services.
946      * Required
947      * </pre>
948      *
949      * <code>string service = 2;</code>
950      *
951      * @return The service.
952      */
getService()953     public java.lang.String getService() {
954       java.lang.Object ref = service_;
955       if (!(ref instanceof java.lang.String)) {
956         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
957         java.lang.String s = bs.toStringUtf8();
958         service_ = s;
959         return s;
960       } else {
961         return (java.lang.String) ref;
962       }
963     }
964     /**
965      *
966      *
967      * <pre>
968      * Specifies a service that was configured for Cloud Audit Logging.
969      * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
970      * `allServices` is a special value that covers all services.
971      * Required
972      * </pre>
973      *
974      * <code>string service = 2;</code>
975      *
976      * @return The bytes for service.
977      */
getServiceBytes()978     public com.google.protobuf.ByteString getServiceBytes() {
979       java.lang.Object ref = service_;
980       if (ref instanceof String) {
981         com.google.protobuf.ByteString b =
982             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
983         service_ = b;
984         return b;
985       } else {
986         return (com.google.protobuf.ByteString) ref;
987       }
988     }
989     /**
990      *
991      *
992      * <pre>
993      * Specifies a service that was configured for Cloud Audit Logging.
994      * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
995      * `allServices` is a special value that covers all services.
996      * Required
997      * </pre>
998      *
999      * <code>string service = 2;</code>
1000      *
1001      * @param value The service to set.
1002      * @return This builder for chaining.
1003      */
setService(java.lang.String value)1004     public Builder setService(java.lang.String value) {
1005       if (value == null) {
1006         throw new NullPointerException();
1007       }
1008       service_ = value;
1009       bitField0_ |= 0x00000002;
1010       onChanged();
1011       return this;
1012     }
1013     /**
1014      *
1015      *
1016      * <pre>
1017      * Specifies a service that was configured for Cloud Audit Logging.
1018      * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1019      * `allServices` is a special value that covers all services.
1020      * Required
1021      * </pre>
1022      *
1023      * <code>string service = 2;</code>
1024      *
1025      * @return This builder for chaining.
1026      */
clearService()1027     public Builder clearService() {
1028       service_ = getDefaultInstance().getService();
1029       bitField0_ = (bitField0_ & ~0x00000002);
1030       onChanged();
1031       return this;
1032     }
1033     /**
1034      *
1035      *
1036      * <pre>
1037      * Specifies a service that was configured for Cloud Audit Logging.
1038      * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1039      * `allServices` is a special value that covers all services.
1040      * Required
1041      * </pre>
1042      *
1043      * <code>string service = 2;</code>
1044      *
1045      * @param value The bytes for service to set.
1046      * @return This builder for chaining.
1047      */
setServiceBytes(com.google.protobuf.ByteString value)1048     public Builder setServiceBytes(com.google.protobuf.ByteString value) {
1049       if (value == null) {
1050         throw new NullPointerException();
1051       }
1052       checkByteStringIsUtf8(value);
1053       service_ = value;
1054       bitField0_ |= 0x00000002;
1055       onChanged();
1056       return this;
1057     }
1058 
1059     private java.lang.Object exemptedMember_ = "";
1060     /**
1061      *
1062      *
1063      * <pre>
1064      * A single identity that is exempted from "data access" audit
1065      * logging for the `service` specified above.
1066      * Follows the same format of Binding.members.
1067      * </pre>
1068      *
1069      * <code>string exempted_member = 3;</code>
1070      *
1071      * @return The exemptedMember.
1072      */
getExemptedMember()1073     public java.lang.String getExemptedMember() {
1074       java.lang.Object ref = exemptedMember_;
1075       if (!(ref instanceof java.lang.String)) {
1076         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1077         java.lang.String s = bs.toStringUtf8();
1078         exemptedMember_ = s;
1079         return s;
1080       } else {
1081         return (java.lang.String) ref;
1082       }
1083     }
1084     /**
1085      *
1086      *
1087      * <pre>
1088      * A single identity that is exempted from "data access" audit
1089      * logging for the `service` specified above.
1090      * Follows the same format of Binding.members.
1091      * </pre>
1092      *
1093      * <code>string exempted_member = 3;</code>
1094      *
1095      * @return The bytes for exemptedMember.
1096      */
getExemptedMemberBytes()1097     public com.google.protobuf.ByteString getExemptedMemberBytes() {
1098       java.lang.Object ref = exemptedMember_;
1099       if (ref instanceof String) {
1100         com.google.protobuf.ByteString b =
1101             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1102         exemptedMember_ = b;
1103         return b;
1104       } else {
1105         return (com.google.protobuf.ByteString) ref;
1106       }
1107     }
1108     /**
1109      *
1110      *
1111      * <pre>
1112      * A single identity that is exempted from "data access" audit
1113      * logging for the `service` specified above.
1114      * Follows the same format of Binding.members.
1115      * </pre>
1116      *
1117      * <code>string exempted_member = 3;</code>
1118      *
1119      * @param value The exemptedMember to set.
1120      * @return This builder for chaining.
1121      */
setExemptedMember(java.lang.String value)1122     public Builder setExemptedMember(java.lang.String value) {
1123       if (value == null) {
1124         throw new NullPointerException();
1125       }
1126       exemptedMember_ = value;
1127       bitField0_ |= 0x00000004;
1128       onChanged();
1129       return this;
1130     }
1131     /**
1132      *
1133      *
1134      * <pre>
1135      * A single identity that is exempted from "data access" audit
1136      * logging for the `service` specified above.
1137      * Follows the same format of Binding.members.
1138      * </pre>
1139      *
1140      * <code>string exempted_member = 3;</code>
1141      *
1142      * @return This builder for chaining.
1143      */
clearExemptedMember()1144     public Builder clearExemptedMember() {
1145       exemptedMember_ = getDefaultInstance().getExemptedMember();
1146       bitField0_ = (bitField0_ & ~0x00000004);
1147       onChanged();
1148       return this;
1149     }
1150     /**
1151      *
1152      *
1153      * <pre>
1154      * A single identity that is exempted from "data access" audit
1155      * logging for the `service` specified above.
1156      * Follows the same format of Binding.members.
1157      * </pre>
1158      *
1159      * <code>string exempted_member = 3;</code>
1160      *
1161      * @param value The bytes for exemptedMember to set.
1162      * @return This builder for chaining.
1163      */
setExemptedMemberBytes(com.google.protobuf.ByteString value)1164     public Builder setExemptedMemberBytes(com.google.protobuf.ByteString value) {
1165       if (value == null) {
1166         throw new NullPointerException();
1167       }
1168       checkByteStringIsUtf8(value);
1169       exemptedMember_ = value;
1170       bitField0_ |= 0x00000004;
1171       onChanged();
1172       return this;
1173     }
1174 
1175     private java.lang.Object logType_ = "";
1176     /**
1177      *
1178      *
1179      * <pre>
1180      * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
1181      * enabled, and cannot be configured.
1182      * Required
1183      * </pre>
1184      *
1185      * <code>string log_type = 4;</code>
1186      *
1187      * @return The logType.
1188      */
getLogType()1189     public java.lang.String getLogType() {
1190       java.lang.Object ref = logType_;
1191       if (!(ref instanceof java.lang.String)) {
1192         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1193         java.lang.String s = bs.toStringUtf8();
1194         logType_ = s;
1195         return s;
1196       } else {
1197         return (java.lang.String) ref;
1198       }
1199     }
1200     /**
1201      *
1202      *
1203      * <pre>
1204      * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
1205      * enabled, and cannot be configured.
1206      * Required
1207      * </pre>
1208      *
1209      * <code>string log_type = 4;</code>
1210      *
1211      * @return The bytes for logType.
1212      */
getLogTypeBytes()1213     public com.google.protobuf.ByteString getLogTypeBytes() {
1214       java.lang.Object ref = logType_;
1215       if (ref instanceof String) {
1216         com.google.protobuf.ByteString b =
1217             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1218         logType_ = b;
1219         return b;
1220       } else {
1221         return (com.google.protobuf.ByteString) ref;
1222       }
1223     }
1224     /**
1225      *
1226      *
1227      * <pre>
1228      * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
1229      * enabled, and cannot be configured.
1230      * Required
1231      * </pre>
1232      *
1233      * <code>string log_type = 4;</code>
1234      *
1235      * @param value The logType to set.
1236      * @return This builder for chaining.
1237      */
setLogType(java.lang.String value)1238     public Builder setLogType(java.lang.String value) {
1239       if (value == null) {
1240         throw new NullPointerException();
1241       }
1242       logType_ = value;
1243       bitField0_ |= 0x00000008;
1244       onChanged();
1245       return this;
1246     }
1247     /**
1248      *
1249      *
1250      * <pre>
1251      * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
1252      * enabled, and cannot be configured.
1253      * Required
1254      * </pre>
1255      *
1256      * <code>string log_type = 4;</code>
1257      *
1258      * @return This builder for chaining.
1259      */
clearLogType()1260     public Builder clearLogType() {
1261       logType_ = getDefaultInstance().getLogType();
1262       bitField0_ = (bitField0_ & ~0x00000008);
1263       onChanged();
1264       return this;
1265     }
1266     /**
1267      *
1268      *
1269      * <pre>
1270      * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
1271      * enabled, and cannot be configured.
1272      * Required
1273      * </pre>
1274      *
1275      * <code>string log_type = 4;</code>
1276      *
1277      * @param value The bytes for logType to set.
1278      * @return This builder for chaining.
1279      */
setLogTypeBytes(com.google.protobuf.ByteString value)1280     public Builder setLogTypeBytes(com.google.protobuf.ByteString value) {
1281       if (value == null) {
1282         throw new NullPointerException();
1283       }
1284       checkByteStringIsUtf8(value);
1285       logType_ = value;
1286       bitField0_ |= 0x00000008;
1287       onChanged();
1288       return this;
1289     }
1290 
1291     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1292     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1293       return super.setUnknownFields(unknownFields);
1294     }
1295 
1296     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1297     public final Builder mergeUnknownFields(
1298         final com.google.protobuf.UnknownFieldSet unknownFields) {
1299       return super.mergeUnknownFields(unknownFields);
1300     }
1301 
1302     // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditConfigDelta)
1303   }
1304 
1305   // @@protoc_insertion_point(class_scope:google.iam.v1.AuditConfigDelta)
1306   private static final com.google.iam.v1.AuditConfigDelta DEFAULT_INSTANCE;
1307 
1308   static {
1309     DEFAULT_INSTANCE = new com.google.iam.v1.AuditConfigDelta();
1310   }
1311 
getDefaultInstance()1312   public static com.google.iam.v1.AuditConfigDelta getDefaultInstance() {
1313     return DEFAULT_INSTANCE;
1314   }
1315 
1316   private static final com.google.protobuf.Parser<AuditConfigDelta> PARSER =
1317       new com.google.protobuf.AbstractParser<AuditConfigDelta>() {
1318         @java.lang.Override
1319         public AuditConfigDelta parsePartialFrom(
1320             com.google.protobuf.CodedInputStream input,
1321             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1322             throws com.google.protobuf.InvalidProtocolBufferException {
1323           Builder builder = newBuilder();
1324           try {
1325             builder.mergeFrom(input, extensionRegistry);
1326           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1327             throw e.setUnfinishedMessage(builder.buildPartial());
1328           } catch (com.google.protobuf.UninitializedMessageException e) {
1329             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1330           } catch (java.io.IOException e) {
1331             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1332                 .setUnfinishedMessage(builder.buildPartial());
1333           }
1334           return builder.buildPartial();
1335         }
1336       };
1337 
parser()1338   public static com.google.protobuf.Parser<AuditConfigDelta> parser() {
1339     return PARSER;
1340   }
1341 
1342   @java.lang.Override
getParserForType()1343   public com.google.protobuf.Parser<AuditConfigDelta> getParserForType() {
1344     return PARSER;
1345   }
1346 
1347   @java.lang.Override
getDefaultInstanceForType()1348   public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() {
1349     return DEFAULT_INSTANCE;
1350   }
1351 }
1352