Class CreateCollectionRequest.Builder

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

public static final class CreateCollectionRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<CreateCollectionRequest.Builder> implements CreateCollectionRequestOrBuilder
 Request message for CreateCollection.
 
Protobuf type google.cloud.visionai.v1.CreateCollectionRequest
  • 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<CreateCollectionRequest.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<CreateCollectionRequest.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<CreateCollectionRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

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

      public String getParent()
       Required. The parent resource where this collection will be created.
       Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface CreateCollectionRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The parent resource where this collection will be created.
       Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface CreateCollectionRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public CreateCollectionRequest.Builder setParent(String value)
       Required. The parent resource where this collection will be created.
       Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
       
      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 CreateCollectionRequest.Builder clearParent()
       Required. The parent resource where this collection will be created.
       Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public CreateCollectionRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The parent resource where this collection will be created.
       Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
       
      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.
    • hasCollection

      public boolean hasCollection()
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasCollection in interface CreateCollectionRequestOrBuilder
      Returns:
      Whether the collection field is set.
    • getCollection

      public Collection getCollection()
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCollection in interface CreateCollectionRequestOrBuilder
      Returns:
      The collection.
    • setCollection

      public CreateCollectionRequest.Builder setCollection(Collection value)
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
    • setCollection

      public CreateCollectionRequest.Builder setCollection(Collection.Builder builderForValue)
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeCollection

      public CreateCollectionRequest.Builder mergeCollection(Collection value)
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearCollection

      public CreateCollectionRequest.Builder clearCollection()
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
    • getCollectionBuilder

      public Collection.Builder getCollectionBuilder()
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
    • getCollectionOrBuilder

      public CollectionOrBuilder getCollectionOrBuilder()
       Required. The collection resource to be created.
       
      .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCollectionOrBuilder in interface CreateCollectionRequestOrBuilder
    • hasCollectionId

      public boolean hasCollectionId()
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCollectionId in interface CreateCollectionRequestOrBuilder
      Returns:
      Whether the collectionId field is set.
    • getCollectionId

      public String getCollectionId()
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCollectionId in interface CreateCollectionRequestOrBuilder
      Returns:
      The collectionId.
    • getCollectionIdBytes

      public com.google.protobuf.ByteString getCollectionIdBytes()
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCollectionIdBytes in interface CreateCollectionRequestOrBuilder
      Returns:
      The bytes for collectionId.
    • setCollectionId

      public CreateCollectionRequest.Builder setCollectionId(String value)
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The collectionId to set.
      Returns:
      This builder for chaining.
    • clearCollectionId

      public CreateCollectionRequest.Builder clearCollectionId()
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setCollectionIdBytes

      public CreateCollectionRequest.Builder setCollectionIdBytes(com.google.protobuf.ByteString value)
       Optional. The ID to use for the collection, which will become the final
       component of the resource name if user choose to specify. Otherwise,
       collection id will be generated by system.
      
       This value should be up to 55 characters, and valid characters
       are /[a-z][0-9]-/. The first character must be a letter, the last could be
       a letter or a number.
       
      optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for collectionId to set.
      Returns:
      This builder for chaining.