# 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.GKEBackup.V1.Model.ClusterMetadata do
  @moduledoc """
  Information about the GKE cluster from which this Backup was created.

  ## Attributes

  *   `anthosVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Anthos version
  *   `backupCrdVersions` (*type:* `map()`, *default:* `nil`) - Output only. A list of the Backup for GKE CRD versions found in the cluster.
  *   `cluster` (*type:* `String.t`, *default:* `nil`) - Output only. The source cluster from which this Backup was created. Valid formats: - `projects/*/locations/*/clusters/*` - `projects/*/zones/*/clusters/*` This is inherited from the parent BackupPlan's cluster field.
  *   `gkeVersion` (*type:* `String.t`, *default:* `nil`) - Output only. GKE version
  *   `k8sVersion` (*type:* `String.t`, *default:* `nil`) - Output only. The Kubernetes server version of the source cluster.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :anthosVersion => String.t() | nil,
          :backupCrdVersions => map() | nil,
          :cluster => String.t() | nil,
          :gkeVersion => String.t() | nil,
          :k8sVersion => String.t() | nil
        }

  field(:anthosVersion)
  field(:backupCrdVersions, type: :map)
  field(:cluster)
  field(:gkeVersion)
  field(:k8sVersion)
end

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

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