Class 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.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
    implements UpdateProductRequestOrBuilder
     Request message for
     [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
     method.
     
    Protobuf type google.cloud.retail.v2beta.UpdateProductRequest
    • Method Detail

      • getDescriptor

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

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public UpdateProductRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • setField

        public UpdateProductRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • clearField

        public UpdateProductRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • clearOneof

        public UpdateProductRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • setRepeatedField

        public UpdateProductRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • addRepeatedField

        public UpdateProductRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.Product], regardless of whether or not
         it exists, a PERMISSION_DENIED error is returned.
        
         If the [Product][google.cloud.retail.v2beta.Product] to update does not
         exist and
         [allow_missing][google.cloud.retail.v2beta.UpdateProductRequest.allow_missing]
         is not set, a NOT_FOUND error is returned.
         
        .google.cloud.retail.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.Product] is
         not found, a new [Product][google.cloud.retail.v2beta.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.v2beta.Product] is
         not found, a new [Product][google.cloud.retail.v2beta.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.v2beta.Product] is
         not found, a new [Product][google.cloud.retail.v2beta.Product] will be
         created. In this situation, `update_mask` is ignored.
         
        bool allow_missing = 3;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final UpdateProductRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>
      • mergeUnknownFields

        public final UpdateProductRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateProductRequest.Builder>