Class CropHintsParams.Builder (3.10.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
TypeDescription
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
NameDescription
valuesIterable<? extends java.lang.Float>

The aspectRatios to add.

Returns
TypeDescription
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
NameDescription
valuefloat

The aspectRatios to add.

Returns
TypeDescription
CropHintsParams.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CropHintsParams build()
Returns
TypeDescription
CropHintsParams

buildPartial()

public CropHintsParams buildPartial()
Returns
TypeDescription
CropHintsParams

clear()

public CropHintsParams.Builder clear()
Returns
TypeDescription
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
TypeDescription
CropHintsParams.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public CropHintsParams.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
List<Float>

A list containing the aspectRatios.

getDefaultInstanceForType()

public CropHintsParams getDefaultInstanceForType()
Returns
TypeDescription
CropHintsParams

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CropHintsParams other)

public CropHintsParams.Builder mergeFrom(CropHintsParams other)
Parameter
NameDescription
otherCropHintsParams
Returns
TypeDescription
CropHintsParams.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CropHintsParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valuefloat

The aspectRatios to set.

Returns
TypeDescription
CropHintsParams.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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