nl.reinkrul.nuts.auth.CreateJwtGrantRequest Maven / Gradle / Ivy
/*
* 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;
import java.util.ArrayList;
import java.util.List;
import nl.reinkrul.nuts.auth.VerifiableCredential;
import nl.reinkrul.nuts.auth.VerifiablePresentation;
/**
* Request for a JWT Grant. The grant can be used during a Access Token Request in the assertion field
*/
@ApiModel(description = "Request for a JWT Grant. The grant can be used during a Access Token Request in the assertion field")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-14T14:56:35.626800+02:00[Europe/Amsterdam]")
public class CreateJwtGrantRequest {
public static final String SERIALIZED_NAME_AUTHORIZER = "authorizer";
@SerializedName(SERIALIZED_NAME_AUTHORIZER)
private String authorizer;
public static final String SERIALIZED_NAME_REQUESTER = "requester";
@SerializedName(SERIALIZED_NAME_REQUESTER)
private String requester;
public static final String SERIALIZED_NAME_IDENTITY = "identity";
@SerializedName(SERIALIZED_NAME_IDENTITY)
private VerifiablePresentation identity;
public static final String SERIALIZED_NAME_SERVICE = "service";
@SerializedName(SERIALIZED_NAME_SERVICE)
private String service;
public static final String SERIALIZED_NAME_CREDENTIALS = "credentials";
@SerializedName(SERIALIZED_NAME_CREDENTIALS)
private List credentials = new ArrayList();
public CreateJwtGrantRequest authorizer(String authorizer) {
this.authorizer = authorizer;
return this;
}
/**
* Get authorizer
* @return authorizer
**/
@ApiModelProperty(required = true, value = "")
public String getAuthorizer() {
return authorizer;
}
public void setAuthorizer(String authorizer) {
this.authorizer = authorizer;
}
public CreateJwtGrantRequest requester(String requester) {
this.requester = requester;
return this;
}
/**
* Get requester
* @return requester
**/
@ApiModelProperty(required = true, value = "")
public String getRequester() {
return requester;
}
public void setRequester(String requester) {
this.requester = requester;
}
public CreateJwtGrantRequest identity(VerifiablePresentation identity) {
this.identity = identity;
return this;
}
/**
* Get identity
* @return identity
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public VerifiablePresentation getIdentity() {
return identity;
}
public void setIdentity(VerifiablePresentation identity) {
this.identity = identity;
}
public CreateJwtGrantRequest service(String service) {
this.service = service;
return this;
}
/**
* The service for which this access token can be used. The right oauth endpoint is selected based on the service.
* @return service
**/
@ApiModelProperty(example = "nuts-patient-transfer", required = true, value = "The service for which this access token can be used. The right oauth endpoint is selected based on the service.")
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public CreateJwtGrantRequest credentials(List credentials) {
this.credentials = credentials;
return this;
}
public CreateJwtGrantRequest addCredentialsItem(VerifiableCredential credentialsItem) {
this.credentials.add(credentialsItem);
return this;
}
/**
* Get credentials
* @return credentials
**/
@ApiModelProperty(required = true, value = "")
public List getCredentials() {
return credentials;
}
public void setCredentials(List credentials) {
this.credentials = credentials;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateJwtGrantRequest createJwtGrantRequest = (CreateJwtGrantRequest) o;
return Objects.equals(this.authorizer, createJwtGrantRequest.authorizer) &&
Objects.equals(this.requester, createJwtGrantRequest.requester) &&
Objects.equals(this.identity, createJwtGrantRequest.identity) &&
Objects.equals(this.service, createJwtGrantRequest.service) &&
Objects.equals(this.credentials, createJwtGrantRequest.credentials);
}
@Override
public int hashCode() {
return Objects.hash(authorizer, requester, identity, service, credentials);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateJwtGrantRequest {\n");
sb.append(" authorizer: ").append(toIndentedString(authorizer)).append("\n");
sb.append(" requester: ").append(toIndentedString(requester)).append("\n");
sb.append(" identity: ").append(toIndentedString(identity)).append("\n");
sb.append(" service: ").append(toIndentedString(service)).append("\n");
sb.append(" credentials: ").append(toIndentedString(credentials)).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