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

com.confidentify.client.model.IngestFileRequest Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
/*
 * Confidentify API
 * Services that let you build confidence and identify matches in customer data. ## Features overview * Contact data processing services (tagged with `process`) which offer   validation and enrichment backed by inference and knowledge on complex   data types such as names, email addresses, phone numbers.  * Data matching and searching services (tagged with `matching`) that    allow you to identify duplicated data or matches against third party   contact data list.  * Dataset management services (tagged with `dataset`) that allow record storage and retrieval. ## Integrator notes: * Use the `/auth` endpoint to get an access token. Access tokens are temporary, so design the client the be capable of renewing it. * The APIs are rate-limited, so design the client to be capable of retrying with some delay upon HTTP 429 responses. 
 *
 * 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 com.confidentify.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;

/**
 * IngestFileRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-04-14T23:15:31.038649800+02:00[Europe/Paris]")
public class IngestFileRequest {
  /**
   * Defines the type of file and thus also the type of data ingestion to perform. 
   */
  @JsonAdapter(FileTypeEnum.Adapter.class)
  public enum FileTypeEnum {
    RECORDS_CSV("records.csv"),
    
    DOCUMENTS_ZIP("documents.zip");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

  public static final String SERIALIZED_NAME_FILE_TYPE = "file_type";
  @SerializedName(SERIALIZED_NAME_FILE_TYPE)
  private FileTypeEnum fileType;

  public static final String SERIALIZED_NAME_RECORD_SOURCE = "record_source";
  @SerializedName(SERIALIZED_NAME_RECORD_SOURCE)
  private String recordSource;


  public IngestFileRequest fileType(FileTypeEnum fileType) {
    
    this.fileType = fileType;
    return this;
  }

   /**
   * Defines the type of file and thus also the type of data ingestion to perform. 
   * @return fileType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Defines the type of file and thus also the type of data ingestion to perform. ")

  public FileTypeEnum getFileType() {
    return fileType;
  }


  public void setFileType(FileTypeEnum fileType) {
    this.fileType = fileType;
  }


  public IngestFileRequest recordSource(String recordSource) {
    
    this.recordSource = recordSource;
    return this;
  }

   /**
   * Value to use for any `meta_record_source` fields of ingested records. This could be the original filename or the name of the originating data source. 
   * @return recordSource
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Value to use for any `meta_record_source` fields of ingested records. This could be the original filename or the name of the originating data source. ")

  public String getRecordSource() {
    return recordSource;
  }


  public void setRecordSource(String recordSource) {
    this.recordSource = recordSource;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IngestFileRequest ingestFileRequest = (IngestFileRequest) o;
    return Objects.equals(this.fileType, ingestFileRequest.fileType) &&
        Objects.equals(this.recordSource, ingestFileRequest.recordSource);
  }

  @Override
  public int hashCode() {
    return Objects.hash(fileType, recordSource);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IngestFileRequest {\n");
    sb.append("    fileType: ").append(toIndentedString(fileType)).append("\n");
    sb.append("    recordSource: ").append(toIndentedString(recordSource)).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