lib/google_api/compute/v1/model/instance_managed_by_igm_error_instance_action_details.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.Compute.V1.Model.InstanceManagedByIgmErrorInstanceActionDetails do
  @moduledoc """


  ## Attributes

  *   `action` (*type:* `String.t`, *default:* `nil`) - [Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values:
  *   `instance` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created.
  *   `version` (*type:* `GoogleApi.Compute.V1.Model.ManagedInstanceVersion.t`, *default:* `nil`) - [Output Only] Version this instance was created from, or was being created from, but the creation failed. Corresponds to one of the versions that were set on the Instance Group Manager resource at the time this instance was being created.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :action => String.t() | nil,
          :instance => String.t() | nil,
          :version => GoogleApi.Compute.V1.Model.ManagedInstanceVersion.t() | nil
        }

  field(:action)
  field(:instance)
  field(:version, as: GoogleApi.Compute.V1.Model.ManagedInstanceVersion)
end

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

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