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

/**
 * Response message for IntrospectToken.
 *
 * <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 Security Token Service 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 GoogleIdentityStsV1IntrospectTokenResponse extends com.google.api.client.json.GenericJson {

  /**
   * A boolean value that indicates whether the provided access token is currently active.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean active;

  /**
   * The client identifier for the OAuth 2.0 client that requested the provided token.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("client_id")
  private java.lang.String clientId;

  /**
   * The expiration timestamp, measured in the number of seconds since January 1 1970 UTC,
   * indicating when this token will expire.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long exp;

  /**
   * The issued timestamp, measured in the number of seconds since January 1 1970 UTC, indicating
   * when this token was originally issued.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long iat;

  /**
   * The issuer of the provided token.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String iss;

  /**
   * A list of scopes associated with the provided token.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String scope;

  /**
   * The unique user ID associated with the provided token. For Google Accounts, this value is based
   * on the Google Account's user ID. For federated identities, this value is based on the identity
   * pool ID and the value of the mapped `google.subject` attribute.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sub;

  /**
   * The human-readable identifier for the token principal subject. For example, if the provided
   * token is associated with a workload identity pool, this field contains a value in the following
   * format:
   * `principal://iam.googleapis.com/projects//locations/global/workloadIdentityPools//subject/`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String username;

  /**
   * A boolean value that indicates whether the provided access token is currently active.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getActive() {
    return active;
  }

  /**
   * A boolean value that indicates whether the provided access token is currently active.
   * @param active active or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setActive(java.lang.Boolean active) {
    this.active = active;
    return this;
  }

  /**
   * The client identifier for the OAuth 2.0 client that requested the provided token.
   * @return value or {@code null} for none
   */
  public java.lang.String getClientId() {
    return clientId;
  }

  /**
   * The client identifier for the OAuth 2.0 client that requested the provided token.
   * @param clientId clientId or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setClientId(java.lang.String clientId) {
    this.clientId = clientId;
    return this;
  }

  /**
   * The expiration timestamp, measured in the number of seconds since January 1 1970 UTC,
   * indicating when this token will expire.
   * @return value or {@code null} for none
   */
  public java.lang.Long getExp() {
    return exp;
  }

  /**
   * The expiration timestamp, measured in the number of seconds since January 1 1970 UTC,
   * indicating when this token will expire.
   * @param exp exp or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setExp(java.lang.Long exp) {
    this.exp = exp;
    return this;
  }

  /**
   * The issued timestamp, measured in the number of seconds since January 1 1970 UTC, indicating
   * when this token was originally issued.
   * @return value or {@code null} for none
   */
  public java.lang.Long getIat() {
    return iat;
  }

  /**
   * The issued timestamp, measured in the number of seconds since January 1 1970 UTC, indicating
   * when this token was originally issued.
   * @param iat iat or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setIat(java.lang.Long iat) {
    this.iat = iat;
    return this;
  }

  /**
   * The issuer of the provided token.
   * @return value or {@code null} for none
   */
  public java.lang.String getIss() {
    return iss;
  }

  /**
   * The issuer of the provided token.
   * @param iss iss or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setIss(java.lang.String iss) {
    this.iss = iss;
    return this;
  }

  /**
   * A list of scopes associated with the provided token.
   * @return value or {@code null} for none
   */
  public java.lang.String getScope() {
    return scope;
  }

  /**
   * A list of scopes associated with the provided token.
   * @param scope scope or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setScope(java.lang.String scope) {
    this.scope = scope;
    return this;
  }

  /**
   * The unique user ID associated with the provided token. For Google Accounts, this value is based
   * on the Google Account's user ID. For federated identities, this value is based on the identity
   * pool ID and the value of the mapped `google.subject` attribute.
   * @return value or {@code null} for none
   */
  public java.lang.String getSub() {
    return sub;
  }

  /**
   * The unique user ID associated with the provided token. For Google Accounts, this value is based
   * on the Google Account's user ID. For federated identities, this value is based on the identity
   * pool ID and the value of the mapped `google.subject` attribute.
   * @param sub sub or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setSub(java.lang.String sub) {
    this.sub = sub;
    return this;
  }

  /**
   * The human-readable identifier for the token principal subject. For example, if the provided
   * token is associated with a workload identity pool, this field contains a value in the following
   * format:
   * `principal://iam.googleapis.com/projects//locations/global/workloadIdentityPools//subject/`
   * @return value or {@code null} for none
   */
  public java.lang.String getUsername() {
    return username;
  }

  /**
   * The human-readable identifier for the token principal subject. For example, if the provided
   * token is associated with a workload identity pool, this field contains a value in the following
   * format:
   * `principal://iam.googleapis.com/projects//locations/global/workloadIdentityPools//subject/`
   * @param username username or {@code null} for none
   */
  public GoogleIdentityStsV1IntrospectTokenResponse setUsername(java.lang.String username) {
    this.username = username;
    return this;
  }

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

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

}
