# 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.BareMetalNodePool do
  @moduledoc """
  Resource that represents a bare metal node pool.

  ## Attributes

  *   `annotations` (*type:* `map()`, *default:* `nil`) - Annotations on the bare metal node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this bare metal node pool was created.
  *   `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this bare metal node pool was deleted. If the resource is not deleted, this must be empty
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The display name for the bare metal node pool.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The bare metal node pool resource name.
  *   `nodePoolConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolConfig.t`, *default:* `nil`) - Required. Node pool configuration.
  *   `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. If set, there are currently changes in flight to the bare metal node pool.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of the bare metal node pool.
  *   `status` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t`, *default:* `nil`) - Output only. ResourceStatus representing the detailed node pool status.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The unique identifier of the bare metal node pool.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this bare metal node pool was last updated.
  *   `upgradePolicy` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolUpgradePolicy.t`, *default:* `nil`) - The worker node pool upgrade policy.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotations => map() | nil,
          :createTime => DateTime.t() | nil,
          :deleteTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :name => String.t() | nil,
          :nodePoolConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolConfig.t() | nil,
          :reconciling => boolean() | nil,
          :state => String.t() | nil,
          :status => GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :upgradePolicy => GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolUpgradePolicy.t() | nil
        }

  field(:annotations, type: :map)
  field(:createTime, as: DateTime)
  field(:deleteTime, as: DateTime)
  field(:displayName)
  field(:etag)
  field(:name)
  field(:nodePoolConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolConfig)
  field(:reconciling)
  field(:state)
  field(:status, as: GoogleApi.GKEOnPrem.V1.Model.ResourceStatus)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:upgradePolicy, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalNodePoolUpgradePolicy)
end

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

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