Class UpdateProductRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder>
com.google.cloud.retail.v2alpha.UpdateProductRequest.Builder
All Implemented Interfaces:
UpdateProductRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
UpdateProductRequest

public static final class UpdateProductRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder> implements UpdateProductRequestOrBuilder
 Request message for
 [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
 method.
 
Protobuf type google.cloud.retail.v2alpha.UpdateProductRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder>
    • getDefaultInstanceForType

      public UpdateProductRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public UpdateProductRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public UpdateProductRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public UpdateProductRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UpdateProductRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<UpdateProductRequest.Builder>
    • mergeFrom

      public UpdateProductRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UpdateProductRequest.Builder>
      Throws:
      IOException
    • hasProduct

      public boolean hasProduct()
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasProduct in interface UpdateProductRequestOrBuilder
      Returns:
      Whether the product field is set.
    • getProduct

      public Product getProduct()
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProduct in interface UpdateProductRequestOrBuilder
      Returns:
      The product.
    • setProduct

      public UpdateProductRequest.Builder setProduct(Product value)
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • setProduct

      public UpdateProductRequest.Builder setProduct(Product.Builder builderForValue)
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • mergeProduct

      public UpdateProductRequest.Builder mergeProduct(Product value)
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • clearProduct

      public UpdateProductRequest.Builder clearProduct()
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • getProductBuilder

      public Product.Builder getProductBuilder()
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • getProductOrBuilder

      public ProductOrBuilder getProductOrBuilder()
       Required. The product to update/create.
      
       If the caller does not have permission to update the
       [Product][google.cloud.retail.v2alpha.Product], regardless of whether or
       not it exists, a PERMISSION_DENIED error is returned.
      
       If the [Product][google.cloud.retail.v2alpha.Product] to update does not
       exist and
       [allow_missing][google.cloud.retail.v2alpha.UpdateProductRequest.allow_missing]
       is not set, a NOT_FOUND error is returned.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProductOrBuilder in interface UpdateProductRequestOrBuilder
    • hasUpdateMask

      public boolean hasUpdateMask()
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
      Specified by:
      hasUpdateMask in interface UpdateProductRequestOrBuilder
      Returns:
      Whether the updateMask field is set.
    • getUpdateMask

      public com.google.protobuf.FieldMask getUpdateMask()
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
      Specified by:
      getUpdateMask in interface UpdateProductRequestOrBuilder
      Returns:
      The updateMask.
    • setUpdateMask

      public UpdateProductRequest.Builder setUpdateMask(com.google.protobuf.FieldMask value)
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
    • setUpdateMask

      public UpdateProductRequest.Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue)
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
    • mergeUpdateMask

      public UpdateProductRequest.Builder mergeUpdateMask(com.google.protobuf.FieldMask value)
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
    • clearUpdateMask

      public UpdateProductRequest.Builder clearUpdateMask()
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
    • getUpdateMaskBuilder

      public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder()
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
    • getUpdateMaskOrBuilder

      public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder()
       Indicates which fields in the provided
       [Product][google.cloud.retail.v2alpha.Product] to update. The immutable and
       output only fields are NOT supported. If not set, all supported fields (the
       fields that are neither immutable nor output only) are updated.
      
       If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
       is returned.
      
       The attribute key can be updated by setting the mask path as
       "attributes.${key_name}". If a key name is present in the mask but not in
       the patching product from the request, this key will be deleted after the
       update.
       
      .google.protobuf.FieldMask update_mask = 2;
      Specified by:
      getUpdateMaskOrBuilder in interface UpdateProductRequestOrBuilder
    • getAllowMissing

      public boolean getAllowMissing()
       If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
       not found, a new [Product][google.cloud.retail.v2alpha.Product] will be
       created. In this situation, `update_mask` is ignored.
       
      bool allow_missing = 3;
      Specified by:
      getAllowMissing in interface UpdateProductRequestOrBuilder
      Returns:
      The allowMissing.
    • setAllowMissing

      public UpdateProductRequest.Builder setAllowMissing(boolean value)
       If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
       not found, a new [Product][google.cloud.retail.v2alpha.Product] will be
       created. In this situation, `update_mask` is ignored.
       
      bool allow_missing = 3;
      Parameters:
      value - The allowMissing to set.
      Returns:
      This builder for chaining.
    • clearAllowMissing

      public UpdateProductRequest.Builder clearAllowMissing()
       If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is
       not found, a new [Product][google.cloud.retail.v2alpha.Product] will be
       created. In this situation, `update_mask` is ignored.
       
      bool allow_missing = 3;
      Returns:
      This builder for chaining.