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