# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Batch.V1.Model.AgentContainer do
  @moduledoc """
  Container runnable representation on the agent side.

  ## Attributes

  *   `commands` (*type:* `list(String.t)`, *default:* `nil`) - Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.
  *   `entrypoint` (*type:* `String.t`, *default:* `nil`) - Overrides the `ENTRYPOINT` specified in the container.
  *   `imageUri` (*type:* `String.t`, *default:* `nil`) - The URI to pull the container image from.
  *   `options` (*type:* `String.t`, *default:* `nil`) - Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host".
  *   `volumes` (*type:* `list(String.t)`, *default:* `nil`) - Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :commands => list(String.t()) | nil,
          :entrypoint => String.t() | nil,
          :imageUri => String.t() | nil,
          :options => String.t() | nil,
          :volumes => list(String.t()) | nil
        }

  field(:commands, type: :list)
  field(:entrypoint)
  field(:imageUri)
  field(:options)
  field(:volumes, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Batch.V1.Model.AgentContainer do
  def decode(value, options) do
    GoogleApi.Batch.V1.Model.AgentContainer.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Batch.V1.Model.AgentContainer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
