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