# 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.GKEOnPrem.V1.Model.VmwarePlatformConfig do
  @moduledoc """
  VmwarePlatformConfig represents configuration for the VMware platform.

  ## Attributes

  *   `bundles` (*type:* `list(GoogleApi.GKEOnPrem.V1.Model.VmwareBundleConfig.t)`, *default:* `nil`) - Output only. The list of bundles installed in the admin cluster.
  *   `platformVersion` (*type:* `String.t`, *default:* `nil`) - Output only. The platform version e.g. 1.13.2.
  *   `requiredPlatformVersion` (*type:* `String.t`, *default:* `nil`) - Input only. The required platform version e.g. 1.13.1. If the current platform version is lower than the target version, the platform version will be updated to the target version. If the target version is not installed in the platform (bundle versions), download the target version bundle.
  *   `status` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t`, *default:* `nil`) - Output only. Resource status for the platform.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bundles => list(GoogleApi.GKEOnPrem.V1.Model.VmwareBundleConfig.t()) | nil,
          :platformVersion => String.t() | nil,
          :requiredPlatformVersion => String.t() | nil,
          :status => GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t() | nil
        }

  field(:bundles, as: GoogleApi.GKEOnPrem.V1.Model.VmwareBundleConfig, type: :list)
  field(:platformVersion)
  field(:requiredPlatformVersion)
  field(:status, as: GoogleApi.GKEOnPrem.V1.Model.ResourceStatus)
end

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

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