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

io.formapi.SubmissionDataRequest Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
/*
 * API v1
 * FormAPI is a service that helps you fill out and sign PDF templates.
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.formapi;

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;

/**
 * SubmissionDataRequest
 */
@javax.annotation.Generated(value = "io.formapi.codegen.FormApiJavaClientCodegen", date = "2018-12-18T08:05:56.906+07:00[Asia/Bangkok]")
public class SubmissionDataRequest {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id = null;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name = null;

  public static final String SERIALIZED_NAME_EMAIL = "email";
  @SerializedName(SERIALIZED_NAME_EMAIL)
  private String email = null;

  public static final String SERIALIZED_NAME_ORDER = "order";
  @SerializedName(SERIALIZED_NAME_ORDER)
  private Integer order = null;

  public static final String SERIALIZED_NAME_FIELDS = "fields";
  @SerializedName(SERIALIZED_NAME_FIELDS)
  private List fields = new ArrayList();

  public static final String SERIALIZED_NAME_METADATA = "metadata";
  @SerializedName(SERIALIZED_NAME_METADATA)
  private Object metadata = null;

  /**
   * Gets or Sets state
   */
  @JsonAdapter(StateEnum.Adapter.class)
  public enum StateEnum {
    PENDING("pending"),
    
    COMPLETED("completed");

    private String value;

    StateEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static StateEnum fromValue(String text) {
      for (StateEnum b : StateEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + text + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public StateEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return StateEnum.fromValue(String.valueOf(value));
      }
    }
  }

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private StateEnum state = null;

  public static final String SERIALIZED_NAME_VIEWED_AT = "viewed_at";
  @SerializedName(SERIALIZED_NAME_VIEWED_AT)
  private String viewedAt = null;

  public static final String SERIALIZED_NAME_COMPLETED_AT = "completed_at";
  @SerializedName(SERIALIZED_NAME_COMPLETED_AT)
  private String completedAt = null;

  /**
   * Gets or Sets authType
   */
  @JsonAdapter(AuthTypeEnum.Adapter.class)
  public enum AuthTypeEnum {
    NONE("none"),
    
    PASSWORD("password"),
    
    OAUTH("oauth"),
    
    EMAIL_LINK("email_link"),
    
    PHONE_NUMBER("phone_number"),
    
    LDAP("ldap"),
    
    SAML("saml");

    private String value;

    AuthTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AuthTypeEnum fromValue(String text) {
      for (AuthTypeEnum b : AuthTypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + text + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final AuthTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AuthTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AuthTypeEnum.fromValue(String.valueOf(value));
      }
    }
  }

  public static final String SERIALIZED_NAME_AUTH_TYPE = "auth_type";
  @SerializedName(SERIALIZED_NAME_AUTH_TYPE)
  private AuthTypeEnum authType = null;

  /**
   * Gets or Sets authSecondFactorType
   */
  @JsonAdapter(AuthSecondFactorTypeEnum.Adapter.class)
  public enum AuthSecondFactorTypeEnum {
    NONE("none"),
    
    PHONE_NUMBER("phone_number"),
    
    TOTP("totp"),
    
    MOBILE_PUSH("mobile_push"),
    
    SECURITY_KEY("security_key"),
    
    FINGERPRINT("fingerprint");

    private String value;

    AuthSecondFactorTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AuthSecondFactorTypeEnum fromValue(String text) {
      for (AuthSecondFactorTypeEnum b : AuthSecondFactorTypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + text + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final AuthSecondFactorTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AuthSecondFactorTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AuthSecondFactorTypeEnum.fromValue(String.valueOf(value));
      }
    }
  }

  public static final String SERIALIZED_NAME_AUTH_SECOND_FACTOR_TYPE = "auth_second_factor_type";
  @SerializedName(SERIALIZED_NAME_AUTH_SECOND_FACTOR_TYPE)
  private AuthSecondFactorTypeEnum authSecondFactorType = null;

  public static final String SERIALIZED_NAME_AUTH_PROVIDER = "auth_provider";
  @SerializedName(SERIALIZED_NAME_AUTH_PROVIDER)
  private String authProvider = null;

  public static final String SERIALIZED_NAME_AUTH_SESSION_STARTED_AT = "auth_session_started_at";
  @SerializedName(SERIALIZED_NAME_AUTH_SESSION_STARTED_AT)
  private String authSessionStartedAt = null;

  public static final String SERIALIZED_NAME_AUTH_SESSION_ID_HASH = "auth_session_id_hash";
  @SerializedName(SERIALIZED_NAME_AUTH_SESSION_ID_HASH)
  private String authSessionIdHash = null;

  public static final String SERIALIZED_NAME_AUTH_USER_ID_HASH = "auth_user_id_hash";
  @SerializedName(SERIALIZED_NAME_AUTH_USER_ID_HASH)
  private String authUserIdHash = null;

  public static final String SERIALIZED_NAME_AUTH_USERNAME_HASH = "auth_username_hash";
  @SerializedName(SERIALIZED_NAME_AUTH_USERNAME_HASH)
  private String authUsernameHash = null;

  public static final String SERIALIZED_NAME_AUTH_PHONE_NUMBER_HASH = "auth_phone_number_hash";
  @SerializedName(SERIALIZED_NAME_AUTH_PHONE_NUMBER_HASH)
  private String authPhoneNumberHash = null;

  public SubmissionDataRequest id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(required = true, value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public SubmissionDataRequest name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(required = true, value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public SubmissionDataRequest email(String email) {
    this.email = email;
    return this;
  }

   /**
   * Get email
   * @return email
  **/
  @ApiModelProperty(required = true, value = "")
  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public SubmissionDataRequest order(Integer order) {
    this.order = order;
    return this;
  }

   /**
   * Get order
   * @return order
  **/
  @ApiModelProperty(required = true, value = "")
  public Integer getOrder() {
    return order;
  }

  public void setOrder(Integer order) {
    this.order = order;
  }

  public SubmissionDataRequest fields(List fields) {
    this.fields = fields;
    return this;
  }

  public SubmissionDataRequest addFieldsItem(String fieldsItem) {
    this.fields.add(fieldsItem);
    return this;
  }

   /**
   * Get fields
   * @return fields
  **/
  @ApiModelProperty(required = true, value = "")
  public List getFields() {
    return fields;
  }

  public void setFields(List fields) {
    this.fields = fields;
  }

  public SubmissionDataRequest metadata(Object metadata) {
    this.metadata = metadata;
    return this;
  }

   /**
   * Get metadata
   * @return metadata
  **/
  @ApiModelProperty(required = true, value = "")
  public Object getMetadata() {
    return metadata;
  }

  public void setMetadata(Object metadata) {
    this.metadata = metadata;
  }

  public SubmissionDataRequest state(StateEnum state) {
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @ApiModelProperty(required = true, value = "")
  public StateEnum getState() {
    return state;
  }

  public void setState(StateEnum state) {
    this.state = state;
  }

  public SubmissionDataRequest viewedAt(String viewedAt) {
    this.viewedAt = viewedAt;
    return this;
  }

   /**
   * Get viewedAt
   * @return viewedAt
  **/
  @ApiModelProperty(value = "")
  public String getViewedAt() {
    return viewedAt;
  }

  public void setViewedAt(String viewedAt) {
    this.viewedAt = viewedAt;
  }

  public SubmissionDataRequest completedAt(String completedAt) {
    this.completedAt = completedAt;
    return this;
  }

   /**
   * Get completedAt
   * @return completedAt
  **/
  @ApiModelProperty(value = "")
  public String getCompletedAt() {
    return completedAt;
  }

  public void setCompletedAt(String completedAt) {
    this.completedAt = completedAt;
  }

  public SubmissionDataRequest authType(AuthTypeEnum authType) {
    this.authType = authType;
    return this;
  }

   /**
   * Get authType
   * @return authType
  **/
  @ApiModelProperty(value = "")
  public AuthTypeEnum getAuthType() {
    return authType;
  }

  public void setAuthType(AuthTypeEnum authType) {
    this.authType = authType;
  }

  public SubmissionDataRequest authSecondFactorType(AuthSecondFactorTypeEnum authSecondFactorType) {
    this.authSecondFactorType = authSecondFactorType;
    return this;
  }

   /**
   * Get authSecondFactorType
   * @return authSecondFactorType
  **/
  @ApiModelProperty(value = "")
  public AuthSecondFactorTypeEnum getAuthSecondFactorType() {
    return authSecondFactorType;
  }

  public void setAuthSecondFactorType(AuthSecondFactorTypeEnum authSecondFactorType) {
    this.authSecondFactorType = authSecondFactorType;
  }

  public SubmissionDataRequest authProvider(String authProvider) {
    this.authProvider = authProvider;
    return this;
  }

   /**
   * Get authProvider
   * @return authProvider
  **/
  @ApiModelProperty(value = "")
  public String getAuthProvider() {
    return authProvider;
  }

  public void setAuthProvider(String authProvider) {
    this.authProvider = authProvider;
  }

  public SubmissionDataRequest authSessionStartedAt(String authSessionStartedAt) {
    this.authSessionStartedAt = authSessionStartedAt;
    return this;
  }

   /**
   * Get authSessionStartedAt
   * @return authSessionStartedAt
  **/
  @ApiModelProperty(value = "")
  public String getAuthSessionStartedAt() {
    return authSessionStartedAt;
  }

  public void setAuthSessionStartedAt(String authSessionStartedAt) {
    this.authSessionStartedAt = authSessionStartedAt;
  }

  public SubmissionDataRequest authSessionIdHash(String authSessionIdHash) {
    this.authSessionIdHash = authSessionIdHash;
    return this;
  }

   /**
   * Get authSessionIdHash
   * @return authSessionIdHash
  **/
  @ApiModelProperty(value = "")
  public String getAuthSessionIdHash() {
    return authSessionIdHash;
  }

  public void setAuthSessionIdHash(String authSessionIdHash) {
    this.authSessionIdHash = authSessionIdHash;
  }

  public SubmissionDataRequest authUserIdHash(String authUserIdHash) {
    this.authUserIdHash = authUserIdHash;
    return this;
  }

   /**
   * Get authUserIdHash
   * @return authUserIdHash
  **/
  @ApiModelProperty(value = "")
  public String getAuthUserIdHash() {
    return authUserIdHash;
  }

  public void setAuthUserIdHash(String authUserIdHash) {
    this.authUserIdHash = authUserIdHash;
  }

  public SubmissionDataRequest authUsernameHash(String authUsernameHash) {
    this.authUsernameHash = authUsernameHash;
    return this;
  }

   /**
   * Get authUsernameHash
   * @return authUsernameHash
  **/
  @ApiModelProperty(value = "")
  public String getAuthUsernameHash() {
    return authUsernameHash;
  }

  public void setAuthUsernameHash(String authUsernameHash) {
    this.authUsernameHash = authUsernameHash;
  }

  public SubmissionDataRequest authPhoneNumberHash(String authPhoneNumberHash) {
    this.authPhoneNumberHash = authPhoneNumberHash;
    return this;
  }

   /**
   * Get authPhoneNumberHash
   * @return authPhoneNumberHash
  **/
  @ApiModelProperty(value = "")
  public String getAuthPhoneNumberHash() {
    return authPhoneNumberHash;
  }

  public void setAuthPhoneNumberHash(String authPhoneNumberHash) {
    this.authPhoneNumberHash = authPhoneNumberHash;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubmissionDataRequest submissionDataRequest = (SubmissionDataRequest) o;
    return Objects.equals(this.id, submissionDataRequest.id) &&
        Objects.equals(this.name, submissionDataRequest.name) &&
        Objects.equals(this.email, submissionDataRequest.email) &&
        Objects.equals(this.order, submissionDataRequest.order) &&
        Objects.equals(this.fields, submissionDataRequest.fields) &&
        Objects.equals(this.metadata, submissionDataRequest.metadata) &&
        Objects.equals(this.state, submissionDataRequest.state) &&
        Objects.equals(this.viewedAt, submissionDataRequest.viewedAt) &&
        Objects.equals(this.completedAt, submissionDataRequest.completedAt) &&
        Objects.equals(this.authType, submissionDataRequest.authType) &&
        Objects.equals(this.authSecondFactorType, submissionDataRequest.authSecondFactorType) &&
        Objects.equals(this.authProvider, submissionDataRequest.authProvider) &&
        Objects.equals(this.authSessionStartedAt, submissionDataRequest.authSessionStartedAt) &&
        Objects.equals(this.authSessionIdHash, submissionDataRequest.authSessionIdHash) &&
        Objects.equals(this.authUserIdHash, submissionDataRequest.authUserIdHash) &&
        Objects.equals(this.authUsernameHash, submissionDataRequest.authUsernameHash) &&
        Objects.equals(this.authPhoneNumberHash, submissionDataRequest.authPhoneNumberHash);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, email, order, fields, metadata, state, viewedAt, completedAt, authType, authSecondFactorType, authProvider, authSessionStartedAt, authSessionIdHash, authUserIdHash, authUsernameHash, authPhoneNumberHash);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubmissionDataRequest {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    order: ").append(toIndentedString(order)).append("\n");
    sb.append("    fields: ").append(toIndentedString(fields)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    viewedAt: ").append(toIndentedString(viewedAt)).append("\n");
    sb.append("    completedAt: ").append(toIndentedString(completedAt)).append("\n");
    sb.append("    authType: ").append(toIndentedString(authType)).append("\n");
    sb.append("    authSecondFactorType: ").append(toIndentedString(authSecondFactorType)).append("\n");
    sb.append("    authProvider: ").append(toIndentedString(authProvider)).append("\n");
    sb.append("    authSessionStartedAt: ").append(toIndentedString(authSessionStartedAt)).append("\n");
    sb.append("    authSessionIdHash: ").append(toIndentedString(authSessionIdHash)).append("\n");
    sb.append("    authUserIdHash: ").append(toIndentedString(authUserIdHash)).append("\n");
    sb.append("    authUsernameHash: ").append(toIndentedString(authUsernameHash)).append("\n");
    sb.append("    authPhoneNumberHash: ").append(toIndentedString(authPhoneNumberHash)).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