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

org.openapitools.client.model.QueryRunCreateRequest Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/

package org.openapitools.client.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 org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * QueryRunCreateRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class QueryRunCreateRequest {
  public static final String SERIALIZED_NAME_COLUMN_SEPARATOR = "column_separator";
  @SerializedName(SERIALIZED_NAME_COLUMN_SEPARATOR)
  private String columnSeparator;

  /**
   * If supplied, Zuora with compress the output file using the specified compression algorithm.
   */
  @JsonAdapter(ContentEncodingEnum.Adapter.class)
  public enum ContentEncodingEnum {
    GZIP("gzip"),
    
    ZIP("zip"),
    
    NONE("none"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static ContentEncodingEnum fromValue(String value) {
      for (ContentEncodingEnum b : ContentEncodingEnum.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 ContentEncodingEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_CONTENT_ENCODING = "content_encoding";
  @SerializedName(SERIALIZED_NAME_CONTENT_ENCODING)
  private ContentEncodingEnum contentEncoding;

  public static final String SERIALIZED_NAME_ENCRYPTION_KEY = "encryption_key";
  @SerializedName(SERIALIZED_NAME_ENCRYPTION_KEY)
  private String encryptionKey;

  /**
   * The type of the file returned.
   */
  @JsonAdapter(ContentTypeEnum.Adapter.class)
  public enum ContentTypeEnum {
    JSON("json"),
    
    CSV("csv"),
    
    TSV("tsv"),
    
    DSV("dsv"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static ContentTypeEnum fromValue(String value) {
      for (ContentTypeEnum b : ContentTypeEnum.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 ContentTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type";
  @SerializedName(SERIALIZED_NAME_CONTENT_TYPE)
  private ContentTypeEnum contentType;

  public static final String SERIALIZED_NAME_SQL = "sql";
  @SerializedName(SERIALIZED_NAME_SQL)
  private String sql;

  public static final String SERIALIZED_NAME_READ_DELETED = "read_deleted";
  @SerializedName(SERIALIZED_NAME_READ_DELETED)
  private Boolean readDeleted;

  public QueryRunCreateRequest() { 
  }

  public QueryRunCreateRequest columnSeparator(String columnSeparator) {
    
    this.columnSeparator = columnSeparator;
    return this;
  }

   /**
   * The character used as delimiter to separate values in the output file.
   * @return columnSeparator
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The character used as delimiter to separate values in the output file.")

  public String getColumnSeparator() {
    return columnSeparator;
  }


  public void setColumnSeparator(String columnSeparator) {
    this.columnSeparator = columnSeparator;
  }


  public QueryRunCreateRequest contentEncoding(ContentEncodingEnum contentEncoding) {
    
    this.contentEncoding = contentEncoding;
    return this;
  }

   /**
   * If supplied, Zuora with compress the output file using the specified compression algorithm.
   * @return contentEncoding
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If supplied, Zuora with compress the output file using the specified compression algorithm.")

  public ContentEncodingEnum getContentEncoding() {
    return contentEncoding;
  }


  public void setContentEncoding(ContentEncodingEnum contentEncoding) {
    this.contentEncoding = contentEncoding;
  }


  public QueryRunCreateRequest encryptionKey(String encryptionKey) {
    
    this.encryptionKey = encryptionKey;
    return this;
  }

   /**
   * Base64-encoded public key of a 1024-bit RSA key-pair. If you set this field, Zuora will encrypt the query results using the provided public key. You must use the corresponding private key to decrypt the query results.
   * @return encryptionKey
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Base64-encoded public key of a 1024-bit RSA key-pair. If you set this field, Zuora will encrypt the query results using the provided public key. You must use the corresponding private key to decrypt the query results.")

  public String getEncryptionKey() {
    return encryptionKey;
  }


  public void setEncryptionKey(String encryptionKey) {
    this.encryptionKey = encryptionKey;
  }


  public QueryRunCreateRequest contentType(ContentTypeEnum contentType) {
    
    this.contentType = contentType;
    return this;
  }

   /**
   * The type of the file returned.
   * @return contentType
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The type of the file returned.")

  public ContentTypeEnum getContentType() {
    return contentType;
  }


  public void setContentType(ContentTypeEnum contentType) {
    this.contentType = contentType;
  }


  public QueryRunCreateRequest sql(String sql) {
    
    this.sql = sql;
    return this;
  }

   /**
   * The SQL statement of the query.
   * @return sql
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The SQL statement of the query.")

  public String getSql() {
    return sql;
  }


  public void setSql(String sql) {
    this.sql = sql;
  }


  public QueryRunCreateRequest readDeleted(Boolean readDeleted) {
    
    this.readDeleted = readDeleted;
    return this;
  }

   /**
   * If set to `true`, any deleted records are included in the response.
   * @return readDeleted
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If set to `true`, any deleted records are included in the response.")

  public Boolean getReadDeleted() {
    return readDeleted;
  }


  public void setReadDeleted(Boolean readDeleted) {
    this.readDeleted = readDeleted;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    QueryRunCreateRequest queryRunCreateRequest = (QueryRunCreateRequest) o;
    return Objects.equals(this.columnSeparator, queryRunCreateRequest.columnSeparator) &&
        Objects.equals(this.contentEncoding, queryRunCreateRequest.contentEncoding) &&
        Objects.equals(this.encryptionKey, queryRunCreateRequest.encryptionKey) &&
        Objects.equals(this.contentType, queryRunCreateRequest.contentType) &&
        Objects.equals(this.sql, queryRunCreateRequest.sql) &&
        Objects.equals(this.readDeleted, queryRunCreateRequest.readDeleted);
  }

  @Override
  public int hashCode() {
    return Objects.hash(columnSeparator, contentEncoding, encryptionKey, contentType, sql, readDeleted);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class QueryRunCreateRequest {\n");
    sb.append("    columnSeparator: ").append(toIndentedString(columnSeparator)).append("\n");
    sb.append("    contentEncoding: ").append(toIndentedString(contentEncoding)).append("\n");
    sb.append("    encryptionKey: ").append(toIndentedString(encryptionKey)).append("\n");
    sb.append("    contentType: ").append(toIndentedString(contentType)).append("\n");
    sb.append("    sql: ").append(toIndentedString(sql)).append("\n");
    sb.append("    readDeleted: ").append(toIndentedString(readDeleted)).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