com.github.GBSEcom.model.AccessTokenResponse Maven / Gradle / Ivy
/*
* Payment Gateway API Specification
* Payment Gateway API for payment processing.
*
* OpenAPI spec version: 0.0.1
*
*
* 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.github.GBSEcom.model;
import java.util.Objects;
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;
/**
* Access Token generation response
*/
@ApiModel(description = "Access Token generation response")
public class AccessTokenResponse {
@SerializedName("accessToken")
private String accessToken = null;
@SerializedName("clientRequestId")
private String clientRequestId = null;
@SerializedName("apiTraceId")
private String apiTraceId = null;
/**
* The result of the requested operation. If this is anything other than 'SUCCESS', please refer to the 400s HTTP error codes. See ErrorResponse object for details.
*/
@JsonAdapter(RequestStatusEnum.Adapter.class)
public enum RequestStatusEnum {
SUCCESS("SUCCESS");
private String value;
RequestStatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static RequestStatusEnum fromValue(String text) {
for (RequestStatusEnum b : RequestStatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final RequestStatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public RequestStatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return RequestStatusEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("requestStatus")
private RequestStatusEnum requestStatus = null;
public AccessTokenResponse accessToken(String accessToken) {
this.accessToken = accessToken;
return this;
}
/**
* Access Token for authentication
* @return accessToken
**/
@ApiModelProperty(example = "Rft3dqrs56Blirls56a", value = "Access Token for authentication")
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public AccessTokenResponse clientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
return this;
}
/**
* Echoes back the value from the request header for tracking
* @return clientRequestId
**/
@ApiModelProperty(example = "30dd879c-ee2f-11db-8314-0800200c9a66", value = "Echoes back the value from the request header for tracking")
public String getClientRequestId() {
return clientRequestId;
}
public void setClientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
}
public AccessTokenResponse apiTraceId(String apiTraceId) {
this.apiTraceId = apiTraceId;
return this;
}
/**
* Request identifier in API. Use this to request logs from support.
* @return apiTraceId
**/
@ApiModelProperty(example = "1231234135", value = "Request identifier in API. Use this to request logs from support.")
public String getApiTraceId() {
return apiTraceId;
}
public void setApiTraceId(String apiTraceId) {
this.apiTraceId = apiTraceId;
}
public AccessTokenResponse requestStatus(RequestStatusEnum requestStatus) {
this.requestStatus = requestStatus;
return this;
}
/**
* The result of the requested operation. If this is anything other than 'SUCCESS', please refer to the 400s HTTP error codes. See ErrorResponse object for details.
* @return requestStatus
**/
@ApiModelProperty(value = "The result of the requested operation. If this is anything other than 'SUCCESS', please refer to the 400s HTTP error codes. See ErrorResponse object for details.")
public RequestStatusEnum getRequestStatus() {
return requestStatus;
}
public void setRequestStatus(RequestStatusEnum requestStatus) {
this.requestStatus = requestStatus;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AccessTokenResponse accessTokenResponse = (AccessTokenResponse) o;
return Objects.equals(this.accessToken, accessTokenResponse.accessToken) &&
Objects.equals(this.clientRequestId, accessTokenResponse.clientRequestId) &&
Objects.equals(this.apiTraceId, accessTokenResponse.apiTraceId) &&
Objects.equals(this.requestStatus, accessTokenResponse.requestStatus);
}
@Override
public int hashCode() {
return Objects.hash(accessToken, clientRequestId, apiTraceId, requestStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AccessTokenResponse {\n");
sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n");
sb.append(" clientRequestId: ").append(toIndentedString(clientRequestId)).append("\n");
sb.append(" apiTraceId: ").append(toIndentedString(apiTraceId)).append("\n");
sb.append(" requestStatus: ").append(toIndentedString(requestStatus)).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