Class CreateProductRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CreateProductRequest.Builder>
com.google.cloud.vision.v1.CreateProductRequest.Builder
All Implemented Interfaces:
CreateProductRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CreateProductRequest

public static final class CreateProductRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<CreateProductRequest.Builder> implements CreateProductRequestOrBuilder
 Request message for the `CreateProduct` method.
 
Protobuf type google.cloud.vision.v1.CreateProductRequest
  • 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<CreateProductRequest.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<CreateProductRequest.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<CreateProductRequest.Builder>
    • getDefaultInstanceForType

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

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

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

      public CreateProductRequest.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<CreateProductRequest.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<CreateProductRequest.Builder>
    • mergeFrom

      public CreateProductRequest.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<CreateProductRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. The project in which the Product should be created.
      
       Format is
       `projects/PROJECT_ID/locations/LOC_ID`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface CreateProductRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The project in which the Product should be created.
      
       Format is
       `projects/PROJECT_ID/locations/LOC_ID`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface CreateProductRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public CreateProductRequest.Builder setParent(String value)
       Required. The project in which the Product should be created.
      
       Format is
       `projects/PROJECT_ID/locations/LOC_ID`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public CreateProductRequest.Builder clearParent()
       Required. The project in which the Product should be created.
      
       Format is
       `projects/PROJECT_ID/locations/LOC_ID`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public CreateProductRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The project in which the Product should be created.
      
       Format is
       `projects/PROJECT_ID/locations/LOC_ID`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • hasProduct

      public boolean hasProduct()
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasProduct in interface CreateProductRequestOrBuilder
      Returns:
      Whether the product field is set.
    • getProduct

      public Product getProduct()
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProduct in interface CreateProductRequestOrBuilder
      Returns:
      The product.
    • setProduct

      public CreateProductRequest.Builder setProduct(Product value)
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
    • setProduct

      public CreateProductRequest.Builder setProduct(Product.Builder builderForValue)
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeProduct

      public CreateProductRequest.Builder mergeProduct(Product value)
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearProduct

      public CreateProductRequest.Builder clearProduct()
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
    • getProductBuilder

      public Product.Builder getProductBuilder()
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
    • getProductOrBuilder

      public ProductOrBuilder getProductOrBuilder()
       Required. The product to create.
       
      .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProductOrBuilder in interface CreateProductRequestOrBuilder
    • getProductId

      public String getProductId()
       A user-supplied resource id for this Product. If set, the server will
       attempt to use this value as the resource id. If it is already in use, an
       error is returned with code ALREADY_EXISTS. Must be at most 128 characters
       long. It cannot contain the character `/`.
       
      string product_id = 3;
      Specified by:
      getProductId in interface CreateProductRequestOrBuilder
      Returns:
      The productId.
    • getProductIdBytes

      public com.google.protobuf.ByteString getProductIdBytes()
       A user-supplied resource id for this Product. If set, the server will
       attempt to use this value as the resource id. If it is already in use, an
       error is returned with code ALREADY_EXISTS. Must be at most 128 characters
       long. It cannot contain the character `/`.
       
      string product_id = 3;
      Specified by:
      getProductIdBytes in interface CreateProductRequestOrBuilder
      Returns:
      The bytes for productId.
    • setProductId

      public CreateProductRequest.Builder setProductId(String value)
       A user-supplied resource id for this Product. If set, the server will
       attempt to use this value as the resource id. If it is already in use, an
       error is returned with code ALREADY_EXISTS. Must be at most 128 characters
       long. It cannot contain the character `/`.
       
      string product_id = 3;
      Parameters:
      value - The productId to set.
      Returns:
      This builder for chaining.
    • clearProductId

      public CreateProductRequest.Builder clearProductId()
       A user-supplied resource id for this Product. If set, the server will
       attempt to use this value as the resource id. If it is already in use, an
       error is returned with code ALREADY_EXISTS. Must be at most 128 characters
       long. It cannot contain the character `/`.
       
      string product_id = 3;
      Returns:
      This builder for chaining.
    • setProductIdBytes

      public CreateProductRequest.Builder setProductIdBytes(com.google.protobuf.ByteString value)
       A user-supplied resource id for this Product. If set, the server will
       attempt to use this value as the resource id. If it is already in use, an
       error is returned with code ALREADY_EXISTS. Must be at most 128 characters
       long. It cannot contain the character `/`.
       
      string product_id = 3;
      Parameters:
      value - The bytes for productId to set.
      Returns:
      This builder for chaining.