/*
 * 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.v1alpha.model;

/**
 * **Anthos Identity Service**: State for a single Membership.
 *
 * <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 IdentityServiceMembershipState extends com.google.api.client.json.GenericJson {

  /**
   * The reason of the failure.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String failureReason;

  /**
   * Installed AIS version. This is the AIS version installed on this member. The values makes sense
   * iff state is OK.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String installedVersion;

  /**
   * Last reconciled membership configuration
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private IdentityServiceMembershipSpec memberConfig;

  /**
   * Deployment state on this member
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * The reason of the failure.
   * @return value or {@code null} for none
   */
  public java.lang.String getFailureReason() {
    return failureReason;
  }

  /**
   * The reason of the failure.
   * @param failureReason failureReason or {@code null} for none
   */
  public IdentityServiceMembershipState setFailureReason(java.lang.String failureReason) {
    this.failureReason = failureReason;
    return this;
  }

  /**
   * Installed AIS version. This is the AIS version installed on this member. The values makes sense
   * iff state is OK.
   * @return value or {@code null} for none
   */
  public java.lang.String getInstalledVersion() {
    return installedVersion;
  }

  /**
   * Installed AIS version. This is the AIS version installed on this member. The values makes sense
   * iff state is OK.
   * @param installedVersion installedVersion or {@code null} for none
   */
  public IdentityServiceMembershipState setInstalledVersion(java.lang.String installedVersion) {
    this.installedVersion = installedVersion;
    return this;
  }

  /**
   * Last reconciled membership configuration
   * @return value or {@code null} for none
   */
  public IdentityServiceMembershipSpec getMemberConfig() {
    return memberConfig;
  }

  /**
   * Last reconciled membership configuration
   * @param memberConfig memberConfig or {@code null} for none
   */
  public IdentityServiceMembershipState setMemberConfig(IdentityServiceMembershipSpec memberConfig) {
    this.memberConfig = memberConfig;
    return this;
  }

  /**
   * Deployment state on this member
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Deployment state on this member
   * @param state state or {@code null} for none
   */
  public IdentityServiceMembershipState setState(java.lang.String state) {
    this.state = state;
    return this;
  }

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

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

}
