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/v1beta1/cloud_redis.proto 18 19 package com.google.cloud.redis.v1beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * The output content 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.redis.v1beta1.OutputConfig} 29 */ 30 public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.redis.v1beta1.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.v1beta1.CloudRedisServiceBetaProto 55 .internal_static_google_cloud_redis_v1beta1_OutputConfig_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto 62 .internal_static_google_cloud_redis_v1beta1_OutputConfig_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.redis.v1beta1.OutputConfig.class, 65 com.google.cloud.redis.v1beta1.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.v1beta1.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.v1beta1.GcsDestination gcs_destination = 1;</code> 136 * 137 * @return The gcsDestination. 138 */ 139 @java.lang.Override getGcsDestination()140 public com.google.cloud.redis.v1beta1.GcsDestination getGcsDestination() { 141 if (destinationCase_ == 1) { 142 return (com.google.cloud.redis.v1beta1.GcsDestination) destination_; 143 } 144 return com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance(); 145 } 146 /** 147 * 148 * 149 * <pre> 150 * Google Cloud Storage destination for output content. 151 * </pre> 152 * 153 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 154 */ 155 @java.lang.Override getGcsDestinationOrBuilder()156 public com.google.cloud.redis.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { 157 if (destinationCase_ == 1) { 158 return (com.google.cloud.redis.v1beta1.GcsDestination) destination_; 159 } 160 return com.google.cloud.redis.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.OutputConfig)) { 205 return super.equals(obj); 206 } 207 com.google.cloud.redis.v1beta1.OutputConfig other = 208 (com.google.cloud.redis.v1beta1.OutputConfig) obj; 209 210 if (!getDestinationCase().equals(other.getDestinationCase())) return false; 211 switch (destinationCase_) { 212 case 1: 213 if (!getGcsDestination().equals(other.getGcsDestination())) 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) + GCS_DESTINATION_FIELD_NUMBER; 232 hash = (53 * hash) + getGcsDestination().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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig prototype)323 public static Builder newBuilder(com.google.cloud.redis.v1beta1.OutputConfig 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 * The output content 342 * </pre> 343 * 344 * Protobuf type {@code google.cloud.redis.v1beta1.OutputConfig} 345 */ 346 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 347 implements 348 // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1beta1.OutputConfig) 349 com.google.cloud.redis.v1beta1.OutputConfigOrBuilder { getDescriptor()350 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 351 return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto 352 .internal_static_google_cloud_redis_v1beta1_OutputConfig_descriptor; 353 } 354 355 @java.lang.Override 356 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()357 internalGetFieldAccessorTable() { 358 return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto 359 .internal_static_google_cloud_redis_v1beta1_OutputConfig_fieldAccessorTable 360 .ensureFieldAccessorsInitialized( 361 com.google.cloud.redis.v1beta1.OutputConfig.class, 362 com.google.cloud.redis.v1beta1.OutputConfig.Builder.class); 363 } 364 365 // Construct using com.google.cloud.redis.v1beta1.OutputConfig.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 (gcsDestinationBuilder_ != null) { 377 gcsDestinationBuilder_.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.redis.v1beta1.CloudRedisServiceBetaProto 387 .internal_static_google_cloud_redis_v1beta1_OutputConfig_descriptor; 388 } 389 390 @java.lang.Override getDefaultInstanceForType()391 public com.google.cloud.redis.v1beta1.OutputConfig getDefaultInstanceForType() { 392 return com.google.cloud.redis.v1beta1.OutputConfig.getDefaultInstance(); 393 } 394 395 @java.lang.Override build()396 public com.google.cloud.redis.v1beta1.OutputConfig build() { 397 com.google.cloud.redis.v1beta1.OutputConfig 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.redis.v1beta1.OutputConfig buildPartial() { 406 com.google.cloud.redis.v1beta1.OutputConfig result = 407 new com.google.cloud.redis.v1beta1.OutputConfig(this); 408 if (bitField0_ != 0) { 409 buildPartial0(result); 410 } 411 buildPartialOneofs(result); 412 onBuilt(); 413 return result; 414 } 415 buildPartial0(com.google.cloud.redis.v1beta1.OutputConfig result)416 private void buildPartial0(com.google.cloud.redis.v1beta1.OutputConfig result) { 417 int from_bitField0_ = bitField0_; 418 } 419 buildPartialOneofs(com.google.cloud.redis.v1beta1.OutputConfig result)420 private void buildPartialOneofs(com.google.cloud.redis.v1beta1.OutputConfig result) { 421 result.destinationCase_ = destinationCase_; 422 result.destination_ = this.destination_; 423 if (destinationCase_ == 1 && gcsDestinationBuilder_ != null) { 424 result.destination_ = gcsDestinationBuilder_.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.redis.v1beta1.OutputConfig) { 464 return mergeFrom((com.google.cloud.redis.v1beta1.OutputConfig) other); 465 } else { 466 super.mergeFrom(other); 467 return this; 468 } 469 } 470 mergeFrom(com.google.cloud.redis.v1beta1.OutputConfig other)471 public Builder mergeFrom(com.google.cloud.redis.v1beta1.OutputConfig other) { 472 if (other == com.google.cloud.redis.v1beta1.OutputConfig.getDefaultInstance()) return this; 473 switch (other.getDestinationCase()) { 474 case GCS_DESTINATION: 475 { 476 mergeGcsDestination(other.getGcsDestination()); 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(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); 513 destinationCase_ = 1; 514 break; 515 } // case 10 516 default: 517 { 518 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 519 done = true; // was an endgroup tag 520 } 521 break; 522 } // default: 523 } // switch (tag) 524 } // while (!done) 525 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 526 throw e.unwrapIOException(); 527 } finally { 528 onChanged(); 529 } // finally 530 return this; 531 } 532 533 private int destinationCase_ = 0; 534 private java.lang.Object destination_; 535 getDestinationCase()536 public DestinationCase getDestinationCase() { 537 return DestinationCase.forNumber(destinationCase_); 538 } 539 clearDestination()540 public Builder clearDestination() { 541 destinationCase_ = 0; 542 destination_ = null; 543 onChanged(); 544 return this; 545 } 546 547 private int bitField0_; 548 549 private com.google.protobuf.SingleFieldBuilderV3< 550 com.google.cloud.redis.v1beta1.GcsDestination, 551 com.google.cloud.redis.v1beta1.GcsDestination.Builder, 552 com.google.cloud.redis.v1beta1.GcsDestinationOrBuilder> 553 gcsDestinationBuilder_; 554 /** 555 * 556 * 557 * <pre> 558 * Google Cloud Storage destination for output content. 559 * </pre> 560 * 561 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 562 * 563 * @return Whether the gcsDestination field is set. 564 */ 565 @java.lang.Override hasGcsDestination()566 public boolean hasGcsDestination() { 567 return destinationCase_ == 1; 568 } 569 /** 570 * 571 * 572 * <pre> 573 * Google Cloud Storage destination for output content. 574 * </pre> 575 * 576 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 577 * 578 * @return The gcsDestination. 579 */ 580 @java.lang.Override getGcsDestination()581 public com.google.cloud.redis.v1beta1.GcsDestination getGcsDestination() { 582 if (gcsDestinationBuilder_ == null) { 583 if (destinationCase_ == 1) { 584 return (com.google.cloud.redis.v1beta1.GcsDestination) destination_; 585 } 586 return com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance(); 587 } else { 588 if (destinationCase_ == 1) { 589 return gcsDestinationBuilder_.getMessage(); 590 } 591 return com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance(); 592 } 593 } 594 /** 595 * 596 * 597 * <pre> 598 * Google Cloud Storage destination for output content. 599 * </pre> 600 * 601 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 602 */ setGcsDestination(com.google.cloud.redis.v1beta1.GcsDestination value)603 public Builder setGcsDestination(com.google.cloud.redis.v1beta1.GcsDestination value) { 604 if (gcsDestinationBuilder_ == null) { 605 if (value == null) { 606 throw new NullPointerException(); 607 } 608 destination_ = value; 609 onChanged(); 610 } else { 611 gcsDestinationBuilder_.setMessage(value); 612 } 613 destinationCase_ = 1; 614 return this; 615 } 616 /** 617 * 618 * 619 * <pre> 620 * Google Cloud Storage destination for output content. 621 * </pre> 622 * 623 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 624 */ setGcsDestination( com.google.cloud.redis.v1beta1.GcsDestination.Builder builderForValue)625 public Builder setGcsDestination( 626 com.google.cloud.redis.v1beta1.GcsDestination.Builder builderForValue) { 627 if (gcsDestinationBuilder_ == null) { 628 destination_ = builderForValue.build(); 629 onChanged(); 630 } else { 631 gcsDestinationBuilder_.setMessage(builderForValue.build()); 632 } 633 destinationCase_ = 1; 634 return this; 635 } 636 /** 637 * 638 * 639 * <pre> 640 * Google Cloud Storage destination for output content. 641 * </pre> 642 * 643 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 644 */ mergeGcsDestination(com.google.cloud.redis.v1beta1.GcsDestination value)645 public Builder mergeGcsDestination(com.google.cloud.redis.v1beta1.GcsDestination value) { 646 if (gcsDestinationBuilder_ == null) { 647 if (destinationCase_ == 1 648 && destination_ != com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance()) { 649 destination_ = 650 com.google.cloud.redis.v1beta1.GcsDestination.newBuilder( 651 (com.google.cloud.redis.v1beta1.GcsDestination) destination_) 652 .mergeFrom(value) 653 .buildPartial(); 654 } else { 655 destination_ = value; 656 } 657 onChanged(); 658 } else { 659 if (destinationCase_ == 1) { 660 gcsDestinationBuilder_.mergeFrom(value); 661 } else { 662 gcsDestinationBuilder_.setMessage(value); 663 } 664 } 665 destinationCase_ = 1; 666 return this; 667 } 668 /** 669 * 670 * 671 * <pre> 672 * Google Cloud Storage destination for output content. 673 * </pre> 674 * 675 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 676 */ clearGcsDestination()677 public Builder clearGcsDestination() { 678 if (gcsDestinationBuilder_ == null) { 679 if (destinationCase_ == 1) { 680 destinationCase_ = 0; 681 destination_ = null; 682 onChanged(); 683 } 684 } else { 685 if (destinationCase_ == 1) { 686 destinationCase_ = 0; 687 destination_ = null; 688 } 689 gcsDestinationBuilder_.clear(); 690 } 691 return this; 692 } 693 /** 694 * 695 * 696 * <pre> 697 * Google Cloud Storage destination for output content. 698 * </pre> 699 * 700 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 701 */ getGcsDestinationBuilder()702 public com.google.cloud.redis.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { 703 return getGcsDestinationFieldBuilder().getBuilder(); 704 } 705 /** 706 * 707 * 708 * <pre> 709 * Google Cloud Storage destination for output content. 710 * </pre> 711 * 712 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 713 */ 714 @java.lang.Override getGcsDestinationOrBuilder()715 public com.google.cloud.redis.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { 716 if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { 717 return gcsDestinationBuilder_.getMessageOrBuilder(); 718 } else { 719 if (destinationCase_ == 1) { 720 return (com.google.cloud.redis.v1beta1.GcsDestination) destination_; 721 } 722 return com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance(); 723 } 724 } 725 /** 726 * 727 * 728 * <pre> 729 * Google Cloud Storage destination for output content. 730 * </pre> 731 * 732 * <code>.google.cloud.redis.v1beta1.GcsDestination gcs_destination = 1;</code> 733 */ 734 private com.google.protobuf.SingleFieldBuilderV3< 735 com.google.cloud.redis.v1beta1.GcsDestination, 736 com.google.cloud.redis.v1beta1.GcsDestination.Builder, 737 com.google.cloud.redis.v1beta1.GcsDestinationOrBuilder> getGcsDestinationFieldBuilder()738 getGcsDestinationFieldBuilder() { 739 if (gcsDestinationBuilder_ == null) { 740 if (!(destinationCase_ == 1)) { 741 destination_ = com.google.cloud.redis.v1beta1.GcsDestination.getDefaultInstance(); 742 } 743 gcsDestinationBuilder_ = 744 new com.google.protobuf.SingleFieldBuilderV3< 745 com.google.cloud.redis.v1beta1.GcsDestination, 746 com.google.cloud.redis.v1beta1.GcsDestination.Builder, 747 com.google.cloud.redis.v1beta1.GcsDestinationOrBuilder>( 748 (com.google.cloud.redis.v1beta1.GcsDestination) destination_, 749 getParentForChildren(), 750 isClean()); 751 destination_ = null; 752 } 753 destinationCase_ = 1; 754 onChanged(); 755 return gcsDestinationBuilder_; 756 } 757 758 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)759 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 760 return super.setUnknownFields(unknownFields); 761 } 762 763 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)764 public final Builder mergeUnknownFields( 765 final com.google.protobuf.UnknownFieldSet unknownFields) { 766 return super.mergeUnknownFields(unknownFields); 767 } 768 769 // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1beta1.OutputConfig) 770 } 771 772 // @@protoc_insertion_point(class_scope:google.cloud.redis.v1beta1.OutputConfig) 773 private static final com.google.cloud.redis.v1beta1.OutputConfig DEFAULT_INSTANCE; 774 775 static { 776 DEFAULT_INSTANCE = new com.google.cloud.redis.v1beta1.OutputConfig(); 777 } 778 getDefaultInstance()779 public static com.google.cloud.redis.v1beta1.OutputConfig getDefaultInstance() { 780 return DEFAULT_INSTANCE; 781 } 782 783 private static final com.google.protobuf.Parser<OutputConfig> PARSER = 784 new com.google.protobuf.AbstractParser<OutputConfig>() { 785 @java.lang.Override 786 public OutputConfig parsePartialFrom( 787 com.google.protobuf.CodedInputStream input, 788 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 789 throws com.google.protobuf.InvalidProtocolBufferException { 790 Builder builder = newBuilder(); 791 try { 792 builder.mergeFrom(input, extensionRegistry); 793 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 794 throw e.setUnfinishedMessage(builder.buildPartial()); 795 } catch (com.google.protobuf.UninitializedMessageException e) { 796 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 797 } catch (java.io.IOException e) { 798 throw new com.google.protobuf.InvalidProtocolBufferException(e) 799 .setUnfinishedMessage(builder.buildPartial()); 800 } 801 return builder.buildPartial(); 802 } 803 }; 804 parser()805 public static com.google.protobuf.Parser<OutputConfig> parser() { 806 return PARSER; 807 } 808 809 @java.lang.Override getParserForType()810 public com.google.protobuf.Parser<OutputConfig> getParserForType() { 811 return PARSER; 812 } 813 814 @java.lang.Override getDefaultInstanceForType()815 public com.google.cloud.redis.v1beta1.OutputConfig getDefaultInstanceForType() { 816 return DEFAULT_INSTANCE; 817 } 818 } 819