Class Corpus.Builder

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

public static final class Corpus.Builder extends com.google.protobuf.GeneratedMessage.Builder<Corpus.Builder> implements CorpusOrBuilder
 Corpus is a set of media contents for management.
 Within a corpus, media shares the same data schema. Search is also restricted
 within a single corpus.
 
Protobuf type google.cloud.visionai.v1.Corpus
  • 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<Corpus.Builder>
    • clear

      public Corpus.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<Corpus.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<Corpus.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Corpus.Builder mergeFrom(Corpus other)
    • isInitialized

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

      public Corpus.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<Corpus.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Resource name of the corpus.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
       
      string name = 1;
      Specified by:
      getName in interface CorpusOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Resource name of the corpus.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
       
      string name = 1;
      Specified by:
      getNameBytes in interface CorpusOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Corpus.Builder setName(String value)
       Resource name of the corpus.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Corpus.Builder clearName()
       Resource name of the corpus.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Corpus.Builder setNameBytes(com.google.protobuf.ByteString value)
       Resource name of the corpus.
       Format:
       `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The corpus name to shown in the UI. The name can be up to 32
       characters long.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface CorpusOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The corpus name to shown in the UI. The name can be up to 32
       characters long.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface CorpusOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Corpus.Builder setDisplayName(String value)
       Required. The corpus name to shown in the UI. The name can be up to 32
       characters long.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Corpus.Builder clearDisplayName()
       Required. The corpus name to shown in the UI. The name can be up to 32
       characters long.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Corpus.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The corpus name to shown in the UI. The name can be up to 32
       characters long.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. Description of the corpus. Can be up to 25000 characters long.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface CorpusOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. Description of the corpus. Can be up to 25000 characters long.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface CorpusOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Corpus.Builder setDescription(String value)
       Optional. Description of the corpus. Can be up to 25000 characters long.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Corpus.Builder clearDescription()
       Optional. Description of the corpus. Can be up to 25000 characters long.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Corpus.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. Description of the corpus. Can be up to 25000 characters long.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • hasDefaultTtl

      public boolean hasDefaultTtl()
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasDefaultTtl in interface CorpusOrBuilder
      Returns:
      Whether the defaultTtl field is set.
    • getDefaultTtl

      public com.google.protobuf.Duration getDefaultTtl()
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDefaultTtl in interface CorpusOrBuilder
      Returns:
      The defaultTtl.
    • setDefaultTtl

      public Corpus.Builder setDefaultTtl(com.google.protobuf.Duration value)
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
    • setDefaultTtl

      public Corpus.Builder setDefaultTtl(com.google.protobuf.Duration.Builder builderForValue)
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
    • mergeDefaultTtl

      public Corpus.Builder mergeDefaultTtl(com.google.protobuf.Duration value)
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
    • clearDefaultTtl

      public Corpus.Builder clearDefaultTtl()
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getDefaultTtlBuilder

      public com.google.protobuf.Duration.Builder getDefaultTtlBuilder()
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getDefaultTtlOrBuilder

      public com.google.protobuf.DurationOrBuilder getDefaultTtlOrBuilder()
       Optional. The default TTL value for all assets under the corpus without a
       asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
       required and the maximum allowed
       default_ttl is 10 years.
       
      .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDefaultTtlOrBuilder in interface CorpusOrBuilder
    • getTypeValue

      public int getTypeValue()
       Optional. Type of the asset inside corpus.
       
      .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTypeValue in interface CorpusOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public Corpus.Builder setTypeValue(int value)
       Optional. Type of the asset inside corpus.
       
      .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

      public Corpus.Type getType()
       Optional. Type of the asset inside corpus.
       
      .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getType in interface CorpusOrBuilder
      Returns:
      The type.
    • setType

      public Corpus.Builder setType(Corpus.Type value)
       Optional. Type of the asset inside corpus.
       
      .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public Corpus.Builder clearType()
       Optional. Type of the asset inside corpus.
       
      .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasSearchCapabilitySetting

      public boolean hasSearchCapabilitySetting()
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
      Specified by:
      hasSearchCapabilitySetting in interface CorpusOrBuilder
      Returns:
      Whether the searchCapabilitySetting field is set.
    • getSearchCapabilitySetting

      public SearchCapabilitySetting getSearchCapabilitySetting()
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
      Specified by:
      getSearchCapabilitySetting in interface CorpusOrBuilder
      Returns:
      The searchCapabilitySetting.
    • setSearchCapabilitySetting

      public Corpus.Builder setSearchCapabilitySetting(SearchCapabilitySetting value)
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
    • setSearchCapabilitySetting

      public Corpus.Builder setSearchCapabilitySetting(SearchCapabilitySetting.Builder builderForValue)
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
    • mergeSearchCapabilitySetting

      public Corpus.Builder mergeSearchCapabilitySetting(SearchCapabilitySetting value)
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
    • clearSearchCapabilitySetting

      public Corpus.Builder clearSearchCapabilitySetting()
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
    • getSearchCapabilitySettingBuilder

      public SearchCapabilitySetting.Builder getSearchCapabilitySettingBuilder()
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
    • getSearchCapabilitySettingOrBuilder

      public SearchCapabilitySettingOrBuilder getSearchCapabilitySettingOrBuilder()
       Default search capability setting on corpus level.
       
      .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;
      Specified by:
      getSearchCapabilitySettingOrBuilder in interface CorpusOrBuilder
    • hasSatisfiesPzs

      public boolean hasSatisfiesPzs()
       Output only. This boolean field is only set for projects that have Physical
       Zone Separation enabled via an Org Policy constraint. It is set to true
       when the corpus is a valid zone separated corpus and false if it isn't.
       
      optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasSatisfiesPzs in interface CorpusOrBuilder
      Returns:
      Whether the satisfiesPzs field is set.
    • getSatisfiesPzs

      public boolean getSatisfiesPzs()
       Output only. This boolean field is only set for projects that have Physical
       Zone Separation enabled via an Org Policy constraint. It is set to true
       when the corpus is a valid zone separated corpus and false if it isn't.
       
      optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSatisfiesPzs in interface CorpusOrBuilder
      Returns:
      The satisfiesPzs.
    • setSatisfiesPzs

      public Corpus.Builder setSatisfiesPzs(boolean value)
       Output only. This boolean field is only set for projects that have Physical
       Zone Separation enabled via an Org Policy constraint. It is set to true
       when the corpus is a valid zone separated corpus and false if it isn't.
       
      optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The satisfiesPzs to set.
      Returns:
      This builder for chaining.
    • clearSatisfiesPzs

      public Corpus.Builder clearSatisfiesPzs()
       Output only. This boolean field is only set for projects that have Physical
       Zone Separation enabled via an Org Policy constraint. It is set to true
       when the corpus is a valid zone separated corpus and false if it isn't.
       
      optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasSatisfiesPzi

      public boolean hasSatisfiesPzi()
       Output only. This boolean field is only set for projects that have Physical
       Zone Isolation enabled via an Org Policy constraint. It is set to true when
       the corpus is a valid zone isolated corpus and false if it isn't.
       
      optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasSatisfiesPzi in interface CorpusOrBuilder
      Returns:
      Whether the satisfiesPzi field is set.
    • getSatisfiesPzi

      public boolean getSatisfiesPzi()
       Output only. This boolean field is only set for projects that have Physical
       Zone Isolation enabled via an Org Policy constraint. It is set to true when
       the corpus is a valid zone isolated corpus and false if it isn't.
       
      optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSatisfiesPzi in interface CorpusOrBuilder
      Returns:
      The satisfiesPzi.
    • setSatisfiesPzi

      public Corpus.Builder setSatisfiesPzi(boolean value)
       Output only. This boolean field is only set for projects that have Physical
       Zone Isolation enabled via an Org Policy constraint. It is set to true when
       the corpus is a valid zone isolated corpus and false if it isn't.
       
      optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The satisfiesPzi to set.
      Returns:
      This builder for chaining.
    • clearSatisfiesPzi

      public Corpus.Builder clearSatisfiesPzi()
       Output only. This boolean field is only set for projects that have Physical
       Zone Isolation enabled via an Org Policy constraint. It is set to true when
       the corpus is a valid zone isolated corpus and false if it isn't.
       
      optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.