• 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/asset_service.proto
18 
19 package com.google.cloud.asset.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A Cloud Storage location.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.asset.v1.GcsDestination}
29  */
30 public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GcsDestination)
33     GcsDestinationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use GcsDestination.newBuilder() to construct.
GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
GcsDestination()40   private GcsDestination() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new GcsDestination();
46   }
47 
48   @java.lang.Override
getUnknownFields()49   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50     return this.unknownFields;
51   }
52 
getDescriptor()53   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
54     return com.google.cloud.asset.v1.AssetServiceProto
55         .internal_static_google_cloud_asset_v1_GcsDestination_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.asset.v1.AssetServiceProto
62         .internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.asset.v1.GcsDestination.class,
65             com.google.cloud.asset.v1.GcsDestination.Builder.class);
66   }
67 
68   private int objectUriCase_ = 0;
69   private java.lang.Object objectUri_;
70 
71   public enum ObjectUriCase
72       implements
73           com.google.protobuf.Internal.EnumLite,
74           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
75     URI(1),
76     URI_PREFIX(2),
77     OBJECTURI_NOT_SET(0);
78     private final int value;
79 
ObjectUriCase(int value)80     private ObjectUriCase(int value) {
81       this.value = value;
82     }
83     /**
84      * @param value The number of the enum to look for.
85      * @return The enum associated with the given number.
86      * @deprecated Use {@link #forNumber(int)} instead.
87      */
88     @java.lang.Deprecated
valueOf(int value)89     public static ObjectUriCase valueOf(int value) {
90       return forNumber(value);
91     }
92 
forNumber(int value)93     public static ObjectUriCase forNumber(int value) {
94       switch (value) {
95         case 1:
96           return URI;
97         case 2:
98           return URI_PREFIX;
99         case 0:
100           return OBJECTURI_NOT_SET;
101         default:
102           return null;
103       }
104     }
105 
getNumber()106     public int getNumber() {
107       return this.value;
108     }
109   };
110 
getObjectUriCase()111   public ObjectUriCase getObjectUriCase() {
112     return ObjectUriCase.forNumber(objectUriCase_);
113   }
114 
115   public static final int URI_FIELD_NUMBER = 1;
116   /**
117    *
118    *
119    * <pre>
120    * The URI of the Cloud Storage object. It's the same URI that is used by
121    * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
122    * Editing Object
123    * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
124    * for more information.
125    * If the specified Cloud Storage object already exists and there is no
126    * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
127    * overwritten with the exported result.
128    * </pre>
129    *
130    * <code>string uri = 1;</code>
131    *
132    * @return Whether the uri field is set.
133    */
hasUri()134   public boolean hasUri() {
135     return objectUriCase_ == 1;
136   }
137   /**
138    *
139    *
140    * <pre>
141    * The URI of the Cloud Storage object. It's the same URI that is used by
142    * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
143    * Editing Object
144    * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
145    * for more information.
146    * If the specified Cloud Storage object already exists and there is no
147    * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
148    * overwritten with the exported result.
149    * </pre>
150    *
151    * <code>string uri = 1;</code>
152    *
153    * @return The uri.
154    */
getUri()155   public java.lang.String getUri() {
156     java.lang.Object ref = "";
157     if (objectUriCase_ == 1) {
158       ref = objectUri_;
159     }
160     if (ref instanceof java.lang.String) {
161       return (java.lang.String) ref;
162     } else {
163       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
164       java.lang.String s = bs.toStringUtf8();
165       if (objectUriCase_ == 1) {
166         objectUri_ = s;
167       }
168       return s;
169     }
170   }
171   /**
172    *
173    *
174    * <pre>
175    * The URI of the Cloud Storage object. It's the same URI that is used by
176    * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
177    * Editing Object
178    * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
179    * for more information.
180    * If the specified Cloud Storage object already exists and there is no
181    * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
182    * overwritten with the exported result.
183    * </pre>
184    *
185    * <code>string uri = 1;</code>
186    *
187    * @return The bytes for uri.
188    */
getUriBytes()189   public com.google.protobuf.ByteString getUriBytes() {
190     java.lang.Object ref = "";
191     if (objectUriCase_ == 1) {
192       ref = objectUri_;
193     }
194     if (ref instanceof java.lang.String) {
195       com.google.protobuf.ByteString b =
196           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
197       if (objectUriCase_ == 1) {
198         objectUri_ = b;
199       }
200       return b;
201     } else {
202       return (com.google.protobuf.ByteString) ref;
203     }
204   }
205 
206   public static final int URI_PREFIX_FIELD_NUMBER = 2;
207   /**
208    *
209    *
210    * <pre>
211    * The URI prefix of all generated Cloud Storage objects. Example:
212    * "gs://bucket_name/object_name_prefix". Each object URI is in format:
213    * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
214    * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
215    * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
216    * the first shard of output objects containing all
217    * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
218    * returned if file with the same name "gs://bucket_name/object_name_prefix"
219    * already exists.
220    * </pre>
221    *
222    * <code>string uri_prefix = 2;</code>
223    *
224    * @return Whether the uriPrefix field is set.
225    */
hasUriPrefix()226   public boolean hasUriPrefix() {
227     return objectUriCase_ == 2;
228   }
229   /**
230    *
231    *
232    * <pre>
233    * The URI prefix of all generated Cloud Storage objects. Example:
234    * "gs://bucket_name/object_name_prefix". Each object URI is in format:
235    * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
236    * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
237    * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
238    * the first shard of output objects containing all
239    * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
240    * returned if file with the same name "gs://bucket_name/object_name_prefix"
241    * already exists.
242    * </pre>
243    *
244    * <code>string uri_prefix = 2;</code>
245    *
246    * @return The uriPrefix.
247    */
getUriPrefix()248   public java.lang.String getUriPrefix() {
249     java.lang.Object ref = "";
250     if (objectUriCase_ == 2) {
251       ref = objectUri_;
252     }
253     if (ref instanceof java.lang.String) {
254       return (java.lang.String) ref;
255     } else {
256       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
257       java.lang.String s = bs.toStringUtf8();
258       if (objectUriCase_ == 2) {
259         objectUri_ = s;
260       }
261       return s;
262     }
263   }
264   /**
265    *
266    *
267    * <pre>
268    * The URI prefix of all generated Cloud Storage objects. Example:
269    * "gs://bucket_name/object_name_prefix". Each object URI is in format:
270    * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
271    * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
272    * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
273    * the first shard of output objects containing all
274    * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
275    * returned if file with the same name "gs://bucket_name/object_name_prefix"
276    * already exists.
277    * </pre>
278    *
279    * <code>string uri_prefix = 2;</code>
280    *
281    * @return The bytes for uriPrefix.
282    */
getUriPrefixBytes()283   public com.google.protobuf.ByteString getUriPrefixBytes() {
284     java.lang.Object ref = "";
285     if (objectUriCase_ == 2) {
286       ref = objectUri_;
287     }
288     if (ref instanceof java.lang.String) {
289       com.google.protobuf.ByteString b =
290           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
291       if (objectUriCase_ == 2) {
292         objectUri_ = b;
293       }
294       return b;
295     } else {
296       return (com.google.protobuf.ByteString) ref;
297     }
298   }
299 
300   private byte memoizedIsInitialized = -1;
301 
302   @java.lang.Override
isInitialized()303   public final boolean isInitialized() {
304     byte isInitialized = memoizedIsInitialized;
305     if (isInitialized == 1) return true;
306     if (isInitialized == 0) return false;
307 
308     memoizedIsInitialized = 1;
309     return true;
310   }
311 
312   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)313   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
314     if (objectUriCase_ == 1) {
315       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_);
316     }
317     if (objectUriCase_ == 2) {
318       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_);
319     }
320     getUnknownFields().writeTo(output);
321   }
322 
323   @java.lang.Override
getSerializedSize()324   public int getSerializedSize() {
325     int size = memoizedSize;
326     if (size != -1) return size;
327 
328     size = 0;
329     if (objectUriCase_ == 1) {
330       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_);
331     }
332     if (objectUriCase_ == 2) {
333       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_);
334     }
335     size += getUnknownFields().getSerializedSize();
336     memoizedSize = size;
337     return size;
338   }
339 
340   @java.lang.Override
equals(final java.lang.Object obj)341   public boolean equals(final java.lang.Object obj) {
342     if (obj == this) {
343       return true;
344     }
345     if (!(obj instanceof com.google.cloud.asset.v1.GcsDestination)) {
346       return super.equals(obj);
347     }
348     com.google.cloud.asset.v1.GcsDestination other = (com.google.cloud.asset.v1.GcsDestination) obj;
349 
350     if (!getObjectUriCase().equals(other.getObjectUriCase())) return false;
351     switch (objectUriCase_) {
352       case 1:
353         if (!getUri().equals(other.getUri())) return false;
354         break;
355       case 2:
356         if (!getUriPrefix().equals(other.getUriPrefix())) return false;
357         break;
358       case 0:
359       default:
360     }
361     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
362     return true;
363   }
364 
365   @java.lang.Override
hashCode()366   public int hashCode() {
367     if (memoizedHashCode != 0) {
368       return memoizedHashCode;
369     }
370     int hash = 41;
371     hash = (19 * hash) + getDescriptor().hashCode();
372     switch (objectUriCase_) {
373       case 1:
374         hash = (37 * hash) + URI_FIELD_NUMBER;
375         hash = (53 * hash) + getUri().hashCode();
376         break;
377       case 2:
378         hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER;
379         hash = (53 * hash) + getUriPrefix().hashCode();
380         break;
381       case 0:
382       default:
383     }
384     hash = (29 * hash) + getUnknownFields().hashCode();
385     memoizedHashCode = hash;
386     return hash;
387   }
388 
parseFrom(java.nio.ByteBuffer data)389   public static com.google.cloud.asset.v1.GcsDestination parseFrom(java.nio.ByteBuffer data)
390       throws com.google.protobuf.InvalidProtocolBufferException {
391     return PARSER.parseFrom(data);
392   }
393 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)394   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
395       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
396       throws com.google.protobuf.InvalidProtocolBufferException {
397     return PARSER.parseFrom(data, extensionRegistry);
398   }
399 
parseFrom( com.google.protobuf.ByteString data)400   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
401       com.google.protobuf.ByteString data)
402       throws com.google.protobuf.InvalidProtocolBufferException {
403     return PARSER.parseFrom(data);
404   }
405 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)406   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
407       com.google.protobuf.ByteString data,
408       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
409       throws com.google.protobuf.InvalidProtocolBufferException {
410     return PARSER.parseFrom(data, extensionRegistry);
411   }
412 
parseFrom(byte[] data)413   public static com.google.cloud.asset.v1.GcsDestination parseFrom(byte[] data)
414       throws com.google.protobuf.InvalidProtocolBufferException {
415     return PARSER.parseFrom(data);
416   }
417 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)418   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
419       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
420       throws com.google.protobuf.InvalidProtocolBufferException {
421     return PARSER.parseFrom(data, extensionRegistry);
422   }
423 
parseFrom(java.io.InputStream input)424   public static com.google.cloud.asset.v1.GcsDestination parseFrom(java.io.InputStream input)
425       throws java.io.IOException {
426     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
427   }
428 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)429   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
430       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
431       throws java.io.IOException {
432     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
433         PARSER, input, extensionRegistry);
434   }
435 
parseDelimitedFrom( java.io.InputStream input)436   public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom(
437       java.io.InputStream input) throws java.io.IOException {
438     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
439   }
440 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)441   public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom(
442       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
443       throws java.io.IOException {
444     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
445         PARSER, input, extensionRegistry);
446   }
447 
parseFrom( com.google.protobuf.CodedInputStream input)448   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
449       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
450     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
451   }
452 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)453   public static com.google.cloud.asset.v1.GcsDestination parseFrom(
454       com.google.protobuf.CodedInputStream input,
455       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
456       throws java.io.IOException {
457     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
458         PARSER, input, extensionRegistry);
459   }
460 
461   @java.lang.Override
newBuilderForType()462   public Builder newBuilderForType() {
463     return newBuilder();
464   }
465 
newBuilder()466   public static Builder newBuilder() {
467     return DEFAULT_INSTANCE.toBuilder();
468   }
469 
newBuilder(com.google.cloud.asset.v1.GcsDestination prototype)470   public static Builder newBuilder(com.google.cloud.asset.v1.GcsDestination prototype) {
471     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
472   }
473 
474   @java.lang.Override
toBuilder()475   public Builder toBuilder() {
476     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
477   }
478 
479   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)480   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
481     Builder builder = new Builder(parent);
482     return builder;
483   }
484   /**
485    *
486    *
487    * <pre>
488    * A Cloud Storage location.
489    * </pre>
490    *
491    * Protobuf type {@code google.cloud.asset.v1.GcsDestination}
492    */
493   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
494       implements
495       // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GcsDestination)
496       com.google.cloud.asset.v1.GcsDestinationOrBuilder {
getDescriptor()497     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
498       return com.google.cloud.asset.v1.AssetServiceProto
499           .internal_static_google_cloud_asset_v1_GcsDestination_descriptor;
500     }
501 
502     @java.lang.Override
503     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()504         internalGetFieldAccessorTable() {
505       return com.google.cloud.asset.v1.AssetServiceProto
506           .internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable
507           .ensureFieldAccessorsInitialized(
508               com.google.cloud.asset.v1.GcsDestination.class,
509               com.google.cloud.asset.v1.GcsDestination.Builder.class);
510     }
511 
512     // Construct using com.google.cloud.asset.v1.GcsDestination.newBuilder()
Builder()513     private Builder() {}
514 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)515     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
516       super(parent);
517     }
518 
519     @java.lang.Override
clear()520     public Builder clear() {
521       super.clear();
522       bitField0_ = 0;
523       objectUriCase_ = 0;
524       objectUri_ = null;
525       return this;
526     }
527 
528     @java.lang.Override
getDescriptorForType()529     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
530       return com.google.cloud.asset.v1.AssetServiceProto
531           .internal_static_google_cloud_asset_v1_GcsDestination_descriptor;
532     }
533 
534     @java.lang.Override
getDefaultInstanceForType()535     public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() {
536       return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance();
537     }
538 
539     @java.lang.Override
build()540     public com.google.cloud.asset.v1.GcsDestination build() {
541       com.google.cloud.asset.v1.GcsDestination result = buildPartial();
542       if (!result.isInitialized()) {
543         throw newUninitializedMessageException(result);
544       }
545       return result;
546     }
547 
548     @java.lang.Override
buildPartial()549     public com.google.cloud.asset.v1.GcsDestination buildPartial() {
550       com.google.cloud.asset.v1.GcsDestination result =
551           new com.google.cloud.asset.v1.GcsDestination(this);
552       if (bitField0_ != 0) {
553         buildPartial0(result);
554       }
555       buildPartialOneofs(result);
556       onBuilt();
557       return result;
558     }
559 
buildPartial0(com.google.cloud.asset.v1.GcsDestination result)560     private void buildPartial0(com.google.cloud.asset.v1.GcsDestination result) {
561       int from_bitField0_ = bitField0_;
562     }
563 
buildPartialOneofs(com.google.cloud.asset.v1.GcsDestination result)564     private void buildPartialOneofs(com.google.cloud.asset.v1.GcsDestination result) {
565       result.objectUriCase_ = objectUriCase_;
566       result.objectUri_ = this.objectUri_;
567     }
568 
569     @java.lang.Override
clone()570     public Builder clone() {
571       return super.clone();
572     }
573 
574     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)575     public Builder setField(
576         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
577       return super.setField(field, value);
578     }
579 
580     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)581     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
582       return super.clearField(field);
583     }
584 
585     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)586     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
587       return super.clearOneof(oneof);
588     }
589 
590     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)591     public Builder setRepeatedField(
592         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
593       return super.setRepeatedField(field, index, value);
594     }
595 
596     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)597     public Builder addRepeatedField(
598         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
599       return super.addRepeatedField(field, value);
600     }
601 
602     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)603     public Builder mergeFrom(com.google.protobuf.Message other) {
604       if (other instanceof com.google.cloud.asset.v1.GcsDestination) {
605         return mergeFrom((com.google.cloud.asset.v1.GcsDestination) other);
606       } else {
607         super.mergeFrom(other);
608         return this;
609       }
610     }
611 
mergeFrom(com.google.cloud.asset.v1.GcsDestination other)612     public Builder mergeFrom(com.google.cloud.asset.v1.GcsDestination other) {
613       if (other == com.google.cloud.asset.v1.GcsDestination.getDefaultInstance()) return this;
614       switch (other.getObjectUriCase()) {
615         case URI:
616           {
617             objectUriCase_ = 1;
618             objectUri_ = other.objectUri_;
619             onChanged();
620             break;
621           }
622         case URI_PREFIX:
623           {
624             objectUriCase_ = 2;
625             objectUri_ = other.objectUri_;
626             onChanged();
627             break;
628           }
629         case OBJECTURI_NOT_SET:
630           {
631             break;
632           }
633       }
634       this.mergeUnknownFields(other.getUnknownFields());
635       onChanged();
636       return this;
637     }
638 
639     @java.lang.Override
isInitialized()640     public final boolean isInitialized() {
641       return true;
642     }
643 
644     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)645     public Builder mergeFrom(
646         com.google.protobuf.CodedInputStream input,
647         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
648         throws java.io.IOException {
649       if (extensionRegistry == null) {
650         throw new java.lang.NullPointerException();
651       }
652       try {
653         boolean done = false;
654         while (!done) {
655           int tag = input.readTag();
656           switch (tag) {
657             case 0:
658               done = true;
659               break;
660             case 10:
661               {
662                 java.lang.String s = input.readStringRequireUtf8();
663                 objectUriCase_ = 1;
664                 objectUri_ = s;
665                 break;
666               } // case 10
667             case 18:
668               {
669                 java.lang.String s = input.readStringRequireUtf8();
670                 objectUriCase_ = 2;
671                 objectUri_ = s;
672                 break;
673               } // case 18
674             default:
675               {
676                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
677                   done = true; // was an endgroup tag
678                 }
679                 break;
680               } // default:
681           } // switch (tag)
682         } // while (!done)
683       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
684         throw e.unwrapIOException();
685       } finally {
686         onChanged();
687       } // finally
688       return this;
689     }
690 
691     private int objectUriCase_ = 0;
692     private java.lang.Object objectUri_;
693 
getObjectUriCase()694     public ObjectUriCase getObjectUriCase() {
695       return ObjectUriCase.forNumber(objectUriCase_);
696     }
697 
clearObjectUri()698     public Builder clearObjectUri() {
699       objectUriCase_ = 0;
700       objectUri_ = null;
701       onChanged();
702       return this;
703     }
704 
705     private int bitField0_;
706 
707     /**
708      *
709      *
710      * <pre>
711      * The URI of the Cloud Storage object. It's the same URI that is used by
712      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
713      * Editing Object
714      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
715      * for more information.
716      * If the specified Cloud Storage object already exists and there is no
717      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
718      * overwritten with the exported result.
719      * </pre>
720      *
721      * <code>string uri = 1;</code>
722      *
723      * @return Whether the uri field is set.
724      */
725     @java.lang.Override
hasUri()726     public boolean hasUri() {
727       return objectUriCase_ == 1;
728     }
729     /**
730      *
731      *
732      * <pre>
733      * The URI of the Cloud Storage object. It's the same URI that is used by
734      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
735      * Editing Object
736      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
737      * for more information.
738      * If the specified Cloud Storage object already exists and there is no
739      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
740      * overwritten with the exported result.
741      * </pre>
742      *
743      * <code>string uri = 1;</code>
744      *
745      * @return The uri.
746      */
747     @java.lang.Override
getUri()748     public java.lang.String getUri() {
749       java.lang.Object ref = "";
750       if (objectUriCase_ == 1) {
751         ref = objectUri_;
752       }
753       if (!(ref instanceof java.lang.String)) {
754         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
755         java.lang.String s = bs.toStringUtf8();
756         if (objectUriCase_ == 1) {
757           objectUri_ = s;
758         }
759         return s;
760       } else {
761         return (java.lang.String) ref;
762       }
763     }
764     /**
765      *
766      *
767      * <pre>
768      * The URI of the Cloud Storage object. It's the same URI that is used by
769      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
770      * Editing Object
771      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
772      * for more information.
773      * If the specified Cloud Storage object already exists and there is no
774      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
775      * overwritten with the exported result.
776      * </pre>
777      *
778      * <code>string uri = 1;</code>
779      *
780      * @return The bytes for uri.
781      */
782     @java.lang.Override
getUriBytes()783     public com.google.protobuf.ByteString getUriBytes() {
784       java.lang.Object ref = "";
785       if (objectUriCase_ == 1) {
786         ref = objectUri_;
787       }
788       if (ref instanceof String) {
789         com.google.protobuf.ByteString b =
790             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
791         if (objectUriCase_ == 1) {
792           objectUri_ = b;
793         }
794         return b;
795       } else {
796         return (com.google.protobuf.ByteString) ref;
797       }
798     }
799     /**
800      *
801      *
802      * <pre>
803      * The URI of the Cloud Storage object. It's the same URI that is used by
804      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
805      * Editing Object
806      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
807      * for more information.
808      * If the specified Cloud Storage object already exists and there is no
809      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
810      * overwritten with the exported result.
811      * </pre>
812      *
813      * <code>string uri = 1;</code>
814      *
815      * @param value The uri to set.
816      * @return This builder for chaining.
817      */
setUri(java.lang.String value)818     public Builder setUri(java.lang.String value) {
819       if (value == null) {
820         throw new NullPointerException();
821       }
822       objectUriCase_ = 1;
823       objectUri_ = value;
824       onChanged();
825       return this;
826     }
827     /**
828      *
829      *
830      * <pre>
831      * The URI of the Cloud Storage object. It's the same URI that is used by
832      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
833      * Editing Object
834      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
835      * for more information.
836      * If the specified Cloud Storage object already exists and there is no
837      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
838      * overwritten with the exported result.
839      * </pre>
840      *
841      * <code>string uri = 1;</code>
842      *
843      * @return This builder for chaining.
844      */
clearUri()845     public Builder clearUri() {
846       if (objectUriCase_ == 1) {
847         objectUriCase_ = 0;
848         objectUri_ = null;
849         onChanged();
850       }
851       return this;
852     }
853     /**
854      *
855      *
856      * <pre>
857      * The URI of the Cloud Storage object. It's the same URI that is used by
858      * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
859      * Editing Object
860      * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
861      * for more information.
862      * If the specified Cloud Storage object already exists and there is no
863      * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
864      * overwritten with the exported result.
865      * </pre>
866      *
867      * <code>string uri = 1;</code>
868      *
869      * @param value The bytes for uri to set.
870      * @return This builder for chaining.
871      */
setUriBytes(com.google.protobuf.ByteString value)872     public Builder setUriBytes(com.google.protobuf.ByteString value) {
873       if (value == null) {
874         throw new NullPointerException();
875       }
876       checkByteStringIsUtf8(value);
877       objectUriCase_ = 1;
878       objectUri_ = value;
879       onChanged();
880       return this;
881     }
882 
883     /**
884      *
885      *
886      * <pre>
887      * The URI prefix of all generated Cloud Storage objects. Example:
888      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
889      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
890      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
891      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
892      * the first shard of output objects containing all
893      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
894      * returned if file with the same name "gs://bucket_name/object_name_prefix"
895      * already exists.
896      * </pre>
897      *
898      * <code>string uri_prefix = 2;</code>
899      *
900      * @return Whether the uriPrefix field is set.
901      */
902     @java.lang.Override
hasUriPrefix()903     public boolean hasUriPrefix() {
904       return objectUriCase_ == 2;
905     }
906     /**
907      *
908      *
909      * <pre>
910      * The URI prefix of all generated Cloud Storage objects. Example:
911      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
912      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
913      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
914      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
915      * the first shard of output objects containing all
916      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
917      * returned if file with the same name "gs://bucket_name/object_name_prefix"
918      * already exists.
919      * </pre>
920      *
921      * <code>string uri_prefix = 2;</code>
922      *
923      * @return The uriPrefix.
924      */
925     @java.lang.Override
getUriPrefix()926     public java.lang.String getUriPrefix() {
927       java.lang.Object ref = "";
928       if (objectUriCase_ == 2) {
929         ref = objectUri_;
930       }
931       if (!(ref instanceof java.lang.String)) {
932         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
933         java.lang.String s = bs.toStringUtf8();
934         if (objectUriCase_ == 2) {
935           objectUri_ = s;
936         }
937         return s;
938       } else {
939         return (java.lang.String) ref;
940       }
941     }
942     /**
943      *
944      *
945      * <pre>
946      * The URI prefix of all generated Cloud Storage objects. Example:
947      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
948      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
949      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
950      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
951      * the first shard of output objects containing all
952      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
953      * returned if file with the same name "gs://bucket_name/object_name_prefix"
954      * already exists.
955      * </pre>
956      *
957      * <code>string uri_prefix = 2;</code>
958      *
959      * @return The bytes for uriPrefix.
960      */
961     @java.lang.Override
getUriPrefixBytes()962     public com.google.protobuf.ByteString getUriPrefixBytes() {
963       java.lang.Object ref = "";
964       if (objectUriCase_ == 2) {
965         ref = objectUri_;
966       }
967       if (ref instanceof String) {
968         com.google.protobuf.ByteString b =
969             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
970         if (objectUriCase_ == 2) {
971           objectUri_ = b;
972         }
973         return b;
974       } else {
975         return (com.google.protobuf.ByteString) ref;
976       }
977     }
978     /**
979      *
980      *
981      * <pre>
982      * The URI prefix of all generated Cloud Storage objects. Example:
983      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
984      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
985      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
986      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
987      * the first shard of output objects containing all
988      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
989      * returned if file with the same name "gs://bucket_name/object_name_prefix"
990      * already exists.
991      * </pre>
992      *
993      * <code>string uri_prefix = 2;</code>
994      *
995      * @param value The uriPrefix to set.
996      * @return This builder for chaining.
997      */
setUriPrefix(java.lang.String value)998     public Builder setUriPrefix(java.lang.String value) {
999       if (value == null) {
1000         throw new NullPointerException();
1001       }
1002       objectUriCase_ = 2;
1003       objectUri_ = value;
1004       onChanged();
1005       return this;
1006     }
1007     /**
1008      *
1009      *
1010      * <pre>
1011      * The URI prefix of all generated Cloud Storage objects. Example:
1012      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
1013      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
1014      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
1015      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
1016      * the first shard of output objects containing all
1017      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
1018      * returned if file with the same name "gs://bucket_name/object_name_prefix"
1019      * already exists.
1020      * </pre>
1021      *
1022      * <code>string uri_prefix = 2;</code>
1023      *
1024      * @return This builder for chaining.
1025      */
clearUriPrefix()1026     public Builder clearUriPrefix() {
1027       if (objectUriCase_ == 2) {
1028         objectUriCase_ = 0;
1029         objectUri_ = null;
1030         onChanged();
1031       }
1032       return this;
1033     }
1034     /**
1035      *
1036      *
1037      * <pre>
1038      * The URI prefix of all generated Cloud Storage objects. Example:
1039      * "gs://bucket_name/object_name_prefix". Each object URI is in format:
1040      * "gs://bucket_name/object_name_prefix/&lt;asset type&gt;/&lt;shard number&gt; and only
1041      * contains assets for that type. &lt;shard number&gt; starts from 0. Example:
1042      * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
1043      * the first shard of output objects containing all
1044      * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
1045      * returned if file with the same name "gs://bucket_name/object_name_prefix"
1046      * already exists.
1047      * </pre>
1048      *
1049      * <code>string uri_prefix = 2;</code>
1050      *
1051      * @param value The bytes for uriPrefix to set.
1052      * @return This builder for chaining.
1053      */
setUriPrefixBytes(com.google.protobuf.ByteString value)1054     public Builder setUriPrefixBytes(com.google.protobuf.ByteString value) {
1055       if (value == null) {
1056         throw new NullPointerException();
1057       }
1058       checkByteStringIsUtf8(value);
1059       objectUriCase_ = 2;
1060       objectUri_ = value;
1061       onChanged();
1062       return this;
1063     }
1064 
1065     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1066     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1067       return super.setUnknownFields(unknownFields);
1068     }
1069 
1070     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1071     public final Builder mergeUnknownFields(
1072         final com.google.protobuf.UnknownFieldSet unknownFields) {
1073       return super.mergeUnknownFields(unknownFields);
1074     }
1075 
1076     // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GcsDestination)
1077   }
1078 
1079   // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GcsDestination)
1080   private static final com.google.cloud.asset.v1.GcsDestination DEFAULT_INSTANCE;
1081 
1082   static {
1083     DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GcsDestination();
1084   }
1085 
getDefaultInstance()1086   public static com.google.cloud.asset.v1.GcsDestination getDefaultInstance() {
1087     return DEFAULT_INSTANCE;
1088   }
1089 
1090   private static final com.google.protobuf.Parser<GcsDestination> PARSER =
1091       new com.google.protobuf.AbstractParser<GcsDestination>() {
1092         @java.lang.Override
1093         public GcsDestination parsePartialFrom(
1094             com.google.protobuf.CodedInputStream input,
1095             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1096             throws com.google.protobuf.InvalidProtocolBufferException {
1097           Builder builder = newBuilder();
1098           try {
1099             builder.mergeFrom(input, extensionRegistry);
1100           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1101             throw e.setUnfinishedMessage(builder.buildPartial());
1102           } catch (com.google.protobuf.UninitializedMessageException e) {
1103             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1104           } catch (java.io.IOException e) {
1105             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1106                 .setUnfinishedMessage(builder.buildPartial());
1107           }
1108           return builder.buildPartial();
1109         }
1110       };
1111 
parser()1112   public static com.google.protobuf.Parser<GcsDestination> parser() {
1113     return PARSER;
1114   }
1115 
1116   @java.lang.Override
getParserForType()1117   public com.google.protobuf.Parser<GcsDestination> getParserForType() {
1118     return PARSER;
1119   }
1120 
1121   @java.lang.Override
getDefaultInstanceForType()1122   public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() {
1123     return DEFAULT_INSTANCE;
1124   }
1125 }
1126