Class UploadAssetRequest.Builder (0.6.0)

public static final class UploadAssetRequest.Builder extends GeneratedMessageV3.Builder<UploadAssetRequest.Builder> implements UploadAssetRequestOrBuilder

Request message for UploadAsset.

Protobuf type google.cloud.visionai.v1.UploadAssetRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UploadAssetRequest build()
Returns
Type Description
UploadAssetRequest

buildPartial()

public UploadAssetRequest buildPartial()
Returns
Type Description
UploadAssetRequest

clear()

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

clearAssetSource()

public UploadAssetRequest.Builder clearAssetSource()

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Returns
Type Description
UploadAssetRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public UploadAssetRequest.Builder clearName()

Required. The resource name of the asset to upload. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
UploadAssetRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAssetSource()

public AssetSource getAssetSource()

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Returns
Type Description
AssetSource

The assetSource.

getAssetSourceBuilder()

public AssetSource.Builder getAssetSourceBuilder()

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Returns
Type Description
AssetSource.Builder

getAssetSourceOrBuilder()

public AssetSourceOrBuilder getAssetSourceOrBuilder()

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Returns
Type Description
AssetSourceOrBuilder

getDefaultInstanceForType()

public UploadAssetRequest getDefaultInstanceForType()
Returns
Type Description
UploadAssetRequest

getDescriptorForType()

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

getName()

public String getName()

Required. The resource name of the asset to upload. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The resource name of the asset to upload. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

hasAssetSource()

public boolean hasAssetSource()

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Returns
Type Description
boolean

Whether the assetSource field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAssetSource(AssetSource value)

public UploadAssetRequest.Builder mergeAssetSource(AssetSource value)

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Parameter
Name Description
value AssetSource
Returns
Type Description
UploadAssetRequest.Builder

mergeFrom(UploadAssetRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAssetSource(AssetSource value)

public UploadAssetRequest.Builder setAssetSource(AssetSource value)

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Parameter
Name Description
value AssetSource
Returns
Type Description
UploadAssetRequest.Builder

setAssetSource(AssetSource.Builder builderForValue)

public UploadAssetRequest.Builder setAssetSource(AssetSource.Builder builderForValue)

The source of the asset.

.google.cloud.visionai.v1.AssetSource asset_source = 2;

Parameter
Name Description
builderForValue AssetSource.Builder
Returns
Type Description
UploadAssetRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public UploadAssetRequest.Builder setName(String value)

Required. The resource name of the asset to upload. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
UploadAssetRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public UploadAssetRequest.Builder setNameBytes(ByteString value)

Required. The resource name of the asset to upload. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
UploadAssetRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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