Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model input_config.ex
Raw

lib/googly/cloud_vision/model/input_config.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.InputConfig do
@moduledoc """
The desired input location and metadata.
## Attributes
* `content` (*type:* `String.t()`) - File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.
* `gcs_source` (*type:* `Googly.CloudVision.Model.GcsSource.t()`) - The Google Cloud Storage location to read the input from.
* `mime_type` (*type:* `String.t()`) - The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.
"""
defstruct [:content, :gcs_source, :mime_type]
@type t :: %__MODULE__{
content: String.t() | nil,
gcs_source: Googly.CloudVision.Model.GcsSource.t() | nil,
mime_type: String.t() | nil
}
@wire %{gcs_source: "gcsSource", mime_type: "mimeType"}
@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__{
content: m["content"],
gcs_source: Googly.CloudVision.Model.GcsSource.decode(m["gcsSource"]),
mime_type: m["mimeType"]
}
end
end