Class Corpus.Builder (0.2.0)

public static final class Corpus.Builder extends GeneratedMessageV3.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

Implements

CorpusOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Corpus.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Corpus.Builder
Overrides

build()

public Corpus build()
Returns
Type Description
Corpus

buildPartial()

public Corpus buildPartial()
Returns
Type Description
Corpus

clear()

public Corpus.Builder clear()
Returns
Type Description
Corpus.Builder
Overrides

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];

Returns
Type Description
Corpus.Builder

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
Type Description
Corpus.Builder

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
Type Description
Corpus.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Corpus.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Corpus.Builder
Overrides

clearName()

public Corpus.Builder clearName()

Resource name of the corpus. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

string name = 1;

Returns
Type Description
Corpus.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Corpus.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Corpus.Builder
Overrides

clearSearchCapabilitySetting()

public Corpus.Builder clearSearchCapabilitySetting()

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Returns
Type Description
Corpus.Builder

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
Type Description
Corpus.Builder

This builder for chaining.

clone()

public Corpus.Builder clone()
Returns
Type Description
Corpus.Builder
Overrides

getDefaultInstanceForType()

public Corpus getDefaultInstanceForType()
Returns
Type Description
Corpus

getDefaultTtl()

public 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];

Returns
Type Description
Duration

The defaultTtl.

getDefaultTtlBuilder()

public 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];

Returns
Type Description
Builder

getDefaultTtlOrBuilder()

public 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];

Returns
Type Description
DurationOrBuilder

getDescription()

public String getDescription()

Optional. Description of the corpus. Can be up to 25000 characters long.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the corpus. Can be up to 25000 characters long.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public 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];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Resource name of the corpus. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name of the corpus. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getSearchCapabilitySetting()

public SearchCapabilitySetting getSearchCapabilitySetting()

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Returns
Type Description
SearchCapabilitySetting

The searchCapabilitySetting.

getSearchCapabilitySettingBuilder()

public SearchCapabilitySetting.Builder getSearchCapabilitySettingBuilder()

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Returns
Type Description
SearchCapabilitySetting.Builder

getSearchCapabilitySettingOrBuilder()

public SearchCapabilitySettingOrBuilder getSearchCapabilitySettingOrBuilder()

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Returns
Type Description
SearchCapabilitySettingOrBuilder

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];

Returns
Type Description
Corpus.Type

The type.

getTypeValue()

public int getTypeValue()

Optional. Type of the asset inside corpus.

.google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for type.

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];

Returns
Type Description
boolean

Whether the defaultTtl field is set.

hasSearchCapabilitySetting()

public boolean hasSearchCapabilitySetting()

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Returns
Type Description
boolean

Whether the searchCapabilitySetting field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDefaultTtl(Duration value)

public Corpus.Builder mergeDefaultTtl(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];

Parameter
Name Description
value Duration
Returns
Type Description
Corpus.Builder

mergeFrom(Corpus other)

public Corpus.Builder mergeFrom(Corpus other)
Parameter
Name Description
other Corpus
Returns
Type Description
Corpus.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Corpus.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Corpus.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Corpus.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Corpus.Builder
Overrides

mergeSearchCapabilitySetting(SearchCapabilitySetting value)

public Corpus.Builder mergeSearchCapabilitySetting(SearchCapabilitySetting value)

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Parameter
Name Description
value SearchCapabilitySetting
Returns
Type Description
Corpus.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Corpus.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Corpus.Builder
Overrides

setDefaultTtl(Duration value)

public Corpus.Builder setDefaultTtl(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];

Parameter
Name Description
value Duration
Returns
Type Description
Corpus.Builder

setDefaultTtl(Duration.Builder builderForValue)

public Corpus.Builder setDefaultTtl(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Corpus.Builder

setDescription(String value)

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];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Corpus.Builder setDescriptionBytes(ByteString value)

Optional. Description of the corpus. Can be up to 25000 characters long.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setDisplayName(String value)

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];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Corpus.Builder setDisplayNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Corpus.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Corpus.Builder
Overrides

setName(String value)

public Corpus.Builder setName(String value)

Resource name of the corpus. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Corpus.Builder setNameBytes(ByteString value)

Resource name of the corpus. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Corpus.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Corpus.Builder
Overrides

setSearchCapabilitySetting(SearchCapabilitySetting value)

public Corpus.Builder setSearchCapabilitySetting(SearchCapabilitySetting value)

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Parameter
Name Description
value SearchCapabilitySetting
Returns
Type Description
Corpus.Builder

setSearchCapabilitySetting(SearchCapabilitySetting.Builder builderForValue)

public Corpus.Builder setSearchCapabilitySetting(SearchCapabilitySetting.Builder builderForValue)

Default search capability setting on corpus level.

.google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8;

Parameter
Name Description
builderForValue SearchCapabilitySetting.Builder
Returns
Type Description
Corpus.Builder

setType(Corpus.Type value)

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];

Parameter
Name Description
value Corpus.Type

The type to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setTypeValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
Corpus.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Corpus.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Corpus.Builder
Overrides