Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/crop_hints_params.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.CropHintsParams do
@moduledoc """
Parameters for crop hints annotation request.
## Attributes
* `aspect_ratios` (*type:* `list(number())`) - 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.
"""
defstruct [:aspect_ratios]
@type t :: %__MODULE__{
aspect_ratios: list(number()) | nil
}
@wire %{aspect_ratios: "aspectRatios"}
@doc false
def __wire__, do: @wire
@doc false
def decode(nil), do: nil
def decode(list) when is_list(list), do: Enum.map(list, &decode/1)
def decode(m) do
%__MODULE__{
aspect_ratios: m["aspectRatios"]
}
end
end