Class Asset (0.1.0)

public final class Asset extends GeneratedMessageV3 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 Fields

ASSET_GCS_SOURCE_FIELD_NUMBER

public static final int ASSET_GCS_SOURCE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TTL_FIELD_NUMBER

public static final int TTL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Asset getDefaultInstance()
Returns
Type Description
Asset

getDescriptor()

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

newBuilder()

public static Asset.Builder newBuilder()
Returns
Type Description
Asset.Builder

newBuilder(Asset prototype)

public static Asset.Builder newBuilder(Asset prototype)
Parameter
Name Description
prototype Asset
Returns
Type Description
Asset.Builder

parseDelimitedFrom(InputStream input)

public static Asset parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Asset parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Asset parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Asset parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Asset parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Asset parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Asset parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Asset parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Asset parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Asset parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Asset parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Asset parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Asset
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Asset> parser()
Returns
Type Description
Parser<Asset>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

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.

getParserForType()

public Parser<Asset> getParserForType()
Returns
Type Description
Parser<Asset>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Asset.Builder newBuilderForType()
Returns
Type Description
Asset.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Asset.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Asset.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Asset.Builder toBuilder()
Returns
Type Description
Asset.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException