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/channel/v1/customers.proto 18 19 package com.google.cloud.channel.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Contact information for a customer account. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.channel.v1.ContactInfo} 29 */ 30 public final class ContactInfo extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ContactInfo) 33 ContactInfoOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ContactInfo.newBuilder() to construct. ContactInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ContactInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ContactInfo()40 private ContactInfo() { 41 firstName_ = ""; 42 lastName_ = ""; 43 displayName_ = ""; 44 email_ = ""; 45 title_ = ""; 46 phone_ = ""; 47 } 48 49 @java.lang.Override 50 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)51 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 52 return new ContactInfo(); 53 } 54 55 @java.lang.Override getUnknownFields()56 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 57 return this.unknownFields; 58 } 59 getDescriptor()60 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 61 return com.google.cloud.channel.v1.CustomersProto 62 .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; 63 } 64 65 @java.lang.Override 66 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()67 internalGetFieldAccessorTable() { 68 return com.google.cloud.channel.v1.CustomersProto 69 .internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable 70 .ensureFieldAccessorsInitialized( 71 com.google.cloud.channel.v1.ContactInfo.class, 72 com.google.cloud.channel.v1.ContactInfo.Builder.class); 73 } 74 75 public static final int FIRST_NAME_FIELD_NUMBER = 1; 76 77 @SuppressWarnings("serial") 78 private volatile java.lang.Object firstName_ = ""; 79 /** 80 * 81 * 82 * <pre> 83 * The customer account contact's first name. Optional for Team customers. 84 * </pre> 85 * 86 * <code>string first_name = 1;</code> 87 * 88 * @return The firstName. 89 */ 90 @java.lang.Override getFirstName()91 public java.lang.String getFirstName() { 92 java.lang.Object ref = firstName_; 93 if (ref instanceof java.lang.String) { 94 return (java.lang.String) ref; 95 } else { 96 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 97 java.lang.String s = bs.toStringUtf8(); 98 firstName_ = s; 99 return s; 100 } 101 } 102 /** 103 * 104 * 105 * <pre> 106 * The customer account contact's first name. Optional for Team customers. 107 * </pre> 108 * 109 * <code>string first_name = 1;</code> 110 * 111 * @return The bytes for firstName. 112 */ 113 @java.lang.Override getFirstNameBytes()114 public com.google.protobuf.ByteString getFirstNameBytes() { 115 java.lang.Object ref = firstName_; 116 if (ref instanceof java.lang.String) { 117 com.google.protobuf.ByteString b = 118 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 119 firstName_ = b; 120 return b; 121 } else { 122 return (com.google.protobuf.ByteString) ref; 123 } 124 } 125 126 public static final int LAST_NAME_FIELD_NUMBER = 2; 127 128 @SuppressWarnings("serial") 129 private volatile java.lang.Object lastName_ = ""; 130 /** 131 * 132 * 133 * <pre> 134 * The customer account contact's last name. Optional for Team customers. 135 * </pre> 136 * 137 * <code>string last_name = 2;</code> 138 * 139 * @return The lastName. 140 */ 141 @java.lang.Override getLastName()142 public java.lang.String getLastName() { 143 java.lang.Object ref = lastName_; 144 if (ref instanceof java.lang.String) { 145 return (java.lang.String) ref; 146 } else { 147 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 148 java.lang.String s = bs.toStringUtf8(); 149 lastName_ = s; 150 return s; 151 } 152 } 153 /** 154 * 155 * 156 * <pre> 157 * The customer account contact's last name. Optional for Team customers. 158 * </pre> 159 * 160 * <code>string last_name = 2;</code> 161 * 162 * @return The bytes for lastName. 163 */ 164 @java.lang.Override getLastNameBytes()165 public com.google.protobuf.ByteString getLastNameBytes() { 166 java.lang.Object ref = lastName_; 167 if (ref instanceof java.lang.String) { 168 com.google.protobuf.ByteString b = 169 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 170 lastName_ = b; 171 return b; 172 } else { 173 return (com.google.protobuf.ByteString) ref; 174 } 175 } 176 177 public static final int DISPLAY_NAME_FIELD_NUMBER = 4; 178 179 @SuppressWarnings("serial") 180 private volatile java.lang.Object displayName_ = ""; 181 /** 182 * 183 * 184 * <pre> 185 * Output only. The customer account contact's display name, formatted as a 186 * combination of the customer's first and last name. 187 * </pre> 188 * 189 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 190 * 191 * @return The displayName. 192 */ 193 @java.lang.Override getDisplayName()194 public java.lang.String getDisplayName() { 195 java.lang.Object ref = displayName_; 196 if (ref instanceof java.lang.String) { 197 return (java.lang.String) ref; 198 } else { 199 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 200 java.lang.String s = bs.toStringUtf8(); 201 displayName_ = s; 202 return s; 203 } 204 } 205 /** 206 * 207 * 208 * <pre> 209 * Output only. The customer account contact's display name, formatted as a 210 * combination of the customer's first and last name. 211 * </pre> 212 * 213 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 214 * 215 * @return The bytes for displayName. 216 */ 217 @java.lang.Override getDisplayNameBytes()218 public com.google.protobuf.ByteString getDisplayNameBytes() { 219 java.lang.Object ref = displayName_; 220 if (ref instanceof java.lang.String) { 221 com.google.protobuf.ByteString b = 222 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 223 displayName_ = b; 224 return b; 225 } else { 226 return (com.google.protobuf.ByteString) ref; 227 } 228 } 229 230 public static final int EMAIL_FIELD_NUMBER = 5; 231 232 @SuppressWarnings("serial") 233 private volatile java.lang.Object email_ = ""; 234 /** 235 * 236 * 237 * <pre> 238 * The customer account's contact email. Required for entitlements that create 239 * admin.google.com accounts, and serves as the customer's username for those 240 * accounts. Use this email to invite Team customers. 241 * </pre> 242 * 243 * <code>string email = 5;</code> 244 * 245 * @return The email. 246 */ 247 @java.lang.Override getEmail()248 public java.lang.String getEmail() { 249 java.lang.Object ref = email_; 250 if (ref instanceof java.lang.String) { 251 return (java.lang.String) ref; 252 } else { 253 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 254 java.lang.String s = bs.toStringUtf8(); 255 email_ = s; 256 return s; 257 } 258 } 259 /** 260 * 261 * 262 * <pre> 263 * The customer account's contact email. Required for entitlements that create 264 * admin.google.com accounts, and serves as the customer's username for those 265 * accounts. Use this email to invite Team customers. 266 * </pre> 267 * 268 * <code>string email = 5;</code> 269 * 270 * @return The bytes for email. 271 */ 272 @java.lang.Override getEmailBytes()273 public com.google.protobuf.ByteString getEmailBytes() { 274 java.lang.Object ref = email_; 275 if (ref instanceof java.lang.String) { 276 com.google.protobuf.ByteString b = 277 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 278 email_ = b; 279 return b; 280 } else { 281 return (com.google.protobuf.ByteString) ref; 282 } 283 } 284 285 public static final int TITLE_FIELD_NUMBER = 6; 286 287 @SuppressWarnings("serial") 288 private volatile java.lang.Object title_ = ""; 289 /** 290 * 291 * 292 * <pre> 293 * Optional. The customer account contact's job title. 294 * </pre> 295 * 296 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 297 * 298 * @return The title. 299 */ 300 @java.lang.Override getTitle()301 public java.lang.String getTitle() { 302 java.lang.Object ref = title_; 303 if (ref instanceof java.lang.String) { 304 return (java.lang.String) ref; 305 } else { 306 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 307 java.lang.String s = bs.toStringUtf8(); 308 title_ = s; 309 return s; 310 } 311 } 312 /** 313 * 314 * 315 * <pre> 316 * Optional. The customer account contact's job title. 317 * </pre> 318 * 319 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 320 * 321 * @return The bytes for title. 322 */ 323 @java.lang.Override getTitleBytes()324 public com.google.protobuf.ByteString getTitleBytes() { 325 java.lang.Object ref = title_; 326 if (ref instanceof java.lang.String) { 327 com.google.protobuf.ByteString b = 328 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 329 title_ = b; 330 return b; 331 } else { 332 return (com.google.protobuf.ByteString) ref; 333 } 334 } 335 336 public static final int PHONE_FIELD_NUMBER = 7; 337 338 @SuppressWarnings("serial") 339 private volatile java.lang.Object phone_ = ""; 340 /** 341 * 342 * 343 * <pre> 344 * The customer account's contact phone number. 345 * </pre> 346 * 347 * <code>string phone = 7;</code> 348 * 349 * @return The phone. 350 */ 351 @java.lang.Override getPhone()352 public java.lang.String getPhone() { 353 java.lang.Object ref = phone_; 354 if (ref instanceof java.lang.String) { 355 return (java.lang.String) ref; 356 } else { 357 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 358 java.lang.String s = bs.toStringUtf8(); 359 phone_ = s; 360 return s; 361 } 362 } 363 /** 364 * 365 * 366 * <pre> 367 * The customer account's contact phone number. 368 * </pre> 369 * 370 * <code>string phone = 7;</code> 371 * 372 * @return The bytes for phone. 373 */ 374 @java.lang.Override getPhoneBytes()375 public com.google.protobuf.ByteString getPhoneBytes() { 376 java.lang.Object ref = phone_; 377 if (ref instanceof java.lang.String) { 378 com.google.protobuf.ByteString b = 379 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 380 phone_ = b; 381 return b; 382 } else { 383 return (com.google.protobuf.ByteString) ref; 384 } 385 } 386 387 private byte memoizedIsInitialized = -1; 388 389 @java.lang.Override isInitialized()390 public final boolean isInitialized() { 391 byte isInitialized = memoizedIsInitialized; 392 if (isInitialized == 1) return true; 393 if (isInitialized == 0) return false; 394 395 memoizedIsInitialized = 1; 396 return true; 397 } 398 399 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)400 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 401 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firstName_)) { 402 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, firstName_); 403 } 404 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastName_)) { 405 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lastName_); 406 } 407 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 408 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); 409 } 410 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { 411 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, email_); 412 } 413 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { 414 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, title_); 415 } 416 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { 417 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, phone_); 418 } 419 getUnknownFields().writeTo(output); 420 } 421 422 @java.lang.Override getSerializedSize()423 public int getSerializedSize() { 424 int size = memoizedSize; 425 if (size != -1) return size; 426 427 size = 0; 428 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firstName_)) { 429 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, firstName_); 430 } 431 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastName_)) { 432 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lastName_); 433 } 434 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 435 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); 436 } 437 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { 438 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, email_); 439 } 440 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { 441 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, title_); 442 } 443 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { 444 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, phone_); 445 } 446 size += getUnknownFields().getSerializedSize(); 447 memoizedSize = size; 448 return size; 449 } 450 451 @java.lang.Override equals(final java.lang.Object obj)452 public boolean equals(final java.lang.Object obj) { 453 if (obj == this) { 454 return true; 455 } 456 if (!(obj instanceof com.google.cloud.channel.v1.ContactInfo)) { 457 return super.equals(obj); 458 } 459 com.google.cloud.channel.v1.ContactInfo other = (com.google.cloud.channel.v1.ContactInfo) obj; 460 461 if (!getFirstName().equals(other.getFirstName())) return false; 462 if (!getLastName().equals(other.getLastName())) return false; 463 if (!getDisplayName().equals(other.getDisplayName())) return false; 464 if (!getEmail().equals(other.getEmail())) return false; 465 if (!getTitle().equals(other.getTitle())) return false; 466 if (!getPhone().equals(other.getPhone())) return false; 467 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 468 return true; 469 } 470 471 @java.lang.Override hashCode()472 public int hashCode() { 473 if (memoizedHashCode != 0) { 474 return memoizedHashCode; 475 } 476 int hash = 41; 477 hash = (19 * hash) + getDescriptor().hashCode(); 478 hash = (37 * hash) + FIRST_NAME_FIELD_NUMBER; 479 hash = (53 * hash) + getFirstName().hashCode(); 480 hash = (37 * hash) + LAST_NAME_FIELD_NUMBER; 481 hash = (53 * hash) + getLastName().hashCode(); 482 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 483 hash = (53 * hash) + getDisplayName().hashCode(); 484 hash = (37 * hash) + EMAIL_FIELD_NUMBER; 485 hash = (53 * hash) + getEmail().hashCode(); 486 hash = (37 * hash) + TITLE_FIELD_NUMBER; 487 hash = (53 * hash) + getTitle().hashCode(); 488 hash = (37 * hash) + PHONE_FIELD_NUMBER; 489 hash = (53 * hash) + getPhone().hashCode(); 490 hash = (29 * hash) + getUnknownFields().hashCode(); 491 memoizedHashCode = hash; 492 return hash; 493 } 494 parseFrom(java.nio.ByteBuffer data)495 public static com.google.cloud.channel.v1.ContactInfo parseFrom(java.nio.ByteBuffer data) 496 throws com.google.protobuf.InvalidProtocolBufferException { 497 return PARSER.parseFrom(data); 498 } 499 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)500 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 501 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 502 throws com.google.protobuf.InvalidProtocolBufferException { 503 return PARSER.parseFrom(data, extensionRegistry); 504 } 505 parseFrom( com.google.protobuf.ByteString data)506 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 507 com.google.protobuf.ByteString data) 508 throws com.google.protobuf.InvalidProtocolBufferException { 509 return PARSER.parseFrom(data); 510 } 511 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)512 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 513 com.google.protobuf.ByteString data, 514 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 515 throws com.google.protobuf.InvalidProtocolBufferException { 516 return PARSER.parseFrom(data, extensionRegistry); 517 } 518 parseFrom(byte[] data)519 public static com.google.cloud.channel.v1.ContactInfo parseFrom(byte[] data) 520 throws com.google.protobuf.InvalidProtocolBufferException { 521 return PARSER.parseFrom(data); 522 } 523 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)524 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 525 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 526 throws com.google.protobuf.InvalidProtocolBufferException { 527 return PARSER.parseFrom(data, extensionRegistry); 528 } 529 parseFrom(java.io.InputStream input)530 public static com.google.cloud.channel.v1.ContactInfo parseFrom(java.io.InputStream input) 531 throws java.io.IOException { 532 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 533 } 534 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)535 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 536 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 537 throws java.io.IOException { 538 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 539 PARSER, input, extensionRegistry); 540 } 541 parseDelimitedFrom( java.io.InputStream input)542 public static com.google.cloud.channel.v1.ContactInfo parseDelimitedFrom( 543 java.io.InputStream input) throws java.io.IOException { 544 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 545 } 546 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547 public static com.google.cloud.channel.v1.ContactInfo parseDelimitedFrom( 548 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 549 throws java.io.IOException { 550 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 551 PARSER, input, extensionRegistry); 552 } 553 parseFrom( com.google.protobuf.CodedInputStream input)554 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 555 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 556 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 557 } 558 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)559 public static com.google.cloud.channel.v1.ContactInfo parseFrom( 560 com.google.protobuf.CodedInputStream input, 561 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 562 throws java.io.IOException { 563 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 564 PARSER, input, extensionRegistry); 565 } 566 567 @java.lang.Override newBuilderForType()568 public Builder newBuilderForType() { 569 return newBuilder(); 570 } 571 newBuilder()572 public static Builder newBuilder() { 573 return DEFAULT_INSTANCE.toBuilder(); 574 } 575 newBuilder(com.google.cloud.channel.v1.ContactInfo prototype)576 public static Builder newBuilder(com.google.cloud.channel.v1.ContactInfo prototype) { 577 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 578 } 579 580 @java.lang.Override toBuilder()581 public Builder toBuilder() { 582 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 583 } 584 585 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)586 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 587 Builder builder = new Builder(parent); 588 return builder; 589 } 590 /** 591 * 592 * 593 * <pre> 594 * Contact information for a customer account. 595 * </pre> 596 * 597 * Protobuf type {@code google.cloud.channel.v1.ContactInfo} 598 */ 599 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 600 implements 601 // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ContactInfo) 602 com.google.cloud.channel.v1.ContactInfoOrBuilder { getDescriptor()603 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 604 return com.google.cloud.channel.v1.CustomersProto 605 .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; 606 } 607 608 @java.lang.Override 609 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()610 internalGetFieldAccessorTable() { 611 return com.google.cloud.channel.v1.CustomersProto 612 .internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable 613 .ensureFieldAccessorsInitialized( 614 com.google.cloud.channel.v1.ContactInfo.class, 615 com.google.cloud.channel.v1.ContactInfo.Builder.class); 616 } 617 618 // Construct using com.google.cloud.channel.v1.ContactInfo.newBuilder() Builder()619 private Builder() {} 620 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)621 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 622 super(parent); 623 } 624 625 @java.lang.Override clear()626 public Builder clear() { 627 super.clear(); 628 bitField0_ = 0; 629 firstName_ = ""; 630 lastName_ = ""; 631 displayName_ = ""; 632 email_ = ""; 633 title_ = ""; 634 phone_ = ""; 635 return this; 636 } 637 638 @java.lang.Override getDescriptorForType()639 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 640 return com.google.cloud.channel.v1.CustomersProto 641 .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; 642 } 643 644 @java.lang.Override getDefaultInstanceForType()645 public com.google.cloud.channel.v1.ContactInfo getDefaultInstanceForType() { 646 return com.google.cloud.channel.v1.ContactInfo.getDefaultInstance(); 647 } 648 649 @java.lang.Override build()650 public com.google.cloud.channel.v1.ContactInfo build() { 651 com.google.cloud.channel.v1.ContactInfo result = buildPartial(); 652 if (!result.isInitialized()) { 653 throw newUninitializedMessageException(result); 654 } 655 return result; 656 } 657 658 @java.lang.Override buildPartial()659 public com.google.cloud.channel.v1.ContactInfo buildPartial() { 660 com.google.cloud.channel.v1.ContactInfo result = 661 new com.google.cloud.channel.v1.ContactInfo(this); 662 if (bitField0_ != 0) { 663 buildPartial0(result); 664 } 665 onBuilt(); 666 return result; 667 } 668 buildPartial0(com.google.cloud.channel.v1.ContactInfo result)669 private void buildPartial0(com.google.cloud.channel.v1.ContactInfo result) { 670 int from_bitField0_ = bitField0_; 671 if (((from_bitField0_ & 0x00000001) != 0)) { 672 result.firstName_ = firstName_; 673 } 674 if (((from_bitField0_ & 0x00000002) != 0)) { 675 result.lastName_ = lastName_; 676 } 677 if (((from_bitField0_ & 0x00000004) != 0)) { 678 result.displayName_ = displayName_; 679 } 680 if (((from_bitField0_ & 0x00000008) != 0)) { 681 result.email_ = email_; 682 } 683 if (((from_bitField0_ & 0x00000010) != 0)) { 684 result.title_ = title_; 685 } 686 if (((from_bitField0_ & 0x00000020) != 0)) { 687 result.phone_ = phone_; 688 } 689 } 690 691 @java.lang.Override clone()692 public Builder clone() { 693 return super.clone(); 694 } 695 696 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)697 public Builder setField( 698 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 699 return super.setField(field, value); 700 } 701 702 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)703 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 704 return super.clearField(field); 705 } 706 707 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)708 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 709 return super.clearOneof(oneof); 710 } 711 712 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)713 public Builder setRepeatedField( 714 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 715 return super.setRepeatedField(field, index, value); 716 } 717 718 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)719 public Builder addRepeatedField( 720 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 721 return super.addRepeatedField(field, value); 722 } 723 724 @java.lang.Override mergeFrom(com.google.protobuf.Message other)725 public Builder mergeFrom(com.google.protobuf.Message other) { 726 if (other instanceof com.google.cloud.channel.v1.ContactInfo) { 727 return mergeFrom((com.google.cloud.channel.v1.ContactInfo) other); 728 } else { 729 super.mergeFrom(other); 730 return this; 731 } 732 } 733 mergeFrom(com.google.cloud.channel.v1.ContactInfo other)734 public Builder mergeFrom(com.google.cloud.channel.v1.ContactInfo other) { 735 if (other == com.google.cloud.channel.v1.ContactInfo.getDefaultInstance()) return this; 736 if (!other.getFirstName().isEmpty()) { 737 firstName_ = other.firstName_; 738 bitField0_ |= 0x00000001; 739 onChanged(); 740 } 741 if (!other.getLastName().isEmpty()) { 742 lastName_ = other.lastName_; 743 bitField0_ |= 0x00000002; 744 onChanged(); 745 } 746 if (!other.getDisplayName().isEmpty()) { 747 displayName_ = other.displayName_; 748 bitField0_ |= 0x00000004; 749 onChanged(); 750 } 751 if (!other.getEmail().isEmpty()) { 752 email_ = other.email_; 753 bitField0_ |= 0x00000008; 754 onChanged(); 755 } 756 if (!other.getTitle().isEmpty()) { 757 title_ = other.title_; 758 bitField0_ |= 0x00000010; 759 onChanged(); 760 } 761 if (!other.getPhone().isEmpty()) { 762 phone_ = other.phone_; 763 bitField0_ |= 0x00000020; 764 onChanged(); 765 } 766 this.mergeUnknownFields(other.getUnknownFields()); 767 onChanged(); 768 return this; 769 } 770 771 @java.lang.Override isInitialized()772 public final boolean isInitialized() { 773 return true; 774 } 775 776 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)777 public Builder mergeFrom( 778 com.google.protobuf.CodedInputStream input, 779 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 780 throws java.io.IOException { 781 if (extensionRegistry == null) { 782 throw new java.lang.NullPointerException(); 783 } 784 try { 785 boolean done = false; 786 while (!done) { 787 int tag = input.readTag(); 788 switch (tag) { 789 case 0: 790 done = true; 791 break; 792 case 10: 793 { 794 firstName_ = input.readStringRequireUtf8(); 795 bitField0_ |= 0x00000001; 796 break; 797 } // case 10 798 case 18: 799 { 800 lastName_ = input.readStringRequireUtf8(); 801 bitField0_ |= 0x00000002; 802 break; 803 } // case 18 804 case 34: 805 { 806 displayName_ = input.readStringRequireUtf8(); 807 bitField0_ |= 0x00000004; 808 break; 809 } // case 34 810 case 42: 811 { 812 email_ = input.readStringRequireUtf8(); 813 bitField0_ |= 0x00000008; 814 break; 815 } // case 42 816 case 50: 817 { 818 title_ = input.readStringRequireUtf8(); 819 bitField0_ |= 0x00000010; 820 break; 821 } // case 50 822 case 58: 823 { 824 phone_ = input.readStringRequireUtf8(); 825 bitField0_ |= 0x00000020; 826 break; 827 } // case 58 828 default: 829 { 830 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 831 done = true; // was an endgroup tag 832 } 833 break; 834 } // default: 835 } // switch (tag) 836 } // while (!done) 837 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 838 throw e.unwrapIOException(); 839 } finally { 840 onChanged(); 841 } // finally 842 return this; 843 } 844 845 private int bitField0_; 846 847 private java.lang.Object firstName_ = ""; 848 /** 849 * 850 * 851 * <pre> 852 * The customer account contact's first name. Optional for Team customers. 853 * </pre> 854 * 855 * <code>string first_name = 1;</code> 856 * 857 * @return The firstName. 858 */ getFirstName()859 public java.lang.String getFirstName() { 860 java.lang.Object ref = firstName_; 861 if (!(ref instanceof java.lang.String)) { 862 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 863 java.lang.String s = bs.toStringUtf8(); 864 firstName_ = s; 865 return s; 866 } else { 867 return (java.lang.String) ref; 868 } 869 } 870 /** 871 * 872 * 873 * <pre> 874 * The customer account contact's first name. Optional for Team customers. 875 * </pre> 876 * 877 * <code>string first_name = 1;</code> 878 * 879 * @return The bytes for firstName. 880 */ getFirstNameBytes()881 public com.google.protobuf.ByteString getFirstNameBytes() { 882 java.lang.Object ref = firstName_; 883 if (ref instanceof String) { 884 com.google.protobuf.ByteString b = 885 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 886 firstName_ = b; 887 return b; 888 } else { 889 return (com.google.protobuf.ByteString) ref; 890 } 891 } 892 /** 893 * 894 * 895 * <pre> 896 * The customer account contact's first name. Optional for Team customers. 897 * </pre> 898 * 899 * <code>string first_name = 1;</code> 900 * 901 * @param value The firstName to set. 902 * @return This builder for chaining. 903 */ setFirstName(java.lang.String value)904 public Builder setFirstName(java.lang.String value) { 905 if (value == null) { 906 throw new NullPointerException(); 907 } 908 firstName_ = value; 909 bitField0_ |= 0x00000001; 910 onChanged(); 911 return this; 912 } 913 /** 914 * 915 * 916 * <pre> 917 * The customer account contact's first name. Optional for Team customers. 918 * </pre> 919 * 920 * <code>string first_name = 1;</code> 921 * 922 * @return This builder for chaining. 923 */ clearFirstName()924 public Builder clearFirstName() { 925 firstName_ = getDefaultInstance().getFirstName(); 926 bitField0_ = (bitField0_ & ~0x00000001); 927 onChanged(); 928 return this; 929 } 930 /** 931 * 932 * 933 * <pre> 934 * The customer account contact's first name. Optional for Team customers. 935 * </pre> 936 * 937 * <code>string first_name = 1;</code> 938 * 939 * @param value The bytes for firstName to set. 940 * @return This builder for chaining. 941 */ setFirstNameBytes(com.google.protobuf.ByteString value)942 public Builder setFirstNameBytes(com.google.protobuf.ByteString value) { 943 if (value == null) { 944 throw new NullPointerException(); 945 } 946 checkByteStringIsUtf8(value); 947 firstName_ = value; 948 bitField0_ |= 0x00000001; 949 onChanged(); 950 return this; 951 } 952 953 private java.lang.Object lastName_ = ""; 954 /** 955 * 956 * 957 * <pre> 958 * The customer account contact's last name. Optional for Team customers. 959 * </pre> 960 * 961 * <code>string last_name = 2;</code> 962 * 963 * @return The lastName. 964 */ getLastName()965 public java.lang.String getLastName() { 966 java.lang.Object ref = lastName_; 967 if (!(ref instanceof java.lang.String)) { 968 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 969 java.lang.String s = bs.toStringUtf8(); 970 lastName_ = s; 971 return s; 972 } else { 973 return (java.lang.String) ref; 974 } 975 } 976 /** 977 * 978 * 979 * <pre> 980 * The customer account contact's last name. Optional for Team customers. 981 * </pre> 982 * 983 * <code>string last_name = 2;</code> 984 * 985 * @return The bytes for lastName. 986 */ getLastNameBytes()987 public com.google.protobuf.ByteString getLastNameBytes() { 988 java.lang.Object ref = lastName_; 989 if (ref instanceof String) { 990 com.google.protobuf.ByteString b = 991 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 992 lastName_ = b; 993 return b; 994 } else { 995 return (com.google.protobuf.ByteString) ref; 996 } 997 } 998 /** 999 * 1000 * 1001 * <pre> 1002 * The customer account contact's last name. Optional for Team customers. 1003 * </pre> 1004 * 1005 * <code>string last_name = 2;</code> 1006 * 1007 * @param value The lastName to set. 1008 * @return This builder for chaining. 1009 */ setLastName(java.lang.String value)1010 public Builder setLastName(java.lang.String value) { 1011 if (value == null) { 1012 throw new NullPointerException(); 1013 } 1014 lastName_ = value; 1015 bitField0_ |= 0x00000002; 1016 onChanged(); 1017 return this; 1018 } 1019 /** 1020 * 1021 * 1022 * <pre> 1023 * The customer account contact's last name. Optional for Team customers. 1024 * </pre> 1025 * 1026 * <code>string last_name = 2;</code> 1027 * 1028 * @return This builder for chaining. 1029 */ clearLastName()1030 public Builder clearLastName() { 1031 lastName_ = getDefaultInstance().getLastName(); 1032 bitField0_ = (bitField0_ & ~0x00000002); 1033 onChanged(); 1034 return this; 1035 } 1036 /** 1037 * 1038 * 1039 * <pre> 1040 * The customer account contact's last name. Optional for Team customers. 1041 * </pre> 1042 * 1043 * <code>string last_name = 2;</code> 1044 * 1045 * @param value The bytes for lastName to set. 1046 * @return This builder for chaining. 1047 */ setLastNameBytes(com.google.protobuf.ByteString value)1048 public Builder setLastNameBytes(com.google.protobuf.ByteString value) { 1049 if (value == null) { 1050 throw new NullPointerException(); 1051 } 1052 checkByteStringIsUtf8(value); 1053 lastName_ = value; 1054 bitField0_ |= 0x00000002; 1055 onChanged(); 1056 return this; 1057 } 1058 1059 private java.lang.Object displayName_ = ""; 1060 /** 1061 * 1062 * 1063 * <pre> 1064 * Output only. The customer account contact's display name, formatted as a 1065 * combination of the customer's first and last name. 1066 * </pre> 1067 * 1068 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1069 * 1070 * @return The displayName. 1071 */ getDisplayName()1072 public java.lang.String getDisplayName() { 1073 java.lang.Object ref = displayName_; 1074 if (!(ref instanceof java.lang.String)) { 1075 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1076 java.lang.String s = bs.toStringUtf8(); 1077 displayName_ = s; 1078 return s; 1079 } else { 1080 return (java.lang.String) ref; 1081 } 1082 } 1083 /** 1084 * 1085 * 1086 * <pre> 1087 * Output only. The customer account contact's display name, formatted as a 1088 * combination of the customer's first and last name. 1089 * </pre> 1090 * 1091 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1092 * 1093 * @return The bytes for displayName. 1094 */ getDisplayNameBytes()1095 public com.google.protobuf.ByteString getDisplayNameBytes() { 1096 java.lang.Object ref = displayName_; 1097 if (ref instanceof String) { 1098 com.google.protobuf.ByteString b = 1099 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1100 displayName_ = b; 1101 return b; 1102 } else { 1103 return (com.google.protobuf.ByteString) ref; 1104 } 1105 } 1106 /** 1107 * 1108 * 1109 * <pre> 1110 * Output only. The customer account contact's display name, formatted as a 1111 * combination of the customer's first and last name. 1112 * </pre> 1113 * 1114 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1115 * 1116 * @param value The displayName to set. 1117 * @return This builder for chaining. 1118 */ setDisplayName(java.lang.String value)1119 public Builder setDisplayName(java.lang.String value) { 1120 if (value == null) { 1121 throw new NullPointerException(); 1122 } 1123 displayName_ = value; 1124 bitField0_ |= 0x00000004; 1125 onChanged(); 1126 return this; 1127 } 1128 /** 1129 * 1130 * 1131 * <pre> 1132 * Output only. The customer account contact's display name, formatted as a 1133 * combination of the customer's first and last name. 1134 * </pre> 1135 * 1136 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1137 * 1138 * @return This builder for chaining. 1139 */ clearDisplayName()1140 public Builder clearDisplayName() { 1141 displayName_ = getDefaultInstance().getDisplayName(); 1142 bitField0_ = (bitField0_ & ~0x00000004); 1143 onChanged(); 1144 return this; 1145 } 1146 /** 1147 * 1148 * 1149 * <pre> 1150 * Output only. The customer account contact's display name, formatted as a 1151 * combination of the customer's first and last name. 1152 * </pre> 1153 * 1154 * <code>string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1155 * 1156 * @param value The bytes for displayName to set. 1157 * @return This builder for chaining. 1158 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1159 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1160 if (value == null) { 1161 throw new NullPointerException(); 1162 } 1163 checkByteStringIsUtf8(value); 1164 displayName_ = value; 1165 bitField0_ |= 0x00000004; 1166 onChanged(); 1167 return this; 1168 } 1169 1170 private java.lang.Object email_ = ""; 1171 /** 1172 * 1173 * 1174 * <pre> 1175 * The customer account's contact email. Required for entitlements that create 1176 * admin.google.com accounts, and serves as the customer's username for those 1177 * accounts. Use this email to invite Team customers. 1178 * </pre> 1179 * 1180 * <code>string email = 5;</code> 1181 * 1182 * @return The email. 1183 */ getEmail()1184 public java.lang.String getEmail() { 1185 java.lang.Object ref = email_; 1186 if (!(ref instanceof java.lang.String)) { 1187 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1188 java.lang.String s = bs.toStringUtf8(); 1189 email_ = s; 1190 return s; 1191 } else { 1192 return (java.lang.String) ref; 1193 } 1194 } 1195 /** 1196 * 1197 * 1198 * <pre> 1199 * The customer account's contact email. Required for entitlements that create 1200 * admin.google.com accounts, and serves as the customer's username for those 1201 * accounts. Use this email to invite Team customers. 1202 * </pre> 1203 * 1204 * <code>string email = 5;</code> 1205 * 1206 * @return The bytes for email. 1207 */ getEmailBytes()1208 public com.google.protobuf.ByteString getEmailBytes() { 1209 java.lang.Object ref = email_; 1210 if (ref instanceof String) { 1211 com.google.protobuf.ByteString b = 1212 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1213 email_ = b; 1214 return b; 1215 } else { 1216 return (com.google.protobuf.ByteString) ref; 1217 } 1218 } 1219 /** 1220 * 1221 * 1222 * <pre> 1223 * The customer account's contact email. Required for entitlements that create 1224 * admin.google.com accounts, and serves as the customer's username for those 1225 * accounts. Use this email to invite Team customers. 1226 * </pre> 1227 * 1228 * <code>string email = 5;</code> 1229 * 1230 * @param value The email to set. 1231 * @return This builder for chaining. 1232 */ setEmail(java.lang.String value)1233 public Builder setEmail(java.lang.String value) { 1234 if (value == null) { 1235 throw new NullPointerException(); 1236 } 1237 email_ = value; 1238 bitField0_ |= 0x00000008; 1239 onChanged(); 1240 return this; 1241 } 1242 /** 1243 * 1244 * 1245 * <pre> 1246 * The customer account's contact email. Required for entitlements that create 1247 * admin.google.com accounts, and serves as the customer's username for those 1248 * accounts. Use this email to invite Team customers. 1249 * </pre> 1250 * 1251 * <code>string email = 5;</code> 1252 * 1253 * @return This builder for chaining. 1254 */ clearEmail()1255 public Builder clearEmail() { 1256 email_ = getDefaultInstance().getEmail(); 1257 bitField0_ = (bitField0_ & ~0x00000008); 1258 onChanged(); 1259 return this; 1260 } 1261 /** 1262 * 1263 * 1264 * <pre> 1265 * The customer account's contact email. Required for entitlements that create 1266 * admin.google.com accounts, and serves as the customer's username for those 1267 * accounts. Use this email to invite Team customers. 1268 * </pre> 1269 * 1270 * <code>string email = 5;</code> 1271 * 1272 * @param value The bytes for email to set. 1273 * @return This builder for chaining. 1274 */ setEmailBytes(com.google.protobuf.ByteString value)1275 public Builder setEmailBytes(com.google.protobuf.ByteString value) { 1276 if (value == null) { 1277 throw new NullPointerException(); 1278 } 1279 checkByteStringIsUtf8(value); 1280 email_ = value; 1281 bitField0_ |= 0x00000008; 1282 onChanged(); 1283 return this; 1284 } 1285 1286 private java.lang.Object title_ = ""; 1287 /** 1288 * 1289 * 1290 * <pre> 1291 * Optional. The customer account contact's job title. 1292 * </pre> 1293 * 1294 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1295 * 1296 * @return The title. 1297 */ getTitle()1298 public java.lang.String getTitle() { 1299 java.lang.Object ref = title_; 1300 if (!(ref instanceof java.lang.String)) { 1301 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1302 java.lang.String s = bs.toStringUtf8(); 1303 title_ = s; 1304 return s; 1305 } else { 1306 return (java.lang.String) ref; 1307 } 1308 } 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * Optional. The customer account contact's job title. 1314 * </pre> 1315 * 1316 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1317 * 1318 * @return The bytes for title. 1319 */ getTitleBytes()1320 public com.google.protobuf.ByteString getTitleBytes() { 1321 java.lang.Object ref = title_; 1322 if (ref instanceof String) { 1323 com.google.protobuf.ByteString b = 1324 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1325 title_ = b; 1326 return b; 1327 } else { 1328 return (com.google.protobuf.ByteString) ref; 1329 } 1330 } 1331 /** 1332 * 1333 * 1334 * <pre> 1335 * Optional. The customer account contact's job title. 1336 * </pre> 1337 * 1338 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1339 * 1340 * @param value The title to set. 1341 * @return This builder for chaining. 1342 */ setTitle(java.lang.String value)1343 public Builder setTitle(java.lang.String value) { 1344 if (value == null) { 1345 throw new NullPointerException(); 1346 } 1347 title_ = value; 1348 bitField0_ |= 0x00000010; 1349 onChanged(); 1350 return this; 1351 } 1352 /** 1353 * 1354 * 1355 * <pre> 1356 * Optional. The customer account contact's job title. 1357 * </pre> 1358 * 1359 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1360 * 1361 * @return This builder for chaining. 1362 */ clearTitle()1363 public Builder clearTitle() { 1364 title_ = getDefaultInstance().getTitle(); 1365 bitField0_ = (bitField0_ & ~0x00000010); 1366 onChanged(); 1367 return this; 1368 } 1369 /** 1370 * 1371 * 1372 * <pre> 1373 * Optional. The customer account contact's job title. 1374 * </pre> 1375 * 1376 * <code>string title = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1377 * 1378 * @param value The bytes for title to set. 1379 * @return This builder for chaining. 1380 */ setTitleBytes(com.google.protobuf.ByteString value)1381 public Builder setTitleBytes(com.google.protobuf.ByteString value) { 1382 if (value == null) { 1383 throw new NullPointerException(); 1384 } 1385 checkByteStringIsUtf8(value); 1386 title_ = value; 1387 bitField0_ |= 0x00000010; 1388 onChanged(); 1389 return this; 1390 } 1391 1392 private java.lang.Object phone_ = ""; 1393 /** 1394 * 1395 * 1396 * <pre> 1397 * The customer account's contact phone number. 1398 * </pre> 1399 * 1400 * <code>string phone = 7;</code> 1401 * 1402 * @return The phone. 1403 */ getPhone()1404 public java.lang.String getPhone() { 1405 java.lang.Object ref = phone_; 1406 if (!(ref instanceof java.lang.String)) { 1407 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1408 java.lang.String s = bs.toStringUtf8(); 1409 phone_ = s; 1410 return s; 1411 } else { 1412 return (java.lang.String) ref; 1413 } 1414 } 1415 /** 1416 * 1417 * 1418 * <pre> 1419 * The customer account's contact phone number. 1420 * </pre> 1421 * 1422 * <code>string phone = 7;</code> 1423 * 1424 * @return The bytes for phone. 1425 */ getPhoneBytes()1426 public com.google.protobuf.ByteString getPhoneBytes() { 1427 java.lang.Object ref = phone_; 1428 if (ref instanceof String) { 1429 com.google.protobuf.ByteString b = 1430 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1431 phone_ = b; 1432 return b; 1433 } else { 1434 return (com.google.protobuf.ByteString) ref; 1435 } 1436 } 1437 /** 1438 * 1439 * 1440 * <pre> 1441 * The customer account's contact phone number. 1442 * </pre> 1443 * 1444 * <code>string phone = 7;</code> 1445 * 1446 * @param value The phone to set. 1447 * @return This builder for chaining. 1448 */ setPhone(java.lang.String value)1449 public Builder setPhone(java.lang.String value) { 1450 if (value == null) { 1451 throw new NullPointerException(); 1452 } 1453 phone_ = value; 1454 bitField0_ |= 0x00000020; 1455 onChanged(); 1456 return this; 1457 } 1458 /** 1459 * 1460 * 1461 * <pre> 1462 * The customer account's contact phone number. 1463 * </pre> 1464 * 1465 * <code>string phone = 7;</code> 1466 * 1467 * @return This builder for chaining. 1468 */ clearPhone()1469 public Builder clearPhone() { 1470 phone_ = getDefaultInstance().getPhone(); 1471 bitField0_ = (bitField0_ & ~0x00000020); 1472 onChanged(); 1473 return this; 1474 } 1475 /** 1476 * 1477 * 1478 * <pre> 1479 * The customer account's contact phone number. 1480 * </pre> 1481 * 1482 * <code>string phone = 7;</code> 1483 * 1484 * @param value The bytes for phone to set. 1485 * @return This builder for chaining. 1486 */ setPhoneBytes(com.google.protobuf.ByteString value)1487 public Builder setPhoneBytes(com.google.protobuf.ByteString value) { 1488 if (value == null) { 1489 throw new NullPointerException(); 1490 } 1491 checkByteStringIsUtf8(value); 1492 phone_ = value; 1493 bitField0_ |= 0x00000020; 1494 onChanged(); 1495 return this; 1496 } 1497 1498 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1499 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1500 return super.setUnknownFields(unknownFields); 1501 } 1502 1503 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1504 public final Builder mergeUnknownFields( 1505 final com.google.protobuf.UnknownFieldSet unknownFields) { 1506 return super.mergeUnknownFields(unknownFields); 1507 } 1508 1509 // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ContactInfo) 1510 } 1511 1512 // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ContactInfo) 1513 private static final com.google.cloud.channel.v1.ContactInfo DEFAULT_INSTANCE; 1514 1515 static { 1516 DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ContactInfo(); 1517 } 1518 getDefaultInstance()1519 public static com.google.cloud.channel.v1.ContactInfo getDefaultInstance() { 1520 return DEFAULT_INSTANCE; 1521 } 1522 1523 private static final com.google.protobuf.Parser<ContactInfo> PARSER = 1524 new com.google.protobuf.AbstractParser<ContactInfo>() { 1525 @java.lang.Override 1526 public ContactInfo parsePartialFrom( 1527 com.google.protobuf.CodedInputStream input, 1528 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1529 throws com.google.protobuf.InvalidProtocolBufferException { 1530 Builder builder = newBuilder(); 1531 try { 1532 builder.mergeFrom(input, extensionRegistry); 1533 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1534 throw e.setUnfinishedMessage(builder.buildPartial()); 1535 } catch (com.google.protobuf.UninitializedMessageException e) { 1536 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1537 } catch (java.io.IOException e) { 1538 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1539 .setUnfinishedMessage(builder.buildPartial()); 1540 } 1541 return builder.buildPartial(); 1542 } 1543 }; 1544 parser()1545 public static com.google.protobuf.Parser<ContactInfo> parser() { 1546 return PARSER; 1547 } 1548 1549 @java.lang.Override getParserForType()1550 public com.google.protobuf.Parser<ContactInfo> getParserForType() { 1551 return PARSER; 1552 } 1553 1554 @java.lang.Override getDefaultInstanceForType()1555 public com.google.cloud.channel.v1.ContactInfo getDefaultInstanceForType() { 1556 return DEFAULT_INSTANCE; 1557 } 1558 } 1559