# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.TextDetectionParams do @moduledoc """ Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features. ## Attributes * `advanced_ocr_options` (*type:* `list(String.t())`) - A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation. * `enable_text_detection_confidence_score` (*type:* `boolean()`) - By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well. """ defstruct [:advanced_ocr_options, :enable_text_detection_confidence_score] @type t :: %__MODULE__{ advanced_ocr_options: list(String.t()) | nil, enable_text_detection_confidence_score: boolean() | nil } @wire %{ advanced_ocr_options: "advancedOcrOptions", enable_text_detection_confidence_score: "enableTextDetectionConfidenceScore" } @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__{ advanced_ocr_options: m["advancedOcrOptions"], enable_text_detection_confidence_score: m["enableTextDetectionConfidenceScore"] } end end