/**
 * Unboxed primitive types.
 *
 * We use boxed primitive types where possible, to achieve nominal typing for extra type safety. However, TSOA does not
 * recognise these, so we provide unboxed variants here that we can attach OpenAPI specification metadata to.
 */
export type IgnoreMeUnboxed = never; // Required, else above doc-comment wipes-out the next type's generated spec.

/**
 * User ID from your application, to help organize uploaded files.
 * @example "user_id_from_your_app"
 * @minLength 1
 * @maxLength 255
 * @pattern ^\S.*?\S$
 */
export type CustomUserIdUnboxed = string;

/**
 * Upload User ID.
 * @example "BC8048E8-A6F4-40CD-BFA2-1081049AA1AB"
 * @minLength 36
 * @maxLength 36
 * @pattern ^\S.*?\S$
 */
export type UserIdUnboxed = string;

/**
 * Upload Account ID.
 * @example "A623uY2RX"
 * @minLength 9
 * @maxLength 9
 * @pattern ^[1-9A-HJ-NP-Za-km-z]*$
 */
export type AccountIdUnboxed = string; // Sync with: AccountIdUtils

/**
 * File ID.
 * @example "A623uY2RXvnNq1vZ80fY"
 * @minLength 20
 * @maxLength 20
 * @pattern ^[1-9A-HJ-NP-Za-km-z]*$
 */
export type FileIdUnboxed = string;

/**
 * File size in bytes.
 * @example 43182
 * @isInt
 * @minimum 0
 */
export type FileSizeUnboxed = number;

/**
 * File tag, to help organize uploaded files.
 * @example "images/profile"
 * @minLength 1
 * @maxLength 255
 * @pattern ^[a-z0-9\.,/=_+-]*$
 */
export type FileTagUnboxed = string;

/**
 * File MIME type.
 * @example "image/jpeg"
 * @minLength 3
 * @maxLength 255
 * @pattern ^[a-z0-9]+/[a-z0-9+\-._]+$
 */
export type MimeTypeUnboxed = string; // Sync with 'normalizeMimeType' in 'upload-js'.

/**
 * File name.
 * @example "example.jpg"
 * @minLength 1
 * @maxLength 255
 * @pattern ^.+$
 */
export type FileNameUnboxed = string;

/**
 * File ETag.
 * @example "33a64df551425fcc55e4d42a148795d9f25f89d4"
 * @minLength 1
 * @maxLength 255
 * @pattern ^\S*$
 */
export type ETagUnboxed = string;

/**
 * Number of parts the file will be uploaded in.
 * @example 12
 * @isInt
 * @minimum 1
 */
export type FilePartCountUnboxed = number;

/**
 * Index of an uploadable file part.
 * @example 7
 * @isInt
 * @minimum 0
 */
export type UploadPartIndexUnboxed = number;

/**
 * Pre-signed upload URL for this part.
 * @example "https://...long-url...x-id=PutObject"
 * @minLength 10
 */
export type PreSignedUploadUrlUnboxed = string;

/**
 * Domain name.
 * @example "localhost"
 * @minLength 1
 * @maxLength 255
 * @pattern ^[a-z0-9-\.]*$
 */
export type DomainNameUnboxed = string;

/**
 * JSON Web Token (JWT).
 * @example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ4In0.fiX9xWK-9af81KNXzUT_PARqLr9S43OS5iZI7MvLAYk"
 * @pattern ^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$
 */
export type JwtUnboxed = string;

/**
 * First name of a person.
 * @example "Mark"
 * @minLength 1
 * @maxLength 35
 * @pattern ^\S.*?\S$
 */
export type FirstNameUnboxed = string;

/**
 * Last name of a person.
 * @example "Smith"
 * @minLength 1
 * @maxLength 35
 * @pattern ^\S.*?\S$
 */
export type LastNameUnboxed = string;

// See: https://github.com/lukeautry/tsoa/issues/621#issuecomment-699642005
// Explanation: '\u0040' is required because '@' causes the example to be elided.
/**
 * Email address.
 * @example "mark.smith\u0040example.com"
 * @minLength 1
 * @maxLength 254
 * @pattern ^\S+\x40\S+\.\S+$
 */
export type EmailAddressUnboxed = string;

/**
 * Organization name.
 * @example "Acme Corp"
 * @minLength 1
 * @maxLength 100
 * @pattern ^\S.*?\S$
 */
export type OrganizationNameUnboxed = string;

/**
 * Department name.
 * @example "Software Development"
 * @minLength 1
 * @maxLength 100
 * @pattern ^\S.*?\S$
 */
export type DepartmentNameUnboxed = string;

/**
 * Epoch milliseconds (since midnight 1 January 1970, UTC).
 * @example 1615680311115
 * @isInt
 * @minimum 0
 */
export type EpochMillisUnboxed = number;

/**
 * Description or notes about an API key.
 * @example "Production API key"
 * @minLength 1
 * @maxLength 50
 * @pattern ^\S.*?\S$
 */
export type ApiKeyDescriptionUnboxed = string;

/**
 * Public API key (can be used in frontend code).
 * @example "public_A623uY2RvnNq1vZ80fYgGyhKN0U7xt"
 * @minLength 37
 * @maxLength 37
 * @pattern ^public_[1-9A-HJ-NP-Za-km-z]*$
 */
export type PublicApiKeyUnboxed = string;

/**
 * Secret API key (do not use in frontend code).
 * @example "secret_A623uY2RvkUy789gT8jHaPLmNd89qa"
 * @minLength 37
 * @maxLength 37
 * @pattern ^secret_[1-9A-HJ-NP-Za-km-z]*$
 */
export type SecretApiKeyUnboxed = string;

/**
 * API key.
 * @example "secret_A623uY2RvkUy789gT8jHaPLmNd89qa"
 * @minLength 37
 * @maxLength 37
 * @pattern ^(public|secret)_[1-9A-HJ-NP-Za-km-z]*$
 */
export type ApiKeyUnboxed = string; // Sync with 'PublicApiKeyUnboxed' and 'SecretApiKeyUnboxed'

/**
 * API key type.
 * @example "secret"
 * @pattern ^(public|secret)$
 */
export type ApiKeyTypeUnboxed = "public" | "secret"; // Sync with 'PublicApiKeyUnboxed' and 'SecretApiKeyUnboxed'

/**
 * Username of package maintainer on NPM.
 * @example "upload-io"
 * @minLength 1
 * @maxLength 50
 * @pattern ^[0-9A-Za-z-_.]*$
 */
export type NpmUsernameUnboxed = string;

/**
 * NPM package name.
 * @example "upload-compression-plugin"
 * @minLength 1
 * @maxLength 100
 * @pattern ^[0-9A-Za-z-_.\x40\/]*$
 */
export type NpmPackageNameUnboxed = string;

/**
 * Semantic version.
 * @example "1.2.0"
 * @minLength 1
 * @maxLength 50
 * @pattern ^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$
 */
export type SemanticVersionUnboxed = string;

/**
 * Description for an Upload Plugin.
 * @example "Archives, compresses and decompresses files."
 * @minLength 1
 * @maxLength 80
 * @pattern ^\S.*?\S$
 */
export type PluginDescriptionUnboxed = string;

/**
 * Category for a transformation template.
 * @example "Image"
 * @minLength 1
 * @maxLength 30
 * @pattern ^\S.*?\S$
 */
export type TemplateCategoryUnboxed = string;

/**
 * Description for a transformation template.
 * @example "Compress a file"
 * @minLength 1
 * @maxLength 30
 * @pattern ^\S.*?\S$
 */
export type TemplateNameUnboxed = string;

/**
 * Label for a transformation template parameter.
 * @example "Compression format"
 * @minLength 1
 * @maxLength 30
 * @pattern ^\S.*?\S$
 */
export type TemplateParamLabelUnboxed = string;

/**
 * Description for a transformation template parameter.
 * @example "The compression format to use"
 * @minLength 1
 * @maxLength 80
 * @pattern ^\S.*?\S$
 */
export type TemplateParamDescriptionUnboxed = string;

/**
 * Default value for a transformation template parameter.
 * @example "zip"
 * @minLength 1
 * @maxLength 100
 */
export type TemplateParamDefaultUnboxed = string;

/**
 * Substitution placeholder used inside a transformation template.
 * @example "COMPRESSION_FORMAT"
 * @minLength 1
 * @maxLength 50
 * @pattern ^[A-Z0-9_]*$
 */
export type TemplateParamPlaceholderUnboxed = string;

/**
 * Transformation definition ID.
 * @example "A623uY2RXvnNq1vZ80fY"
 * @minLength 20
 * @maxLength 20
 * @pattern ^[1-9A-HJ-NP-Za-km-z]*$
 */
export type TransformationDefinitionIdUnboxed = string;

/**
 * Description given to a transformation.
 * @example "Compress file"
 * @minLength 1
 * @maxLength 80
 * @pattern ^\S.*?\S$
 */
export type TransformationDescriptionUnboxed = string;

/**
 * MIME type scope for a transformation definition.
 * @example "*"
 * @minLength 1
 * @maxLength 255
 * @pattern ^(?:\*|[a-z0-9]+\/(?:[a-z0-9+\-._]+|[a-z0-9+\-._]*\*))$
 */
export type TransformationMimeScopeUnboxed = string;

/**
 * File tag scope for a transformation definition.
 * @example "*"
 * @minLength 1
 * @maxLength 255
 * @pattern ^[a-z0-9\.,/=_+-]*\*?$
 */
export type TransformationTagScopeUnboxed = string;

/**
 * Identifies the location to save/load transformed files to/from.
 * @example "compressed-files-v1"
 * @minLength 1
 * @maxLength 50
 * @pattern ^[a-zA-Z0-9-]*$
 */
export type CacheKeyUnboxed = string;

/**
 * Transformation URL slug (excludes the leading forward-slash).
 * @example "resize:800x600"
 * @minLength 1
 * @maxLength 100
 * @pattern ^[a-zA-Z0-9-_.+=\x40~:%]*$
 */
export type TransformationUrlSlugUnboxed = string; // Sync with 'RoutingService.transformationUrlSlugRegexUnanchored'

/**
 * @minItems 1
 */
export type NonEmptyArrayUnboxed<T> = T[];

/**
 * @uniqueItems true
 * @minItems 1
 */
export type NonEmptySetUnboxed<T> = T[];

/**
 * Continuation token (aka pagination cursor).
 * @example "user_id_from_your_app"
 * @minLength 1
 * @maxLength 1000
 * @pattern ^\S.*?\S$
 */
export type ContinuationTokenUnboxed = string;

/**
 * Page size (i.e. maximum items to return in a page of results).
 * @example 12
 * @isInt
 * @minimum 3
 * @maximum 20
 */
export type PageSizeUnboxed = number;
