All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sh.ory.hydra.model.TrustJwtGrantIssuerBody Maven / Gradle / Ivy

/*
 * Ory Oathkeeper API
 * Documentation for all of Ory Oathkeeper's APIs. 
 *
 * The version of the OpenAPI document: v1.11.6
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package sh.ory.hydra.model;

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.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import sh.ory.hydra.model.JSONWebKey;

/**
 * TrustJwtGrantIssuerBody
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-02-23T08:12:00.883126307Z[Etc/UTC]")
public class TrustJwtGrantIssuerBody {
  public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at";
  @SerializedName(SERIALIZED_NAME_EXPIRES_AT)
  private OffsetDateTime expiresAt;

  public static final String SERIALIZED_NAME_ISSUER = "issuer";
  @SerializedName(SERIALIZED_NAME_ISSUER)
  private String issuer;

  public static final String SERIALIZED_NAME_JWK = "jwk";
  @SerializedName(SERIALIZED_NAME_JWK)
  private JSONWebKey jwk;

  public static final String SERIALIZED_NAME_SCOPE = "scope";
  @SerializedName(SERIALIZED_NAME_SCOPE)
  private List scope = new ArrayList<>();

  public static final String SERIALIZED_NAME_SUBJECT = "subject";
  @SerializedName(SERIALIZED_NAME_SUBJECT)
  private String subject;

  public TrustJwtGrantIssuerBody() { 
  }

  public TrustJwtGrantIssuerBody expiresAt(OffsetDateTime expiresAt) {
    
    this.expiresAt = expiresAt;
    return this;
  }

   /**
   * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".
   * @return expiresAt
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".")

  public OffsetDateTime getExpiresAt() {
    return expiresAt;
  }


  public void setExpiresAt(OffsetDateTime expiresAt) {
    this.expiresAt = expiresAt;
  }


  public TrustJwtGrantIssuerBody issuer(String issuer) {
    
    this.issuer = issuer;
    return this;
  }

   /**
   * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).
   * @return issuer
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "https://jwt-idp.example.com", required = true, value = "The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).")

  public String getIssuer() {
    return issuer;
  }


  public void setIssuer(String issuer) {
    this.issuer = issuer;
  }


  public TrustJwtGrantIssuerBody jwk(JSONWebKey jwk) {
    
    this.jwk = jwk;
    return this;
  }

   /**
   * Get jwk
   * @return jwk
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")

  public JSONWebKey getJwk() {
    return jwk;
  }


  public void setJwk(JSONWebKey jwk) {
    this.jwk = jwk;
  }


  public TrustJwtGrantIssuerBody scope(List scope) {
    
    this.scope = scope;
    return this;
  }

  public TrustJwtGrantIssuerBody addScopeItem(String scopeItem) {
    this.scope.add(scopeItem);
    return this;
  }

   /**
   * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])
   * @return scope
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "[\"openid\",\"offline\"]", required = true, value = "The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])")

  public List getScope() {
    return scope;
  }


  public void setScope(List scope) {
    this.scope = scope;
  }


  public TrustJwtGrantIssuerBody subject(String subject) {
    
    this.subject = subject;
    return this;
  }

   /**
   * The \"subject\" identifies the principal that is the subject of the JWT.
   * @return subject
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "[email protected]", required = true, value = "The \"subject\" identifies the principal that is the subject of the JWT.")

  public String getSubject() {
    return subject;
  }


  public void setSubject(String subject) {
    this.subject = subject;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TrustJwtGrantIssuerBody trustJwtGrantIssuerBody = (TrustJwtGrantIssuerBody) o;
    return Objects.equals(this.expiresAt, trustJwtGrantIssuerBody.expiresAt) &&
        Objects.equals(this.issuer, trustJwtGrantIssuerBody.issuer) &&
        Objects.equals(this.jwk, trustJwtGrantIssuerBody.jwk) &&
        Objects.equals(this.scope, trustJwtGrantIssuerBody.scope) &&
        Objects.equals(this.subject, trustJwtGrantIssuerBody.subject);
  }

  @Override
  public int hashCode() {
    return Objects.hash(expiresAt, issuer, jwk, scope, subject);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TrustJwtGrantIssuerBody {\n");
    sb.append("    expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
    sb.append("    issuer: ").append(toIndentedString(issuer)).append("\n");
    sb.append("    jwk: ").append(toIndentedString(jwk)).append("\n");
    sb.append("    scope: ").append(toIndentedString(scope)).append("\n");
    sb.append("    subject: ").append(toIndentedString(subject)).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 - 2024 Weber Informatics LLC | Privacy Policy