Class ImageQuery.Builder (0.12.0)

public static final class ImageQuery.Builder extends GeneratedMessageV3.Builder<ImageQuery.Builder> implements ImageQueryOrBuilder

Image query for search endpoint request.

Protobuf type google.cloud.visionai.v1.ImageQuery

Implements

ImageQueryOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ImageQuery build()
Returns
Type Description
ImageQuery

buildPartial()

public ImageQuery buildPartial()
Returns
Type Description
ImageQuery

clear()

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

clearAsset()

public ImageQuery.Builder clearAsset()

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ImageQuery.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearImage()

public ImageQuery.Builder clearImage()
Returns
Type Description
ImageQuery.Builder

clearInputImage()

public ImageQuery.Builder clearInputImage()

Input image in raw bytes.

bytes input_image = 1;

Returns
Type Description
ImageQuery.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAsset()

public String getAsset()

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The asset.

getAssetBytes()

public ByteString getAssetBytes()

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for asset.

getDefaultInstanceForType()

public ImageQuery getDefaultInstanceForType()
Returns
Type Description
ImageQuery

getDescriptorForType()

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

getImageCase()

public ImageQuery.ImageCase getImageCase()
Returns
Type Description
ImageQuery.ImageCase

getInputImage()

public ByteString getInputImage()

Input image in raw bytes.

bytes input_image = 1;

Returns
Type Description
ByteString

The inputImage.

hasAsset()

public boolean hasAsset()

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the asset field is set.

hasInputImage()

public boolean hasInputImage()

Input image in raw bytes.

bytes input_image = 1;

Returns
Type Description
boolean

Whether the inputImage field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ImageQuery other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAsset(String value)

public ImageQuery.Builder setAsset(String value)

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The asset to set.

Returns
Type Description
ImageQuery.Builder

This builder for chaining.

setAssetBytes(ByteString value)

public ImageQuery.Builder setAssetBytes(ByteString value)

Resource name of the asset. Only supported in IMAGE corpus type. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

string asset = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for asset to set.

Returns
Type Description
ImageQuery.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInputImage(ByteString value)

public ImageQuery.Builder setInputImage(ByteString value)

Input image in raw bytes.

bytes input_image = 1;

Parameter
Name Description
value ByteString

The inputImage to set.

Returns
Type Description
ImageQuery.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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