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

com.konfigthis.carbonai.client.model.UserFile Maven / Gradle / Ivy

Go to download

Connect external data to LLMs, no matter the source. This library was generated by https://konfigthis.com

There is a newer version: 0.1.51
Show newest version
/*
 * Carbon
 * Connect external data to LLMs, no matter the source.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by Konfig (https://konfigthis.com).
 * Do not edit the class manually.
 */


package com.konfigthis.carbonai.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 com.konfigthis.carbonai.client.model.ChunkPropertiesNullable;
import com.konfigthis.carbonai.client.model.DataSourceType;
import com.konfigthis.carbonai.client.model.EmbeddingProperties;
import com.konfigthis.carbonai.client.model.EmbeddingStorageStatus;
import com.konfigthis.carbonai.client.model.ExternalFileSyncStatuses;
import com.konfigthis.carbonai.client.model.FileStatisticsNullable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import org.apache.commons.lang3.StringUtils;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import com.konfigthis.carbonai.client.JSON;

/**
 * UserFile
 */@javax.annotation.Generated(value = "Generated by https://konfigthis.com")
public class UserFile {
  public static final String SERIALIZED_NAME_TAGS = "tags";
  @SerializedName(SERIALIZED_NAME_TAGS)
  private Object tags;

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Integer id;

  public static final String SERIALIZED_NAME_SOURCE = "source";
  @SerializedName(SERIALIZED_NAME_SOURCE)
  private DataSourceType source;

  public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id";
  @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID)
  private Integer organizationId;

  public static final String SERIALIZED_NAME_ORGANIZATION_SUPPLIED_USER_ID = "organization_supplied_user_id";
  @SerializedName(SERIALIZED_NAME_ORGANIZATION_SUPPLIED_USER_ID)
  private String organizationSuppliedUserId;

  public static final String SERIALIZED_NAME_ORGANIZATION_USER_DATA_SOURCE_ID = "organization_user_data_source_id";
  @SerializedName(SERIALIZED_NAME_ORGANIZATION_USER_DATA_SOURCE_ID)
  private Integer organizationUserDataSourceId;

  public static final String SERIALIZED_NAME_EXTERNAL_FILE_ID = "external_file_id";
  @SerializedName(SERIALIZED_NAME_EXTERNAL_FILE_ID)
  private String externalFileId;

  public static final String SERIALIZED_NAME_EXTERNAL_URL = "external_url";
  @SerializedName(SERIALIZED_NAME_EXTERNAL_URL)
  private String externalUrl;

  public static final String SERIALIZED_NAME_SYNC_STATUS = "sync_status";
  @SerializedName(SERIALIZED_NAME_SYNC_STATUS)
  private ExternalFileSyncStatuses syncStatus;

  public static final String SERIALIZED_NAME_SYNC_ERROR_MESSAGE = "sync_error_message";
  @SerializedName(SERIALIZED_NAME_SYNC_ERROR_MESSAGE)
  private String syncErrorMessage;

  public static final String SERIALIZED_NAME_LAST_SYNC = "last_sync";
  @SerializedName(SERIALIZED_NAME_LAST_SYNC)
  private OffsetDateTime lastSync;

  public static final String SERIALIZED_NAME_FILE_STATISTICS = "file_statistics";
  @SerializedName(SERIALIZED_NAME_FILE_STATISTICS)
  private FileStatisticsNullable fileStatistics;

  public static final String SERIALIZED_NAME_FILE_METADATA = "file_metadata";
  @SerializedName(SERIALIZED_NAME_FILE_METADATA)
  private Object fileMetadata;

  public static final String SERIALIZED_NAME_EMBEDDING_PROPERTIES = "embedding_properties";
  @SerializedName(SERIALIZED_NAME_EMBEDDING_PROPERTIES)
  private Map embeddingProperties = new HashMap<>();

  public static final String SERIALIZED_NAME_CHUNK_SIZE = "chunk_size";
  @SerializedName(SERIALIZED_NAME_CHUNK_SIZE)
  private Integer chunkSize;

  public static final String SERIALIZED_NAME_CHUNK_OVERLAP = "chunk_overlap";
  @SerializedName(SERIALIZED_NAME_CHUNK_OVERLAP)
  private Integer chunkOverlap;

  public static final String SERIALIZED_NAME_CHUNK_PROPERTIES = "chunk_properties";
  @SerializedName(SERIALIZED_NAME_CHUNK_PROPERTIES)
  private ChunkPropertiesNullable chunkProperties;

  public static final String SERIALIZED_NAME_OCR_PROPERTIES = "ocr_properties";
  @SerializedName(SERIALIZED_NAME_OCR_PROPERTIES)
  private Object ocrProperties;

  public static final String SERIALIZED_NAME_OCR_JOB_STARTED_AT = "ocr_job_started_at";
  @SerializedName(SERIALIZED_NAME_OCR_JOB_STARTED_AT)
  private OffsetDateTime ocrJobStartedAt;

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

  public static final String SERIALIZED_NAME_PARENT_ID = "parent_id";
  @SerializedName(SERIALIZED_NAME_PARENT_ID)
  private Integer parentId;

  public static final String SERIALIZED_NAME_ENABLE_AUTO_SYNC = "enable_auto_sync";
  @SerializedName(SERIALIZED_NAME_ENABLE_AUTO_SYNC)
  private Boolean enableAutoSync;

  public static final String SERIALIZED_NAME_PRESIGNED_URL = "presigned_url";
  @SerializedName(SERIALIZED_NAME_PRESIGNED_URL)
  private String presignedUrl;

  public static final String SERIALIZED_NAME_PARSED_TEXT_URL = "parsed_text_url";
  @SerializedName(SERIALIZED_NAME_PARSED_TEXT_URL)
  private String parsedTextUrl;

  public static final String SERIALIZED_NAME_ADDITIONAL_PRESIGNED_URLS = "additional_presigned_urls";
  @SerializedName(SERIALIZED_NAME_ADDITIONAL_PRESIGNED_URLS)
  private Object additionalPresignedUrls;

  public static final String SERIALIZED_NAME_SKIP_EMBEDDING_GENERATION = "skip_embedding_generation";
  @SerializedName(SERIALIZED_NAME_SKIP_EMBEDDING_GENERATION)
  private Boolean skipEmbeddingGeneration;

  public static final String SERIALIZED_NAME_SOURCE_CREATED_AT = "source_created_at";
  @SerializedName(SERIALIZED_NAME_SOURCE_CREATED_AT)
  private OffsetDateTime sourceCreatedAt;

  public static final String SERIALIZED_NAME_GENERATE_SPARSE_VECTORS = "generate_sparse_vectors";
  @SerializedName(SERIALIZED_NAME_GENERATE_SPARSE_VECTORS)
  private Boolean generateSparseVectors;

  public static final String SERIALIZED_NAME_REQUEST_ID = "request_id";
  @SerializedName(SERIALIZED_NAME_REQUEST_ID)
  private String requestId;

  public static final String SERIALIZED_NAME_SYNC_PROPERTIES = "sync_properties";
  @SerializedName(SERIALIZED_NAME_SYNC_PROPERTIES)
  private Object syncProperties;

  public static final String SERIALIZED_NAME_MESSAGES_METADATA = "messages_metadata";
  @SerializedName(SERIALIZED_NAME_MESSAGES_METADATA)
  private Object messagesMetadata;

  public static final String SERIALIZED_NAME_FILE_CONTENTS_DELETED = "file_contents_deleted";
  @SerializedName(SERIALIZED_NAME_FILE_CONTENTS_DELETED)
  private Boolean fileContentsDeleted = false;

  public static final String SERIALIZED_NAME_SUPPORTS_COLD_STORAGE = "supports_cold_storage";
  @SerializedName(SERIALIZED_NAME_SUPPORTS_COLD_STORAGE)
  private Boolean supportsColdStorage;

  public static final String SERIALIZED_NAME_HOT_STORAGE_TIME_TO_LIVE = "hot_storage_time_to_live";
  @SerializedName(SERIALIZED_NAME_HOT_STORAGE_TIME_TO_LIVE)
  private Integer hotStorageTimeToLive;

  public static final String SERIALIZED_NAME_EMBEDDING_STORAGE_STATUS = "embedding_storage_status";
  @SerializedName(SERIALIZED_NAME_EMBEDDING_STORAGE_STATUS)
  private EmbeddingStorageStatus embeddingStorageStatus;

  public static final String SERIALIZED_NAME_CREATED_AT = "created_at";
  @SerializedName(SERIALIZED_NAME_CREATED_AT)
  private OffsetDateTime createdAt;

  public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at";
  @SerializedName(SERIALIZED_NAME_UPDATED_AT)
  private OffsetDateTime updatedAt;

  public UserFile() {
  }

  public UserFile tags(Object tags) {
    
    
    
    
    this.tags = tags;
    return this;
  }

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

  public Object getTags() {
    return tags;
  }


  public void setTags(Object tags) {
    
    
    
    this.tags = tags;
  }


  public UserFile id(Integer id) {
    
    
    
    
    this.id = id;
    return this;
  }

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

  public Integer getId() {
    return id;
  }


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


  public UserFile source(DataSourceType source) {
    
    
    
    
    this.source = source;
    return this;
  }

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

  public DataSourceType getSource() {
    return source;
  }


  public void setSource(DataSourceType source) {
    
    
    
    this.source = source;
  }


  public UserFile organizationId(Integer organizationId) {
    
    
    
    
    this.organizationId = organizationId;
    return this;
  }

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

  public Integer getOrganizationId() {
    return organizationId;
  }


  public void setOrganizationId(Integer organizationId) {
    
    
    
    this.organizationId = organizationId;
  }


  public UserFile organizationSuppliedUserId(String organizationSuppliedUserId) {
    
    
    
    
    this.organizationSuppliedUserId = organizationSuppliedUserId;
    return this;
  }

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

  public String getOrganizationSuppliedUserId() {
    return organizationSuppliedUserId;
  }


  public void setOrganizationSuppliedUserId(String organizationSuppliedUserId) {
    
    
    
    this.organizationSuppliedUserId = organizationSuppliedUserId;
  }


  public UserFile organizationUserDataSourceId(Integer organizationUserDataSourceId) {
    
    
    
    
    this.organizationUserDataSourceId = organizationUserDataSourceId;
    return this;
  }

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

  public Integer getOrganizationUserDataSourceId() {
    return organizationUserDataSourceId;
  }


  public void setOrganizationUserDataSourceId(Integer organizationUserDataSourceId) {
    
    
    
    this.organizationUserDataSourceId = organizationUserDataSourceId;
  }


  public UserFile externalFileId(String externalFileId) {
    
    
    
    
    this.externalFileId = externalFileId;
    return this;
  }

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

  public String getExternalFileId() {
    return externalFileId;
  }


  public void setExternalFileId(String externalFileId) {
    
    
    
    this.externalFileId = externalFileId;
  }


  public UserFile externalUrl(String externalUrl) {
    
    
    
    
    this.externalUrl = externalUrl;
    return this;
  }

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

  public String getExternalUrl() {
    return externalUrl;
  }


  public void setExternalUrl(String externalUrl) {
    
    
    
    this.externalUrl = externalUrl;
  }


  public UserFile syncStatus(ExternalFileSyncStatuses syncStatus) {
    
    
    
    
    this.syncStatus = syncStatus;
    return this;
  }

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

  public ExternalFileSyncStatuses getSyncStatus() {
    return syncStatus;
  }


  public void setSyncStatus(ExternalFileSyncStatuses syncStatus) {
    
    
    
    this.syncStatus = syncStatus;
  }


  public UserFile syncErrorMessage(String syncErrorMessage) {
    
    
    
    
    this.syncErrorMessage = syncErrorMessage;
    return this;
  }

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

  public String getSyncErrorMessage() {
    return syncErrorMessage;
  }


  public void setSyncErrorMessage(String syncErrorMessage) {
    
    
    
    this.syncErrorMessage = syncErrorMessage;
  }


  public UserFile lastSync(OffsetDateTime lastSync) {
    
    
    
    
    this.lastSync = lastSync;
    return this;
  }

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

  public OffsetDateTime getLastSync() {
    return lastSync;
  }


  public void setLastSync(OffsetDateTime lastSync) {
    
    
    
    this.lastSync = lastSync;
  }


  public UserFile fileStatistics(FileStatisticsNullable fileStatistics) {
    
    
    
    
    this.fileStatistics = fileStatistics;
    return this;
  }

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

  public FileStatisticsNullable getFileStatistics() {
    return fileStatistics;
  }


  public void setFileStatistics(FileStatisticsNullable fileStatistics) {
    
    
    
    this.fileStatistics = fileStatistics;
  }


  public UserFile fileMetadata(Object fileMetadata) {
    
    
    
    
    this.fileMetadata = fileMetadata;
    return this;
  }

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

  public Object getFileMetadata() {
    return fileMetadata;
  }


  public void setFileMetadata(Object fileMetadata) {
    
    
    
    this.fileMetadata = fileMetadata;
  }


  public UserFile embeddingProperties(Map embeddingProperties) {
    
    
    
    
    this.embeddingProperties = embeddingProperties;
    return this;
  }

  public UserFile putEmbeddingPropertiesItem(String key, EmbeddingProperties embeddingPropertiesItem) {
    this.embeddingProperties.put(key, embeddingPropertiesItem);
    return this;
  }

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

  public Map getEmbeddingProperties() {
    return embeddingProperties;
  }


  public void setEmbeddingProperties(Map embeddingProperties) {
    
    
    
    this.embeddingProperties = embeddingProperties;
  }


  public UserFile chunkSize(Integer chunkSize) {
    
    
    
    
    this.chunkSize = chunkSize;
    return this;
  }

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

  public Integer getChunkSize() {
    return chunkSize;
  }


  public void setChunkSize(Integer chunkSize) {
    
    
    
    this.chunkSize = chunkSize;
  }


  public UserFile chunkOverlap(Integer chunkOverlap) {
    
    
    
    
    this.chunkOverlap = chunkOverlap;
    return this;
  }

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

  public Integer getChunkOverlap() {
    return chunkOverlap;
  }


  public void setChunkOverlap(Integer chunkOverlap) {
    
    
    
    this.chunkOverlap = chunkOverlap;
  }


  public UserFile chunkProperties(ChunkPropertiesNullable chunkProperties) {
    
    
    
    
    this.chunkProperties = chunkProperties;
    return this;
  }

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

  public ChunkPropertiesNullable getChunkProperties() {
    return chunkProperties;
  }


  public void setChunkProperties(ChunkPropertiesNullable chunkProperties) {
    
    
    
    this.chunkProperties = chunkProperties;
  }


  public UserFile ocrProperties(Object ocrProperties) {
    
    
    
    
    this.ocrProperties = ocrProperties;
    return this;
  }

   /**
   * Get ocrProperties
   * @return ocrProperties
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "{}", required = true, value = "")

  public Object getOcrProperties() {
    return ocrProperties;
  }


  public void setOcrProperties(Object ocrProperties) {
    
    
    
    this.ocrProperties = ocrProperties;
  }


  public UserFile ocrJobStartedAt(OffsetDateTime ocrJobStartedAt) {
    
    
    
    
    this.ocrJobStartedAt = ocrJobStartedAt;
    return this;
  }

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

  public OffsetDateTime getOcrJobStartedAt() {
    return ocrJobStartedAt;
  }


  public void setOcrJobStartedAt(OffsetDateTime ocrJobStartedAt) {
    
    
    
    this.ocrJobStartedAt = ocrJobStartedAt;
  }


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

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

  public String getName() {
    return name;
  }


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


  public UserFile parentId(Integer parentId) {
    
    
    
    
    this.parentId = parentId;
    return this;
  }

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

  public Integer getParentId() {
    return parentId;
  }


  public void setParentId(Integer parentId) {
    
    
    
    this.parentId = parentId;
  }


  public UserFile enableAutoSync(Boolean enableAutoSync) {
    
    
    
    
    this.enableAutoSync = enableAutoSync;
    return this;
  }

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

  public Boolean getEnableAutoSync() {
    return enableAutoSync;
  }


  public void setEnableAutoSync(Boolean enableAutoSync) {
    
    
    
    this.enableAutoSync = enableAutoSync;
  }


  public UserFile presignedUrl(String presignedUrl) {
    
    
    
    
    this.presignedUrl = presignedUrl;
    return this;
  }

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

  public String getPresignedUrl() {
    return presignedUrl;
  }


  public void setPresignedUrl(String presignedUrl) {
    
    
    
    this.presignedUrl = presignedUrl;
  }


  public UserFile parsedTextUrl(String parsedTextUrl) {
    
    
    
    
    this.parsedTextUrl = parsedTextUrl;
    return this;
  }

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

  public String getParsedTextUrl() {
    return parsedTextUrl;
  }


  public void setParsedTextUrl(String parsedTextUrl) {
    
    
    
    this.parsedTextUrl = parsedTextUrl;
  }


  public UserFile additionalPresignedUrls(Object additionalPresignedUrls) {
    
    
    
    
    this.additionalPresignedUrls = additionalPresignedUrls;
    return this;
  }

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

  public Object getAdditionalPresignedUrls() {
    return additionalPresignedUrls;
  }


  public void setAdditionalPresignedUrls(Object additionalPresignedUrls) {
    
    
    
    this.additionalPresignedUrls = additionalPresignedUrls;
  }


  public UserFile skipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
    
    
    
    
    this.skipEmbeddingGeneration = skipEmbeddingGeneration;
    return this;
  }

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

  public Boolean getSkipEmbeddingGeneration() {
    return skipEmbeddingGeneration;
  }


  public void setSkipEmbeddingGeneration(Boolean skipEmbeddingGeneration) {
    
    
    
    this.skipEmbeddingGeneration = skipEmbeddingGeneration;
  }


  public UserFile sourceCreatedAt(OffsetDateTime sourceCreatedAt) {
    
    
    
    
    this.sourceCreatedAt = sourceCreatedAt;
    return this;
  }

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

  public OffsetDateTime getSourceCreatedAt() {
    return sourceCreatedAt;
  }


  public void setSourceCreatedAt(OffsetDateTime sourceCreatedAt) {
    
    
    
    this.sourceCreatedAt = sourceCreatedAt;
  }


  public UserFile generateSparseVectors(Boolean generateSparseVectors) {
    
    
    
    
    this.generateSparseVectors = generateSparseVectors;
    return this;
  }

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

  public Boolean getGenerateSparseVectors() {
    return generateSparseVectors;
  }


  public void setGenerateSparseVectors(Boolean generateSparseVectors) {
    
    
    
    this.generateSparseVectors = generateSparseVectors;
  }


  public UserFile requestId(String requestId) {
    
    
    
    
    this.requestId = requestId;
    return this;
  }

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

  public String getRequestId() {
    return requestId;
  }


  public void setRequestId(String requestId) {
    
    
    
    this.requestId = requestId;
  }


  public UserFile syncProperties(Object syncProperties) {
    
    
    
    
    this.syncProperties = syncProperties;
    return this;
  }

   /**
   * Get syncProperties
   * @return syncProperties
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "{}", required = true, value = "")

  public Object getSyncProperties() {
    return syncProperties;
  }


  public void setSyncProperties(Object syncProperties) {
    
    
    
    this.syncProperties = syncProperties;
  }


  public UserFile messagesMetadata(Object messagesMetadata) {
    
    
    
    
    this.messagesMetadata = messagesMetadata;
    return this;
  }

   /**
   * Get messagesMetadata
   * @return messagesMetadata
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "{}", required = true, value = "")

  public Object getMessagesMetadata() {
    return messagesMetadata;
  }


  public void setMessagesMetadata(Object messagesMetadata) {
    
    
    
    this.messagesMetadata = messagesMetadata;
  }


  public UserFile fileContentsDeleted(Boolean fileContentsDeleted) {
    
    
    
    
    this.fileContentsDeleted = fileContentsDeleted;
    return this;
  }

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

  public Boolean getFileContentsDeleted() {
    return fileContentsDeleted;
  }


  public void setFileContentsDeleted(Boolean fileContentsDeleted) {
    
    
    
    this.fileContentsDeleted = fileContentsDeleted;
  }


  public UserFile supportsColdStorage(Boolean supportsColdStorage) {
    
    
    
    
    this.supportsColdStorage = supportsColdStorage;
    return this;
  }

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

  public Boolean getSupportsColdStorage() {
    return supportsColdStorage;
  }


  public void setSupportsColdStorage(Boolean supportsColdStorage) {
    
    
    
    this.supportsColdStorage = supportsColdStorage;
  }


  public UserFile hotStorageTimeToLive(Integer hotStorageTimeToLive) {
    
    
    
    
    this.hotStorageTimeToLive = hotStorageTimeToLive;
    return this;
  }

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

  public Integer getHotStorageTimeToLive() {
    return hotStorageTimeToLive;
  }


  public void setHotStorageTimeToLive(Integer hotStorageTimeToLive) {
    
    
    
    this.hotStorageTimeToLive = hotStorageTimeToLive;
  }


  public UserFile embeddingStorageStatus(EmbeddingStorageStatus embeddingStorageStatus) {
    
    
    
    
    this.embeddingStorageStatus = embeddingStorageStatus;
    return this;
  }

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

  public EmbeddingStorageStatus getEmbeddingStorageStatus() {
    return embeddingStorageStatus;
  }


  public void setEmbeddingStorageStatus(EmbeddingStorageStatus embeddingStorageStatus) {
    
    
    
    this.embeddingStorageStatus = embeddingStorageStatus;
  }


  public UserFile createdAt(OffsetDateTime createdAt) {
    
    
    
    
    this.createdAt = createdAt;
    return this;
  }

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

  public OffsetDateTime getCreatedAt() {
    return createdAt;
  }


  public void setCreatedAt(OffsetDateTime createdAt) {
    
    
    
    this.createdAt = createdAt;
  }


  public UserFile updatedAt(OffsetDateTime updatedAt) {
    
    
    
    
    this.updatedAt = updatedAt;
    return this;
  }

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

  public OffsetDateTime getUpdatedAt() {
    return updatedAt;
  }


  public void setUpdatedAt(OffsetDateTime updatedAt) {
    
    
    
    this.updatedAt = updatedAt;
  }

  /**
   * A container for additional, undeclared properties.
   * This is a holder for any undeclared properties as specified with
   * the 'additionalProperties' keyword in the OAS document.
   */
  private Map additionalProperties;

  /**
   * Set the additional (undeclared) property with the specified name and value.
   * If the property does not already exist, create it otherwise replace it.
   *
   * @param key name of the property
   * @param value value of the property
   * @return the UserFile instance itself
   */
  public UserFile putAdditionalProperty(String key, Object value) {
    if (this.additionalProperties == null) {
        this.additionalProperties = new HashMap();
    }
    this.additionalProperties.put(key, value);
    return this;
  }

  /**
   * Return the additional (undeclared) property.
   *
   * @return a map of objects
   */
  public Map getAdditionalProperties() {
    return additionalProperties;
  }

  /**
   * Return the additional (undeclared) property with the specified name.
   *
   * @param key name of the property
   * @return an object
   */
  public Object getAdditionalProperty(String key) {
    if (this.additionalProperties == null) {
        return null;
    }
    return this.additionalProperties.get(key);
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UserFile userFile = (UserFile) o;
    return Objects.equals(this.tags, userFile.tags) &&
        Objects.equals(this.id, userFile.id) &&
        Objects.equals(this.source, userFile.source) &&
        Objects.equals(this.organizationId, userFile.organizationId) &&
        Objects.equals(this.organizationSuppliedUserId, userFile.organizationSuppliedUserId) &&
        Objects.equals(this.organizationUserDataSourceId, userFile.organizationUserDataSourceId) &&
        Objects.equals(this.externalFileId, userFile.externalFileId) &&
        Objects.equals(this.externalUrl, userFile.externalUrl) &&
        Objects.equals(this.syncStatus, userFile.syncStatus) &&
        Objects.equals(this.syncErrorMessage, userFile.syncErrorMessage) &&
        Objects.equals(this.lastSync, userFile.lastSync) &&
        Objects.equals(this.fileStatistics, userFile.fileStatistics) &&
        Objects.equals(this.fileMetadata, userFile.fileMetadata) &&
        Objects.equals(this.embeddingProperties, userFile.embeddingProperties) &&
        Objects.equals(this.chunkSize, userFile.chunkSize) &&
        Objects.equals(this.chunkOverlap, userFile.chunkOverlap) &&
        Objects.equals(this.chunkProperties, userFile.chunkProperties) &&
        Objects.equals(this.ocrProperties, userFile.ocrProperties) &&
        Objects.equals(this.ocrJobStartedAt, userFile.ocrJobStartedAt) &&
        Objects.equals(this.name, userFile.name) &&
        Objects.equals(this.parentId, userFile.parentId) &&
        Objects.equals(this.enableAutoSync, userFile.enableAutoSync) &&
        Objects.equals(this.presignedUrl, userFile.presignedUrl) &&
        Objects.equals(this.parsedTextUrl, userFile.parsedTextUrl) &&
        Objects.equals(this.additionalPresignedUrls, userFile.additionalPresignedUrls) &&
        Objects.equals(this.skipEmbeddingGeneration, userFile.skipEmbeddingGeneration) &&
        Objects.equals(this.sourceCreatedAt, userFile.sourceCreatedAt) &&
        Objects.equals(this.generateSparseVectors, userFile.generateSparseVectors) &&
        Objects.equals(this.requestId, userFile.requestId) &&
        Objects.equals(this.syncProperties, userFile.syncProperties) &&
        Objects.equals(this.messagesMetadata, userFile.messagesMetadata) &&
        Objects.equals(this.fileContentsDeleted, userFile.fileContentsDeleted) &&
        Objects.equals(this.supportsColdStorage, userFile.supportsColdStorage) &&
        Objects.equals(this.hotStorageTimeToLive, userFile.hotStorageTimeToLive) &&
        Objects.equals(this.embeddingStorageStatus, userFile.embeddingStorageStatus) &&
        Objects.equals(this.createdAt, userFile.createdAt) &&
        Objects.equals(this.updatedAt, userFile.updatedAt)&&
        Objects.equals(this.additionalProperties, userFile.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(tags, id, source, organizationId, organizationSuppliedUserId, organizationUserDataSourceId, externalFileId, externalUrl, syncStatus, syncErrorMessage, lastSync, fileStatistics, fileMetadata, embeddingProperties, chunkSize, chunkOverlap, chunkProperties, ocrProperties, ocrJobStartedAt, name, parentId, enableAutoSync, presignedUrl, parsedTextUrl, additionalPresignedUrls, skipEmbeddingGeneration, sourceCreatedAt, generateSparseVectors, requestId, syncProperties, messagesMetadata, fileContentsDeleted, supportsColdStorage, hotStorageTimeToLive, embeddingStorageStatus, createdAt, updatedAt, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UserFile {\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    organizationId: ").append(toIndentedString(organizationId)).append("\n");
    sb.append("    organizationSuppliedUserId: ").append(toIndentedString(organizationSuppliedUserId)).append("\n");
    sb.append("    organizationUserDataSourceId: ").append(toIndentedString(organizationUserDataSourceId)).append("\n");
    sb.append("    externalFileId: ").append(toIndentedString(externalFileId)).append("\n");
    sb.append("    externalUrl: ").append(toIndentedString(externalUrl)).append("\n");
    sb.append("    syncStatus: ").append(toIndentedString(syncStatus)).append("\n");
    sb.append("    syncErrorMessage: ").append(toIndentedString(syncErrorMessage)).append("\n");
    sb.append("    lastSync: ").append(toIndentedString(lastSync)).append("\n");
    sb.append("    fileStatistics: ").append(toIndentedString(fileStatistics)).append("\n");
    sb.append("    fileMetadata: ").append(toIndentedString(fileMetadata)).append("\n");
    sb.append("    embeddingProperties: ").append(toIndentedString(embeddingProperties)).append("\n");
    sb.append("    chunkSize: ").append(toIndentedString(chunkSize)).append("\n");
    sb.append("    chunkOverlap: ").append(toIndentedString(chunkOverlap)).append("\n");
    sb.append("    chunkProperties: ").append(toIndentedString(chunkProperties)).append("\n");
    sb.append("    ocrProperties: ").append(toIndentedString(ocrProperties)).append("\n");
    sb.append("    ocrJobStartedAt: ").append(toIndentedString(ocrJobStartedAt)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    parentId: ").append(toIndentedString(parentId)).append("\n");
    sb.append("    enableAutoSync: ").append(toIndentedString(enableAutoSync)).append("\n");
    sb.append("    presignedUrl: ").append(toIndentedString(presignedUrl)).append("\n");
    sb.append("    parsedTextUrl: ").append(toIndentedString(parsedTextUrl)).append("\n");
    sb.append("    additionalPresignedUrls: ").append(toIndentedString(additionalPresignedUrls)).append("\n");
    sb.append("    skipEmbeddingGeneration: ").append(toIndentedString(skipEmbeddingGeneration)).append("\n");
    sb.append("    sourceCreatedAt: ").append(toIndentedString(sourceCreatedAt)).append("\n");
    sb.append("    generateSparseVectors: ").append(toIndentedString(generateSparseVectors)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).append("\n");
    sb.append("    syncProperties: ").append(toIndentedString(syncProperties)).append("\n");
    sb.append("    messagesMetadata: ").append(toIndentedString(messagesMetadata)).append("\n");
    sb.append("    fileContentsDeleted: ").append(toIndentedString(fileContentsDeleted)).append("\n");
    sb.append("    supportsColdStorage: ").append(toIndentedString(supportsColdStorage)).append("\n");
    sb.append("    hotStorageTimeToLive: ").append(toIndentedString(hotStorageTimeToLive)).append("\n");
    sb.append("    embeddingStorageStatus: ").append(toIndentedString(embeddingStorageStatus)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
    sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).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    ");
  }


  public static HashSet openapiFields;
  public static HashSet openapiRequiredFields;

  static {
    // a set of all properties/fields (JSON key names)
    openapiFields = new HashSet();
    openapiFields.add("tags");
    openapiFields.add("id");
    openapiFields.add("source");
    openapiFields.add("organization_id");
    openapiFields.add("organization_supplied_user_id");
    openapiFields.add("organization_user_data_source_id");
    openapiFields.add("external_file_id");
    openapiFields.add("external_url");
    openapiFields.add("sync_status");
    openapiFields.add("sync_error_message");
    openapiFields.add("last_sync");
    openapiFields.add("file_statistics");
    openapiFields.add("file_metadata");
    openapiFields.add("embedding_properties");
    openapiFields.add("chunk_size");
    openapiFields.add("chunk_overlap");
    openapiFields.add("chunk_properties");
    openapiFields.add("ocr_properties");
    openapiFields.add("ocr_job_started_at");
    openapiFields.add("name");
    openapiFields.add("parent_id");
    openapiFields.add("enable_auto_sync");
    openapiFields.add("presigned_url");
    openapiFields.add("parsed_text_url");
    openapiFields.add("additional_presigned_urls");
    openapiFields.add("skip_embedding_generation");
    openapiFields.add("source_created_at");
    openapiFields.add("generate_sparse_vectors");
    openapiFields.add("request_id");
    openapiFields.add("sync_properties");
    openapiFields.add("messages_metadata");
    openapiFields.add("file_contents_deleted");
    openapiFields.add("supports_cold_storage");
    openapiFields.add("hot_storage_time_to_live");
    openapiFields.add("embedding_storage_status");
    openapiFields.add("created_at");
    openapiFields.add("updated_at");

    // a set of required properties/fields (JSON key names)
    openapiRequiredFields = new HashSet();
    openapiRequiredFields.add("tags");
    openapiRequiredFields.add("id");
    openapiRequiredFields.add("source");
    openapiRequiredFields.add("organization_id");
    openapiRequiredFields.add("organization_supplied_user_id");
    openapiRequiredFields.add("organization_user_data_source_id");
    openapiRequiredFields.add("external_file_id");
    openapiRequiredFields.add("external_url");
    openapiRequiredFields.add("sync_status");
    openapiRequiredFields.add("sync_error_message");
    openapiRequiredFields.add("last_sync");
    openapiRequiredFields.add("file_statistics");
    openapiRequiredFields.add("file_metadata");
    openapiRequiredFields.add("embedding_properties");
    openapiRequiredFields.add("chunk_size");
    openapiRequiredFields.add("chunk_overlap");
    openapiRequiredFields.add("chunk_properties");
    openapiRequiredFields.add("ocr_properties");
    openapiRequiredFields.add("ocr_job_started_at");
    openapiRequiredFields.add("name");
    openapiRequiredFields.add("parent_id");
    openapiRequiredFields.add("enable_auto_sync");
    openapiRequiredFields.add("presigned_url");
    openapiRequiredFields.add("parsed_text_url");
    openapiRequiredFields.add("additional_presigned_urls");
    openapiRequiredFields.add("skip_embedding_generation");
    openapiRequiredFields.add("source_created_at");
    openapiRequiredFields.add("generate_sparse_vectors");
    openapiRequiredFields.add("request_id");
    openapiRequiredFields.add("sync_properties");
    openapiRequiredFields.add("messages_metadata");
    openapiRequiredFields.add("file_contents_deleted");
    openapiRequiredFields.add("supports_cold_storage");
    openapiRequiredFields.add("hot_storage_time_to_live");
    openapiRequiredFields.add("embedding_storage_status");
    openapiRequiredFields.add("created_at");
    openapiRequiredFields.add("updated_at");
  }

 /**
  * Validates the JSON Object and throws an exception if issues found
  *
  * @param jsonObj JSON Object
  * @throws IOException if the JSON Object is invalid with respect to UserFile
  */
  public static void validateJsonObject(JsonObject jsonObj) throws IOException {
      if (jsonObj == null) {
        if (!UserFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in UserFile is not found in the empty JSON string", UserFile.openapiRequiredFields.toString()));
        }
      }

      // check to make sure all required properties/fields are present in the JSON string
      for (String requiredField : UserFile.openapiRequiredFields) {
        if (jsonObj.get(requiredField) == null) {
          throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
        }
      }
      if (!jsonObj.get("organization_supplied_user_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `organization_supplied_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_supplied_user_id").toString()));
      }
      if (!jsonObj.get("external_file_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `external_file_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("external_file_id").toString()));
      }
      if (!jsonObj.get("external_url").isJsonNull() && !jsonObj.get("external_url").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `external_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("external_url").toString()));
      }
      if (!jsonObj.get("sync_error_message").isJsonNull() && !jsonObj.get("sync_error_message").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `sync_error_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sync_error_message").toString()));
      }
      // validate the required field `file_statistics`
      if (!jsonObj.get("file_statistics").isJsonNull()) {
        FileStatisticsNullable.validateJsonObject(jsonObj.getAsJsonObject("file_statistics"));
      }
      // validate the required field `chunk_properties`
      if (!jsonObj.get("chunk_properties").isJsonNull()) {
        ChunkPropertiesNullable.validateJsonObject(jsonObj.getAsJsonObject("chunk_properties"));
      }
      if (!jsonObj.get("name").isJsonNull() && !jsonObj.get("name").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
      }
      if (!jsonObj.get("presigned_url").isJsonNull() && !jsonObj.get("presigned_url").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `presigned_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("presigned_url").toString()));
      }
      if (!jsonObj.get("parsed_text_url").isJsonNull() && !jsonObj.get("parsed_text_url").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `parsed_text_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parsed_text_url").toString()));
      }
      if (!jsonObj.get("request_id").isJsonNull() && !jsonObj.get("request_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `request_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_id").toString()));
      }
  }

  public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override
    public  TypeAdapter create(Gson gson, TypeToken type) {
       if (!UserFile.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'UserFile' and its subtypes
       }
       final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(UserFile.class));

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, UserFile value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             obj.remove("additionalProperties");
             // serialize additonal properties
             if (value.getAdditionalProperties() != null) {
               for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
                 if (entry.getValue() instanceof String)
                   obj.addProperty(entry.getKey(), (String) entry.getValue());
                 else if (entry.getValue() instanceof Number)
                   obj.addProperty(entry.getKey(), (Number) entry.getValue());
                 else if (entry.getValue() instanceof Boolean)
                   obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
                 else if (entry.getValue() instanceof Character)
                   obj.addProperty(entry.getKey(), (Character) entry.getValue());
                 else if (entry.getValue() == null) {
                   obj.addProperty(entry.getKey(), (String) null);
                 } else {
                   obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
                 }
               }
             }
             elementAdapter.write(out, obj);
           }

           @Override
           public UserFile read(JsonReader in) throws IOException {
             JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
             validateJsonObject(jsonObj);
             // store additional fields in the deserialized instance
             UserFile instance = thisAdapter.fromJsonTree(jsonObj);
             for (Map.Entry entry : jsonObj.entrySet()) {
               if (!openapiFields.contains(entry.getKey())) {
                 if (entry.getValue().isJsonPrimitive()) { // primitive type
                   if (entry.getValue().getAsJsonPrimitive().isString())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
                   else if (entry.getValue().getAsJsonPrimitive().isNumber())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
                   else if (entry.getValue().getAsJsonPrimitive().isBoolean())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
                   else
                     throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
                 } else if (entry.getValue().isJsonArray()) {
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
                 } else { // JSON object
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
                 }
               }
             }
             return instance;
           }

       }.nullSafe();
    }
  }

 /**
  * Create an instance of UserFile given an JSON string
  *
  * @param jsonString JSON string
  * @return An instance of UserFile
  * @throws IOException if the JSON string is invalid with respect to UserFile
  */
  public static UserFile fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, UserFile.class);
  }

 /**
  * Convert an instance of UserFile to an JSON string
  *
  * @return JSON string
  */
  public String toJson() {
    return JSON.getGson().toJson(this);
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy