Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/operation_metadata.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.OperationMetadata do
@moduledoc """
Contains metadata for the BatchAnnotateImages operation.
## Attributes
* `create_time` (*type:* `DateTime.t()`) - The time when the batch request was received.
* `state` (*type:* `String.t()`) - Current state of the batch operation.
* `update_time` (*type:* `DateTime.t()`) - The time when the operation result was last updated.
"""
alias Googly.CloudVision.Decode
defstruct [:create_time, :state, :update_time]
@type t :: %__MODULE__{
create_time: DateTime.t() | nil,
state: String.t() | nil,
update_time: DateTime.t() | nil
}
@wire %{create_time: "createTime", update_time: "updateTime"}
@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__{
create_time: Decode.datetime(m["createTime"]),
state: m["state"],
update_time: Decode.datetime(m["updateTime"])
}
end
end