Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/batch_operation_metadata.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.BatchOperationMetadata do
@moduledoc """
Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
## Attributes
* `end_time` (*type:* `DateTime.t()`) - The time when the batch request is finished and google.longrunning.Operation.done is set to true.
* `state` (*type:* `String.t()`) - The current state of the batch operation.
* `submit_time` (*type:* `DateTime.t()`) - The time when the batch request was submitted to the server.
"""
alias Googly.CloudVision.Decode
defstruct [:end_time, :state, :submit_time]
@type t :: %__MODULE__{
end_time: DateTime.t() | nil,
state: String.t() | nil,
submit_time: DateTime.t() | nil
}
@wire %{end_time: "endTime", submit_time: "submitTime"}
@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__{
end_time: Decode.datetime(m["endTime"]),
state: m["state"],
submit_time: Decode.datetime(m["submitTime"])
}
end
end