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

/**
 * Request message for RevokeToken.
 *
 * <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 Identity Toolkit 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 GoogleCloudIdentitytoolkitV2RevokeTokenRequest extends com.google.api.client.json.GenericJson {

  /**
   * Required. A valid Identity Platform ID token to link the account. If there was a successful
   * token revocation request on the account and no tokens are generated after the revocation, the
   * duplicate requests will be ignored and returned immediately.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String idToken;

  /**
   * Required. The idp provider for the token. Currently only supports Apple Idp. The format should
   * be "apple.com".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String providerId;

  /**
   * The redirect URI provided in the initial authorization request made by the client to the IDP.
   * The URI must use the HTTPS protocol, include a domain name, and can't contain an IP address or
   * localhost. Required if token_type is CODE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String redirectUri;

  /**
   * The ID of the Identity Platform tenant the user is signing in to. If not set, the user will
   * sign in to the default Identity Platform project.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tenantId;

  /**
   * Required. The token to be revoked. If an authorization_code is passed in, the API will first
   * exchange the code for access token and then revoke the token exchanged.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String token;

  /**
   * Required. The type of the token to be revoked.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tokenType;

  /**
   * Required. A valid Identity Platform ID token to link the account. If there was a successful
   * token revocation request on the account and no tokens are generated after the revocation, the
   * duplicate requests will be ignored and returned immediately.
   * @return value or {@code null} for none
   */
  public java.lang.String getIdToken() {
    return idToken;
  }

  /**
   * Required. A valid Identity Platform ID token to link the account. If there was a successful
   * token revocation request on the account and no tokens are generated after the revocation, the
   * duplicate requests will be ignored and returned immediately.
   * @param idToken idToken or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setIdToken(java.lang.String idToken) {
    this.idToken = idToken;
    return this;
  }

  /**
   * Required. The idp provider for the token. Currently only supports Apple Idp. The format should
   * be "apple.com".
   * @return value or {@code null} for none
   */
  public java.lang.String getProviderId() {
    return providerId;
  }

  /**
   * Required. The idp provider for the token. Currently only supports Apple Idp. The format should
   * be "apple.com".
   * @param providerId providerId or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setProviderId(java.lang.String providerId) {
    this.providerId = providerId;
    return this;
  }

  /**
   * The redirect URI provided in the initial authorization request made by the client to the IDP.
   * The URI must use the HTTPS protocol, include a domain name, and can't contain an IP address or
   * localhost. Required if token_type is CODE.
   * @return value or {@code null} for none
   */
  public java.lang.String getRedirectUri() {
    return redirectUri;
  }

  /**
   * The redirect URI provided in the initial authorization request made by the client to the IDP.
   * The URI must use the HTTPS protocol, include a domain name, and can't contain an IP address or
   * localhost. Required if token_type is CODE.
   * @param redirectUri redirectUri or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setRedirectUri(java.lang.String redirectUri) {
    this.redirectUri = redirectUri;
    return this;
  }

  /**
   * The ID of the Identity Platform tenant the user is signing in to. If not set, the user will
   * sign in to the default Identity Platform project.
   * @return value or {@code null} for none
   */
  public java.lang.String getTenantId() {
    return tenantId;
  }

  /**
   * The ID of the Identity Platform tenant the user is signing in to. If not set, the user will
   * sign in to the default Identity Platform project.
   * @param tenantId tenantId or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setTenantId(java.lang.String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

  /**
   * Required. The token to be revoked. If an authorization_code is passed in, the API will first
   * exchange the code for access token and then revoke the token exchanged.
   * @return value or {@code null} for none
   */
  public java.lang.String getToken() {
    return token;
  }

  /**
   * Required. The token to be revoked. If an authorization_code is passed in, the API will first
   * exchange the code for access token and then revoke the token exchanged.
   * @param token token or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setToken(java.lang.String token) {
    this.token = token;
    return this;
  }

  /**
   * Required. The type of the token to be revoked.
   * @return value or {@code null} for none
   */
  public java.lang.String getTokenType() {
    return tokenType;
  }

  /**
   * Required. The type of the token to be revoked.
   * @param tokenType tokenType or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitV2RevokeTokenRequest setTokenType(java.lang.String tokenType) {
    this.tokenType = tokenType;
    return this;
  }

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

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

}
