# 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.BareMetalCluster do
  @moduledoc """
  Resource that represents a bare metal user cluster.

  ## Attributes

  *   `adminClusterMembership` (*type:* `String.t`, *default:* `nil`) - Required. The admin cluster this bare metal user cluster belongs to. This is the full resource name of the admin cluster's fleet membership.
  *   `adminClusterName` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the bare metal admin cluster managing this user cluster.
  *   `annotations` (*type:* `map()`, *default:* `nil`) - Annotations on the bare metal user 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.
  *   `bareMetalVersion` (*type:* `String.t`, *default:* `nil`) - Required. The Anthos clusters on bare metal version for your user cluster.
  *   `binaryAuthorization` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BinaryAuthorization.t`, *default:* `nil`) - Binary Authorization related configurations.
  *   `clusterOperations` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterOperationsConfig.t`, *default:* `nil`) - Cluster operations configuration.
  *   `controlPlane` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalControlPlaneConfig.t`, *default:* `nil`) - Required. Control plane configuration.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the bare metal user cluster was created.
  *   `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the bare metal user cluster was deleted. If the resource is not deleted, this must be empty
  *   `description` (*type:* `String.t`, *default:* `nil`) - A human readable description of this bare metal user cluster.
  *   `endpoint` (*type:* `String.t`, *default:* `nil`) - Output only. The IP address of the bare metal user cluster's API server.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Output only. 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.
  *   `loadBalancer` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalLoadBalancerConfig.t`, *default:* `nil`) - Required. Load balancer configuration.
  *   `localName` (*type:* `String.t`, *default:* `nil`) - Output only. The object name of the bare metal user cluster custom resource on the associated admin cluster. 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 name 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. When the local name and cluster name differ, the local name is used in the admin cluster controller logs. You use the cluster name when accessing the cluster using bmctl and kubectl.
  *   `maintenanceConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceConfig.t`, *default:* `nil`) - Maintenance configuration.
  *   `maintenanceStatus` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceStatus.t`, *default:* `nil`) - Output only. Status of on-going maintenance tasks.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The bare metal user cluster resource name.
  *   `networkConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalNetworkConfig.t`, *default:* `nil`) - Required. Network configuration.
  *   `nodeAccessConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalNodeAccessConfig.t`, *default:* `nil`) - Node access related configurations.
  *   `nodeConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalWorkloadNodeConfig.t`, *default:* `nil`) - Workload node configuration.
  *   `osEnvironmentConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalOsEnvironmentConfig.t`, *default:* `nil`) - OS environment related configurations.
  *   `proxy` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalProxyConfig.t`, *default:* `nil`) - Proxy configuration.
  *   `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. If set, there are currently changes in flight to the bare metal user cluster.
  *   `securityConfig` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalSecurityConfig.t`, *default:* `nil`) - Security related setting configuration.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of the bare metal user cluster.
  *   `status` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t`, *default:* `nil`) - Output only. Detailed cluster status.
  *   `storage` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalStorageConfig.t`, *default:* `nil`) - Required. Storage configuration.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The unique identifier of the bare metal user cluster.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the bare metal user cluster was last updated.
  *   `upgradePolicy` (*type:* `GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterUpgradePolicy.t`, *default:* `nil`) - The cluster upgrade policy.
  *   `validationCheck` (*type:* `GoogleApi.GKEOnPrem.V1.Model.ValidationCheck.t`, *default:* `nil`) - Output only. The result of the preflight check.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adminClusterMembership => String.t() | nil,
          :adminClusterName => String.t() | nil,
          :annotations => map() | nil,
          :bareMetalVersion => String.t() | nil,
          :binaryAuthorization => GoogleApi.GKEOnPrem.V1.Model.BinaryAuthorization.t() | nil,
          :clusterOperations =>
            GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterOperationsConfig.t() | nil,
          :controlPlane => GoogleApi.GKEOnPrem.V1.Model.BareMetalControlPlaneConfig.t() | nil,
          :createTime => DateTime.t() | nil,
          :deleteTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :endpoint => String.t() | nil,
          :etag => String.t() | nil,
          :fleet => GoogleApi.GKEOnPrem.V1.Model.Fleet.t() | nil,
          :loadBalancer => GoogleApi.GKEOnPrem.V1.Model.BareMetalLoadBalancerConfig.t() | nil,
          :localName => String.t() | nil,
          :maintenanceConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceConfig.t() | nil,
          :maintenanceStatus => GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceStatus.t() | nil,
          :name => String.t() | nil,
          :networkConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalNetworkConfig.t() | nil,
          :nodeAccessConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalNodeAccessConfig.t() | nil,
          :nodeConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalWorkloadNodeConfig.t() | nil,
          :osEnvironmentConfig =>
            GoogleApi.GKEOnPrem.V1.Model.BareMetalOsEnvironmentConfig.t() | nil,
          :proxy => GoogleApi.GKEOnPrem.V1.Model.BareMetalProxyConfig.t() | nil,
          :reconciling => boolean() | nil,
          :securityConfig => GoogleApi.GKEOnPrem.V1.Model.BareMetalSecurityConfig.t() | nil,
          :state => String.t() | nil,
          :status => GoogleApi.GKEOnPrem.V1.Model.ResourceStatus.t() | nil,
          :storage => GoogleApi.GKEOnPrem.V1.Model.BareMetalStorageConfig.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :upgradePolicy => GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterUpgradePolicy.t() | nil,
          :validationCheck => GoogleApi.GKEOnPrem.V1.Model.ValidationCheck.t() | nil
        }

  field(:adminClusterMembership)
  field(:adminClusterName)
  field(:annotations, type: :map)
  field(:bareMetalVersion)
  field(:binaryAuthorization, as: GoogleApi.GKEOnPrem.V1.Model.BinaryAuthorization)
  field(:clusterOperations, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterOperationsConfig)
  field(:controlPlane, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalControlPlaneConfig)
  field(:createTime, as: DateTime)
  field(:deleteTime, as: DateTime)
  field(:description)
  field(:endpoint)
  field(:etag)
  field(:fleet, as: GoogleApi.GKEOnPrem.V1.Model.Fleet)
  field(:loadBalancer, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalLoadBalancerConfig)
  field(:localName)
  field(:maintenanceConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceConfig)
  field(:maintenanceStatus, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalMaintenanceStatus)
  field(:name)
  field(:networkConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalNetworkConfig)
  field(:nodeAccessConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalNodeAccessConfig)
  field(:nodeConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalWorkloadNodeConfig)
  field(:osEnvironmentConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalOsEnvironmentConfig)
  field(:proxy, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalProxyConfig)
  field(:reconciling)
  field(:securityConfig, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalSecurityConfig)
  field(:state)
  field(:status, as: GoogleApi.GKEOnPrem.V1.Model.ResourceStatus)
  field(:storage, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalStorageConfig)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:upgradePolicy, as: GoogleApi.GKEOnPrem.V1.Model.BareMetalClusterUpgradePolicy)
  field(:validationCheck, as: GoogleApi.GKEOnPrem.V1.Model.ValidationCheck)
end

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

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