
#nullable enable

namespace Google.Gemini
{
    /// <summary>
    /// A `Document` is a collection of `Chunk`s.
    /// </summary>
    public sealed partial class Document
    {
        /// <summary>
        /// Output only. The Timestamp of when the `Document` was created.<br/>
        /// Included only in responses
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("createTime")]
        public string? CreateTime { get; set; }

        /// <summary>
        /// Output only. Current state of the `Document`.<br/>
        /// Included only in responses
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("state")]
        [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Google.Gemini.JsonConverters.DocumentStateJsonConverter))]
        public global::Google.Gemini.DocumentState? State { get; set; }

        /// <summary>
        /// Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: "Semantic Retriever Documentation"
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("displayName")]
        public string? DisplayName { get; set; }

        /// <summary>
        /// Output only. The Timestamp of when the `Document` was last updated.<br/>
        /// Included only in responses
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("updateTime")]
        public string? UpdateTime { get; set; }

        /// <summary>
        /// Output only. The mime type of the Document.<br/>
        /// Included only in responses
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("mimeType")]
        public string? MimeType { get; set; }

        /// <summary>
        /// Immutable. Identifier. The `Document` resource name. The ID (name excluding the "fileSearchStores/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("name")]
        public string? Name { get; set; }

        /// <summary>
        /// Output only. The size of raw bytes ingested into the Document.<br/>
        /// Included only in responses
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("sizeBytes")]
        public string? SizeBytes { get; set; }

        /// <summary>
        /// Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("customMetadata")]
        public global::System.Collections.Generic.IList<global::Google.Gemini.CustomMetadata>? CustomMetadata { get; set; }

        /// <summary>
        /// Additional properties that are not explicitly defined in the schema
        /// </summary>
        [global::System.Text.Json.Serialization.JsonExtensionData]
        public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

        /// <summary>
        /// Initializes a new instance of the <see cref="Document" /> class.
        /// </summary>
        /// <param name="createTime">
        /// Output only. The Timestamp of when the `Document` was created.<br/>
        /// Included only in responses
        /// </param>
        /// <param name="state">
        /// Output only. Current state of the `Document`.<br/>
        /// Included only in responses
        /// </param>
        /// <param name="displayName">
        /// Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: "Semantic Retriever Documentation"
        /// </param>
        /// <param name="updateTime">
        /// Output only. The Timestamp of when the `Document` was last updated.<br/>
        /// Included only in responses
        /// </param>
        /// <param name="mimeType">
        /// Output only. The mime type of the Document.<br/>
        /// Included only in responses
        /// </param>
        /// <param name="name">
        /// Immutable. Identifier. The `Document` resource name. The ID (name excluding the "fileSearchStores/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`
        /// </param>
        /// <param name="sizeBytes">
        /// Output only. The size of raw bytes ingested into the Document.<br/>
        /// Included only in responses
        /// </param>
        /// <param name="customMetadata">
        /// Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.
        /// </param>
#if NET7_0_OR_GREATER
        [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
        public Document(
            string? createTime,
            global::Google.Gemini.DocumentState? state,
            string? displayName,
            string? updateTime,
            string? mimeType,
            string? name,
            string? sizeBytes,
            global::System.Collections.Generic.IList<global::Google.Gemini.CustomMetadata>? customMetadata)
        {
            this.CreateTime = createTime;
            this.State = state;
            this.DisplayName = displayName;
            this.UpdateTime = updateTime;
            this.MimeType = mimeType;
            this.Name = name;
            this.SizeBytes = sizeBytes;
            this.CustomMetadata = customMetadata;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Document" /> class.
        /// </summary>
        public Document()
        {
        }

    }
}