• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/asset/v1/assets.proto
18 
19 package com.google.cloud.asset.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents the detailed state of an entity under analysis, such as a
26  * resource, an identity or an access.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState}
30  */
31 public final class IamPolicyAnalysisState extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisState)
34     IamPolicyAnalysisStateOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use IamPolicyAnalysisState.newBuilder() to construct.
IamPolicyAnalysisState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private IamPolicyAnalysisState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
IamPolicyAnalysisState()41   private IamPolicyAnalysisState() {
42     code_ = 0;
43     cause_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new IamPolicyAnalysisState();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.asset.v1.AssetProto
59         .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.asset.v1.AssetProto
66         .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.asset.v1.IamPolicyAnalysisState.class,
69             com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class);
70   }
71 
72   public static final int CODE_FIELD_NUMBER = 1;
73   private int code_ = 0;
74   /**
75    *
76    *
77    * <pre>
78    * The Google standard error code that best describes the state.
79    * For example:
80    * - OK means the analysis on this entity has been successfully finished;
81    * - PERMISSION_DENIED means an access denied error is encountered;
82    * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
83    * in time;
84    * </pre>
85    *
86    * <code>.google.rpc.Code code = 1;</code>
87    *
88    * @return The enum numeric value on the wire for code.
89    */
90   @java.lang.Override
getCodeValue()91   public int getCodeValue() {
92     return code_;
93   }
94   /**
95    *
96    *
97    * <pre>
98    * The Google standard error code that best describes the state.
99    * For example:
100    * - OK means the analysis on this entity has been successfully finished;
101    * - PERMISSION_DENIED means an access denied error is encountered;
102    * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
103    * in time;
104    * </pre>
105    *
106    * <code>.google.rpc.Code code = 1;</code>
107    *
108    * @return The code.
109    */
110   @java.lang.Override
getCode()111   public com.google.rpc.Code getCode() {
112     com.google.rpc.Code result = com.google.rpc.Code.forNumber(code_);
113     return result == null ? com.google.rpc.Code.UNRECOGNIZED : result;
114   }
115 
116   public static final int CAUSE_FIELD_NUMBER = 2;
117 
118   @SuppressWarnings("serial")
119   private volatile java.lang.Object cause_ = "";
120   /**
121    *
122    *
123    * <pre>
124    * The human-readable description of the cause of failure.
125    * </pre>
126    *
127    * <code>string cause = 2;</code>
128    *
129    * @return The cause.
130    */
131   @java.lang.Override
getCause()132   public java.lang.String getCause() {
133     java.lang.Object ref = cause_;
134     if (ref instanceof java.lang.String) {
135       return (java.lang.String) ref;
136     } else {
137       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
138       java.lang.String s = bs.toStringUtf8();
139       cause_ = s;
140       return s;
141     }
142   }
143   /**
144    *
145    *
146    * <pre>
147    * The human-readable description of the cause of failure.
148    * </pre>
149    *
150    * <code>string cause = 2;</code>
151    *
152    * @return The bytes for cause.
153    */
154   @java.lang.Override
getCauseBytes()155   public com.google.protobuf.ByteString getCauseBytes() {
156     java.lang.Object ref = cause_;
157     if (ref instanceof java.lang.String) {
158       com.google.protobuf.ByteString b =
159           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
160       cause_ = b;
161       return b;
162     } else {
163       return (com.google.protobuf.ByteString) ref;
164     }
165   }
166 
167   private byte memoizedIsInitialized = -1;
168 
169   @java.lang.Override
isInitialized()170   public final boolean isInitialized() {
171     byte isInitialized = memoizedIsInitialized;
172     if (isInitialized == 1) return true;
173     if (isInitialized == 0) return false;
174 
175     memoizedIsInitialized = 1;
176     return true;
177   }
178 
179   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)180   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
181     if (code_ != com.google.rpc.Code.OK.getNumber()) {
182       output.writeEnum(1, code_);
183     }
184     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) {
185       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_);
186     }
187     getUnknownFields().writeTo(output);
188   }
189 
190   @java.lang.Override
getSerializedSize()191   public int getSerializedSize() {
192     int size = memoizedSize;
193     if (size != -1) return size;
194 
195     size = 0;
196     if (code_ != com.google.rpc.Code.OK.getNumber()) {
197       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_);
198     }
199     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) {
200       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_);
201     }
202     size += getUnknownFields().getSerializedSize();
203     memoizedSize = size;
204     return size;
205   }
206 
207   @java.lang.Override
equals(final java.lang.Object obj)208   public boolean equals(final java.lang.Object obj) {
209     if (obj == this) {
210       return true;
211     }
212     if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState)) {
213       return super.equals(obj);
214     }
215     com.google.cloud.asset.v1.IamPolicyAnalysisState other =
216         (com.google.cloud.asset.v1.IamPolicyAnalysisState) obj;
217 
218     if (code_ != other.code_) return false;
219     if (!getCause().equals(other.getCause())) return false;
220     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
221     return true;
222   }
223 
224   @java.lang.Override
hashCode()225   public int hashCode() {
226     if (memoizedHashCode != 0) {
227       return memoizedHashCode;
228     }
229     int hash = 41;
230     hash = (19 * hash) + getDescriptor().hashCode();
231     hash = (37 * hash) + CODE_FIELD_NUMBER;
232     hash = (53 * hash) + code_;
233     hash = (37 * hash) + CAUSE_FIELD_NUMBER;
234     hash = (53 * hash) + getCause().hashCode();
235     hash = (29 * hash) + getUnknownFields().hashCode();
236     memoizedHashCode = hash;
237     return hash;
238   }
239 
parseFrom(java.nio.ByteBuffer data)240   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(java.nio.ByteBuffer data)
241       throws com.google.protobuf.InvalidProtocolBufferException {
242     return PARSER.parseFrom(data);
243   }
244 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)245   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
246       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
247       throws com.google.protobuf.InvalidProtocolBufferException {
248     return PARSER.parseFrom(data, extensionRegistry);
249   }
250 
parseFrom( com.google.protobuf.ByteString data)251   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
252       com.google.protobuf.ByteString data)
253       throws com.google.protobuf.InvalidProtocolBufferException {
254     return PARSER.parseFrom(data);
255   }
256 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)257   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
258       com.google.protobuf.ByteString data,
259       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260       throws com.google.protobuf.InvalidProtocolBufferException {
261     return PARSER.parseFrom(data, extensionRegistry);
262   }
263 
parseFrom(byte[] data)264   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(byte[] data)
265       throws com.google.protobuf.InvalidProtocolBufferException {
266     return PARSER.parseFrom(data);
267   }
268 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)269   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
270       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
271       throws com.google.protobuf.InvalidProtocolBufferException {
272     return PARSER.parseFrom(data, extensionRegistry);
273   }
274 
parseFrom( java.io.InputStream input)275   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
276       java.io.InputStream input) throws java.io.IOException {
277     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
278   }
279 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)280   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
281       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
282       throws java.io.IOException {
283     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
284         PARSER, input, extensionRegistry);
285   }
286 
parseDelimitedFrom( java.io.InputStream input)287   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom(
288       java.io.InputStream input) throws java.io.IOException {
289     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
290   }
291 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)292   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom(
293       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294       throws java.io.IOException {
295     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
296         PARSER, input, extensionRegistry);
297   }
298 
parseFrom( com.google.protobuf.CodedInputStream input)299   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
300       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
301     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
302   }
303 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)304   public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(
305       com.google.protobuf.CodedInputStream input,
306       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
307       throws java.io.IOException {
308     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
309         PARSER, input, extensionRegistry);
310   }
311 
312   @java.lang.Override
newBuilderForType()313   public Builder newBuilderForType() {
314     return newBuilder();
315   }
316 
newBuilder()317   public static Builder newBuilder() {
318     return DEFAULT_INSTANCE.toBuilder();
319   }
320 
newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisState prototype)321   public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisState prototype) {
322     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
323   }
324 
325   @java.lang.Override
toBuilder()326   public Builder toBuilder() {
327     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
328   }
329 
330   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)331   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
332     Builder builder = new Builder(parent);
333     return builder;
334   }
335   /**
336    *
337    *
338    * <pre>
339    * Represents the detailed state of an entity under analysis, such as a
340    * resource, an identity or an access.
341    * </pre>
342    *
343    * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState}
344    */
345   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
346       implements
347       // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisState)
348       com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder {
getDescriptor()349     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
350       return com.google.cloud.asset.v1.AssetProto
351           .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor;
352     }
353 
354     @java.lang.Override
355     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()356         internalGetFieldAccessorTable() {
357       return com.google.cloud.asset.v1.AssetProto
358           .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable
359           .ensureFieldAccessorsInitialized(
360               com.google.cloud.asset.v1.IamPolicyAnalysisState.class,
361               com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class);
362     }
363 
364     // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder()
Builder()365     private Builder() {}
366 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)367     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
368       super(parent);
369     }
370 
371     @java.lang.Override
clear()372     public Builder clear() {
373       super.clear();
374       bitField0_ = 0;
375       code_ = 0;
376       cause_ = "";
377       return this;
378     }
379 
380     @java.lang.Override
getDescriptorForType()381     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
382       return com.google.cloud.asset.v1.AssetProto
383           .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor;
384     }
385 
386     @java.lang.Override
getDefaultInstanceForType()387     public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() {
388       return com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance();
389     }
390 
391     @java.lang.Override
build()392     public com.google.cloud.asset.v1.IamPolicyAnalysisState build() {
393       com.google.cloud.asset.v1.IamPolicyAnalysisState result = buildPartial();
394       if (!result.isInitialized()) {
395         throw newUninitializedMessageException(result);
396       }
397       return result;
398     }
399 
400     @java.lang.Override
buildPartial()401     public com.google.cloud.asset.v1.IamPolicyAnalysisState buildPartial() {
402       com.google.cloud.asset.v1.IamPolicyAnalysisState result =
403           new com.google.cloud.asset.v1.IamPolicyAnalysisState(this);
404       if (bitField0_ != 0) {
405         buildPartial0(result);
406       }
407       onBuilt();
408       return result;
409     }
410 
buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisState result)411     private void buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisState result) {
412       int from_bitField0_ = bitField0_;
413       if (((from_bitField0_ & 0x00000001) != 0)) {
414         result.code_ = code_;
415       }
416       if (((from_bitField0_ & 0x00000002) != 0)) {
417         result.cause_ = cause_;
418       }
419     }
420 
421     @java.lang.Override
clone()422     public Builder clone() {
423       return super.clone();
424     }
425 
426     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)427     public Builder setField(
428         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
429       return super.setField(field, value);
430     }
431 
432     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)433     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
434       return super.clearField(field);
435     }
436 
437     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)438     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
439       return super.clearOneof(oneof);
440     }
441 
442     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)443     public Builder setRepeatedField(
444         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
445       return super.setRepeatedField(field, index, value);
446     }
447 
448     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)449     public Builder addRepeatedField(
450         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
451       return super.addRepeatedField(field, value);
452     }
453 
454     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)455     public Builder mergeFrom(com.google.protobuf.Message other) {
456       if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState) {
457         return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisState) other);
458       } else {
459         super.mergeFrom(other);
460         return this;
461       }
462     }
463 
mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other)464     public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other) {
465       if (other == com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance())
466         return this;
467       if (other.code_ != 0) {
468         setCodeValue(other.getCodeValue());
469       }
470       if (!other.getCause().isEmpty()) {
471         cause_ = other.cause_;
472         bitField0_ |= 0x00000002;
473         onChanged();
474       }
475       this.mergeUnknownFields(other.getUnknownFields());
476       onChanged();
477       return this;
478     }
479 
480     @java.lang.Override
isInitialized()481     public final boolean isInitialized() {
482       return true;
483     }
484 
485     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)486     public Builder mergeFrom(
487         com.google.protobuf.CodedInputStream input,
488         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
489         throws java.io.IOException {
490       if (extensionRegistry == null) {
491         throw new java.lang.NullPointerException();
492       }
493       try {
494         boolean done = false;
495         while (!done) {
496           int tag = input.readTag();
497           switch (tag) {
498             case 0:
499               done = true;
500               break;
501             case 8:
502               {
503                 code_ = input.readEnum();
504                 bitField0_ |= 0x00000001;
505                 break;
506               } // case 8
507             case 18:
508               {
509                 cause_ = input.readStringRequireUtf8();
510                 bitField0_ |= 0x00000002;
511                 break;
512               } // case 18
513             default:
514               {
515                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
516                   done = true; // was an endgroup tag
517                 }
518                 break;
519               } // default:
520           } // switch (tag)
521         } // while (!done)
522       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
523         throw e.unwrapIOException();
524       } finally {
525         onChanged();
526       } // finally
527       return this;
528     }
529 
530     private int bitField0_;
531 
532     private int code_ = 0;
533     /**
534      *
535      *
536      * <pre>
537      * The Google standard error code that best describes the state.
538      * For example:
539      * - OK means the analysis on this entity has been successfully finished;
540      * - PERMISSION_DENIED means an access denied error is encountered;
541      * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
542      * in time;
543      * </pre>
544      *
545      * <code>.google.rpc.Code code = 1;</code>
546      *
547      * @return The enum numeric value on the wire for code.
548      */
549     @java.lang.Override
getCodeValue()550     public int getCodeValue() {
551       return code_;
552     }
553     /**
554      *
555      *
556      * <pre>
557      * The Google standard error code that best describes the state.
558      * For example:
559      * - OK means the analysis on this entity has been successfully finished;
560      * - PERMISSION_DENIED means an access denied error is encountered;
561      * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
562      * in time;
563      * </pre>
564      *
565      * <code>.google.rpc.Code code = 1;</code>
566      *
567      * @param value The enum numeric value on the wire for code to set.
568      * @return This builder for chaining.
569      */
setCodeValue(int value)570     public Builder setCodeValue(int value) {
571       code_ = value;
572       bitField0_ |= 0x00000001;
573       onChanged();
574       return this;
575     }
576     /**
577      *
578      *
579      * <pre>
580      * The Google standard error code that best describes the state.
581      * For example:
582      * - OK means the analysis on this entity has been successfully finished;
583      * - PERMISSION_DENIED means an access denied error is encountered;
584      * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
585      * in time;
586      * </pre>
587      *
588      * <code>.google.rpc.Code code = 1;</code>
589      *
590      * @return The code.
591      */
592     @java.lang.Override
getCode()593     public com.google.rpc.Code getCode() {
594       com.google.rpc.Code result = com.google.rpc.Code.forNumber(code_);
595       return result == null ? com.google.rpc.Code.UNRECOGNIZED : result;
596     }
597     /**
598      *
599      *
600      * <pre>
601      * The Google standard error code that best describes the state.
602      * For example:
603      * - OK means the analysis on this entity has been successfully finished;
604      * - PERMISSION_DENIED means an access denied error is encountered;
605      * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
606      * in time;
607      * </pre>
608      *
609      * <code>.google.rpc.Code code = 1;</code>
610      *
611      * @param value The code to set.
612      * @return This builder for chaining.
613      */
setCode(com.google.rpc.Code value)614     public Builder setCode(com.google.rpc.Code value) {
615       if (value == null) {
616         throw new NullPointerException();
617       }
618       bitField0_ |= 0x00000001;
619       code_ = value.getNumber();
620       onChanged();
621       return this;
622     }
623     /**
624      *
625      *
626      * <pre>
627      * The Google standard error code that best describes the state.
628      * For example:
629      * - OK means the analysis on this entity has been successfully finished;
630      * - PERMISSION_DENIED means an access denied error is encountered;
631      * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
632      * in time;
633      * </pre>
634      *
635      * <code>.google.rpc.Code code = 1;</code>
636      *
637      * @return This builder for chaining.
638      */
clearCode()639     public Builder clearCode() {
640       bitField0_ = (bitField0_ & ~0x00000001);
641       code_ = 0;
642       onChanged();
643       return this;
644     }
645 
646     private java.lang.Object cause_ = "";
647     /**
648      *
649      *
650      * <pre>
651      * The human-readable description of the cause of failure.
652      * </pre>
653      *
654      * <code>string cause = 2;</code>
655      *
656      * @return The cause.
657      */
getCause()658     public java.lang.String getCause() {
659       java.lang.Object ref = cause_;
660       if (!(ref instanceof java.lang.String)) {
661         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
662         java.lang.String s = bs.toStringUtf8();
663         cause_ = s;
664         return s;
665       } else {
666         return (java.lang.String) ref;
667       }
668     }
669     /**
670      *
671      *
672      * <pre>
673      * The human-readable description of the cause of failure.
674      * </pre>
675      *
676      * <code>string cause = 2;</code>
677      *
678      * @return The bytes for cause.
679      */
getCauseBytes()680     public com.google.protobuf.ByteString getCauseBytes() {
681       java.lang.Object ref = cause_;
682       if (ref instanceof String) {
683         com.google.protobuf.ByteString b =
684             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
685         cause_ = b;
686         return b;
687       } else {
688         return (com.google.protobuf.ByteString) ref;
689       }
690     }
691     /**
692      *
693      *
694      * <pre>
695      * The human-readable description of the cause of failure.
696      * </pre>
697      *
698      * <code>string cause = 2;</code>
699      *
700      * @param value The cause to set.
701      * @return This builder for chaining.
702      */
setCause(java.lang.String value)703     public Builder setCause(java.lang.String value) {
704       if (value == null) {
705         throw new NullPointerException();
706       }
707       cause_ = value;
708       bitField0_ |= 0x00000002;
709       onChanged();
710       return this;
711     }
712     /**
713      *
714      *
715      * <pre>
716      * The human-readable description of the cause of failure.
717      * </pre>
718      *
719      * <code>string cause = 2;</code>
720      *
721      * @return This builder for chaining.
722      */
clearCause()723     public Builder clearCause() {
724       cause_ = getDefaultInstance().getCause();
725       bitField0_ = (bitField0_ & ~0x00000002);
726       onChanged();
727       return this;
728     }
729     /**
730      *
731      *
732      * <pre>
733      * The human-readable description of the cause of failure.
734      * </pre>
735      *
736      * <code>string cause = 2;</code>
737      *
738      * @param value The bytes for cause to set.
739      * @return This builder for chaining.
740      */
setCauseBytes(com.google.protobuf.ByteString value)741     public Builder setCauseBytes(com.google.protobuf.ByteString value) {
742       if (value == null) {
743         throw new NullPointerException();
744       }
745       checkByteStringIsUtf8(value);
746       cause_ = value;
747       bitField0_ |= 0x00000002;
748       onChanged();
749       return this;
750     }
751 
752     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)753     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
754       return super.setUnknownFields(unknownFields);
755     }
756 
757     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)758     public final Builder mergeUnknownFields(
759         final com.google.protobuf.UnknownFieldSet unknownFields) {
760       return super.mergeUnknownFields(unknownFields);
761     }
762 
763     // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisState)
764   }
765 
766   // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisState)
767   private static final com.google.cloud.asset.v1.IamPolicyAnalysisState DEFAULT_INSTANCE;
768 
769   static {
770     DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisState();
771   }
772 
getDefaultInstance()773   public static com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstance() {
774     return DEFAULT_INSTANCE;
775   }
776 
777   private static final com.google.protobuf.Parser<IamPolicyAnalysisState> PARSER =
778       new com.google.protobuf.AbstractParser<IamPolicyAnalysisState>() {
779         @java.lang.Override
780         public IamPolicyAnalysisState parsePartialFrom(
781             com.google.protobuf.CodedInputStream input,
782             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
783             throws com.google.protobuf.InvalidProtocolBufferException {
784           Builder builder = newBuilder();
785           try {
786             builder.mergeFrom(input, extensionRegistry);
787           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
788             throw e.setUnfinishedMessage(builder.buildPartial());
789           } catch (com.google.protobuf.UninitializedMessageException e) {
790             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
791           } catch (java.io.IOException e) {
792             throw new com.google.protobuf.InvalidProtocolBufferException(e)
793                 .setUnfinishedMessage(builder.buildPartial());
794           }
795           return builder.buildPartial();
796         }
797       };
798 
parser()799   public static com.google.protobuf.Parser<IamPolicyAnalysisState> parser() {
800     return PARSER;
801   }
802 
803   @java.lang.Override
getParserForType()804   public com.google.protobuf.Parser<IamPolicyAnalysisState> getParserForType() {
805     return PARSER;
806   }
807 
808   @java.lang.Override
getDefaultInstanceForType()809   public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() {
810     return DEFAULT_INSTANCE;
811   }
812 }
813