Class ProductSearchResults.Result.Builder (3.11.0)

public static final class ProductSearchResults.Result.Builder extends GeneratedMessageV3.Builder<ProductSearchResults.Result.Builder> implements ProductSearchResults.ResultOrBuilder

Information about a product.

Protobuf type google.cloud.vision.v1p4beta1.ProductSearchResults.Result

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductSearchResults.Result.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

build()

public ProductSearchResults.Result build()
Returns
TypeDescription
ProductSearchResults.Result

buildPartial()

public ProductSearchResults.Result buildPartial()
Returns
TypeDescription
ProductSearchResults.Result

clear()

public ProductSearchResults.Result.Builder clear()
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ProductSearchResults.Result.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

clearImage()

public ProductSearchResults.Result.Builder clearImage()

The resource name of the image from the product that is the closest match to the query.

string image = 3;

Returns
TypeDescription
ProductSearchResults.Result.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProductSearchResults.Result.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

clearProduct()

public ProductSearchResults.Result.Builder clearProduct()

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Returns
TypeDescription
ProductSearchResults.Result.Builder

clearScore()

public ProductSearchResults.Result.Builder clearScore()

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

float score = 2;

Returns
TypeDescription
ProductSearchResults.Result.Builder

This builder for chaining.

clone()

public ProductSearchResults.Result.Builder clone()
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

getDefaultInstanceForType()

public ProductSearchResults.Result getDefaultInstanceForType()
Returns
TypeDescription
ProductSearchResults.Result

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImage()

public String getImage()

The resource name of the image from the product that is the closest match to the query.

string image = 3;

Returns
TypeDescription
String

The image.

getImageBytes()

public ByteString getImageBytes()

The resource name of the image from the product that is the closest match to the query.

string image = 3;

Returns
TypeDescription
ByteString

The bytes for image.

getProduct()

public Product getProduct()

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Returns
TypeDescription
Product

The product.

getProductBuilder()

public Product.Builder getProductBuilder()

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Returns
TypeDescription
Product.Builder

getProductOrBuilder()

public ProductOrBuilder getProductOrBuilder()

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Returns
TypeDescription
ProductOrBuilder

getScore()

public float getScore()

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

float score = 2;

Returns
TypeDescription
float

The score.

hasProduct()

public boolean hasProduct()

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Returns
TypeDescription
boolean

Whether the product field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ProductSearchResults.Result other)

public ProductSearchResults.Result.Builder mergeFrom(ProductSearchResults.Result other)
Parameter
NameDescription
otherProductSearchResults.Result
Returns
TypeDescription
ProductSearchResults.Result.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProductSearchResults.Result.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ProductSearchResults.Result.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

mergeProduct(Product value)

public ProductSearchResults.Result.Builder mergeProduct(Product value)

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Parameter
NameDescription
valueProduct
Returns
TypeDescription
ProductSearchResults.Result.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProductSearchResults.Result.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ProductSearchResults.Result.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

setImage(String value)

public ProductSearchResults.Result.Builder setImage(String value)

The resource name of the image from the product that is the closest match to the query.

string image = 3;

Parameter
NameDescription
valueString

The image to set.

Returns
TypeDescription
ProductSearchResults.Result.Builder

This builder for chaining.

setImageBytes(ByteString value)

public ProductSearchResults.Result.Builder setImageBytes(ByteString value)

The resource name of the image from the product that is the closest match to the query.

string image = 3;

Parameter
NameDescription
valueByteString

The bytes for image to set.

Returns
TypeDescription
ProductSearchResults.Result.Builder

This builder for chaining.

setProduct(Product value)

public ProductSearchResults.Result.Builder setProduct(Product value)

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Parameter
NameDescription
valueProduct
Returns
TypeDescription
ProductSearchResults.Result.Builder

setProduct(Product.Builder builderForValue)

public ProductSearchResults.Result.Builder setProduct(Product.Builder builderForValue)

The Product.

.google.cloud.vision.v1p4beta1.Product product = 1;

Parameter
NameDescription
builderForValueProduct.Builder
Returns
TypeDescription
ProductSearchResults.Result.Builder

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

public ProductSearchResults.Result.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides

setScore(float value)

public ProductSearchResults.Result.Builder setScore(float value)

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

float score = 2;

Parameter
NameDescription
valuefloat

The score to set.

Returns
TypeDescription
ProductSearchResults.Result.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProductSearchResults.Result.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProductSearchResults.Result.Builder
Overrides