# 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.VmwareNodeConfig do
  @moduledoc """
  Parameters that describe the configuration of all nodes within a given node pool.

  ## Attributes

  *   `bootDiskSizeGb` (*type:* `String.t`, *default:* `nil`) - VMware disk size to be used during creation.
  *   `cpus` (*type:* `String.t`, *default:* `nil`) - The number of CPUs for each node in the node pool.
  *   `enableLoadBalancer` (*type:* `boolean()`, *default:* `nil`) - Allow node pool traffic to be load balanced. Only works for clusters with MetalLB load balancers.
  *   `image` (*type:* `String.t`, *default:* `nil`) - The OS image name in vCenter, only valid when using Windows.
  *   `imageType` (*type:* `String.t`, *default:* `nil`) - Required. The OS image to be used for each node in a node pool. Currently `cos`, `cos_cgv2`, `ubuntu`, `ubuntu_cgv2`, `ubuntu_containerd` and `windows` are supported.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  *   `memoryMb` (*type:* `String.t`, *default:* `nil`) - The megabytes of memory for each node in the node pool.
  *   `replicas` (*type:* `String.t`, *default:* `nil`) - The number of nodes in the node pool.
  *   `taints` (*type:* `list(GoogleApi.GKEOnPrem.V1.Model.NodeTaint.t)`, *default:* `nil`) - The initial taints assigned to nodes of this node pool.
  *   `vsphereConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareVsphereConfig.t`, *default:* `nil`) - Specifies the vSphere config for node pool.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bootDiskSizeGb => String.t() | nil,
          :cpus => String.t() | nil,
          :enableLoadBalancer => boolean() | nil,
          :image => String.t() | nil,
          :imageType => String.t() | nil,
          :labels => map() | nil,
          :memoryMb => String.t() | nil,
          :replicas => String.t() | nil,
          :taints => list(GoogleApi.GKEOnPrem.V1.Model.NodeTaint.t()) | nil,
          :vsphereConfig => GoogleApi.GKEOnPrem.V1.Model.VmwareVsphereConfig.t() | nil
        }

  field(:bootDiskSizeGb)
  field(:cpus)
  field(:enableLoadBalancer)
  field(:image)
  field(:imageType)
  field(:labels, type: :map)
  field(:memoryMb)
  field(:replicas)
  field(:taints, as: GoogleApi.GKEOnPrem.V1.Model.NodeTaint, type: :list)
  field(:vsphereConfig, as: GoogleApi.GKEOnPrem.V1.Model.VmwareVsphereConfig)
end

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

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