Class CropHintsParams.Builder (3.53.0)

public static final class CropHintsParams.Builder extends GeneratedMessageV3.Builder<CropHintsParams.Builder> implements CropHintsParamsOrBuilder

Parameters for crop hints annotation request.

Protobuf type google.cloud.vision.v1p4beta1.CropHintsParams

Static Methods

getDescriptor()

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

Methods

addAllAspectRatios(Iterable<? extends Float> values)

public CropHintsParams.Builder addAllAspectRatios(Iterable<? extends Float> values)

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Parameter
Name Description
values Iterable<? extends java.lang.Float>

The aspectRatios to add.

Returns
Type Description
CropHintsParams.Builder

This builder for chaining.

addAspectRatios(float value)

public CropHintsParams.Builder addAspectRatios(float value)

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Parameter
Name Description
value float

The aspectRatios to add.

Returns
Type Description
CropHintsParams.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CropHintsParams build()
Returns
Type Description
CropHintsParams

buildPartial()

public CropHintsParams buildPartial()
Returns
Type Description
CropHintsParams

clear()

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

clearAspectRatios()

public CropHintsParams.Builder clearAspectRatios()

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Returns
Type Description
CropHintsParams.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAspectRatios(int index)

public float getAspectRatios(int index)

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
float

The aspectRatios at the given index.

getAspectRatiosCount()

public int getAspectRatiosCount()

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Returns
Type Description
int

The count of aspectRatios.

getAspectRatiosList()

public List<Float> getAspectRatiosList()

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Returns
Type Description
List<Float>

A list containing the aspectRatios.

getDefaultInstanceForType()

public CropHintsParams getDefaultInstanceForType()
Returns
Type Description
CropHintsParams

getDescriptorForType()

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CropHintsParams other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAspectRatios(int index, float value)

public CropHintsParams.Builder setAspectRatios(int index, float value)

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

repeated float aspect_ratios = 1;

Parameters
Name Description
index int

The index to set the value at.

value float

The aspectRatios to set.

Returns
Type Description
CropHintsParams.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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