src.main.java.com.smartbear.readyapi.client.model.Authentication Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ready-api-testserver-client Show documentation
Show all versions of ready-api-testserver-client Show documentation
Java client library for creating and executing test recipes against Ready!API TestServer
package com.smartbear.readyapi.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Data structure for authentication in test recipes.
**/
@ApiModel(description = "Data structure for authentication in test recipes.")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-21T13:20:07.368+02:00")
public class Authentication {
private String type = null;
private String username = null;
private String password = null;
private String domain = null;
private String accessToken = null;
private String accessTokenPosition = null;
private String accessTokenUri = null;
private String clientId = null;
private String clientSecret = null;
private String refreshToken = null;
/**
* Authentication type. Possible values: - Basic
- SPNEGO/Kerberos
- OAuth 2.0
**/
public Authentication type(String type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "Authentication type. Possible values: - Basic
- SPNEGO/Kerberos
- OAuth 2.0
")
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
* Username used for authentication.
**/
public Authentication username(String username) {
this.username = username;
return this;
}
@ApiModelProperty(example = "null", value = "Username used for authentication.")
@JsonProperty("username")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
/**
* Password used for authentication.
**/
public Authentication password(String password) {
this.password = password;
return this;
}
@ApiModelProperty(example = "null", value = "Password used for authentication.")
@JsonProperty("password")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
/**
* Domain the user belongs to. Required for Kerberos authentication.
**/
public Authentication domain(String domain) {
this.domain = domain;
return this;
}
@ApiModelProperty(example = "null", value = "Domain the user belongs to. Required for Kerberos authentication.")
@JsonProperty("domain")
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
/**
* For OAuth 2.0 only. Access token attached to the user.
**/
public Authentication accessToken(String accessToken) {
this.accessToken = accessToken;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. Access token attached to the user.")
@JsonProperty("accessToken")
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
/**
* For OAuth 2.0 only. The position of the access token.
**/
public Authentication accessTokenPosition(String accessTokenPosition) {
this.accessTokenPosition = accessTokenPosition;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. The position of the access token.")
@JsonProperty("accessTokenPosition")
public String getAccessTokenPosition() {
return accessTokenPosition;
}
public void setAccessTokenPosition(String accessTokenPosition) {
this.accessTokenPosition = accessTokenPosition;
}
/**
* For OAuth 2.0 only. The URI used to retrieve the access token.
**/
public Authentication accessTokenUri(String accessTokenUri) {
this.accessTokenUri = accessTokenUri;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. The URI used to retrieve the access token.")
@JsonProperty("accessTokenUri")
public String getAccessTokenUri() {
return accessTokenUri;
}
public void setAccessTokenUri(String accessTokenUri) {
this.accessTokenUri = accessTokenUri;
}
/**
* For OAuth 2.0 only. The client ID attached to the user.
**/
public Authentication clientId(String clientId) {
this.clientId = clientId;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. The client ID attached to the user.")
@JsonProperty("clientId")
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
/**
* For OAuth 2.0 only. The client secret key attached to the user.
**/
public Authentication clientSecret(String clientSecret) {
this.clientSecret = clientSecret;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. The client secret key attached to the user.")
@JsonProperty("clientSecret")
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
/**
* For OAuth 2.0 only. Specifies the refresh token used.
**/
public Authentication refreshToken(String refreshToken) {
this.refreshToken = refreshToken;
return this;
}
@ApiModelProperty(example = "null", value = "For OAuth 2.0 only. Specifies the refresh token used.")
@JsonProperty("refreshToken")
public String getRefreshToken() {
return refreshToken;
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Authentication authentication = (Authentication) o;
return Objects.equals(this.type, authentication.type) &&
Objects.equals(this.username, authentication.username) &&
Objects.equals(this.password, authentication.password) &&
Objects.equals(this.domain, authentication.domain) &&
Objects.equals(this.accessToken, authentication.accessToken) &&
Objects.equals(this.accessTokenPosition, authentication.accessTokenPosition) &&
Objects.equals(this.accessTokenUri, authentication.accessTokenUri) &&
Objects.equals(this.clientId, authentication.clientId) &&
Objects.equals(this.clientSecret, authentication.clientSecret) &&
Objects.equals(this.refreshToken, authentication.refreshToken);
}
@Override
public int hashCode() {
return Objects.hash(type, username, password, domain, accessToken, accessTokenPosition, accessTokenUri, clientId, clientSecret, refreshToken);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Authentication {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n");
sb.append(" accessTokenPosition: ").append(toIndentedString(accessTokenPosition)).append("\n");
sb.append(" accessTokenUri: ").append(toIndentedString(accessTokenUri)).append("\n");
sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n");
sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n");
sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).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 - 2024 Weber Informatics LLC | Privacy Policy