All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.confidentify.client.model.AuthRequest Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
/*
 * Confidentify API
 * Services that let you build confidence and identify matches in customer data. ## Features overview * Contact data processing services (tagged with `process`) which offer   validation and enrichment backed by inference and knowledge on complex   data types such as names, email addresses, phone numbers.  * Data matching and searching services (tagged with `matching`) that    allow you to identify duplicated data or matches against third party   contact data list.  * Dataset management services (tagged with `dataset`) that allow record storage and retrieval. ## Integrator notes: * Use the `/auth` endpoint to get an access token. Access tokens are temporary, so design the client the be capable of renewing it. * The APIs are rate-limited, so design the client to be capable of retrying with some delay upon HTTP 429 responses. 
 *
 * The version of the OpenAPI document: 1.1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.confidentify.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * AuthRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-04-21T21:21:06.848810800+02:00[Europe/Paris]")
public class AuthRequest {
  public static final String SERIALIZED_NAME_USERNAME = "username";
  @SerializedName(SERIALIZED_NAME_USERNAME)
  private String username;

  public static final String SERIALIZED_NAME_PASSWORD = "password";
  @SerializedName(SERIALIZED_NAME_PASSWORD)
  private String password;

  public static final String SERIALIZED_NAME_GOOGLE_ACCESS_TOKEN = "google_access_token";
  @SerializedName(SERIALIZED_NAME_GOOGLE_ACCESS_TOKEN)
  private String googleAccessToken;

  public static final String SERIALIZED_NAME_EXPIRE_AFTER_SECONDS = "expire_after_seconds";
  @SerializedName(SERIALIZED_NAME_EXPIRE_AFTER_SECONDS)
  private Integer expireAfterSeconds = 300;

  public static final String SERIALIZED_NAME_SERVICE_GRANTS = "service_grants";
  @SerializedName(SERIALIZED_NAME_SERVICE_GRANTS)
  private List serviceGrants = null;


  public AuthRequest username(String username) {
    
    this.username = username;
    return this;
  }

   /**
   * The username of the user, usually an email address.
   * @return username
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "[email protected]", value = "The username of the user, usually an email address.")

  public String getUsername() {
    return username;
  }


  public void setUsername(String username) {
    this.username = username;
  }


  public AuthRequest password(String password) {
    
    this.password = password;
    return this;
  }

   /**
   * Password to use for authentication.
   * @return password
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "secret", value = "Password to use for authentication.")

  public String getPassword() {
    return password;
  }


  public void setPassword(String password) {
    this.password = password;
  }


  public AuthRequest googleAccessToken(String googleAccessToken) {
    
    this.googleAccessToken = googleAccessToken;
    return this;
  }

   /**
   * Access token issued by Google to use for authentication.
   * @return googleAccessToken
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "par143pqodw2h4k2jl42n253ljn5dd35as3", value = "Access token issued by Google to use for authentication.")

  public String getGoogleAccessToken() {
    return googleAccessToken;
  }


  public void setGoogleAccessToken(String googleAccessToken) {
    this.googleAccessToken = googleAccessToken;
  }


  public AuthRequest expireAfterSeconds(Integer expireAfterSeconds) {
    
    this.expireAfterSeconds = expireAfterSeconds;
    return this;
  }

   /**
   * Optional integer specifying the number of seconds that the returned token should be valid for. 
   * minimum: 60
   * maximum: 1200
   * @return expireAfterSeconds
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Optional integer specifying the number of seconds that the returned token should be valid for. ")

  public Integer getExpireAfterSeconds() {
    return expireAfterSeconds;
  }


  public void setExpireAfterSeconds(Integer expireAfterSeconds) {
    this.expireAfterSeconds = expireAfterSeconds;
  }


  public AuthRequest serviceGrants(List serviceGrants) {
    
    this.serviceGrants = serviceGrants;
    return this;
  }

  public AuthRequest addServiceGrantsItem(String serviceGrantsItem) {
    if (this.serviceGrants == null) {
      this.serviceGrants = new ArrayList<>();
    }
    this.serviceGrants.add(serviceGrantsItem);
    return this;
  }

   /**
   * An optional array of service names to grant access to. Use this to generate access tokens with limited capabilities. 
   * @return serviceGrants
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "[\"/person_name\",\"/email\",\"/datasets/kFDs14IO313n1l\"]", value = "An optional array of service names to grant access to. Use this to generate access tokens with limited capabilities. ")

  public List getServiceGrants() {
    return serviceGrants;
  }


  public void setServiceGrants(List serviceGrants) {
    this.serviceGrants = serviceGrants;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AuthRequest authRequest = (AuthRequest) o;
    return Objects.equals(this.username, authRequest.username) &&
        Objects.equals(this.password, authRequest.password) &&
        Objects.equals(this.googleAccessToken, authRequest.googleAccessToken) &&
        Objects.equals(this.expireAfterSeconds, authRequest.expireAfterSeconds) &&
        Objects.equals(this.serviceGrants, authRequest.serviceGrants);
  }

  @Override
  public int hashCode() {
    return Objects.hash(username, password, googleAccessToken, expireAfterSeconds, serviceGrants);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AuthRequest {\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    googleAccessToken: ").append(toIndentedString(googleAccessToken)).append("\n");
    sb.append("    expireAfterSeconds: ").append(toIndentedString(expireAfterSeconds)).append("\n");
    sb.append("    serviceGrants: ").append(toIndentedString(serviceGrants)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy