com.squareup.connect.models.CreateMobileAuthorizationCodeResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect Show documentation
Show all versions of connect Show documentation
Java client library for the Square Connect API
/*
* Square Connect API
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.squareup.connect.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.squareup.connect.models.Error;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Defines the fields that are included in the response body of a request to the [CreateMobileAuthorizationCode](#endpoint-createmobileauthorizationcode) endpoint.
*/
@ApiModel(description = "Defines the fields that are included in the response body of a request to the [CreateMobileAuthorizationCode](#endpoint-createmobileauthorizationcode) endpoint.")
public class CreateMobileAuthorizationCodeResponse {
@JsonProperty("authorization_code")
private String authorizationCode = null;
@JsonProperty("expires_at")
private String expiresAt = null;
@JsonProperty("error")
private Error error = null;
public CreateMobileAuthorizationCodeResponse authorizationCode(String authorizationCode) {
this.authorizationCode = authorizationCode;
return this;
}
/**
* Generated authorization code that connects a mobile application instance to a Square account.
* @return authorizationCode
**/
@ApiModelProperty(value = "Generated authorization code that connects a mobile application instance to a Square account.")
public String getAuthorizationCode() {
return authorizationCode;
}
public void setAuthorizationCode(String authorizationCode) {
this.authorizationCode = authorizationCode;
}
public CreateMobileAuthorizationCodeResponse expiresAt(String expiresAt) {
this.expiresAt = expiresAt;
return this;
}
/**
* The timestamp when `authorization_code` expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., \"2016-09-04T23:59:33.123Z\".
* @return expiresAt
**/
@ApiModelProperty(value = "The timestamp when `authorization_code` expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., \"2016-09-04T23:59:33.123Z\".")
public String getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(String expiresAt) {
this.expiresAt = expiresAt;
}
public CreateMobileAuthorizationCodeResponse error(Error error) {
this.error = error;
return this;
}
/**
* An error object that provides details about how creation of authorization code failed.
* @return error
**/
@ApiModelProperty(value = "An error object that provides details about how creation of authorization code failed.")
public Error getError() {
return error;
}
public void setError(Error error) {
this.error = error;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateMobileAuthorizationCodeResponse createMobileAuthorizationCodeResponse = (CreateMobileAuthorizationCodeResponse) o;
return Objects.equals(this.authorizationCode, createMobileAuthorizationCodeResponse.authorizationCode) &&
Objects.equals(this.expiresAt, createMobileAuthorizationCodeResponse.expiresAt) &&
Objects.equals(this.error, createMobileAuthorizationCodeResponse.error);
}
@Override
public int hashCode() {
return Objects.hash(authorizationCode, expiresAt, error);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateMobileAuthorizationCodeResponse {\n");
sb.append(" authorizationCode: ").append(toIndentedString(authorizationCode)).append("\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).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 ");
}
}