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

com.ziqni.admin.sdk.model.MemberTokenRequest Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
/*
 * ZIQNI Admin API
 * Ziqni Application Services are used to manage and configure spaces.
 *
 * The version of the OpenAPI document: 3.0.1
 * 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 com.ziqni.admin.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * MemberTokenRequest
 */
@JsonPropertyOrder({
  MemberTokenRequest.JSON_PROPERTY_API_KEY,
  MemberTokenRequest.JSON_PROPERTY_IS_REFERENCE_ID,
  MemberTokenRequest.JSON_PROPERTY_ORIGINS,
  MemberTokenRequest.JSON_PROPERTY_MEMBER,
  MemberTokenRequest.JSON_PROPERTY_EXPIRES,
  MemberTokenRequest.JSON_PROPERTY_RESOURCE
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class MemberTokenRequest {
  public static final String JSON_PROPERTY_API_KEY = "apiKey";
  private String apiKey;

  public static final String JSON_PROPERTY_IS_REFERENCE_ID = "isReferenceId";
  private Boolean isReferenceId;

  public static final String JSON_PROPERTY_ORIGINS = "origins";
  private List origins = null;

  public static final String JSON_PROPERTY_MEMBER = "member";
  private String member;

  public static final String JSON_PROPERTY_EXPIRES = "expires";
  private Integer expires;

  public static final String JSON_PROPERTY_RESOURCE = "resource";
  private String resource;


  public MemberTokenRequest apiKey(String apiKey) {
    this.apiKey = apiKey;
    return this;
  }

   /**
   * The API key to use to generate this token.
   * @return apiKey
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The API key to use to generate this token.")
  @JsonProperty(JSON_PROPERTY_API_KEY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getApiKey() {
    return apiKey;
  }


  @JsonProperty(JSON_PROPERTY_API_KEY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setApiKey(String apiKey) {
    this.apiKey = apiKey;
  }


  public MemberTokenRequest isReferenceId(Boolean isReferenceId) {
    this.isReferenceId = isReferenceId;
    return this;
  }

   /**
   * Default is FALSE, if set to TRUE then the meberId will be assumed to be client provided reference id, if set to false then the memberId will be assumed to be a ZIQNI generated identifier.
   * @return isReferenceId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Default is FALSE, if set to TRUE then the meberId will be assumed to be client provided reference id, if set to false then the memberId will be assumed to be a ZIQNI generated identifier.")
  @JsonProperty(JSON_PROPERTY_IS_REFERENCE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsReferenceId() {
    return isReferenceId;
  }


  @JsonProperty(JSON_PROPERTY_IS_REFERENCE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsReferenceId(Boolean isReferenceId) {
    this.isReferenceId = isReferenceId;
  }


  public MemberTokenRequest origins(List origins) {
    this.origins = origins;
    return this;
  }

  public MemberTokenRequest addOriginsItem(String originsItem) {
    if (this.origins == null) {
      this.origins = new ArrayList<>();
    }
    this.origins.add(originsItem);
    return this;
  }

   /**
   * Allowed origins for the generated token. Leave empty to permit all origins, Alternative provide up to 3 allowed origin URIs like https://my-space.api.ziqni.app 
   * @return origins
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Allowed origins for the generated token. Leave empty to permit all origins, Alternative provide up to 3 allowed origin URIs like https://my-space.api.ziqni.app ")
  @JsonProperty(JSON_PROPERTY_ORIGINS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getOrigins() {
    return origins;
  }


  @JsonProperty(JSON_PROPERTY_ORIGINS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOrigins(List origins) {
    this.origins = origins;
  }


  public MemberTokenRequest member(String member) {
    this.member = member;
    return this;
  }

   /**
   * The identifier used to find the member information. if this value is set to \"__PUBLIC__\" and isReferenceId is set to \"FALSE\" then a genral use, non-member specific token will be issued
   * @return member
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The identifier used to find the member information. if this value is set to \"__PUBLIC__\" and isReferenceId is set to \"FALSE\" then a genral use, non-member specific token will be issued")
  @JsonProperty(JSON_PROPERTY_MEMBER)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getMember() {
    return member;
  }


  @JsonProperty(JSON_PROPERTY_MEMBER)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMember(String member) {
    this.member = member;
  }


  public MemberTokenRequest expires(Integer expires) {
    this.expires = expires;
    return this;
  }

   /**
   * The number of minutes this token will be valid for. If left blank the token will only be valid for 30 minutes
   * @return expires
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The number of minutes this token will be valid for. If left blank the token will only be valid for 30 minutes")
  @JsonProperty(JSON_PROPERTY_EXPIRES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getExpires() {
    return expires;
  }


  @JsonProperty(JSON_PROPERTY_EXPIRES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpires(Integer expires) {
    this.expires = expires;
  }


  public MemberTokenRequest resource(String resource) {
    this.resource = resource;
    return this;
  }

   /**
   * This will be ziqni-gapi or similar
   * @return resource
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "This will be ziqni-gapi or similar")
  @JsonProperty(JSON_PROPERTY_RESOURCE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getResource() {
    return resource;
  }


  @JsonProperty(JSON_PROPERTY_RESOURCE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setResource(String resource) {
    this.resource = resource;
  }


  /**
   * Return true if this MemberTokenRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MemberTokenRequest memberTokenRequest = (MemberTokenRequest) o;
    return Objects.equals(this.apiKey, memberTokenRequest.apiKey) &&
        Objects.equals(this.isReferenceId, memberTokenRequest.isReferenceId) &&
        Objects.equals(this.origins, memberTokenRequest.origins) &&
        Objects.equals(this.member, memberTokenRequest.member) &&
        Objects.equals(this.expires, memberTokenRequest.expires) &&
        Objects.equals(this.resource, memberTokenRequest.resource);
  }

  @Override
  public int hashCode() {
    return Objects.hash(apiKey, isReferenceId, origins, member, expires, resource);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MemberTokenRequest {\n");
    sb.append("    apiKey: ").append(toIndentedString(apiKey)).append("\n");
    sb.append("    isReferenceId: ").append(toIndentedString(isReferenceId)).append("\n");
    sb.append("    origins: ").append(toIndentedString(origins)).append("\n");
    sb.append("    member: ").append(toIndentedString(member)).append("\n");
    sb.append("    expires: ").append(toIndentedString(expires)).append("\n");
    sb.append("    resource: ").append(toIndentedString(resource)).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