Class CreateReferenceImageRequest.Builder (3.47.0)

public static final class CreateReferenceImageRequest.Builder extends GeneratedMessageV3.Builder<CreateReferenceImageRequest.Builder> implements CreateReferenceImageRequestOrBuilder

Request message for the CreateReferenceImage method.

Protobuf type google.cloud.vision.v1.CreateReferenceImageRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CreateReferenceImageRequest build()
Returns
Type Description
CreateReferenceImageRequest

buildPartial()

public CreateReferenceImageRequest buildPartial()
Returns
Type Description
CreateReferenceImageRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public CreateReferenceImageRequest.Builder clearParent()

Required. Resource name of the product in which to create the reference image.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

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

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

clearReferenceImage()

public CreateReferenceImageRequest.Builder clearReferenceImage()

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateReferenceImageRequest.Builder

clearReferenceImageId()

public CreateReferenceImageRequest.Builder clearReferenceImageId()

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

string reference_image_id = 3;

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CreateReferenceImageRequest getDefaultInstanceForType()
Returns
Type Description
CreateReferenceImageRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. Resource name of the product in which to create the reference image.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Resource name of the product in which to create the reference image.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

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

Returns
Type Description
ByteString

The bytes for parent.

getReferenceImage()

public ReferenceImage getReferenceImage()

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ReferenceImage

The referenceImage.

getReferenceImageBuilder()

public ReferenceImage.Builder getReferenceImageBuilder()

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ReferenceImage.Builder

getReferenceImageId()

public String getReferenceImageId()

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

string reference_image_id = 3;

Returns
Type Description
String

The referenceImageId.

getReferenceImageIdBytes()

public ByteString getReferenceImageIdBytes()

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

string reference_image_id = 3;

Returns
Type Description
ByteString

The bytes for referenceImageId.

getReferenceImageOrBuilder()

public ReferenceImageOrBuilder getReferenceImageOrBuilder()

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ReferenceImageOrBuilder

hasReferenceImage()

public boolean hasReferenceImage()

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the referenceImage field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateReferenceImageRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeReferenceImage(ReferenceImage value)

public CreateReferenceImageRequest.Builder mergeReferenceImage(ReferenceImage value)

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ReferenceImage
Returns
Type Description
CreateReferenceImageRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setParent(String value)

public CreateReferenceImageRequest.Builder setParent(String value)

Required. Resource name of the product in which to create the reference image.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateReferenceImageRequest.Builder setParentBytes(ByteString value)

Required. Resource name of the product in which to create the reference image.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

setReferenceImage(ReferenceImage value)

public CreateReferenceImageRequest.Builder setReferenceImage(ReferenceImage value)

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ReferenceImage
Returns
Type Description
CreateReferenceImageRequest.Builder

setReferenceImage(ReferenceImage.Builder builderForValue)

public CreateReferenceImageRequest.Builder setReferenceImage(ReferenceImage.Builder builderForValue)

Required. The reference image to create. If an image ID is specified, it is ignored.

.google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue ReferenceImage.Builder
Returns
Type Description
CreateReferenceImageRequest.Builder

setReferenceImageId(String value)

public CreateReferenceImageRequest.Builder setReferenceImageId(String value)

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

string reference_image_id = 3;

Parameter
Name Description
value String

The referenceImageId to set.

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

setReferenceImageIdBytes(ByteString value)

public CreateReferenceImageRequest.Builder setReferenceImageIdBytes(ByteString value)

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

string reference_image_id = 3;

Parameter
Name Description
value ByteString

The bytes for referenceImageId to set.

Returns
Type Description
CreateReferenceImageRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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