lib/google_api/genomics/v1/model/container_started_event.ex

# 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.Genomics.V1.Model.ContainerStartedEvent do
  @moduledoc """
  An event generated when a container starts.

  ## Attributes

  *   `actionId` (*type:* `integer()`, *default:* `nil`) - The numeric ID of the action that started this container.
  *   `ipAddress` (*type:* `String.t`, *default:* `nil`) - The public IP address that can be used to connect to the container. This field is only populated when at least one port mapping is present. If the instance was created with a private address, this field will be empty even if port mappings exist.
  *   `portMappings` (*type:* `map()`, *default:* `nil`) - The container-to-host port mappings installed for this container. This set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag as well as any specified in the `Action` definition.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :actionId => integer() | nil,
          :ipAddress => String.t() | nil,
          :portMappings => map() | nil
        }

  field(:actionId)
  field(:ipAddress)
  field(:portMappings, type: :map)
end

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

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