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