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/retail/v2/product_service.proto 18 19 package com.google.cloud.retail.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Request message for 26 * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] 27 * method. 28 * </pre> 29 * 30 * Protobuf type {@code google.cloud.retail.v2.UpdateProductRequest} 31 */ 32 public final class UpdateProductRequest extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.UpdateProductRequest) 35 UpdateProductRequestOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use UpdateProductRequest.newBuilder() to construct. UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 UpdateProductRequest()42 private UpdateProductRequest() {} 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new UpdateProductRequest(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.retail.v2.ProductServiceProto 57 .internal_static_google_cloud_retail_v2_UpdateProductRequest_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.retail.v2.ProductServiceProto 64 .internal_static_google_cloud_retail_v2_UpdateProductRequest_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.retail.v2.UpdateProductRequest.class, 67 com.google.cloud.retail.v2.UpdateProductRequest.Builder.class); 68 } 69 70 public static final int PRODUCT_FIELD_NUMBER = 1; 71 private com.google.cloud.retail.v2.Product product_; 72 /** 73 * 74 * 75 * <pre> 76 * Required. The product to update/create. 77 * If the caller does not have permission to update the 78 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 79 * exists, a PERMISSION_DENIED error is returned. 80 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 81 * and 82 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 83 * is not set, a NOT_FOUND error is returned. 84 * </pre> 85 * 86 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 87 * </code> 88 * 89 * @return Whether the product field is set. 90 */ 91 @java.lang.Override hasProduct()92 public boolean hasProduct() { 93 return product_ != null; 94 } 95 /** 96 * 97 * 98 * <pre> 99 * Required. The product to update/create. 100 * If the caller does not have permission to update the 101 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 102 * exists, a PERMISSION_DENIED error is returned. 103 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 104 * and 105 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 106 * is not set, a NOT_FOUND error is returned. 107 * </pre> 108 * 109 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 110 * </code> 111 * 112 * @return The product. 113 */ 114 @java.lang.Override getProduct()115 public com.google.cloud.retail.v2.Product getProduct() { 116 return product_ == null ? com.google.cloud.retail.v2.Product.getDefaultInstance() : product_; 117 } 118 /** 119 * 120 * 121 * <pre> 122 * Required. The product to update/create. 123 * If the caller does not have permission to update the 124 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 125 * exists, a PERMISSION_DENIED error is returned. 126 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 127 * and 128 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 129 * is not set, a NOT_FOUND error is returned. 130 * </pre> 131 * 132 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 133 * </code> 134 */ 135 @java.lang.Override getProductOrBuilder()136 public com.google.cloud.retail.v2.ProductOrBuilder getProductOrBuilder() { 137 return product_ == null ? com.google.cloud.retail.v2.Product.getDefaultInstance() : product_; 138 } 139 140 public static final int UPDATE_MASK_FIELD_NUMBER = 2; 141 private com.google.protobuf.FieldMask updateMask_; 142 /** 143 * 144 * 145 * <pre> 146 * Indicates which fields in the provided 147 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 148 * output only fields are NOT supported. If not set, all supported fields (the 149 * fields that are neither immutable nor output only) are updated. 150 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 151 * is returned. 152 * The attribute key can be updated by setting the mask path as 153 * "attributes.${key_name}". If a key name is present in the mask but not in 154 * the patching product from the request, this key will be deleted after the 155 * update. 156 * </pre> 157 * 158 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 159 * 160 * @return Whether the updateMask field is set. 161 */ 162 @java.lang.Override hasUpdateMask()163 public boolean hasUpdateMask() { 164 return updateMask_ != null; 165 } 166 /** 167 * 168 * 169 * <pre> 170 * Indicates which fields in the provided 171 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 172 * output only fields are NOT supported. If not set, all supported fields (the 173 * fields that are neither immutable nor output only) are updated. 174 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 175 * is returned. 176 * The attribute key can be updated by setting the mask path as 177 * "attributes.${key_name}". If a key name is present in the mask but not in 178 * the patching product from the request, this key will be deleted after the 179 * update. 180 * </pre> 181 * 182 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 183 * 184 * @return The updateMask. 185 */ 186 @java.lang.Override getUpdateMask()187 public com.google.protobuf.FieldMask getUpdateMask() { 188 return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; 189 } 190 /** 191 * 192 * 193 * <pre> 194 * Indicates which fields in the provided 195 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 196 * output only fields are NOT supported. If not set, all supported fields (the 197 * fields that are neither immutable nor output only) are updated. 198 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 199 * is returned. 200 * The attribute key can be updated by setting the mask path as 201 * "attributes.${key_name}". If a key name is present in the mask but not in 202 * the patching product from the request, this key will be deleted after the 203 * update. 204 * </pre> 205 * 206 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 207 */ 208 @java.lang.Override getUpdateMaskOrBuilder()209 public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { 210 return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; 211 } 212 213 public static final int ALLOW_MISSING_FIELD_NUMBER = 3; 214 private boolean allowMissing_ = false; 215 /** 216 * 217 * 218 * <pre> 219 * If set to true, and the [Product][google.cloud.retail.v2.Product] is not 220 * found, a new [Product][google.cloud.retail.v2.Product] will be created. In 221 * this situation, `update_mask` is ignored. 222 * </pre> 223 * 224 * <code>bool allow_missing = 3;</code> 225 * 226 * @return The allowMissing. 227 */ 228 @java.lang.Override getAllowMissing()229 public boolean getAllowMissing() { 230 return allowMissing_; 231 } 232 233 private byte memoizedIsInitialized = -1; 234 235 @java.lang.Override isInitialized()236 public final boolean isInitialized() { 237 byte isInitialized = memoizedIsInitialized; 238 if (isInitialized == 1) return true; 239 if (isInitialized == 0) return false; 240 241 memoizedIsInitialized = 1; 242 return true; 243 } 244 245 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)246 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 247 if (product_ != null) { 248 output.writeMessage(1, getProduct()); 249 } 250 if (updateMask_ != null) { 251 output.writeMessage(2, getUpdateMask()); 252 } 253 if (allowMissing_ != false) { 254 output.writeBool(3, allowMissing_); 255 } 256 getUnknownFields().writeTo(output); 257 } 258 259 @java.lang.Override getSerializedSize()260 public int getSerializedSize() { 261 int size = memoizedSize; 262 if (size != -1) return size; 263 264 size = 0; 265 if (product_ != null) { 266 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProduct()); 267 } 268 if (updateMask_ != null) { 269 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); 270 } 271 if (allowMissing_ != false) { 272 size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); 273 } 274 size += getUnknownFields().getSerializedSize(); 275 memoizedSize = size; 276 return size; 277 } 278 279 @java.lang.Override equals(final java.lang.Object obj)280 public boolean equals(final java.lang.Object obj) { 281 if (obj == this) { 282 return true; 283 } 284 if (!(obj instanceof com.google.cloud.retail.v2.UpdateProductRequest)) { 285 return super.equals(obj); 286 } 287 com.google.cloud.retail.v2.UpdateProductRequest other = 288 (com.google.cloud.retail.v2.UpdateProductRequest) obj; 289 290 if (hasProduct() != other.hasProduct()) return false; 291 if (hasProduct()) { 292 if (!getProduct().equals(other.getProduct())) return false; 293 } 294 if (hasUpdateMask() != other.hasUpdateMask()) return false; 295 if (hasUpdateMask()) { 296 if (!getUpdateMask().equals(other.getUpdateMask())) return false; 297 } 298 if (getAllowMissing() != other.getAllowMissing()) return false; 299 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 300 return true; 301 } 302 303 @java.lang.Override hashCode()304 public int hashCode() { 305 if (memoizedHashCode != 0) { 306 return memoizedHashCode; 307 } 308 int hash = 41; 309 hash = (19 * hash) + getDescriptor().hashCode(); 310 if (hasProduct()) { 311 hash = (37 * hash) + PRODUCT_FIELD_NUMBER; 312 hash = (53 * hash) + getProduct().hashCode(); 313 } 314 if (hasUpdateMask()) { 315 hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; 316 hash = (53 * hash) + getUpdateMask().hashCode(); 317 } 318 hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; 319 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); 320 hash = (29 * hash) + getUnknownFields().hashCode(); 321 memoizedHashCode = hash; 322 return hash; 323 } 324 parseFrom(java.nio.ByteBuffer data)325 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom(java.nio.ByteBuffer data) 326 throws com.google.protobuf.InvalidProtocolBufferException { 327 return PARSER.parseFrom(data); 328 } 329 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)330 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 331 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 332 throws com.google.protobuf.InvalidProtocolBufferException { 333 return PARSER.parseFrom(data, extensionRegistry); 334 } 335 parseFrom( com.google.protobuf.ByteString data)336 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 337 com.google.protobuf.ByteString data) 338 throws com.google.protobuf.InvalidProtocolBufferException { 339 return PARSER.parseFrom(data); 340 } 341 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)342 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 343 com.google.protobuf.ByteString data, 344 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 345 throws com.google.protobuf.InvalidProtocolBufferException { 346 return PARSER.parseFrom(data, extensionRegistry); 347 } 348 parseFrom(byte[] data)349 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom(byte[] data) 350 throws com.google.protobuf.InvalidProtocolBufferException { 351 return PARSER.parseFrom(data); 352 } 353 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)354 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 355 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 356 throws com.google.protobuf.InvalidProtocolBufferException { 357 return PARSER.parseFrom(data, extensionRegistry); 358 } 359 parseFrom(java.io.InputStream input)360 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom(java.io.InputStream input) 361 throws java.io.IOException { 362 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 363 } 364 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)365 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 366 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 367 throws java.io.IOException { 368 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 369 PARSER, input, extensionRegistry); 370 } 371 parseDelimitedFrom( java.io.InputStream input)372 public static com.google.cloud.retail.v2.UpdateProductRequest parseDelimitedFrom( 373 java.io.InputStream input) throws java.io.IOException { 374 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 375 } 376 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)377 public static com.google.cloud.retail.v2.UpdateProductRequest parseDelimitedFrom( 378 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 379 throws java.io.IOException { 380 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 381 PARSER, input, extensionRegistry); 382 } 383 parseFrom( com.google.protobuf.CodedInputStream input)384 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 385 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 386 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 387 } 388 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)389 public static com.google.cloud.retail.v2.UpdateProductRequest parseFrom( 390 com.google.protobuf.CodedInputStream input, 391 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 392 throws java.io.IOException { 393 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 394 PARSER, input, extensionRegistry); 395 } 396 397 @java.lang.Override newBuilderForType()398 public Builder newBuilderForType() { 399 return newBuilder(); 400 } 401 newBuilder()402 public static Builder newBuilder() { 403 return DEFAULT_INSTANCE.toBuilder(); 404 } 405 newBuilder(com.google.cloud.retail.v2.UpdateProductRequest prototype)406 public static Builder newBuilder(com.google.cloud.retail.v2.UpdateProductRequest prototype) { 407 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 408 } 409 410 @java.lang.Override toBuilder()411 public Builder toBuilder() { 412 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 413 } 414 415 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)416 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 417 Builder builder = new Builder(parent); 418 return builder; 419 } 420 /** 421 * 422 * 423 * <pre> 424 * Request message for 425 * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] 426 * method. 427 * </pre> 428 * 429 * Protobuf type {@code google.cloud.retail.v2.UpdateProductRequest} 430 */ 431 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 432 implements 433 // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.UpdateProductRequest) 434 com.google.cloud.retail.v2.UpdateProductRequestOrBuilder { getDescriptor()435 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 436 return com.google.cloud.retail.v2.ProductServiceProto 437 .internal_static_google_cloud_retail_v2_UpdateProductRequest_descriptor; 438 } 439 440 @java.lang.Override 441 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()442 internalGetFieldAccessorTable() { 443 return com.google.cloud.retail.v2.ProductServiceProto 444 .internal_static_google_cloud_retail_v2_UpdateProductRequest_fieldAccessorTable 445 .ensureFieldAccessorsInitialized( 446 com.google.cloud.retail.v2.UpdateProductRequest.class, 447 com.google.cloud.retail.v2.UpdateProductRequest.Builder.class); 448 } 449 450 // Construct using com.google.cloud.retail.v2.UpdateProductRequest.newBuilder() Builder()451 private Builder() {} 452 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)453 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 454 super(parent); 455 } 456 457 @java.lang.Override clear()458 public Builder clear() { 459 super.clear(); 460 bitField0_ = 0; 461 product_ = null; 462 if (productBuilder_ != null) { 463 productBuilder_.dispose(); 464 productBuilder_ = null; 465 } 466 updateMask_ = null; 467 if (updateMaskBuilder_ != null) { 468 updateMaskBuilder_.dispose(); 469 updateMaskBuilder_ = null; 470 } 471 allowMissing_ = false; 472 return this; 473 } 474 475 @java.lang.Override getDescriptorForType()476 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 477 return com.google.cloud.retail.v2.ProductServiceProto 478 .internal_static_google_cloud_retail_v2_UpdateProductRequest_descriptor; 479 } 480 481 @java.lang.Override getDefaultInstanceForType()482 public com.google.cloud.retail.v2.UpdateProductRequest getDefaultInstanceForType() { 483 return com.google.cloud.retail.v2.UpdateProductRequest.getDefaultInstance(); 484 } 485 486 @java.lang.Override build()487 public com.google.cloud.retail.v2.UpdateProductRequest build() { 488 com.google.cloud.retail.v2.UpdateProductRequest result = buildPartial(); 489 if (!result.isInitialized()) { 490 throw newUninitializedMessageException(result); 491 } 492 return result; 493 } 494 495 @java.lang.Override buildPartial()496 public com.google.cloud.retail.v2.UpdateProductRequest buildPartial() { 497 com.google.cloud.retail.v2.UpdateProductRequest result = 498 new com.google.cloud.retail.v2.UpdateProductRequest(this); 499 if (bitField0_ != 0) { 500 buildPartial0(result); 501 } 502 onBuilt(); 503 return result; 504 } 505 buildPartial0(com.google.cloud.retail.v2.UpdateProductRequest result)506 private void buildPartial0(com.google.cloud.retail.v2.UpdateProductRequest result) { 507 int from_bitField0_ = bitField0_; 508 if (((from_bitField0_ & 0x00000001) != 0)) { 509 result.product_ = productBuilder_ == null ? product_ : productBuilder_.build(); 510 } 511 if (((from_bitField0_ & 0x00000002) != 0)) { 512 result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); 513 } 514 if (((from_bitField0_ & 0x00000004) != 0)) { 515 result.allowMissing_ = allowMissing_; 516 } 517 } 518 519 @java.lang.Override clone()520 public Builder clone() { 521 return super.clone(); 522 } 523 524 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)525 public Builder setField( 526 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 527 return super.setField(field, value); 528 } 529 530 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)531 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 532 return super.clearField(field); 533 } 534 535 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)536 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 537 return super.clearOneof(oneof); 538 } 539 540 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)541 public Builder setRepeatedField( 542 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 543 return super.setRepeatedField(field, index, value); 544 } 545 546 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)547 public Builder addRepeatedField( 548 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 549 return super.addRepeatedField(field, value); 550 } 551 552 @java.lang.Override mergeFrom(com.google.protobuf.Message other)553 public Builder mergeFrom(com.google.protobuf.Message other) { 554 if (other instanceof com.google.cloud.retail.v2.UpdateProductRequest) { 555 return mergeFrom((com.google.cloud.retail.v2.UpdateProductRequest) other); 556 } else { 557 super.mergeFrom(other); 558 return this; 559 } 560 } 561 mergeFrom(com.google.cloud.retail.v2.UpdateProductRequest other)562 public Builder mergeFrom(com.google.cloud.retail.v2.UpdateProductRequest other) { 563 if (other == com.google.cloud.retail.v2.UpdateProductRequest.getDefaultInstance()) 564 return this; 565 if (other.hasProduct()) { 566 mergeProduct(other.getProduct()); 567 } 568 if (other.hasUpdateMask()) { 569 mergeUpdateMask(other.getUpdateMask()); 570 } 571 if (other.getAllowMissing() != false) { 572 setAllowMissing(other.getAllowMissing()); 573 } 574 this.mergeUnknownFields(other.getUnknownFields()); 575 onChanged(); 576 return this; 577 } 578 579 @java.lang.Override isInitialized()580 public final boolean isInitialized() { 581 return true; 582 } 583 584 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)585 public Builder mergeFrom( 586 com.google.protobuf.CodedInputStream input, 587 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 588 throws java.io.IOException { 589 if (extensionRegistry == null) { 590 throw new java.lang.NullPointerException(); 591 } 592 try { 593 boolean done = false; 594 while (!done) { 595 int tag = input.readTag(); 596 switch (tag) { 597 case 0: 598 done = true; 599 break; 600 case 10: 601 { 602 input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); 603 bitField0_ |= 0x00000001; 604 break; 605 } // case 10 606 case 18: 607 { 608 input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); 609 bitField0_ |= 0x00000002; 610 break; 611 } // case 18 612 case 24: 613 { 614 allowMissing_ = input.readBool(); 615 bitField0_ |= 0x00000004; 616 break; 617 } // case 24 618 default: 619 { 620 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 621 done = true; // was an endgroup tag 622 } 623 break; 624 } // default: 625 } // switch (tag) 626 } // while (!done) 627 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 628 throw e.unwrapIOException(); 629 } finally { 630 onChanged(); 631 } // finally 632 return this; 633 } 634 635 private int bitField0_; 636 637 private com.google.cloud.retail.v2.Product product_; 638 private com.google.protobuf.SingleFieldBuilderV3< 639 com.google.cloud.retail.v2.Product, 640 com.google.cloud.retail.v2.Product.Builder, 641 com.google.cloud.retail.v2.ProductOrBuilder> 642 productBuilder_; 643 /** 644 * 645 * 646 * <pre> 647 * Required. The product to update/create. 648 * If the caller does not have permission to update the 649 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 650 * exists, a PERMISSION_DENIED error is returned. 651 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 652 * and 653 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 654 * is not set, a NOT_FOUND error is returned. 655 * </pre> 656 * 657 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 658 * </code> 659 * 660 * @return Whether the product field is set. 661 */ hasProduct()662 public boolean hasProduct() { 663 return ((bitField0_ & 0x00000001) != 0); 664 } 665 /** 666 * 667 * 668 * <pre> 669 * Required. The product to update/create. 670 * If the caller does not have permission to update the 671 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 672 * exists, a PERMISSION_DENIED error is returned. 673 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 674 * and 675 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 676 * is not set, a NOT_FOUND error is returned. 677 * </pre> 678 * 679 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 680 * </code> 681 * 682 * @return The product. 683 */ getProduct()684 public com.google.cloud.retail.v2.Product getProduct() { 685 if (productBuilder_ == null) { 686 return product_ == null 687 ? com.google.cloud.retail.v2.Product.getDefaultInstance() 688 : product_; 689 } else { 690 return productBuilder_.getMessage(); 691 } 692 } 693 /** 694 * 695 * 696 * <pre> 697 * Required. The product to update/create. 698 * If the caller does not have permission to update the 699 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 700 * exists, a PERMISSION_DENIED error is returned. 701 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 702 * and 703 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 704 * is not set, a NOT_FOUND error is returned. 705 * </pre> 706 * 707 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 708 * </code> 709 */ setProduct(com.google.cloud.retail.v2.Product value)710 public Builder setProduct(com.google.cloud.retail.v2.Product value) { 711 if (productBuilder_ == null) { 712 if (value == null) { 713 throw new NullPointerException(); 714 } 715 product_ = value; 716 } else { 717 productBuilder_.setMessage(value); 718 } 719 bitField0_ |= 0x00000001; 720 onChanged(); 721 return this; 722 } 723 /** 724 * 725 * 726 * <pre> 727 * Required. The product to update/create. 728 * If the caller does not have permission to update the 729 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 730 * exists, a PERMISSION_DENIED error is returned. 731 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 732 * and 733 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 734 * is not set, a NOT_FOUND error is returned. 735 * </pre> 736 * 737 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 738 * </code> 739 */ setProduct(com.google.cloud.retail.v2.Product.Builder builderForValue)740 public Builder setProduct(com.google.cloud.retail.v2.Product.Builder builderForValue) { 741 if (productBuilder_ == null) { 742 product_ = builderForValue.build(); 743 } else { 744 productBuilder_.setMessage(builderForValue.build()); 745 } 746 bitField0_ |= 0x00000001; 747 onChanged(); 748 return this; 749 } 750 /** 751 * 752 * 753 * <pre> 754 * Required. The product to update/create. 755 * If the caller does not have permission to update the 756 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 757 * exists, a PERMISSION_DENIED error is returned. 758 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 759 * and 760 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 761 * is not set, a NOT_FOUND error is returned. 762 * </pre> 763 * 764 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 765 * </code> 766 */ mergeProduct(com.google.cloud.retail.v2.Product value)767 public Builder mergeProduct(com.google.cloud.retail.v2.Product value) { 768 if (productBuilder_ == null) { 769 if (((bitField0_ & 0x00000001) != 0) 770 && product_ != null 771 && product_ != com.google.cloud.retail.v2.Product.getDefaultInstance()) { 772 getProductBuilder().mergeFrom(value); 773 } else { 774 product_ = value; 775 } 776 } else { 777 productBuilder_.mergeFrom(value); 778 } 779 bitField0_ |= 0x00000001; 780 onChanged(); 781 return this; 782 } 783 /** 784 * 785 * 786 * <pre> 787 * Required. The product to update/create. 788 * If the caller does not have permission to update the 789 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 790 * exists, a PERMISSION_DENIED error is returned. 791 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 792 * and 793 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 794 * is not set, a NOT_FOUND error is returned. 795 * </pre> 796 * 797 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 798 * </code> 799 */ clearProduct()800 public Builder clearProduct() { 801 bitField0_ = (bitField0_ & ~0x00000001); 802 product_ = null; 803 if (productBuilder_ != null) { 804 productBuilder_.dispose(); 805 productBuilder_ = null; 806 } 807 onChanged(); 808 return this; 809 } 810 /** 811 * 812 * 813 * <pre> 814 * Required. The product to update/create. 815 * If the caller does not have permission to update the 816 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 817 * exists, a PERMISSION_DENIED error is returned. 818 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 819 * and 820 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 821 * is not set, a NOT_FOUND error is returned. 822 * </pre> 823 * 824 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 825 * </code> 826 */ getProductBuilder()827 public com.google.cloud.retail.v2.Product.Builder getProductBuilder() { 828 bitField0_ |= 0x00000001; 829 onChanged(); 830 return getProductFieldBuilder().getBuilder(); 831 } 832 /** 833 * 834 * 835 * <pre> 836 * Required. The product to update/create. 837 * If the caller does not have permission to update the 838 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 839 * exists, a PERMISSION_DENIED error is returned. 840 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 841 * and 842 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 843 * is not set, a NOT_FOUND error is returned. 844 * </pre> 845 * 846 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 847 * </code> 848 */ getProductOrBuilder()849 public com.google.cloud.retail.v2.ProductOrBuilder getProductOrBuilder() { 850 if (productBuilder_ != null) { 851 return productBuilder_.getMessageOrBuilder(); 852 } else { 853 return product_ == null 854 ? com.google.cloud.retail.v2.Product.getDefaultInstance() 855 : product_; 856 } 857 } 858 /** 859 * 860 * 861 * <pre> 862 * Required. The product to update/create. 863 * If the caller does not have permission to update the 864 * [Product][google.cloud.retail.v2.Product], regardless of whether or not it 865 * exists, a PERMISSION_DENIED error is returned. 866 * If the [Product][google.cloud.retail.v2.Product] to update does not exist 867 * and 868 * [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] 869 * is not set, a NOT_FOUND error is returned. 870 * </pre> 871 * 872 * <code>.google.cloud.retail.v2.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; 873 * </code> 874 */ 875 private com.google.protobuf.SingleFieldBuilderV3< 876 com.google.cloud.retail.v2.Product, 877 com.google.cloud.retail.v2.Product.Builder, 878 com.google.cloud.retail.v2.ProductOrBuilder> getProductFieldBuilder()879 getProductFieldBuilder() { 880 if (productBuilder_ == null) { 881 productBuilder_ = 882 new com.google.protobuf.SingleFieldBuilderV3< 883 com.google.cloud.retail.v2.Product, 884 com.google.cloud.retail.v2.Product.Builder, 885 com.google.cloud.retail.v2.ProductOrBuilder>( 886 getProduct(), getParentForChildren(), isClean()); 887 product_ = null; 888 } 889 return productBuilder_; 890 } 891 892 private com.google.protobuf.FieldMask updateMask_; 893 private com.google.protobuf.SingleFieldBuilderV3< 894 com.google.protobuf.FieldMask, 895 com.google.protobuf.FieldMask.Builder, 896 com.google.protobuf.FieldMaskOrBuilder> 897 updateMaskBuilder_; 898 /** 899 * 900 * 901 * <pre> 902 * Indicates which fields in the provided 903 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 904 * output only fields are NOT supported. If not set, all supported fields (the 905 * fields that are neither immutable nor output only) are updated. 906 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 907 * is returned. 908 * The attribute key can be updated by setting the mask path as 909 * "attributes.${key_name}". If a key name is present in the mask but not in 910 * the patching product from the request, this key will be deleted after the 911 * update. 912 * </pre> 913 * 914 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 915 * 916 * @return Whether the updateMask field is set. 917 */ hasUpdateMask()918 public boolean hasUpdateMask() { 919 return ((bitField0_ & 0x00000002) != 0); 920 } 921 /** 922 * 923 * 924 * <pre> 925 * Indicates which fields in the provided 926 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 927 * output only fields are NOT supported. If not set, all supported fields (the 928 * fields that are neither immutable nor output only) are updated. 929 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 930 * is returned. 931 * The attribute key can be updated by setting the mask path as 932 * "attributes.${key_name}". If a key name is present in the mask but not in 933 * the patching product from the request, this key will be deleted after the 934 * update. 935 * </pre> 936 * 937 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 938 * 939 * @return The updateMask. 940 */ getUpdateMask()941 public com.google.protobuf.FieldMask getUpdateMask() { 942 if (updateMaskBuilder_ == null) { 943 return updateMask_ == null 944 ? com.google.protobuf.FieldMask.getDefaultInstance() 945 : updateMask_; 946 } else { 947 return updateMaskBuilder_.getMessage(); 948 } 949 } 950 /** 951 * 952 * 953 * <pre> 954 * Indicates which fields in the provided 955 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 956 * output only fields are NOT supported. If not set, all supported fields (the 957 * fields that are neither immutable nor output only) are updated. 958 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 959 * is returned. 960 * The attribute key can be updated by setting the mask path as 961 * "attributes.${key_name}". If a key name is present in the mask but not in 962 * the patching product from the request, this key will be deleted after the 963 * update. 964 * </pre> 965 * 966 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 967 */ setUpdateMask(com.google.protobuf.FieldMask value)968 public Builder setUpdateMask(com.google.protobuf.FieldMask value) { 969 if (updateMaskBuilder_ == null) { 970 if (value == null) { 971 throw new NullPointerException(); 972 } 973 updateMask_ = value; 974 } else { 975 updateMaskBuilder_.setMessage(value); 976 } 977 bitField0_ |= 0x00000002; 978 onChanged(); 979 return this; 980 } 981 /** 982 * 983 * 984 * <pre> 985 * Indicates which fields in the provided 986 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 987 * output only fields are NOT supported. If not set, all supported fields (the 988 * fields that are neither immutable nor output only) are updated. 989 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 990 * is returned. 991 * The attribute key can be updated by setting the mask path as 992 * "attributes.${key_name}". If a key name is present in the mask but not in 993 * the patching product from the request, this key will be deleted after the 994 * update. 995 * </pre> 996 * 997 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 998 */ setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue)999 public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { 1000 if (updateMaskBuilder_ == null) { 1001 updateMask_ = builderForValue.build(); 1002 } else { 1003 updateMaskBuilder_.setMessage(builderForValue.build()); 1004 } 1005 bitField0_ |= 0x00000002; 1006 onChanged(); 1007 return this; 1008 } 1009 /** 1010 * 1011 * 1012 * <pre> 1013 * Indicates which fields in the provided 1014 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 1015 * output only fields are NOT supported. If not set, all supported fields (the 1016 * fields that are neither immutable nor output only) are updated. 1017 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 1018 * is returned. 1019 * The attribute key can be updated by setting the mask path as 1020 * "attributes.${key_name}". If a key name is present in the mask but not in 1021 * the patching product from the request, this key will be deleted after the 1022 * update. 1023 * </pre> 1024 * 1025 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 1026 */ mergeUpdateMask(com.google.protobuf.FieldMask value)1027 public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { 1028 if (updateMaskBuilder_ == null) { 1029 if (((bitField0_ & 0x00000002) != 0) 1030 && updateMask_ != null 1031 && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { 1032 getUpdateMaskBuilder().mergeFrom(value); 1033 } else { 1034 updateMask_ = value; 1035 } 1036 } else { 1037 updateMaskBuilder_.mergeFrom(value); 1038 } 1039 bitField0_ |= 0x00000002; 1040 onChanged(); 1041 return this; 1042 } 1043 /** 1044 * 1045 * 1046 * <pre> 1047 * Indicates which fields in the provided 1048 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 1049 * output only fields are NOT supported. If not set, all supported fields (the 1050 * fields that are neither immutable nor output only) are updated. 1051 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 1052 * is returned. 1053 * The attribute key can be updated by setting the mask path as 1054 * "attributes.${key_name}". If a key name is present in the mask but not in 1055 * the patching product from the request, this key will be deleted after the 1056 * update. 1057 * </pre> 1058 * 1059 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 1060 */ clearUpdateMask()1061 public Builder clearUpdateMask() { 1062 bitField0_ = (bitField0_ & ~0x00000002); 1063 updateMask_ = null; 1064 if (updateMaskBuilder_ != null) { 1065 updateMaskBuilder_.dispose(); 1066 updateMaskBuilder_ = null; 1067 } 1068 onChanged(); 1069 return this; 1070 } 1071 /** 1072 * 1073 * 1074 * <pre> 1075 * Indicates which fields in the provided 1076 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 1077 * output only fields are NOT supported. If not set, all supported fields (the 1078 * fields that are neither immutable nor output only) are updated. 1079 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 1080 * is returned. 1081 * The attribute key can be updated by setting the mask path as 1082 * "attributes.${key_name}". If a key name is present in the mask but not in 1083 * the patching product from the request, this key will be deleted after the 1084 * update. 1085 * </pre> 1086 * 1087 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 1088 */ getUpdateMaskBuilder()1089 public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { 1090 bitField0_ |= 0x00000002; 1091 onChanged(); 1092 return getUpdateMaskFieldBuilder().getBuilder(); 1093 } 1094 /** 1095 * 1096 * 1097 * <pre> 1098 * Indicates which fields in the provided 1099 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 1100 * output only fields are NOT supported. If not set, all supported fields (the 1101 * fields that are neither immutable nor output only) are updated. 1102 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 1103 * is returned. 1104 * The attribute key can be updated by setting the mask path as 1105 * "attributes.${key_name}". If a key name is present in the mask but not in 1106 * the patching product from the request, this key will be deleted after the 1107 * update. 1108 * </pre> 1109 * 1110 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 1111 */ getUpdateMaskOrBuilder()1112 public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { 1113 if (updateMaskBuilder_ != null) { 1114 return updateMaskBuilder_.getMessageOrBuilder(); 1115 } else { 1116 return updateMask_ == null 1117 ? com.google.protobuf.FieldMask.getDefaultInstance() 1118 : updateMask_; 1119 } 1120 } 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * Indicates which fields in the provided 1126 * [Product][google.cloud.retail.v2.Product] to update. The immutable and 1127 * output only fields are NOT supported. If not set, all supported fields (the 1128 * fields that are neither immutable nor output only) are updated. 1129 * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error 1130 * is returned. 1131 * The attribute key can be updated by setting the mask path as 1132 * "attributes.${key_name}". If a key name is present in the mask but not in 1133 * the patching product from the request, this key will be deleted after the 1134 * update. 1135 * </pre> 1136 * 1137 * <code>.google.protobuf.FieldMask update_mask = 2;</code> 1138 */ 1139 private com.google.protobuf.SingleFieldBuilderV3< 1140 com.google.protobuf.FieldMask, 1141 com.google.protobuf.FieldMask.Builder, 1142 com.google.protobuf.FieldMaskOrBuilder> getUpdateMaskFieldBuilder()1143 getUpdateMaskFieldBuilder() { 1144 if (updateMaskBuilder_ == null) { 1145 updateMaskBuilder_ = 1146 new com.google.protobuf.SingleFieldBuilderV3< 1147 com.google.protobuf.FieldMask, 1148 com.google.protobuf.FieldMask.Builder, 1149 com.google.protobuf.FieldMaskOrBuilder>( 1150 getUpdateMask(), getParentForChildren(), isClean()); 1151 updateMask_ = null; 1152 } 1153 return updateMaskBuilder_; 1154 } 1155 1156 private boolean allowMissing_; 1157 /** 1158 * 1159 * 1160 * <pre> 1161 * If set to true, and the [Product][google.cloud.retail.v2.Product] is not 1162 * found, a new [Product][google.cloud.retail.v2.Product] will be created. In 1163 * this situation, `update_mask` is ignored. 1164 * </pre> 1165 * 1166 * <code>bool allow_missing = 3;</code> 1167 * 1168 * @return The allowMissing. 1169 */ 1170 @java.lang.Override getAllowMissing()1171 public boolean getAllowMissing() { 1172 return allowMissing_; 1173 } 1174 /** 1175 * 1176 * 1177 * <pre> 1178 * If set to true, and the [Product][google.cloud.retail.v2.Product] is not 1179 * found, a new [Product][google.cloud.retail.v2.Product] will be created. In 1180 * this situation, `update_mask` is ignored. 1181 * </pre> 1182 * 1183 * <code>bool allow_missing = 3;</code> 1184 * 1185 * @param value The allowMissing to set. 1186 * @return This builder for chaining. 1187 */ setAllowMissing(boolean value)1188 public Builder setAllowMissing(boolean value) { 1189 1190 allowMissing_ = value; 1191 bitField0_ |= 0x00000004; 1192 onChanged(); 1193 return this; 1194 } 1195 /** 1196 * 1197 * 1198 * <pre> 1199 * If set to true, and the [Product][google.cloud.retail.v2.Product] is not 1200 * found, a new [Product][google.cloud.retail.v2.Product] will be created. In 1201 * this situation, `update_mask` is ignored. 1202 * </pre> 1203 * 1204 * <code>bool allow_missing = 3;</code> 1205 * 1206 * @return This builder for chaining. 1207 */ clearAllowMissing()1208 public Builder clearAllowMissing() { 1209 bitField0_ = (bitField0_ & ~0x00000004); 1210 allowMissing_ = false; 1211 onChanged(); 1212 return this; 1213 } 1214 1215 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1216 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1217 return super.setUnknownFields(unknownFields); 1218 } 1219 1220 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1221 public final Builder mergeUnknownFields( 1222 final com.google.protobuf.UnknownFieldSet unknownFields) { 1223 return super.mergeUnknownFields(unknownFields); 1224 } 1225 1226 // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.UpdateProductRequest) 1227 } 1228 1229 // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.UpdateProductRequest) 1230 private static final com.google.cloud.retail.v2.UpdateProductRequest DEFAULT_INSTANCE; 1231 1232 static { 1233 DEFAULT_INSTANCE = new com.google.cloud.retail.v2.UpdateProductRequest(); 1234 } 1235 getDefaultInstance()1236 public static com.google.cloud.retail.v2.UpdateProductRequest getDefaultInstance() { 1237 return DEFAULT_INSTANCE; 1238 } 1239 1240 private static final com.google.protobuf.Parser<UpdateProductRequest> PARSER = 1241 new com.google.protobuf.AbstractParser<UpdateProductRequest>() { 1242 @java.lang.Override 1243 public UpdateProductRequest parsePartialFrom( 1244 com.google.protobuf.CodedInputStream input, 1245 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1246 throws com.google.protobuf.InvalidProtocolBufferException { 1247 Builder builder = newBuilder(); 1248 try { 1249 builder.mergeFrom(input, extensionRegistry); 1250 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1251 throw e.setUnfinishedMessage(builder.buildPartial()); 1252 } catch (com.google.protobuf.UninitializedMessageException e) { 1253 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1254 } catch (java.io.IOException e) { 1255 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1256 .setUnfinishedMessage(builder.buildPartial()); 1257 } 1258 return builder.buildPartial(); 1259 } 1260 }; 1261 parser()1262 public static com.google.protobuf.Parser<UpdateProductRequest> parser() { 1263 return PARSER; 1264 } 1265 1266 @java.lang.Override getParserForType()1267 public com.google.protobuf.Parser<UpdateProductRequest> getParserForType() { 1268 return PARSER; 1269 } 1270 1271 @java.lang.Override getDefaultInstanceForType()1272 public com.google.cloud.retail.v2.UpdateProductRequest getDefaultInstanceForType() { 1273 return DEFAULT_INSTANCE; 1274 } 1275 } 1276