/*
 * 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;

/**
 * RBACRoleBinding represents a rbacrolebinding across the Fleet
 *
 * <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 RBACRoleBinding extends com.google.api.client.json.GenericJson {

  /**
   * Output only. When the rbacrolebinding was created.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

  /**
   * Output only. When the rbacrolebinding was deleted.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String deleteTime;

  /**
   * group is the group, as seen by the kubernetes cluster.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String group;

  /**
   * Optional. Labels for this RBACRolebinding.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.String> labels;

  /**
   * The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{
   * namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memb
   * erships/{membership}/rbacrolebindings/{rbacrolebinding}`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Required. Role to bind to the principal
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Role role;

  /**
   * Output only. State of the rbacrolebinding resource.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RBACRoleBindingLifecycleState state;

  /**
   * Output only. Google-generated UUID for this resource. This is unique across all rbacrolebinding
   * resources. If a rbacrolebinding resource is deleted and another resource with the same name is
   * created, it gets a different uid.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String uid;

  /**
   * Output only. When the rbacrolebinding was last updated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * user is the name of the user as seen by the kubernetes cluster, example "alice" or
   * "alice@domain.tld"
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String user;

  /**
   * Output only. When the rbacrolebinding was created.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * Output only. When the rbacrolebinding was created.
   * @param createTime createTime or {@code null} for none
   */
  public RBACRoleBinding setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * Output only. When the rbacrolebinding was deleted.
   * @return value or {@code null} for none
   */
  public String getDeleteTime() {
    return deleteTime;
  }

  /**
   * Output only. When the rbacrolebinding was deleted.
   * @param deleteTime deleteTime or {@code null} for none
   */
  public RBACRoleBinding setDeleteTime(String deleteTime) {
    this.deleteTime = deleteTime;
    return this;
  }

  /**
   * group is the group, as seen by the kubernetes cluster.
   * @return value or {@code null} for none
   */
  public java.lang.String getGroup() {
    return group;
  }

  /**
   * group is the group, as seen by the kubernetes cluster.
   * @param group group or {@code null} for none
   */
  public RBACRoleBinding setGroup(java.lang.String group) {
    this.group = group;
    return this;
  }

  /**
   * Optional. Labels for this RBACRolebinding.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.String> getLabels() {
    return labels;
  }

  /**
   * Optional. Labels for this RBACRolebinding.
   * @param labels labels or {@code null} for none
   */
  public RBACRoleBinding setLabels(java.util.Map<String, java.lang.String> labels) {
    this.labels = labels;
    return this;
  }

  /**
   * The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{
   * namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memb
   * erships/{membership}/rbacrolebindings/{rbacrolebinding}`
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * The resource name for the rbacrolebinding `projects/{project}/locations/{location}/namespaces/{
   * namespace}/rbacrolebindings/{rbacrolebinding}` or `projects/{project}/locations/{location}/memb
   * erships/{membership}/rbacrolebindings/{rbacrolebinding}`
   * @param name name or {@code null} for none
   */
  public RBACRoleBinding setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Required. Role to bind to the principal
   * @return value or {@code null} for none
   */
  public Role getRole() {
    return role;
  }

  /**
   * Required. Role to bind to the principal
   * @param role role or {@code null} for none
   */
  public RBACRoleBinding setRole(Role role) {
    this.role = role;
    return this;
  }

  /**
   * Output only. State of the rbacrolebinding resource.
   * @return value or {@code null} for none
   */
  public RBACRoleBindingLifecycleState getState() {
    return state;
  }

  /**
   * Output only. State of the rbacrolebinding resource.
   * @param state state or {@code null} for none
   */
  public RBACRoleBinding setState(RBACRoleBindingLifecycleState state) {
    this.state = state;
    return this;
  }

  /**
   * Output only. Google-generated UUID for this resource. This is unique across all rbacrolebinding
   * resources. If a rbacrolebinding resource is deleted and another resource with the same name is
   * created, it gets a different uid.
   * @return value or {@code null} for none
   */
  public java.lang.String getUid() {
    return uid;
  }

  /**
   * Output only. Google-generated UUID for this resource. This is unique across all rbacrolebinding
   * resources. If a rbacrolebinding resource is deleted and another resource with the same name is
   * created, it gets a different uid.
   * @param uid uid or {@code null} for none
   */
  public RBACRoleBinding setUid(java.lang.String uid) {
    this.uid = uid;
    return this;
  }

  /**
   * Output only. When the rbacrolebinding was last updated.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. When the rbacrolebinding was last updated.
   * @param updateTime updateTime or {@code null} for none
   */
  public RBACRoleBinding setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

  /**
   * user is the name of the user as seen by the kubernetes cluster, example "alice" or
   * "alice@domain.tld"
   * @return value or {@code null} for none
   */
  public java.lang.String getUser() {
    return user;
  }

  /**
   * user is the name of the user as seen by the kubernetes cluster, example "alice" or
   * "alice@domain.tld"
   * @param user user or {@code null} for none
   */
  public RBACRoleBinding setUser(java.lang.String user) {
    this.user = user;
    return this;
  }

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

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

}
