package org.sagebionetworks.bridge.sdk.models.upload;

/**
 * Represents field types in upload data. This is used to define upload schemas. For more information about Bridge
 * upload data and field types, see https://sagebionetworks.jira.com/wiki/display/BRIDGE/Bridge+Upload+Data+Format
 *
 * @see org.sagebionetworks.bridge.sdk.models.upload.UploadSchema
 */
public enum UploadFieldType {
    /**
     * Health Data Attachment as a non-JSON blob. The value of this field is a foreign key into the Health Data
     * Attachments table. Data stored in this format will not be subject to additional post-processing.
     */
    ATTACHMENT_BLOB,

    /**
     * Health Data Attachment as a CSV file. The value of this field is a foreign key into the Health Data Attachments
     * table. Data stored in this format will be used to construct de-normalized tables during data export.
     */
    ATTACHMENT_CSV,

    /**
     * Health Data Attachment as a JSON blob. The value of this field is a foreign key into the Health Data Attachments
     * table. Data stored in this format will not be subject to additional post-processing, but is tagged as JSON data
     * in the schema for convenience.
     */
    ATTACHMENT_JSON_BLOB,

    /**
     * Health Data Attachment as a JSON blob of a specific "table" format. The value of this field is a foreign key
     * into the Health Data Attachments table. Data stored in this format will be used to construct de-normalizeds
     * tables during data export.
     */
    ATTACHMENT_JSON_TABLE,

    /** A boolean, expected values match Boolean.parse() */
    BOOLEAN,

    /** A calendar date in YYYY-MM-DD format */
    CALENDAR_DATE,

    /** A floating point number, generally represented as a double in Java */
    FLOAT,

    /**
     * A JSON blob that's small enough to fit in the health data. (Generally something that's only a few hundred
     * characters at most.
     */
    INLINE_JSON_BLOB,

    /** An integer value, generally represented as a long in Java (64-bit signed integer) */
    INT,

    /** A string value */
    STRING,

    /** A timestamp in ISO 8601 format (YYYY-MM-DDThhhh:mm:ss+/-zz:zz) */
    TIMESTAMP,
}

@@ -784,60 +784,32 @@
 le. 
-Data stored in this format will be used to construct
+We originally planned to
  de-
@@ -821,35 +821,47 @@
 lize
-d
  t
-ables during data export
+his data, but that feature was punted
 .%0A  
@@ -1382,114 +1382,245 @@
 le. 
-Data stored in this format will be used to construct de-normalizeds%0A     * tables during data export.%0A    
+We originally planned to de-normalize this data, but that feature was%0A     * punted.%0A     */%0A    ATTACHMENT_JSON_TABLE,%0A%0A    /** Upload V2 version of attachments. Fields of this type can be associated with any file extension or MIME type
  */%0A
@@ -1630,34 +1630,26 @@
  ATTACHMENT_
-JSON_TABLE
+V2
 ,%0A%0A    /** A
@@ -1777,24 +1777,108 @@
 NDAR_DATE,%0A%0A
+    /** Duration (how long something took). Used by Upload v2. */%0A    DURATION_V2,%0A%0A
     /** A fl
@@ -2249,36 +2249,272 @@
 /** 
-A string value */%0A    STRING
+Multiple choice question with multiple answers. */%0A    MULTI_CHOICE,%0A%0A    /** Multiple choice question with only a single answer. */%0A    SINGLE_CHOICE,%0A%0A    /** A string value */%0A    STRING,%0A%0A    /** Time without date or timezone. Used in Upload v2. */%0A    TIME_V2
 ,%0A%0A 

version to 0.8.9