# 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.MembershipEndpoint do
  @moduledoc """
  MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata.

  ## Attributes

  *   `applianceCluster` (*type:* `GoogleApi.GKEHub.V1.Model.ApplianceCluster.t`, *default:* `nil`) - Optional. Specific information for a GDC Edge Appliance cluster.
  *   `edgeCluster` (*type:* `GoogleApi.GKEHub.V1.Model.EdgeCluster.t`, *default:* `nil`) - Optional. Specific information for a Google Edge cluster.
  *   `gkeCluster` (*type:* `GoogleApi.GKEHub.V1.Model.GkeCluster.t`, *default:* `nil`) - Optional. Specific information for a GKE-on-GCP cluster.
  *   `googleManaged` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the lifecycle of this membership is managed by a google cluster platform service.
  *   `kubernetesMetadata` (*type:* `GoogleApi.GKEHub.V1.Model.KubernetesMetadata.t`, *default:* `nil`) - Output only. Useful Kubernetes-specific metadata.
  *   `kubernetesResource` (*type:* `GoogleApi.GKEHub.V1.Model.KubernetesResource.t`, *default:* `nil`) - Optional. The in-cluster Kubernetes Resources that should be applied for a correctly registered cluster, in the steady state. These resources: * Ensure that the cluster is exclusively registered to one and only one Hub Membership. * Propagate Workload Pool Information available in the Membership Authority field. * Ensure proper initial configuration of default Hub Features.
  *   `multiCloudCluster` (*type:* `GoogleApi.GKEHub.V1.Model.MultiCloudCluster.t`, *default:* `nil`) - Optional. Specific information for a GKE Multi-Cloud cluster.
  *   `onPremCluster` (*type:* `GoogleApi.GKEHub.V1.Model.OnPremCluster.t`, *default:* `nil`) - Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster who has no resourceLink is not allowed to use this field, it should have a nil "type" instead.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :applianceCluster => GoogleApi.GKEHub.V1.Model.ApplianceCluster.t() | nil,
          :edgeCluster => GoogleApi.GKEHub.V1.Model.EdgeCluster.t() | nil,
          :gkeCluster => GoogleApi.GKEHub.V1.Model.GkeCluster.t() | nil,
          :googleManaged => boolean() | nil,
          :kubernetesMetadata => GoogleApi.GKEHub.V1.Model.KubernetesMetadata.t() | nil,
          :kubernetesResource => GoogleApi.GKEHub.V1.Model.KubernetesResource.t() | nil,
          :multiCloudCluster => GoogleApi.GKEHub.V1.Model.MultiCloudCluster.t() | nil,
          :onPremCluster => GoogleApi.GKEHub.V1.Model.OnPremCluster.t() | nil
        }

  field(:applianceCluster, as: GoogleApi.GKEHub.V1.Model.ApplianceCluster)
  field(:edgeCluster, as: GoogleApi.GKEHub.V1.Model.EdgeCluster)
  field(:gkeCluster, as: GoogleApi.GKEHub.V1.Model.GkeCluster)
  field(:googleManaged)
  field(:kubernetesMetadata, as: GoogleApi.GKEHub.V1.Model.KubernetesMetadata)
  field(:kubernetesResource, as: GoogleApi.GKEHub.V1.Model.KubernetesResource)
  field(:multiCloudCluster, as: GoogleApi.GKEHub.V1.Model.MultiCloudCluster)
  field(:onPremCluster, as: GoogleApi.GKEHub.V1.Model.OnPremCluster)
end

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

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