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/devtools/cloudbuild/v1/cloudbuild.proto 18 19 package com.google.cloudbuild.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * PubsubConfig describes the configuration of a trigger that 26 * creates a build whenever a Pub/Sub message is published. 27 * </pre> 28 * 29 * Protobuf type {@code google.devtools.cloudbuild.v1.PubsubConfig} 30 */ 31 public final class PubsubConfig extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.PubsubConfig) 34 PubsubConfigOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use PubsubConfig.newBuilder() to construct. PubsubConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private PubsubConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 PubsubConfig()41 private PubsubConfig() { 42 subscription_ = ""; 43 topic_ = ""; 44 serviceAccountEmail_ = ""; 45 state_ = 0; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new PubsubConfig(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloudbuild.v1.Cloudbuild 61 .internal_static_google_devtools_cloudbuild_v1_PubsubConfig_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloudbuild.v1.Cloudbuild 68 .internal_static_google_devtools_cloudbuild_v1_PubsubConfig_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloudbuild.v1.PubsubConfig.class, 71 com.google.cloudbuild.v1.PubsubConfig.Builder.class); 72 } 73 74 /** 75 * 76 * 77 * <pre> 78 * Enumerates potential issues with the underlying Pub/Sub subscription 79 * configuration. 80 * </pre> 81 * 82 * Protobuf enum {@code google.devtools.cloudbuild.v1.PubsubConfig.State} 83 */ 84 public enum State implements com.google.protobuf.ProtocolMessageEnum { 85 /** 86 * 87 * 88 * <pre> 89 * The subscription configuration has not been checked. 90 * </pre> 91 * 92 * <code>STATE_UNSPECIFIED = 0;</code> 93 */ 94 STATE_UNSPECIFIED(0), 95 /** 96 * 97 * 98 * <pre> 99 * The Pub/Sub subscription is properly configured. 100 * </pre> 101 * 102 * <code>OK = 1;</code> 103 */ 104 OK(1), 105 /** 106 * 107 * 108 * <pre> 109 * The subscription has been deleted. 110 * </pre> 111 * 112 * <code>SUBSCRIPTION_DELETED = 2;</code> 113 */ 114 SUBSCRIPTION_DELETED(2), 115 /** 116 * 117 * 118 * <pre> 119 * The topic has been deleted. 120 * </pre> 121 * 122 * <code>TOPIC_DELETED = 3;</code> 123 */ 124 TOPIC_DELETED(3), 125 /** 126 * 127 * 128 * <pre> 129 * Some of the subscription's field are misconfigured. 130 * </pre> 131 * 132 * <code>SUBSCRIPTION_MISCONFIGURED = 4;</code> 133 */ 134 SUBSCRIPTION_MISCONFIGURED(4), 135 UNRECOGNIZED(-1), 136 ; 137 138 /** 139 * 140 * 141 * <pre> 142 * The subscription configuration has not been checked. 143 * </pre> 144 * 145 * <code>STATE_UNSPECIFIED = 0;</code> 146 */ 147 public static final int STATE_UNSPECIFIED_VALUE = 0; 148 /** 149 * 150 * 151 * <pre> 152 * The Pub/Sub subscription is properly configured. 153 * </pre> 154 * 155 * <code>OK = 1;</code> 156 */ 157 public static final int OK_VALUE = 1; 158 /** 159 * 160 * 161 * <pre> 162 * The subscription has been deleted. 163 * </pre> 164 * 165 * <code>SUBSCRIPTION_DELETED = 2;</code> 166 */ 167 public static final int SUBSCRIPTION_DELETED_VALUE = 2; 168 /** 169 * 170 * 171 * <pre> 172 * The topic has been deleted. 173 * </pre> 174 * 175 * <code>TOPIC_DELETED = 3;</code> 176 */ 177 public static final int TOPIC_DELETED_VALUE = 3; 178 /** 179 * 180 * 181 * <pre> 182 * Some of the subscription's field are misconfigured. 183 * </pre> 184 * 185 * <code>SUBSCRIPTION_MISCONFIGURED = 4;</code> 186 */ 187 public static final int SUBSCRIPTION_MISCONFIGURED_VALUE = 4; 188 getNumber()189 public final int getNumber() { 190 if (this == UNRECOGNIZED) { 191 throw new java.lang.IllegalArgumentException( 192 "Can't get the number of an unknown enum value."); 193 } 194 return value; 195 } 196 197 /** 198 * @param value The numeric wire value of the corresponding enum entry. 199 * @return The enum associated with the given numeric wire value. 200 * @deprecated Use {@link #forNumber(int)} instead. 201 */ 202 @java.lang.Deprecated valueOf(int value)203 public static State valueOf(int value) { 204 return forNumber(value); 205 } 206 207 /** 208 * @param value The numeric wire value of the corresponding enum entry. 209 * @return The enum associated with the given numeric wire value. 210 */ forNumber(int value)211 public static State forNumber(int value) { 212 switch (value) { 213 case 0: 214 return STATE_UNSPECIFIED; 215 case 1: 216 return OK; 217 case 2: 218 return SUBSCRIPTION_DELETED; 219 case 3: 220 return TOPIC_DELETED; 221 case 4: 222 return SUBSCRIPTION_MISCONFIGURED; 223 default: 224 return null; 225 } 226 } 227 internalGetValueMap()228 public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() { 229 return internalValueMap; 230 } 231 232 private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap = 233 new com.google.protobuf.Internal.EnumLiteMap<State>() { 234 public State findValueByNumber(int number) { 235 return State.forNumber(number); 236 } 237 }; 238 getValueDescriptor()239 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 240 if (this == UNRECOGNIZED) { 241 throw new java.lang.IllegalStateException( 242 "Can't get the descriptor of an unrecognized enum value."); 243 } 244 return getDescriptor().getValues().get(ordinal()); 245 } 246 getDescriptorForType()247 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 248 return getDescriptor(); 249 } 250 getDescriptor()251 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 252 return com.google.cloudbuild.v1.PubsubConfig.getDescriptor().getEnumTypes().get(0); 253 } 254 255 private static final State[] VALUES = values(); 256 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)257 public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 258 if (desc.getType() != getDescriptor()) { 259 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 260 } 261 if (desc.getIndex() == -1) { 262 return UNRECOGNIZED; 263 } 264 return VALUES[desc.getIndex()]; 265 } 266 267 private final int value; 268 State(int value)269 private State(int value) { 270 this.value = value; 271 } 272 273 // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.PubsubConfig.State) 274 } 275 276 public static final int SUBSCRIPTION_FIELD_NUMBER = 1; 277 278 @SuppressWarnings("serial") 279 private volatile java.lang.Object subscription_ = ""; 280 /** 281 * 282 * 283 * <pre> 284 * Output only. Name of the subscription. Format is 285 * `projects/{project}/subscriptions/{subscription}`. 286 * </pre> 287 * 288 * <code> 289 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 290 * </code> 291 * 292 * @return The subscription. 293 */ 294 @java.lang.Override getSubscription()295 public java.lang.String getSubscription() { 296 java.lang.Object ref = subscription_; 297 if (ref instanceof java.lang.String) { 298 return (java.lang.String) ref; 299 } else { 300 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 301 java.lang.String s = bs.toStringUtf8(); 302 subscription_ = s; 303 return s; 304 } 305 } 306 /** 307 * 308 * 309 * <pre> 310 * Output only. Name of the subscription. Format is 311 * `projects/{project}/subscriptions/{subscription}`. 312 * </pre> 313 * 314 * <code> 315 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 316 * </code> 317 * 318 * @return The bytes for subscription. 319 */ 320 @java.lang.Override getSubscriptionBytes()321 public com.google.protobuf.ByteString getSubscriptionBytes() { 322 java.lang.Object ref = subscription_; 323 if (ref instanceof java.lang.String) { 324 com.google.protobuf.ByteString b = 325 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 326 subscription_ = b; 327 return b; 328 } else { 329 return (com.google.protobuf.ByteString) ref; 330 } 331 } 332 333 public static final int TOPIC_FIELD_NUMBER = 2; 334 335 @SuppressWarnings("serial") 336 private volatile java.lang.Object topic_ = ""; 337 /** 338 * 339 * 340 * <pre> 341 * The name of the topic from which this subscription is receiving messages. 342 * Format is `projects/{project}/topics/{topic}`. 343 * </pre> 344 * 345 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 346 * 347 * @return The topic. 348 */ 349 @java.lang.Override getTopic()350 public java.lang.String getTopic() { 351 java.lang.Object ref = topic_; 352 if (ref instanceof java.lang.String) { 353 return (java.lang.String) ref; 354 } else { 355 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 356 java.lang.String s = bs.toStringUtf8(); 357 topic_ = s; 358 return s; 359 } 360 } 361 /** 362 * 363 * 364 * <pre> 365 * The name of the topic from which this subscription is receiving messages. 366 * Format is `projects/{project}/topics/{topic}`. 367 * </pre> 368 * 369 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 370 * 371 * @return The bytes for topic. 372 */ 373 @java.lang.Override getTopicBytes()374 public com.google.protobuf.ByteString getTopicBytes() { 375 java.lang.Object ref = topic_; 376 if (ref instanceof java.lang.String) { 377 com.google.protobuf.ByteString b = 378 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 379 topic_ = b; 380 return b; 381 } else { 382 return (com.google.protobuf.ByteString) ref; 383 } 384 } 385 386 public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; 387 388 @SuppressWarnings("serial") 389 private volatile java.lang.Object serviceAccountEmail_ = ""; 390 /** 391 * 392 * 393 * <pre> 394 * Service account that will make the push request. 395 * </pre> 396 * 397 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 398 * 399 * @return The serviceAccountEmail. 400 */ 401 @java.lang.Override getServiceAccountEmail()402 public java.lang.String getServiceAccountEmail() { 403 java.lang.Object ref = serviceAccountEmail_; 404 if (ref instanceof java.lang.String) { 405 return (java.lang.String) ref; 406 } else { 407 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 408 java.lang.String s = bs.toStringUtf8(); 409 serviceAccountEmail_ = s; 410 return s; 411 } 412 } 413 /** 414 * 415 * 416 * <pre> 417 * Service account that will make the push request. 418 * </pre> 419 * 420 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 421 * 422 * @return The bytes for serviceAccountEmail. 423 */ 424 @java.lang.Override getServiceAccountEmailBytes()425 public com.google.protobuf.ByteString getServiceAccountEmailBytes() { 426 java.lang.Object ref = serviceAccountEmail_; 427 if (ref instanceof java.lang.String) { 428 com.google.protobuf.ByteString b = 429 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 430 serviceAccountEmail_ = b; 431 return b; 432 } else { 433 return (com.google.protobuf.ByteString) ref; 434 } 435 } 436 437 public static final int STATE_FIELD_NUMBER = 4; 438 private int state_ = 0; 439 /** 440 * 441 * 442 * <pre> 443 * Potential issues with the underlying Pub/Sub subscription configuration. 444 * Only populated on get requests. 445 * </pre> 446 * 447 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 448 * 449 * @return The enum numeric value on the wire for state. 450 */ 451 @java.lang.Override getStateValue()452 public int getStateValue() { 453 return state_; 454 } 455 /** 456 * 457 * 458 * <pre> 459 * Potential issues with the underlying Pub/Sub subscription configuration. 460 * Only populated on get requests. 461 * </pre> 462 * 463 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 464 * 465 * @return The state. 466 */ 467 @java.lang.Override getState()468 public com.google.cloudbuild.v1.PubsubConfig.State getState() { 469 com.google.cloudbuild.v1.PubsubConfig.State result = 470 com.google.cloudbuild.v1.PubsubConfig.State.forNumber(state_); 471 return result == null ? com.google.cloudbuild.v1.PubsubConfig.State.UNRECOGNIZED : result; 472 } 473 474 private byte memoizedIsInitialized = -1; 475 476 @java.lang.Override isInitialized()477 public final boolean isInitialized() { 478 byte isInitialized = memoizedIsInitialized; 479 if (isInitialized == 1) return true; 480 if (isInitialized == 0) return false; 481 482 memoizedIsInitialized = 1; 483 return true; 484 } 485 486 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)487 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 488 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { 489 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); 490 } 491 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { 492 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); 493 } 494 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { 495 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, serviceAccountEmail_); 496 } 497 if (state_ != com.google.cloudbuild.v1.PubsubConfig.State.STATE_UNSPECIFIED.getNumber()) { 498 output.writeEnum(4, state_); 499 } 500 getUnknownFields().writeTo(output); 501 } 502 503 @java.lang.Override getSerializedSize()504 public int getSerializedSize() { 505 int size = memoizedSize; 506 if (size != -1) return size; 507 508 size = 0; 509 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { 510 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); 511 } 512 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { 513 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_); 514 } 515 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { 516 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, serviceAccountEmail_); 517 } 518 if (state_ != com.google.cloudbuild.v1.PubsubConfig.State.STATE_UNSPECIFIED.getNumber()) { 519 size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); 520 } 521 size += getUnknownFields().getSerializedSize(); 522 memoizedSize = size; 523 return size; 524 } 525 526 @java.lang.Override equals(final java.lang.Object obj)527 public boolean equals(final java.lang.Object obj) { 528 if (obj == this) { 529 return true; 530 } 531 if (!(obj instanceof com.google.cloudbuild.v1.PubsubConfig)) { 532 return super.equals(obj); 533 } 534 com.google.cloudbuild.v1.PubsubConfig other = (com.google.cloudbuild.v1.PubsubConfig) obj; 535 536 if (!getSubscription().equals(other.getSubscription())) return false; 537 if (!getTopic().equals(other.getTopic())) return false; 538 if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; 539 if (state_ != other.state_) return false; 540 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 541 return true; 542 } 543 544 @java.lang.Override hashCode()545 public int hashCode() { 546 if (memoizedHashCode != 0) { 547 return memoizedHashCode; 548 } 549 int hash = 41; 550 hash = (19 * hash) + getDescriptor().hashCode(); 551 hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; 552 hash = (53 * hash) + getSubscription().hashCode(); 553 hash = (37 * hash) + TOPIC_FIELD_NUMBER; 554 hash = (53 * hash) + getTopic().hashCode(); 555 hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; 556 hash = (53 * hash) + getServiceAccountEmail().hashCode(); 557 hash = (37 * hash) + STATE_FIELD_NUMBER; 558 hash = (53 * hash) + state_; 559 hash = (29 * hash) + getUnknownFields().hashCode(); 560 memoizedHashCode = hash; 561 return hash; 562 } 563 parseFrom(java.nio.ByteBuffer data)564 public static com.google.cloudbuild.v1.PubsubConfig parseFrom(java.nio.ByteBuffer data) 565 throws com.google.protobuf.InvalidProtocolBufferException { 566 return PARSER.parseFrom(data); 567 } 568 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)569 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 570 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 571 throws com.google.protobuf.InvalidProtocolBufferException { 572 return PARSER.parseFrom(data, extensionRegistry); 573 } 574 parseFrom(com.google.protobuf.ByteString data)575 public static com.google.cloudbuild.v1.PubsubConfig parseFrom(com.google.protobuf.ByteString data) 576 throws com.google.protobuf.InvalidProtocolBufferException { 577 return PARSER.parseFrom(data); 578 } 579 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)580 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 581 com.google.protobuf.ByteString data, 582 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 583 throws com.google.protobuf.InvalidProtocolBufferException { 584 return PARSER.parseFrom(data, extensionRegistry); 585 } 586 parseFrom(byte[] data)587 public static com.google.cloudbuild.v1.PubsubConfig parseFrom(byte[] data) 588 throws com.google.protobuf.InvalidProtocolBufferException { 589 return PARSER.parseFrom(data); 590 } 591 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)592 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 593 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 594 throws com.google.protobuf.InvalidProtocolBufferException { 595 return PARSER.parseFrom(data, extensionRegistry); 596 } 597 parseFrom(java.io.InputStream input)598 public static com.google.cloudbuild.v1.PubsubConfig parseFrom(java.io.InputStream input) 599 throws java.io.IOException { 600 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 601 } 602 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)603 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 604 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 605 throws java.io.IOException { 606 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 607 PARSER, input, extensionRegistry); 608 } 609 parseDelimitedFrom(java.io.InputStream input)610 public static com.google.cloudbuild.v1.PubsubConfig parseDelimitedFrom(java.io.InputStream input) 611 throws java.io.IOException { 612 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 613 } 614 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)615 public static com.google.cloudbuild.v1.PubsubConfig parseDelimitedFrom( 616 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 617 throws java.io.IOException { 618 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 619 PARSER, input, extensionRegistry); 620 } 621 parseFrom( com.google.protobuf.CodedInputStream input)622 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 623 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 624 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 625 } 626 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)627 public static com.google.cloudbuild.v1.PubsubConfig parseFrom( 628 com.google.protobuf.CodedInputStream input, 629 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 630 throws java.io.IOException { 631 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 632 PARSER, input, extensionRegistry); 633 } 634 635 @java.lang.Override newBuilderForType()636 public Builder newBuilderForType() { 637 return newBuilder(); 638 } 639 newBuilder()640 public static Builder newBuilder() { 641 return DEFAULT_INSTANCE.toBuilder(); 642 } 643 newBuilder(com.google.cloudbuild.v1.PubsubConfig prototype)644 public static Builder newBuilder(com.google.cloudbuild.v1.PubsubConfig prototype) { 645 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 646 } 647 648 @java.lang.Override toBuilder()649 public Builder toBuilder() { 650 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 651 } 652 653 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)654 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 655 Builder builder = new Builder(parent); 656 return builder; 657 } 658 /** 659 * 660 * 661 * <pre> 662 * PubsubConfig describes the configuration of a trigger that 663 * creates a build whenever a Pub/Sub message is published. 664 * </pre> 665 * 666 * Protobuf type {@code google.devtools.cloudbuild.v1.PubsubConfig} 667 */ 668 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 669 implements 670 // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.PubsubConfig) 671 com.google.cloudbuild.v1.PubsubConfigOrBuilder { getDescriptor()672 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 673 return com.google.cloudbuild.v1.Cloudbuild 674 .internal_static_google_devtools_cloudbuild_v1_PubsubConfig_descriptor; 675 } 676 677 @java.lang.Override 678 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()679 internalGetFieldAccessorTable() { 680 return com.google.cloudbuild.v1.Cloudbuild 681 .internal_static_google_devtools_cloudbuild_v1_PubsubConfig_fieldAccessorTable 682 .ensureFieldAccessorsInitialized( 683 com.google.cloudbuild.v1.PubsubConfig.class, 684 com.google.cloudbuild.v1.PubsubConfig.Builder.class); 685 } 686 687 // Construct using com.google.cloudbuild.v1.PubsubConfig.newBuilder() Builder()688 private Builder() {} 689 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)690 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 691 super(parent); 692 } 693 694 @java.lang.Override clear()695 public Builder clear() { 696 super.clear(); 697 bitField0_ = 0; 698 subscription_ = ""; 699 topic_ = ""; 700 serviceAccountEmail_ = ""; 701 state_ = 0; 702 return this; 703 } 704 705 @java.lang.Override getDescriptorForType()706 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 707 return com.google.cloudbuild.v1.Cloudbuild 708 .internal_static_google_devtools_cloudbuild_v1_PubsubConfig_descriptor; 709 } 710 711 @java.lang.Override getDefaultInstanceForType()712 public com.google.cloudbuild.v1.PubsubConfig getDefaultInstanceForType() { 713 return com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance(); 714 } 715 716 @java.lang.Override build()717 public com.google.cloudbuild.v1.PubsubConfig build() { 718 com.google.cloudbuild.v1.PubsubConfig result = buildPartial(); 719 if (!result.isInitialized()) { 720 throw newUninitializedMessageException(result); 721 } 722 return result; 723 } 724 725 @java.lang.Override buildPartial()726 public com.google.cloudbuild.v1.PubsubConfig buildPartial() { 727 com.google.cloudbuild.v1.PubsubConfig result = 728 new com.google.cloudbuild.v1.PubsubConfig(this); 729 if (bitField0_ != 0) { 730 buildPartial0(result); 731 } 732 onBuilt(); 733 return result; 734 } 735 buildPartial0(com.google.cloudbuild.v1.PubsubConfig result)736 private void buildPartial0(com.google.cloudbuild.v1.PubsubConfig result) { 737 int from_bitField0_ = bitField0_; 738 if (((from_bitField0_ & 0x00000001) != 0)) { 739 result.subscription_ = subscription_; 740 } 741 if (((from_bitField0_ & 0x00000002) != 0)) { 742 result.topic_ = topic_; 743 } 744 if (((from_bitField0_ & 0x00000004) != 0)) { 745 result.serviceAccountEmail_ = serviceAccountEmail_; 746 } 747 if (((from_bitField0_ & 0x00000008) != 0)) { 748 result.state_ = state_; 749 } 750 } 751 752 @java.lang.Override clone()753 public Builder clone() { 754 return super.clone(); 755 } 756 757 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)758 public Builder setField( 759 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 760 return super.setField(field, value); 761 } 762 763 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)764 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 765 return super.clearField(field); 766 } 767 768 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)769 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 770 return super.clearOneof(oneof); 771 } 772 773 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)774 public Builder setRepeatedField( 775 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 776 return super.setRepeatedField(field, index, value); 777 } 778 779 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)780 public Builder addRepeatedField( 781 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 782 return super.addRepeatedField(field, value); 783 } 784 785 @java.lang.Override mergeFrom(com.google.protobuf.Message other)786 public Builder mergeFrom(com.google.protobuf.Message other) { 787 if (other instanceof com.google.cloudbuild.v1.PubsubConfig) { 788 return mergeFrom((com.google.cloudbuild.v1.PubsubConfig) other); 789 } else { 790 super.mergeFrom(other); 791 return this; 792 } 793 } 794 mergeFrom(com.google.cloudbuild.v1.PubsubConfig other)795 public Builder mergeFrom(com.google.cloudbuild.v1.PubsubConfig other) { 796 if (other == com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()) return this; 797 if (!other.getSubscription().isEmpty()) { 798 subscription_ = other.subscription_; 799 bitField0_ |= 0x00000001; 800 onChanged(); 801 } 802 if (!other.getTopic().isEmpty()) { 803 topic_ = other.topic_; 804 bitField0_ |= 0x00000002; 805 onChanged(); 806 } 807 if (!other.getServiceAccountEmail().isEmpty()) { 808 serviceAccountEmail_ = other.serviceAccountEmail_; 809 bitField0_ |= 0x00000004; 810 onChanged(); 811 } 812 if (other.state_ != 0) { 813 setStateValue(other.getStateValue()); 814 } 815 this.mergeUnknownFields(other.getUnknownFields()); 816 onChanged(); 817 return this; 818 } 819 820 @java.lang.Override isInitialized()821 public final boolean isInitialized() { 822 return true; 823 } 824 825 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)826 public Builder mergeFrom( 827 com.google.protobuf.CodedInputStream input, 828 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 829 throws java.io.IOException { 830 if (extensionRegistry == null) { 831 throw new java.lang.NullPointerException(); 832 } 833 try { 834 boolean done = false; 835 while (!done) { 836 int tag = input.readTag(); 837 switch (tag) { 838 case 0: 839 done = true; 840 break; 841 case 10: 842 { 843 subscription_ = input.readStringRequireUtf8(); 844 bitField0_ |= 0x00000001; 845 break; 846 } // case 10 847 case 18: 848 { 849 topic_ = input.readStringRequireUtf8(); 850 bitField0_ |= 0x00000002; 851 break; 852 } // case 18 853 case 26: 854 { 855 serviceAccountEmail_ = input.readStringRequireUtf8(); 856 bitField0_ |= 0x00000004; 857 break; 858 } // case 26 859 case 32: 860 { 861 state_ = input.readEnum(); 862 bitField0_ |= 0x00000008; 863 break; 864 } // case 32 865 default: 866 { 867 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 868 done = true; // was an endgroup tag 869 } 870 break; 871 } // default: 872 } // switch (tag) 873 } // while (!done) 874 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 875 throw e.unwrapIOException(); 876 } finally { 877 onChanged(); 878 } // finally 879 return this; 880 } 881 882 private int bitField0_; 883 884 private java.lang.Object subscription_ = ""; 885 /** 886 * 887 * 888 * <pre> 889 * Output only. Name of the subscription. Format is 890 * `projects/{project}/subscriptions/{subscription}`. 891 * </pre> 892 * 893 * <code> 894 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 895 * </code> 896 * 897 * @return The subscription. 898 */ getSubscription()899 public java.lang.String getSubscription() { 900 java.lang.Object ref = subscription_; 901 if (!(ref instanceof java.lang.String)) { 902 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 903 java.lang.String s = bs.toStringUtf8(); 904 subscription_ = s; 905 return s; 906 } else { 907 return (java.lang.String) ref; 908 } 909 } 910 /** 911 * 912 * 913 * <pre> 914 * Output only. Name of the subscription. Format is 915 * `projects/{project}/subscriptions/{subscription}`. 916 * </pre> 917 * 918 * <code> 919 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 920 * </code> 921 * 922 * @return The bytes for subscription. 923 */ getSubscriptionBytes()924 public com.google.protobuf.ByteString getSubscriptionBytes() { 925 java.lang.Object ref = subscription_; 926 if (ref instanceof String) { 927 com.google.protobuf.ByteString b = 928 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 929 subscription_ = b; 930 return b; 931 } else { 932 return (com.google.protobuf.ByteString) ref; 933 } 934 } 935 /** 936 * 937 * 938 * <pre> 939 * Output only. Name of the subscription. Format is 940 * `projects/{project}/subscriptions/{subscription}`. 941 * </pre> 942 * 943 * <code> 944 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 945 * </code> 946 * 947 * @param value The subscription to set. 948 * @return This builder for chaining. 949 */ setSubscription(java.lang.String value)950 public Builder setSubscription(java.lang.String value) { 951 if (value == null) { 952 throw new NullPointerException(); 953 } 954 subscription_ = value; 955 bitField0_ |= 0x00000001; 956 onChanged(); 957 return this; 958 } 959 /** 960 * 961 * 962 * <pre> 963 * Output only. Name of the subscription. Format is 964 * `projects/{project}/subscriptions/{subscription}`. 965 * </pre> 966 * 967 * <code> 968 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 969 * </code> 970 * 971 * @return This builder for chaining. 972 */ clearSubscription()973 public Builder clearSubscription() { 974 subscription_ = getDefaultInstance().getSubscription(); 975 bitField0_ = (bitField0_ & ~0x00000001); 976 onChanged(); 977 return this; 978 } 979 /** 980 * 981 * 982 * <pre> 983 * Output only. Name of the subscription. Format is 984 * `projects/{project}/subscriptions/{subscription}`. 985 * </pre> 986 * 987 * <code> 988 * string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } 989 * </code> 990 * 991 * @param value The bytes for subscription to set. 992 * @return This builder for chaining. 993 */ setSubscriptionBytes(com.google.protobuf.ByteString value)994 public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { 995 if (value == null) { 996 throw new NullPointerException(); 997 } 998 checkByteStringIsUtf8(value); 999 subscription_ = value; 1000 bitField0_ |= 0x00000001; 1001 onChanged(); 1002 return this; 1003 } 1004 1005 private java.lang.Object topic_ = ""; 1006 /** 1007 * 1008 * 1009 * <pre> 1010 * The name of the topic from which this subscription is receiving messages. 1011 * Format is `projects/{project}/topics/{topic}`. 1012 * </pre> 1013 * 1014 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 1015 * 1016 * @return The topic. 1017 */ getTopic()1018 public java.lang.String getTopic() { 1019 java.lang.Object ref = topic_; 1020 if (!(ref instanceof java.lang.String)) { 1021 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1022 java.lang.String s = bs.toStringUtf8(); 1023 topic_ = s; 1024 return s; 1025 } else { 1026 return (java.lang.String) ref; 1027 } 1028 } 1029 /** 1030 * 1031 * 1032 * <pre> 1033 * The name of the topic from which this subscription is receiving messages. 1034 * Format is `projects/{project}/topics/{topic}`. 1035 * </pre> 1036 * 1037 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 1038 * 1039 * @return The bytes for topic. 1040 */ getTopicBytes()1041 public com.google.protobuf.ByteString getTopicBytes() { 1042 java.lang.Object ref = topic_; 1043 if (ref instanceof String) { 1044 com.google.protobuf.ByteString b = 1045 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1046 topic_ = b; 1047 return b; 1048 } else { 1049 return (com.google.protobuf.ByteString) ref; 1050 } 1051 } 1052 /** 1053 * 1054 * 1055 * <pre> 1056 * The name of the topic from which this subscription is receiving messages. 1057 * Format is `projects/{project}/topics/{topic}`. 1058 * </pre> 1059 * 1060 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 1061 * 1062 * @param value The topic to set. 1063 * @return This builder for chaining. 1064 */ setTopic(java.lang.String value)1065 public Builder setTopic(java.lang.String value) { 1066 if (value == null) { 1067 throw new NullPointerException(); 1068 } 1069 topic_ = value; 1070 bitField0_ |= 0x00000002; 1071 onChanged(); 1072 return this; 1073 } 1074 /** 1075 * 1076 * 1077 * <pre> 1078 * The name of the topic from which this subscription is receiving messages. 1079 * Format is `projects/{project}/topics/{topic}`. 1080 * </pre> 1081 * 1082 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 1083 * 1084 * @return This builder for chaining. 1085 */ clearTopic()1086 public Builder clearTopic() { 1087 topic_ = getDefaultInstance().getTopic(); 1088 bitField0_ = (bitField0_ & ~0x00000002); 1089 onChanged(); 1090 return this; 1091 } 1092 /** 1093 * 1094 * 1095 * <pre> 1096 * The name of the topic from which this subscription is receiving messages. 1097 * Format is `projects/{project}/topics/{topic}`. 1098 * </pre> 1099 * 1100 * <code>string topic = 2 [(.google.api.resource_reference) = { ... }</code> 1101 * 1102 * @param value The bytes for topic to set. 1103 * @return This builder for chaining. 1104 */ setTopicBytes(com.google.protobuf.ByteString value)1105 public Builder setTopicBytes(com.google.protobuf.ByteString value) { 1106 if (value == null) { 1107 throw new NullPointerException(); 1108 } 1109 checkByteStringIsUtf8(value); 1110 topic_ = value; 1111 bitField0_ |= 0x00000002; 1112 onChanged(); 1113 return this; 1114 } 1115 1116 private java.lang.Object serviceAccountEmail_ = ""; 1117 /** 1118 * 1119 * 1120 * <pre> 1121 * Service account that will make the push request. 1122 * </pre> 1123 * 1124 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 1125 * 1126 * @return The serviceAccountEmail. 1127 */ getServiceAccountEmail()1128 public java.lang.String getServiceAccountEmail() { 1129 java.lang.Object ref = serviceAccountEmail_; 1130 if (!(ref instanceof java.lang.String)) { 1131 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1132 java.lang.String s = bs.toStringUtf8(); 1133 serviceAccountEmail_ = s; 1134 return s; 1135 } else { 1136 return (java.lang.String) ref; 1137 } 1138 } 1139 /** 1140 * 1141 * 1142 * <pre> 1143 * Service account that will make the push request. 1144 * </pre> 1145 * 1146 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 1147 * 1148 * @return The bytes for serviceAccountEmail. 1149 */ getServiceAccountEmailBytes()1150 public com.google.protobuf.ByteString getServiceAccountEmailBytes() { 1151 java.lang.Object ref = serviceAccountEmail_; 1152 if (ref instanceof String) { 1153 com.google.protobuf.ByteString b = 1154 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1155 serviceAccountEmail_ = b; 1156 return b; 1157 } else { 1158 return (com.google.protobuf.ByteString) ref; 1159 } 1160 } 1161 /** 1162 * 1163 * 1164 * <pre> 1165 * Service account that will make the push request. 1166 * </pre> 1167 * 1168 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 1169 * 1170 * @param value The serviceAccountEmail to set. 1171 * @return This builder for chaining. 1172 */ setServiceAccountEmail(java.lang.String value)1173 public Builder setServiceAccountEmail(java.lang.String value) { 1174 if (value == null) { 1175 throw new NullPointerException(); 1176 } 1177 serviceAccountEmail_ = value; 1178 bitField0_ |= 0x00000004; 1179 onChanged(); 1180 return this; 1181 } 1182 /** 1183 * 1184 * 1185 * <pre> 1186 * Service account that will make the push request. 1187 * </pre> 1188 * 1189 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 1190 * 1191 * @return This builder for chaining. 1192 */ clearServiceAccountEmail()1193 public Builder clearServiceAccountEmail() { 1194 serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); 1195 bitField0_ = (bitField0_ & ~0x00000004); 1196 onChanged(); 1197 return this; 1198 } 1199 /** 1200 * 1201 * 1202 * <pre> 1203 * Service account that will make the push request. 1204 * </pre> 1205 * 1206 * <code>string service_account_email = 3 [(.google.api.resource_reference) = { ... }</code> 1207 * 1208 * @param value The bytes for serviceAccountEmail to set. 1209 * @return This builder for chaining. 1210 */ setServiceAccountEmailBytes(com.google.protobuf.ByteString value)1211 public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { 1212 if (value == null) { 1213 throw new NullPointerException(); 1214 } 1215 checkByteStringIsUtf8(value); 1216 serviceAccountEmail_ = value; 1217 bitField0_ |= 0x00000004; 1218 onChanged(); 1219 return this; 1220 } 1221 1222 private int state_ = 0; 1223 /** 1224 * 1225 * 1226 * <pre> 1227 * Potential issues with the underlying Pub/Sub subscription configuration. 1228 * Only populated on get requests. 1229 * </pre> 1230 * 1231 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 1232 * 1233 * @return The enum numeric value on the wire for state. 1234 */ 1235 @java.lang.Override getStateValue()1236 public int getStateValue() { 1237 return state_; 1238 } 1239 /** 1240 * 1241 * 1242 * <pre> 1243 * Potential issues with the underlying Pub/Sub subscription configuration. 1244 * Only populated on get requests. 1245 * </pre> 1246 * 1247 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 1248 * 1249 * @param value The enum numeric value on the wire for state to set. 1250 * @return This builder for chaining. 1251 */ setStateValue(int value)1252 public Builder setStateValue(int value) { 1253 state_ = value; 1254 bitField0_ |= 0x00000008; 1255 onChanged(); 1256 return this; 1257 } 1258 /** 1259 * 1260 * 1261 * <pre> 1262 * Potential issues with the underlying Pub/Sub subscription configuration. 1263 * Only populated on get requests. 1264 * </pre> 1265 * 1266 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 1267 * 1268 * @return The state. 1269 */ 1270 @java.lang.Override getState()1271 public com.google.cloudbuild.v1.PubsubConfig.State getState() { 1272 com.google.cloudbuild.v1.PubsubConfig.State result = 1273 com.google.cloudbuild.v1.PubsubConfig.State.forNumber(state_); 1274 return result == null ? com.google.cloudbuild.v1.PubsubConfig.State.UNRECOGNIZED : result; 1275 } 1276 /** 1277 * 1278 * 1279 * <pre> 1280 * Potential issues with the underlying Pub/Sub subscription configuration. 1281 * Only populated on get requests. 1282 * </pre> 1283 * 1284 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 1285 * 1286 * @param value The state to set. 1287 * @return This builder for chaining. 1288 */ setState(com.google.cloudbuild.v1.PubsubConfig.State value)1289 public Builder setState(com.google.cloudbuild.v1.PubsubConfig.State value) { 1290 if (value == null) { 1291 throw new NullPointerException(); 1292 } 1293 bitField0_ |= 0x00000008; 1294 state_ = value.getNumber(); 1295 onChanged(); 1296 return this; 1297 } 1298 /** 1299 * 1300 * 1301 * <pre> 1302 * Potential issues with the underlying Pub/Sub subscription configuration. 1303 * Only populated on get requests. 1304 * </pre> 1305 * 1306 * <code>.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;</code> 1307 * 1308 * @return This builder for chaining. 1309 */ clearState()1310 public Builder clearState() { 1311 bitField0_ = (bitField0_ & ~0x00000008); 1312 state_ = 0; 1313 onChanged(); 1314 return this; 1315 } 1316 1317 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1318 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1319 return super.setUnknownFields(unknownFields); 1320 } 1321 1322 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1323 public final Builder mergeUnknownFields( 1324 final com.google.protobuf.UnknownFieldSet unknownFields) { 1325 return super.mergeUnknownFields(unknownFields); 1326 } 1327 1328 // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.PubsubConfig) 1329 } 1330 1331 // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.PubsubConfig) 1332 private static final com.google.cloudbuild.v1.PubsubConfig DEFAULT_INSTANCE; 1333 1334 static { 1335 DEFAULT_INSTANCE = new com.google.cloudbuild.v1.PubsubConfig(); 1336 } 1337 getDefaultInstance()1338 public static com.google.cloudbuild.v1.PubsubConfig getDefaultInstance() { 1339 return DEFAULT_INSTANCE; 1340 } 1341 1342 private static final com.google.protobuf.Parser<PubsubConfig> PARSER = 1343 new com.google.protobuf.AbstractParser<PubsubConfig>() { 1344 @java.lang.Override 1345 public PubsubConfig parsePartialFrom( 1346 com.google.protobuf.CodedInputStream input, 1347 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1348 throws com.google.protobuf.InvalidProtocolBufferException { 1349 Builder builder = newBuilder(); 1350 try { 1351 builder.mergeFrom(input, extensionRegistry); 1352 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1353 throw e.setUnfinishedMessage(builder.buildPartial()); 1354 } catch (com.google.protobuf.UninitializedMessageException e) { 1355 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1356 } catch (java.io.IOException e) { 1357 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1358 .setUnfinishedMessage(builder.buildPartial()); 1359 } 1360 return builder.buildPartial(); 1361 } 1362 }; 1363 parser()1364 public static com.google.protobuf.Parser<PubsubConfig> parser() { 1365 return PARSER; 1366 } 1367 1368 @java.lang.Override getParserForType()1369 public com.google.protobuf.Parser<PubsubConfig> getParserForType() { 1370 return PARSER; 1371 } 1372 1373 @java.lang.Override getDefaultInstanceForType()1374 public com.google.cloudbuild.v1.PubsubConfig getDefaultInstanceForType() { 1375 return DEFAULT_INSTANCE; 1376 } 1377 } 1378