/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.gkehub.v1.model;

/**
 * MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any
 * additional Kubernetes metadata.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the GKE Hub API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class MembershipEndpoint extends com.google.api.client.json.GenericJson {

  /**
   * Optional. Specific information for a GDC Edge Appliance cluster.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ApplianceCluster applianceCluster;

  /**
   * Optional. Specific information for a Google Edge cluster.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private EdgeCluster edgeCluster;

  /**
   * Optional. Specific information for a GKE-on-GCP cluster.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GkeCluster gkeCluster;

  /**
   * Output only. Whether the lifecycle of this membership is managed by a google cluster platform
   * service.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean googleManaged;

  /**
   * Output only. Useful Kubernetes-specific metadata.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private KubernetesMetadata kubernetesMetadata;

  /**
   * 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.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private KubernetesResource kubernetesResource;

  /**
   * Optional. Specific information for a GKE Multi-Cloud cluster.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private MultiCloudCluster multiCloudCluster;

  /**
   * 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.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private OnPremCluster onPremCluster;

  /**
   * Optional. Specific information for a GDC Edge Appliance cluster.
   * @return value or {@code null} for none
   */
  public ApplianceCluster getApplianceCluster() {
    return applianceCluster;
  }

  /**
   * Optional. Specific information for a GDC Edge Appliance cluster.
   * @param applianceCluster applianceCluster or {@code null} for none
   */
  public MembershipEndpoint setApplianceCluster(ApplianceCluster applianceCluster) {
    this.applianceCluster = applianceCluster;
    return this;
  }

  /**
   * Optional. Specific information for a Google Edge cluster.
   * @return value or {@code null} for none
   */
  public EdgeCluster getEdgeCluster() {
    return edgeCluster;
  }

  /**
   * Optional. Specific information for a Google Edge cluster.
   * @param edgeCluster edgeCluster or {@code null} for none
   */
  public MembershipEndpoint setEdgeCluster(EdgeCluster edgeCluster) {
    this.edgeCluster = edgeCluster;
    return this;
  }

  /**
   * Optional. Specific information for a GKE-on-GCP cluster.
   * @return value or {@code null} for none
   */
  public GkeCluster getGkeCluster() {
    return gkeCluster;
  }

  /**
   * Optional. Specific information for a GKE-on-GCP cluster.
   * @param gkeCluster gkeCluster or {@code null} for none
   */
  public MembershipEndpoint setGkeCluster(GkeCluster gkeCluster) {
    this.gkeCluster = gkeCluster;
    return this;
  }

  /**
   * Output only. Whether the lifecycle of this membership is managed by a google cluster platform
   * service.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getGoogleManaged() {
    return googleManaged;
  }

  /**
   * Output only. Whether the lifecycle of this membership is managed by a google cluster platform
   * service.
   * @param googleManaged googleManaged or {@code null} for none
   */
  public MembershipEndpoint setGoogleManaged(java.lang.Boolean googleManaged) {
    this.googleManaged = googleManaged;
    return this;
  }

  /**
   * Output only. Useful Kubernetes-specific metadata.
   * @return value or {@code null} for none
   */
  public KubernetesMetadata getKubernetesMetadata() {
    return kubernetesMetadata;
  }

  /**
   * Output only. Useful Kubernetes-specific metadata.
   * @param kubernetesMetadata kubernetesMetadata or {@code null} for none
   */
  public MembershipEndpoint setKubernetesMetadata(KubernetesMetadata kubernetesMetadata) {
    this.kubernetesMetadata = kubernetesMetadata;
    return this;
  }

  /**
   * 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.
   * @return value or {@code null} for none
   */
  public KubernetesResource getKubernetesResource() {
    return kubernetesResource;
  }

  /**
   * 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.
   * @param kubernetesResource kubernetesResource or {@code null} for none
   */
  public MembershipEndpoint setKubernetesResource(KubernetesResource kubernetesResource) {
    this.kubernetesResource = kubernetesResource;
    return this;
  }

  /**
   * Optional. Specific information for a GKE Multi-Cloud cluster.
   * @return value or {@code null} for none
   */
  public MultiCloudCluster getMultiCloudCluster() {
    return multiCloudCluster;
  }

  /**
   * Optional. Specific information for a GKE Multi-Cloud cluster.
   * @param multiCloudCluster multiCloudCluster or {@code null} for none
   */
  public MembershipEndpoint setMultiCloudCluster(MultiCloudCluster multiCloudCluster) {
    this.multiCloudCluster = multiCloudCluster;
    return this;
  }

  /**
   * 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.
   * @return value or {@code null} for none
   */
  public OnPremCluster getOnPremCluster() {
    return onPremCluster;
  }

  /**
   * 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.
   * @param onPremCluster onPremCluster or {@code null} for none
   */
  public MembershipEndpoint setOnPremCluster(OnPremCluster onPremCluster) {
    this.onPremCluster = onPremCluster;
    return this;
  }

  @Override
  public MembershipEndpoint set(String fieldName, Object value) {
    return (MembershipEndpoint) super.set(fieldName, value);
  }

  @Override
  public MembershipEndpoint clone() {
    return (MembershipEndpoint) super.clone();
  }

}
