# 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.VmwareAdminCluster do
  @moduledoc """
  Resource that represents a VMware admin cluster.

  ## Attributes

  *   `addonNode` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAddonNodeConfig.t`, *default:* `nil`) - The VMware admin cluster addon node configuration.
  *   `annotations` (*type:* `map()`, *default:* `nil`) - Annotations on the VMware admin cluster. 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.
  *   `antiAffinityGroups` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAAGConfig.t`, *default:* `nil`) - The VMware admin cluster anti affinity group configuration.
  *   `authorization` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAuthorizationConfig.t`, *default:* `nil`) - The VMware admin cluster authorization configuration.
  *   `autoRepairConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAutoRepairConfig.t`, *default:* `nil`) - The VMware admin cluster auto repair configuration.
  *   `bootstrapClusterMembership` (*type:* `String.t`, *default:* `nil`) - The bootstrap cluster this VMware admin cluster belongs to.
  *   `controlPlaneNode` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminControlPlaneNodeConfig.t`, *default:* `nil`) - The VMware admin cluster control plane node configuration.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which VMware admin cluster was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A human readable description of this VMware admin cluster.
  *   `enableAdvancedCluster` (*type:* `boolean()`, *default:* `nil`) - Enable advanced cluster.
  *   `endpoint` (*type:* `String.t`, *default:* `nil`) - Output only. The DNS name of VMware admin cluster's API server.
  *   `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.
  *   `fleet` (*type:* `GoogleApi.GKEOnPrem.V1.Model.Fleet.t`, *default:* `nil`) - Output only. Fleet configuration for the cluster.
  *   `imageType` (*type:* `String.t`, *default:* `nil`) - The OS image type for the VMware admin cluster.
  *   `loadBalancer` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminLoadBalancerConfig.t`, *default:* `nil`) - The VMware admin cluster load balancer configuration.
  *   `localName` (*type:* `String.t`, *default:* `nil`) - Output only. The object name of the VMware OnPremAdminCluster custom resource. This field is used to support conflicting names when enrolling existing clusters to the API. When used as a part of cluster enrollment, this field will differ from the ID in the resource name. For new clusters, this field will match the user provided cluster name and be visible in the last component of the resource name. It is not modifiable. All users should use this name to access their cluster using gkectl or kubectl and should expect to see the local name when viewing admin cluster controller logs.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The VMware admin cluster resource name.
  *   `networkConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminNetworkConfig.t`, *default:* `nil`) - The VMware admin cluster network configuration.
  *   `onPremVersion` (*type:* `String.t`, *default:* `nil`) - The Anthos clusters on the VMware version for the admin cluster.
  *   `platformConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwarePlatformConfig.t`, *default:* `nil`) - The VMware platform configuration.
  *   `preparedSecrets` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminPreparedSecretsConfig.t`, *default:* `nil`) - Output only. The VMware admin cluster prepared secrets configuration. It should always be enabled by the Central API, instead of letting users set it.
  *   `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. If set, there are currently changes in flight to the VMware admin cluster.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of VMware admin cluster.
  *   `status` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t`, *default:* `nil`) - Output only. ResourceStatus representing detailed cluster state.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The unique identifier of the VMware admin cluster.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which VMware admin cluster was last updated.
  *   `validationCheck` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ValidationCheck.t`, *default:* `nil`) - Output only. ValidationCheck represents the result of the preflight check job.
  *   `vcenter` (*type:* `GoogleApi.GKEOnPrem.V1.Model.VmwareAdminVCenterConfig.t`, *default:* `nil`) - The VMware admin cluster VCenter configuration.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :addonNode => GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAddonNodeConfig.t() | nil,
          :annotations => map() | nil,
          :antiAffinityGroups => GoogleApi.GKEOnPrem.V1.Model.VmwareAAGConfig.t() | nil,
          :authorization => GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAuthorizationConfig.t() | nil,
          :autoRepairConfig => GoogleApi.GKEOnPrem.V1.Model.VmwareAutoRepairConfig.t() | nil,
          :bootstrapClusterMembership => String.t() | nil,
          :controlPlaneNode =>
            GoogleApi.GKEOnPrem.V1.Model.VmwareAdminControlPlaneNodeConfig.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :enableAdvancedCluster => boolean() | nil,
          :endpoint => String.t() | nil,
          :etag => String.t() | nil,
          :fleet => GoogleApi.GKEOnPrem.V1.Model.Fleet.t() | nil,
          :imageType => String.t() | nil,
          :loadBalancer => GoogleApi.GKEOnPrem.V1.Model.VmwareAdminLoadBalancerConfig.t() | nil,
          :localName => String.t() | nil,
          :name => String.t() | nil,
          :networkConfig => GoogleApi.GKEOnPrem.V1.Model.VmwareAdminNetworkConfig.t() | nil,
          :onPremVersion => String.t() | nil,
          :platformConfig => GoogleApi.GKEOnPrem.V1.Model.VmwarePlatformConfig.t() | nil,
          :preparedSecrets =>
            GoogleApi.GKEOnPrem.V1.Model.VmwareAdminPreparedSecretsConfig.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,
          :validationCheck => GoogleApi.GKEOnPrem.V1.Model.ValidationCheck.t() | nil,
          :vcenter => GoogleApi.GKEOnPrem.V1.Model.VmwareAdminVCenterConfig.t() | nil
        }

  field(:addonNode, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAddonNodeConfig)
  field(:annotations, type: :map)
  field(:antiAffinityGroups, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAAGConfig)
  field(:authorization, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminAuthorizationConfig)
  field(:autoRepairConfig, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAutoRepairConfig)
  field(:bootstrapClusterMembership)
  field(:controlPlaneNode, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminControlPlaneNodeConfig)
  field(:createTime, as: DateTime)
  field(:description)
  field(:enableAdvancedCluster)
  field(:endpoint)
  field(:etag)
  field(:fleet, as: GoogleApi.GKEOnPrem.V1.Model.Fleet)
  field(:imageType)
  field(:loadBalancer, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminLoadBalancerConfig)
  field(:localName)
  field(:name)
  field(:networkConfig, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminNetworkConfig)
  field(:onPremVersion)
  field(:platformConfig, as: GoogleApi.GKEOnPrem.V1.Model.VmwarePlatformConfig)
  field(:preparedSecrets, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminPreparedSecretsConfig)
  field(:reconciling)
  field(:state)
  field(:status, as: GoogleApi.GKEOnPrem.V1.Model.ResourceStatus)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:validationCheck, as: GoogleApi.GKEOnPrem.V1.Model.ValidationCheck)
  field(:vcenter, as: GoogleApi.GKEOnPrem.V1.Model.VmwareAdminVCenterConfig)
end

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

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