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/v1p2beta1/asset_service.proto 18 19 package com.google.cloud.asset.v1p2beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Output configuration for export assets destination. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.asset.v1p2beta1.OutputConfig} 29 */ 30 public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.OutputConfig) 33 OutputConfigOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use OutputConfig.newBuilder() to construct. OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 OutputConfig()40 private OutputConfig() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new OutputConfig(); 46 } 47 48 @java.lang.Override getUnknownFields()49 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 50 return this.unknownFields; 51 } 52 getDescriptor()53 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 54 return com.google.cloud.asset.v1p2beta1.AssetServiceProto 55 .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.asset.v1p2beta1.AssetServiceProto 62 .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.asset.v1p2beta1.OutputConfig.class, 65 com.google.cloud.asset.v1p2beta1.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 * Destination on Cloud Storage. 118 * </pre> 119 * 120 * <code>.google.cloud.asset.v1p2beta1.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 * Destination on Cloud Storage. 133 * </pre> 134 * 135 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 136 * 137 * @return The gcsDestination. 138 */ 139 @java.lang.Override getGcsDestination()140 public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { 141 if (destinationCase_ == 1) { 142 return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; 143 } 144 return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); 145 } 146 /** 147 * 148 * 149 * <pre> 150 * Destination on Cloud Storage. 151 * </pre> 152 * 153 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 154 */ 155 @java.lang.Override getGcsDestinationOrBuilder()156 public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { 157 if (destinationCase_ == 1) { 158 return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; 159 } 160 return com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.OutputConfig)) { 205 return super.equals(obj); 206 } 207 com.google.cloud.asset.v1p2beta1.OutputConfig other = 208 (com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.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.asset.v1p2beta1.OutputConfig prototype)323 public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.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 * Output configuration for export assets destination. 342 * </pre> 343 * 344 * Protobuf type {@code google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.OutputConfig) 349 com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder { getDescriptor()350 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 351 return com.google.cloud.asset.v1p2beta1.AssetServiceProto 352 .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; 353 } 354 355 @java.lang.Override 356 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()357 internalGetFieldAccessorTable() { 358 return com.google.cloud.asset.v1p2beta1.AssetServiceProto 359 .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable 360 .ensureFieldAccessorsInitialized( 361 com.google.cloud.asset.v1p2beta1.OutputConfig.class, 362 com.google.cloud.asset.v1p2beta1.OutputConfig.Builder.class); 363 } 364 365 // Construct using com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.AssetServiceProto 387 .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; 388 } 389 390 @java.lang.Override getDefaultInstanceForType()391 public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { 392 return com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance(); 393 } 394 395 @java.lang.Override build()396 public com.google.cloud.asset.v1p2beta1.OutputConfig build() { 397 com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.OutputConfig buildPartial() { 406 com.google.cloud.asset.v1p2beta1.OutputConfig result = 407 new com.google.cloud.asset.v1p2beta1.OutputConfig(this); 408 if (bitField0_ != 0) { 409 buildPartial0(result); 410 } 411 buildPartialOneofs(result); 412 onBuilt(); 413 return result; 414 } 415 buildPartial0(com.google.cloud.asset.v1p2beta1.OutputConfig result)416 private void buildPartial0(com.google.cloud.asset.v1p2beta1.OutputConfig result) { 417 int from_bitField0_ = bitField0_; 418 } 419 buildPartialOneofs(com.google.cloud.asset.v1p2beta1.OutputConfig result)420 private void buildPartialOneofs(com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.OutputConfig) { 464 return mergeFrom((com.google.cloud.asset.v1p2beta1.OutputConfig) other); 465 } else { 466 super.mergeFrom(other); 467 return this; 468 } 469 } 470 mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other)471 public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other) { 472 if (other == com.google.cloud.asset.v1p2beta1.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.asset.v1p2beta1.GcsDestination, 551 com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, 552 com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> 553 gcsDestinationBuilder_; 554 /** 555 * 556 * 557 * <pre> 558 * Destination on Cloud Storage. 559 * </pre> 560 * 561 * <code>.google.cloud.asset.v1p2beta1.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 * Destination on Cloud Storage. 574 * </pre> 575 * 576 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 577 * 578 * @return The gcsDestination. 579 */ 580 @java.lang.Override getGcsDestination()581 public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { 582 if (gcsDestinationBuilder_ == null) { 583 if (destinationCase_ == 1) { 584 return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; 585 } 586 return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); 587 } else { 588 if (destinationCase_ == 1) { 589 return gcsDestinationBuilder_.getMessage(); 590 } 591 return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); 592 } 593 } 594 /** 595 * 596 * 597 * <pre> 598 * Destination on Cloud Storage. 599 * </pre> 600 * 601 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 602 */ setGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value)603 public Builder setGcsDestination(com.google.cloud.asset.v1p2beta1.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 * Destination on Cloud Storage. 621 * </pre> 622 * 623 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 624 */ setGcsDestination( com.google.cloud.asset.v1p2beta1.GcsDestination.Builder builderForValue)625 public Builder setGcsDestination( 626 com.google.cloud.asset.v1p2beta1.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 * Destination on Cloud Storage. 641 * </pre> 642 * 643 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 644 */ mergeGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value)645 public Builder mergeGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value) { 646 if (gcsDestinationBuilder_ == null) { 647 if (destinationCase_ == 1 648 && destination_ 649 != com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance()) { 650 destination_ = 651 com.google.cloud.asset.v1p2beta1.GcsDestination.newBuilder( 652 (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_) 653 .mergeFrom(value) 654 .buildPartial(); 655 } else { 656 destination_ = value; 657 } 658 onChanged(); 659 } else { 660 if (destinationCase_ == 1) { 661 gcsDestinationBuilder_.mergeFrom(value); 662 } else { 663 gcsDestinationBuilder_.setMessage(value); 664 } 665 } 666 destinationCase_ = 1; 667 return this; 668 } 669 /** 670 * 671 * 672 * <pre> 673 * Destination on Cloud Storage. 674 * </pre> 675 * 676 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 677 */ clearGcsDestination()678 public Builder clearGcsDestination() { 679 if (gcsDestinationBuilder_ == 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 gcsDestinationBuilder_.clear(); 691 } 692 return this; 693 } 694 /** 695 * 696 * 697 * <pre> 698 * Destination on Cloud Storage. 699 * </pre> 700 * 701 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 702 */ getGcsDestinationBuilder()703 public com.google.cloud.asset.v1p2beta1.GcsDestination.Builder getGcsDestinationBuilder() { 704 return getGcsDestinationFieldBuilder().getBuilder(); 705 } 706 /** 707 * 708 * 709 * <pre> 710 * Destination on Cloud Storage. 711 * </pre> 712 * 713 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 714 */ 715 @java.lang.Override getGcsDestinationOrBuilder()716 public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { 717 if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { 718 return gcsDestinationBuilder_.getMessageOrBuilder(); 719 } else { 720 if (destinationCase_ == 1) { 721 return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; 722 } 723 return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); 724 } 725 } 726 /** 727 * 728 * 729 * <pre> 730 * Destination on Cloud Storage. 731 * </pre> 732 * 733 * <code>.google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1;</code> 734 */ 735 private com.google.protobuf.SingleFieldBuilderV3< 736 com.google.cloud.asset.v1p2beta1.GcsDestination, 737 com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, 738 com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> getGcsDestinationFieldBuilder()739 getGcsDestinationFieldBuilder() { 740 if (gcsDestinationBuilder_ == null) { 741 if (!(destinationCase_ == 1)) { 742 destination_ = com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); 743 } 744 gcsDestinationBuilder_ = 745 new com.google.protobuf.SingleFieldBuilderV3< 746 com.google.cloud.asset.v1p2beta1.GcsDestination, 747 com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, 748 com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder>( 749 (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_, 750 getParentForChildren(), 751 isClean()); 752 destination_ = null; 753 } 754 destinationCase_ = 1; 755 onChanged(); 756 return gcsDestinationBuilder_; 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.v1p2beta1.OutputConfig) 771 } 772 773 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.OutputConfig) 774 private static final com.google.cloud.asset.v1p2beta1.OutputConfig DEFAULT_INSTANCE; 775 776 static { 777 DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.OutputConfig(); 778 } 779 getDefaultInstance()780 public static com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstance() { 781 return DEFAULT_INSTANCE; 782 } 783 784 private static final com.google.protobuf.Parser<OutputConfig> PARSER = 785 new com.google.protobuf.AbstractParser<OutputConfig>() { 786 @java.lang.Override 787 public OutputConfig 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<OutputConfig> parser() { 807 return PARSER; 808 } 809 810 @java.lang.Override getParserForType()811 public com.google.protobuf.Parser<OutputConfig> getParserForType() { 812 return PARSER; 813 } 814 815 @java.lang.Override getDefaultInstanceForType()816 public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { 817 return DEFAULT_INSTANCE; 818 } 819 } 820