• 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 asset feed destination.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig}
29  */
30 public final class FeedOutputConfig extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.FeedOutputConfig)
33     FeedOutputConfigOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use FeedOutputConfig.newBuilder() to construct.
FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
FeedOutputConfig()40   private FeedOutputConfig() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new FeedOutputConfig();
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_FeedOutputConfig_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_FeedOutputConfig_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.asset.v1.FeedOutputConfig.class,
65             com.google.cloud.asset.v1.FeedOutputConfig.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     PUBSUB_DESTINATION(1),
76     DESTINATION_NOT_SET(0);
77     private final int value;
78 
DestinationCase(int value)79     private DestinationCase(int value) {
80       this.value = value;
81     }
82     /**
83      * @param value The number of the enum to look for.
84      * @return The enum associated with the given number.
85      * @deprecated Use {@link #forNumber(int)} instead.
86      */
87     @java.lang.Deprecated
valueOf(int value)88     public static DestinationCase valueOf(int value) {
89       return forNumber(value);
90     }
91 
forNumber(int value)92     public static DestinationCase forNumber(int value) {
93       switch (value) {
94         case 1:
95           return PUBSUB_DESTINATION;
96         case 0:
97           return DESTINATION_NOT_SET;
98         default:
99           return null;
100       }
101     }
102 
getNumber()103     public int getNumber() {
104       return this.value;
105     }
106   };
107 
getDestinationCase()108   public DestinationCase getDestinationCase() {
109     return DestinationCase.forNumber(destinationCase_);
110   }
111 
112   public static final int PUBSUB_DESTINATION_FIELD_NUMBER = 1;
113   /**
114    *
115    *
116    * <pre>
117    * Destination on Pub/Sub.
118    * </pre>
119    *
120    * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
121    *
122    * @return Whether the pubsubDestination field is set.
123    */
124   @java.lang.Override
hasPubsubDestination()125   public boolean hasPubsubDestination() {
126     return destinationCase_ == 1;
127   }
128   /**
129    *
130    *
131    * <pre>
132    * Destination on Pub/Sub.
133    * </pre>
134    *
135    * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
136    *
137    * @return The pubsubDestination.
138    */
139   @java.lang.Override
getPubsubDestination()140   public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() {
141     if (destinationCase_ == 1) {
142       return (com.google.cloud.asset.v1.PubsubDestination) destination_;
143     }
144     return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
145   }
146   /**
147    *
148    *
149    * <pre>
150    * Destination on Pub/Sub.
151    * </pre>
152    *
153    * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
154    */
155   @java.lang.Override
getPubsubDestinationOrBuilder()156   public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() {
157     if (destinationCase_ == 1) {
158       return (com.google.cloud.asset.v1.PubsubDestination) destination_;
159     }
160     return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
161   }
162 
163   private byte memoizedIsInitialized = -1;
164 
165   @java.lang.Override
isInitialized()166   public final boolean isInitialized() {
167     byte isInitialized = memoizedIsInitialized;
168     if (isInitialized == 1) return true;
169     if (isInitialized == 0) return false;
170 
171     memoizedIsInitialized = 1;
172     return true;
173   }
174 
175   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)176   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
177     if (destinationCase_ == 1) {
178       output.writeMessage(1, (com.google.cloud.asset.v1.PubsubDestination) destination_);
179     }
180     getUnknownFields().writeTo(output);
181   }
182 
183   @java.lang.Override
getSerializedSize()184   public int getSerializedSize() {
185     int size = memoizedSize;
186     if (size != -1) return size;
187 
188     size = 0;
189     if (destinationCase_ == 1) {
190       size +=
191           com.google.protobuf.CodedOutputStream.computeMessageSize(
192               1, (com.google.cloud.asset.v1.PubsubDestination) destination_);
193     }
194     size += getUnknownFields().getSerializedSize();
195     memoizedSize = size;
196     return size;
197   }
198 
199   @java.lang.Override
equals(final java.lang.Object obj)200   public boolean equals(final java.lang.Object obj) {
201     if (obj == this) {
202       return true;
203     }
204     if (!(obj instanceof com.google.cloud.asset.v1.FeedOutputConfig)) {
205       return super.equals(obj);
206     }
207     com.google.cloud.asset.v1.FeedOutputConfig other =
208         (com.google.cloud.asset.v1.FeedOutputConfig) obj;
209 
210     if (!getDestinationCase().equals(other.getDestinationCase())) return false;
211     switch (destinationCase_) {
212       case 1:
213         if (!getPubsubDestination().equals(other.getPubsubDestination())) return false;
214         break;
215       case 0:
216       default:
217     }
218     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
219     return true;
220   }
221 
222   @java.lang.Override
hashCode()223   public int hashCode() {
224     if (memoizedHashCode != 0) {
225       return memoizedHashCode;
226     }
227     int hash = 41;
228     hash = (19 * hash) + getDescriptor().hashCode();
229     switch (destinationCase_) {
230       case 1:
231         hash = (37 * hash) + PUBSUB_DESTINATION_FIELD_NUMBER;
232         hash = (53 * hash) + getPubsubDestination().hashCode();
233         break;
234       case 0:
235       default:
236     }
237     hash = (29 * hash) + getUnknownFields().hashCode();
238     memoizedHashCode = hash;
239     return hash;
240   }
241 
parseFrom(java.nio.ByteBuffer data)242   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(java.nio.ByteBuffer data)
243       throws com.google.protobuf.InvalidProtocolBufferException {
244     return PARSER.parseFrom(data);
245   }
246 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)247   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
248       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
249       throws com.google.protobuf.InvalidProtocolBufferException {
250     return PARSER.parseFrom(data, extensionRegistry);
251   }
252 
parseFrom( com.google.protobuf.ByteString data)253   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
254       com.google.protobuf.ByteString data)
255       throws com.google.protobuf.InvalidProtocolBufferException {
256     return PARSER.parseFrom(data);
257   }
258 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)259   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
260       com.google.protobuf.ByteString data,
261       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
262       throws com.google.protobuf.InvalidProtocolBufferException {
263     return PARSER.parseFrom(data, extensionRegistry);
264   }
265 
parseFrom(byte[] data)266   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(byte[] data)
267       throws com.google.protobuf.InvalidProtocolBufferException {
268     return PARSER.parseFrom(data);
269   }
270 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)271   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
272       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273       throws com.google.protobuf.InvalidProtocolBufferException {
274     return PARSER.parseFrom(data, extensionRegistry);
275   }
276 
parseFrom(java.io.InputStream input)277   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(java.io.InputStream input)
278       throws java.io.IOException {
279     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
280   }
281 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)282   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
283       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
284       throws java.io.IOException {
285     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
286         PARSER, input, extensionRegistry);
287   }
288 
parseDelimitedFrom( java.io.InputStream input)289   public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom(
290       java.io.InputStream input) throws java.io.IOException {
291     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
292   }
293 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)294   public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom(
295       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
296       throws java.io.IOException {
297     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
298         PARSER, input, extensionRegistry);
299   }
300 
parseFrom( com.google.protobuf.CodedInputStream input)301   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
302       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
303     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
304   }
305 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)306   public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(
307       com.google.protobuf.CodedInputStream input,
308       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
309       throws java.io.IOException {
310     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
311         PARSER, input, extensionRegistry);
312   }
313 
314   @java.lang.Override
newBuilderForType()315   public Builder newBuilderForType() {
316     return newBuilder();
317   }
318 
newBuilder()319   public static Builder newBuilder() {
320     return DEFAULT_INSTANCE.toBuilder();
321   }
322 
newBuilder(com.google.cloud.asset.v1.FeedOutputConfig prototype)323   public static Builder newBuilder(com.google.cloud.asset.v1.FeedOutputConfig prototype) {
324     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
325   }
326 
327   @java.lang.Override
toBuilder()328   public Builder toBuilder() {
329     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
330   }
331 
332   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)333   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
334     Builder builder = new Builder(parent);
335     return builder;
336   }
337   /**
338    *
339    *
340    * <pre>
341    * Output configuration for asset feed destination.
342    * </pre>
343    *
344    * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig}
345    */
346   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
347       implements
348       // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.FeedOutputConfig)
349       com.google.cloud.asset.v1.FeedOutputConfigOrBuilder {
getDescriptor()350     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
351       return com.google.cloud.asset.v1.AssetServiceProto
352           .internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor;
353     }
354 
355     @java.lang.Override
356     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()357         internalGetFieldAccessorTable() {
358       return com.google.cloud.asset.v1.AssetServiceProto
359           .internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable
360           .ensureFieldAccessorsInitialized(
361               com.google.cloud.asset.v1.FeedOutputConfig.class,
362               com.google.cloud.asset.v1.FeedOutputConfig.Builder.class);
363     }
364 
365     // Construct using com.google.cloud.asset.v1.FeedOutputConfig.newBuilder()
Builder()366     private Builder() {}
367 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)368     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
369       super(parent);
370     }
371 
372     @java.lang.Override
clear()373     public Builder clear() {
374       super.clear();
375       bitField0_ = 0;
376       if (pubsubDestinationBuilder_ != null) {
377         pubsubDestinationBuilder_.clear();
378       }
379       destinationCase_ = 0;
380       destination_ = null;
381       return this;
382     }
383 
384     @java.lang.Override
getDescriptorForType()385     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
386       return com.google.cloud.asset.v1.AssetServiceProto
387           .internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor;
388     }
389 
390     @java.lang.Override
getDefaultInstanceForType()391     public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() {
392       return com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance();
393     }
394 
395     @java.lang.Override
build()396     public com.google.cloud.asset.v1.FeedOutputConfig build() {
397       com.google.cloud.asset.v1.FeedOutputConfig result = buildPartial();
398       if (!result.isInitialized()) {
399         throw newUninitializedMessageException(result);
400       }
401       return result;
402     }
403 
404     @java.lang.Override
buildPartial()405     public com.google.cloud.asset.v1.FeedOutputConfig buildPartial() {
406       com.google.cloud.asset.v1.FeedOutputConfig result =
407           new com.google.cloud.asset.v1.FeedOutputConfig(this);
408       if (bitField0_ != 0) {
409         buildPartial0(result);
410       }
411       buildPartialOneofs(result);
412       onBuilt();
413       return result;
414     }
415 
buildPartial0(com.google.cloud.asset.v1.FeedOutputConfig result)416     private void buildPartial0(com.google.cloud.asset.v1.FeedOutputConfig result) {
417       int from_bitField0_ = bitField0_;
418     }
419 
buildPartialOneofs(com.google.cloud.asset.v1.FeedOutputConfig result)420     private void buildPartialOneofs(com.google.cloud.asset.v1.FeedOutputConfig result) {
421       result.destinationCase_ = destinationCase_;
422       result.destination_ = this.destination_;
423       if (destinationCase_ == 1 && pubsubDestinationBuilder_ != null) {
424         result.destination_ = pubsubDestinationBuilder_.build();
425       }
426     }
427 
428     @java.lang.Override
clone()429     public Builder clone() {
430       return super.clone();
431     }
432 
433     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)434     public Builder setField(
435         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
436       return super.setField(field, value);
437     }
438 
439     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)440     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
441       return super.clearField(field);
442     }
443 
444     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)445     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
446       return super.clearOneof(oneof);
447     }
448 
449     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)450     public Builder setRepeatedField(
451         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
452       return super.setRepeatedField(field, index, value);
453     }
454 
455     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)456     public Builder addRepeatedField(
457         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
458       return super.addRepeatedField(field, value);
459     }
460 
461     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)462     public Builder mergeFrom(com.google.protobuf.Message other) {
463       if (other instanceof com.google.cloud.asset.v1.FeedOutputConfig) {
464         return mergeFrom((com.google.cloud.asset.v1.FeedOutputConfig) other);
465       } else {
466         super.mergeFrom(other);
467         return this;
468       }
469     }
470 
mergeFrom(com.google.cloud.asset.v1.FeedOutputConfig other)471     public Builder mergeFrom(com.google.cloud.asset.v1.FeedOutputConfig other) {
472       if (other == com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()) return this;
473       switch (other.getDestinationCase()) {
474         case PUBSUB_DESTINATION:
475           {
476             mergePubsubDestination(other.getPubsubDestination());
477             break;
478           }
479         case DESTINATION_NOT_SET:
480           {
481             break;
482           }
483       }
484       this.mergeUnknownFields(other.getUnknownFields());
485       onChanged();
486       return this;
487     }
488 
489     @java.lang.Override
isInitialized()490     public final boolean isInitialized() {
491       return true;
492     }
493 
494     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)495     public Builder mergeFrom(
496         com.google.protobuf.CodedInputStream input,
497         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
498         throws java.io.IOException {
499       if (extensionRegistry == null) {
500         throw new java.lang.NullPointerException();
501       }
502       try {
503         boolean done = false;
504         while (!done) {
505           int tag = input.readTag();
506           switch (tag) {
507             case 0:
508               done = true;
509               break;
510             case 10:
511               {
512                 input.readMessage(
513                     getPubsubDestinationFieldBuilder().getBuilder(), extensionRegistry);
514                 destinationCase_ = 1;
515                 break;
516               } // case 10
517             default:
518               {
519                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
520                   done = true; // was an endgroup tag
521                 }
522                 break;
523               } // default:
524           } // switch (tag)
525         } // while (!done)
526       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
527         throw e.unwrapIOException();
528       } finally {
529         onChanged();
530       } // finally
531       return this;
532     }
533 
534     private int destinationCase_ = 0;
535     private java.lang.Object destination_;
536 
getDestinationCase()537     public DestinationCase getDestinationCase() {
538       return DestinationCase.forNumber(destinationCase_);
539     }
540 
clearDestination()541     public Builder clearDestination() {
542       destinationCase_ = 0;
543       destination_ = null;
544       onChanged();
545       return this;
546     }
547 
548     private int bitField0_;
549 
550     private com.google.protobuf.SingleFieldBuilderV3<
551             com.google.cloud.asset.v1.PubsubDestination,
552             com.google.cloud.asset.v1.PubsubDestination.Builder,
553             com.google.cloud.asset.v1.PubsubDestinationOrBuilder>
554         pubsubDestinationBuilder_;
555     /**
556      *
557      *
558      * <pre>
559      * Destination on Pub/Sub.
560      * </pre>
561      *
562      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
563      *
564      * @return Whether the pubsubDestination field is set.
565      */
566     @java.lang.Override
hasPubsubDestination()567     public boolean hasPubsubDestination() {
568       return destinationCase_ == 1;
569     }
570     /**
571      *
572      *
573      * <pre>
574      * Destination on Pub/Sub.
575      * </pre>
576      *
577      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
578      *
579      * @return The pubsubDestination.
580      */
581     @java.lang.Override
getPubsubDestination()582     public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() {
583       if (pubsubDestinationBuilder_ == null) {
584         if (destinationCase_ == 1) {
585           return (com.google.cloud.asset.v1.PubsubDestination) destination_;
586         }
587         return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
588       } else {
589         if (destinationCase_ == 1) {
590           return pubsubDestinationBuilder_.getMessage();
591         }
592         return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
593       }
594     }
595     /**
596      *
597      *
598      * <pre>
599      * Destination on Pub/Sub.
600      * </pre>
601      *
602      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
603      */
setPubsubDestination(com.google.cloud.asset.v1.PubsubDestination value)604     public Builder setPubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) {
605       if (pubsubDestinationBuilder_ == null) {
606         if (value == null) {
607           throw new NullPointerException();
608         }
609         destination_ = value;
610         onChanged();
611       } else {
612         pubsubDestinationBuilder_.setMessage(value);
613       }
614       destinationCase_ = 1;
615       return this;
616     }
617     /**
618      *
619      *
620      * <pre>
621      * Destination on Pub/Sub.
622      * </pre>
623      *
624      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
625      */
setPubsubDestination( com.google.cloud.asset.v1.PubsubDestination.Builder builderForValue)626     public Builder setPubsubDestination(
627         com.google.cloud.asset.v1.PubsubDestination.Builder builderForValue) {
628       if (pubsubDestinationBuilder_ == null) {
629         destination_ = builderForValue.build();
630         onChanged();
631       } else {
632         pubsubDestinationBuilder_.setMessage(builderForValue.build());
633       }
634       destinationCase_ = 1;
635       return this;
636     }
637     /**
638      *
639      *
640      * <pre>
641      * Destination on Pub/Sub.
642      * </pre>
643      *
644      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
645      */
mergePubsubDestination(com.google.cloud.asset.v1.PubsubDestination value)646     public Builder mergePubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) {
647       if (pubsubDestinationBuilder_ == null) {
648         if (destinationCase_ == 1
649             && destination_ != com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance()) {
650           destination_ =
651               com.google.cloud.asset.v1.PubsubDestination.newBuilder(
652                       (com.google.cloud.asset.v1.PubsubDestination) destination_)
653                   .mergeFrom(value)
654                   .buildPartial();
655         } else {
656           destination_ = value;
657         }
658         onChanged();
659       } else {
660         if (destinationCase_ == 1) {
661           pubsubDestinationBuilder_.mergeFrom(value);
662         } else {
663           pubsubDestinationBuilder_.setMessage(value);
664         }
665       }
666       destinationCase_ = 1;
667       return this;
668     }
669     /**
670      *
671      *
672      * <pre>
673      * Destination on Pub/Sub.
674      * </pre>
675      *
676      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
677      */
clearPubsubDestination()678     public Builder clearPubsubDestination() {
679       if (pubsubDestinationBuilder_ == null) {
680         if (destinationCase_ == 1) {
681           destinationCase_ = 0;
682           destination_ = null;
683           onChanged();
684         }
685       } else {
686         if (destinationCase_ == 1) {
687           destinationCase_ = 0;
688           destination_ = null;
689         }
690         pubsubDestinationBuilder_.clear();
691       }
692       return this;
693     }
694     /**
695      *
696      *
697      * <pre>
698      * Destination on Pub/Sub.
699      * </pre>
700      *
701      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
702      */
getPubsubDestinationBuilder()703     public com.google.cloud.asset.v1.PubsubDestination.Builder getPubsubDestinationBuilder() {
704       return getPubsubDestinationFieldBuilder().getBuilder();
705     }
706     /**
707      *
708      *
709      * <pre>
710      * Destination on Pub/Sub.
711      * </pre>
712      *
713      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
714      */
715     @java.lang.Override
getPubsubDestinationOrBuilder()716     public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() {
717       if ((destinationCase_ == 1) && (pubsubDestinationBuilder_ != null)) {
718         return pubsubDestinationBuilder_.getMessageOrBuilder();
719       } else {
720         if (destinationCase_ == 1) {
721           return (com.google.cloud.asset.v1.PubsubDestination) destination_;
722         }
723         return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
724       }
725     }
726     /**
727      *
728      *
729      * <pre>
730      * Destination on Pub/Sub.
731      * </pre>
732      *
733      * <code>.google.cloud.asset.v1.PubsubDestination pubsub_destination = 1;</code>
734      */
735     private com.google.protobuf.SingleFieldBuilderV3<
736             com.google.cloud.asset.v1.PubsubDestination,
737             com.google.cloud.asset.v1.PubsubDestination.Builder,
738             com.google.cloud.asset.v1.PubsubDestinationOrBuilder>
getPubsubDestinationFieldBuilder()739         getPubsubDestinationFieldBuilder() {
740       if (pubsubDestinationBuilder_ == null) {
741         if (!(destinationCase_ == 1)) {
742           destination_ = com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance();
743         }
744         pubsubDestinationBuilder_ =
745             new com.google.protobuf.SingleFieldBuilderV3<
746                 com.google.cloud.asset.v1.PubsubDestination,
747                 com.google.cloud.asset.v1.PubsubDestination.Builder,
748                 com.google.cloud.asset.v1.PubsubDestinationOrBuilder>(
749                 (com.google.cloud.asset.v1.PubsubDestination) destination_,
750                 getParentForChildren(),
751                 isClean());
752         destination_ = null;
753       }
754       destinationCase_ = 1;
755       onChanged();
756       return pubsubDestinationBuilder_;
757     }
758 
759     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)760     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
761       return super.setUnknownFields(unknownFields);
762     }
763 
764     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)765     public final Builder mergeUnknownFields(
766         final com.google.protobuf.UnknownFieldSet unknownFields) {
767       return super.mergeUnknownFields(unknownFields);
768     }
769 
770     // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.FeedOutputConfig)
771   }
772 
773   // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.FeedOutputConfig)
774   private static final com.google.cloud.asset.v1.FeedOutputConfig DEFAULT_INSTANCE;
775 
776   static {
777     DEFAULT_INSTANCE = new com.google.cloud.asset.v1.FeedOutputConfig();
778   }
779 
getDefaultInstance()780   public static com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstance() {
781     return DEFAULT_INSTANCE;
782   }
783 
784   private static final com.google.protobuf.Parser<FeedOutputConfig> PARSER =
785       new com.google.protobuf.AbstractParser<FeedOutputConfig>() {
786         @java.lang.Override
787         public FeedOutputConfig parsePartialFrom(
788             com.google.protobuf.CodedInputStream input,
789             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
790             throws com.google.protobuf.InvalidProtocolBufferException {
791           Builder builder = newBuilder();
792           try {
793             builder.mergeFrom(input, extensionRegistry);
794           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
795             throw e.setUnfinishedMessage(builder.buildPartial());
796           } catch (com.google.protobuf.UninitializedMessageException e) {
797             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
798           } catch (java.io.IOException e) {
799             throw new com.google.protobuf.InvalidProtocolBufferException(e)
800                 .setUnfinishedMessage(builder.buildPartial());
801           }
802           return builder.buildPartial();
803         }
804       };
805 
parser()806   public static com.google.protobuf.Parser<FeedOutputConfig> parser() {
807     return PARSER;
808   }
809 
810   @java.lang.Override
getParserForType()811   public com.google.protobuf.Parser<FeedOutputConfig> getParserForType() {
812     return PARSER;
813   }
814 
815   @java.lang.Override
getDefaultInstanceForType()816   public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() {
817     return DEFAULT_INSTANCE;
818   }
819 }
820