# 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.GKEHub.V1.Model.KubernetesMetadata do
  @moduledoc """
  KubernetesMetadata provides informational metadata for Memberships representing Kubernetes clusters.

  ## Attributes

  *   `kubernetesApiServerVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Kubernetes API server version string as reported by `/version`.
  *   `memoryMb` (*type:* `integer()`, *default:* `nil`) - Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB.
  *   `nodeCount` (*type:* `integer()`, *default:* `nil`) - Output only. Node count as reported by Kubernetes nodes resources.
  *   `nodeProviderId` (*type:* `String.t`, *default:* `nil`) - Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers.
  *   `vcpuCount` (*type:* `integer()`, *default:* `nil`) - Output only. vCPU count as reported by Kubernetes nodes resources.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :kubernetesApiServerVersion => String.t() | nil,
          :memoryMb => integer() | nil,
          :nodeCount => integer() | nil,
          :nodeProviderId => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :vcpuCount => integer() | nil
        }

  field(:kubernetesApiServerVersion)
  field(:memoryMb)
  field(:nodeCount)
  field(:nodeProviderId)
  field(:updateTime, as: DateTime)
  field(:vcpuCount)
end

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

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