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