nl.reinkrul.nuts.auth.AccessTokenRequestFailedResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java client library for using the Nuts Node's REST API.
/*
* Nuts Auth Service API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.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 nl.reinkrul.nuts.auth;
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;
/**
* Error response when access token request fails as described in rfc6749 section 5.2
*/
@ApiModel(description = "Error response when access token request fails as described in rfc6749 section 5.2")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-14T14:56:35.626800+02:00[Europe/Amsterdam]")
public class AccessTokenRequestFailedResponse {
/**
* Gets or Sets error
*/
@JsonAdapter(ErrorEnum.Adapter.class)
public enum ErrorEnum {
INVALID_REQUEST("invalid_request"),
INVALID_GRANT("invalid_grant"),
UNSUPPORTED_GRANT_TYPE("unsupported_grant_type");
private String value;
ErrorEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ErrorEnum fromValue(String value) {
for (ErrorEnum b : ErrorEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final ErrorEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ErrorEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ErrorEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ERROR = "error";
@SerializedName(SERIALIZED_NAME_ERROR)
private ErrorEnum error;
public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description";
@SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION)
private String errorDescription;
public AccessTokenRequestFailedResponse error(ErrorEnum error) {
this.error = error;
return this;
}
/**
* Get error
* @return error
**/
@ApiModelProperty(required = true, value = "")
public ErrorEnum getError() {
return error;
}
public void setError(ErrorEnum error) {
this.error = error;
}
public AccessTokenRequestFailedResponse errorDescription(String errorDescription) {
this.errorDescription = errorDescription;
return this;
}
/**
* Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred.
* @return errorDescription
**/
@ApiModelProperty(required = true, value = "Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. ")
public String getErrorDescription() {
return errorDescription;
}
public void setErrorDescription(String errorDescription) {
this.errorDescription = errorDescription;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AccessTokenRequestFailedResponse accessTokenRequestFailedResponse = (AccessTokenRequestFailedResponse) o;
return Objects.equals(this.error, accessTokenRequestFailedResponse.error) &&
Objects.equals(this.errorDescription, accessTokenRequestFailedResponse.errorDescription);
}
@Override
public int hashCode() {
return Objects.hash(error, errorDescription);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AccessTokenRequestFailedResponse {\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy