Class Asset.Builder (0.3.0)

public static final class Asset.Builder extends GeneratedMessageV3.Builder<Asset.Builder> implements AssetOrBuilder

An asset is a resource in corpus. It represents a media object inside corpus, contains metadata and another resource annotation. Different feature could be applied to the asset to generate annotations. User could specified annotation related to the target asset.

Protobuf type google.cloud.visionai.v1.Asset

Implements

AssetOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Asset build()
Returns
Type Description
Asset

buildPartial()

public Asset buildPartial()
Returns
Type Description
Asset

clear()

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

clearAssetGcsSource()

public Asset.Builder clearAssetGcsSource()

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Asset.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Asset.Builder clearName()

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

string name = 1;

Returns
Type Description
Asset.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTtl()

public Asset.Builder clearTtl()

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Returns
Type Description
Asset.Builder

clone()

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

getAssetGcsSource()

public AssetSource.AssetGcsSource getAssetGcsSource()

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AssetSource.AssetGcsSource

The assetGcsSource.

getAssetGcsSourceBuilder()

public AssetSource.AssetGcsSource.Builder getAssetGcsSourceBuilder()

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AssetSource.AssetGcsSource.Builder

getAssetGcsSourceOrBuilder()

public AssetSource.AssetGcsSourceOrBuilder getAssetGcsSourceOrBuilder()

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AssetSource.AssetGcsSourceOrBuilder

getDefaultInstanceForType()

public Asset getDefaultInstanceForType()
Returns
Type Description
Asset

getDescriptorForType()

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

getName()

public String getName()

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

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getTtl()

public Duration getTtl()

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Returns
Type Description
Duration

The ttl.

getTtlBuilder()

public Duration.Builder getTtlBuilder()

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Returns
Type Description
Builder

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Returns
Type Description
DurationOrBuilder

hasAssetGcsSource()

public boolean hasAssetGcsSource()

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the assetGcsSource field is set.

hasTtl()

public boolean hasTtl()

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Returns
Type Description
boolean

Whether the ttl field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAssetGcsSource(AssetSource.AssetGcsSource value)

public Asset.Builder mergeAssetGcsSource(AssetSource.AssetGcsSource value)

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value AssetSource.AssetGcsSource
Returns
Type Description
Asset.Builder

mergeFrom(Asset other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTtl(Duration value)

public Asset.Builder mergeTtl(Duration value)

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Parameter
Name Description
value Duration
Returns
Type Description
Asset.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAssetGcsSource(AssetSource.AssetGcsSource value)

public Asset.Builder setAssetGcsSource(AssetSource.AssetGcsSource value)

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value AssetSource.AssetGcsSource
Returns
Type Description
Asset.Builder

setAssetGcsSource(AssetSource.AssetGcsSource.Builder builderForValue)

public Asset.Builder setAssetGcsSource(AssetSource.AssetGcsSource.Builder builderForValue)

Output only. The original cloud storage source uri that is associated with this asset.

.google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue AssetSource.AssetGcsSource.Builder
Returns
Type Description
Asset.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Asset.Builder setName(String value)

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

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Asset.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Asset.Builder setNameBytes(ByteString value)

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

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Asset.Builder

This builder for chaining.

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

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

setTtl(Duration value)

public Asset.Builder setTtl(Duration value)

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Parameter
Name Description
value Duration
Returns
Type Description
Asset.Builder

setTtl(Duration.Builder builderForValue)

public Asset.Builder setTtl(Duration.Builder builderForValue)

The duration for which all media assets, associated metadata, and search documents can exist. If not set, then it will using the default ttl in the parent corpus resource.

.google.protobuf.Duration ttl = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Asset.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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