public static final class CropHintsParams.Builder extends GeneratedMessageV3.Builder<CropHintsParams.Builder> implements CropHintsParamsOrBuilder
Parameters for crop hints annotation request.
Protobuf type google.cloud.vision.v1.CropHintsParams
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
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
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
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CropHintsParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CropHintsParams build()
Returns
buildPartial()
public CropHintsParams buildPartial()
Returns
clear()
public CropHintsParams.Builder clear()
Returns
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
clearField(Descriptors.FieldDescriptor field)
public CropHintsParams.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CropHintsParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public CropHintsParams.Builder clone()
Returns
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
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(CropHintsParams other)
public CropHintsParams.Builder mergeFrom(CropHintsParams other)
Parameter
Returns
public CropHintsParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CropHintsParams.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CropHintsParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
setField(Descriptors.FieldDescriptor field, Object value)
public CropHintsParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CropHintsParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CropHintsParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides