openapi-azure-storage-blob 0.1.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Azure Storage Blob service
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2026-02-06
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

use serde_with::serde_as;

/// BlobPropertiesInternal : The properties of a blob.
#[serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlobPropertiesInternal {
    /// The date-time the blob was created in RFC1123 format.
    #[serde(rename = "Creation-Time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The date-time the blob was last modified in RFC1123 format.
    #[serde(rename = "Last-Modified")]
    pub last_modified: String,
    /// The blog ETag.
    #[serde(rename = "Etag")]
    pub etag: String,
    /// The content length of the blob.
    #[serde(rename = "Content-Length", skip_serializing_if = "Option::is_none")]
    pub content_length: Option<i64>,
    /// The content type of the blob.
    #[serde(rename = "Content-Type", skip_serializing_if = "Option::is_none")]
    pub content_type: Option<String>,
    /// The content encoding of the blob.
    #[serde(rename = "Content-Encoding", skip_serializing_if = "Option::is_none")]
    pub content_encoding: Option<String>,
    /// The content language of the blob.
    #[serde(rename = "Content-Language", skip_serializing_if = "Option::is_none")]
    pub content_language: Option<String>,
    /// The content MD5 of the blob.
    #[serde_as(as = "Option<serde_with::base64::Base64>")]
    #[serde(rename = "Content-MD5", skip_serializing_if = "Option::is_none")]
    pub content_md5: Option<Vec<u8>>,
    /// The content disposition of the blob.
    #[serde(
        rename = "Content-Disposition",
        skip_serializing_if = "Option::is_none"
    )]
    pub content_disposition: Option<String>,
    /// The cache control of the blob.
    #[serde(rename = "Cache-Control", skip_serializing_if = "Option::is_none")]
    pub cache_control: Option<String>,
    /// The sequence number of the blob.
    #[serde(
        rename = "x-ms-blob-sequence-number",
        skip_serializing_if = "Option::is_none"
    )]
    pub x_ms_blob_sequence_number: Option<i64>,
    #[serde(rename = "BlobType", skip_serializing_if = "Option::is_none")]
    pub blob_type: Option<models::BlobType>,
    #[serde(rename = "LeaseStatus", skip_serializing_if = "Option::is_none")]
    pub lease_status: Option<models::LeaseStatus>,
    #[serde(rename = "LeaseState", skip_serializing_if = "Option::is_none")]
    pub lease_state: Option<models::LeaseState>,
    #[serde(rename = "LeaseDuration", skip_serializing_if = "Option::is_none")]
    pub lease_duration: Option<models::LeaseDuration>,
    /// The copy ID of the blob.
    #[serde(rename = "CopyId", skip_serializing_if = "Option::is_none")]
    pub copy_id: Option<String>,
    #[serde(rename = "CopyStatus", skip_serializing_if = "Option::is_none")]
    pub copy_status: Option<models::CopyStatus>,
    /// The copy source of the blob.
    #[serde(rename = "CopySource", skip_serializing_if = "Option::is_none")]
    pub copy_source: Option<String>,
    /// The copy progress of the blob.
    #[serde(rename = "CopyProgress", skip_serializing_if = "Option::is_none")]
    pub copy_progress: Option<String>,
    /// The copy completion time of the blob.
    #[serde(rename = "CopyCompletionTime", skip_serializing_if = "Option::is_none")]
    pub copy_completion_time: Option<String>,
    /// The copy status description of the blob.
    #[serde(
        rename = "CopyStatusDescription",
        skip_serializing_if = "Option::is_none"
    )]
    pub copy_status_description: Option<String>,
    /// Whether the blog is encrypted on the server.
    #[serde(rename = "ServerEncrypted", skip_serializing_if = "Option::is_none")]
    pub server_encrypted: Option<bool>,
    /// Whether the blog is incremental copy.
    #[serde(rename = "IncrementalCopy", skip_serializing_if = "Option::is_none")]
    pub incremental_copy: Option<bool>,
    /// The name of the destination snapshot.
    #[serde(
        rename = "DestinationSnapshot",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination_snapshot: Option<String>,
    /// The time the blob was deleted.
    #[serde(rename = "DeletedTime", skip_serializing_if = "Option::is_none")]
    pub deleted_time: Option<String>,
    /// The remaining retention days of the blob.
    #[serde(
        rename = "RemainingRetentionDays",
        skip_serializing_if = "Option::is_none"
    )]
    pub remaining_retention_days: Option<i32>,
    #[serde(rename = "AccessTier", skip_serializing_if = "Option::is_none")]
    pub access_tier: Option<models::AccessTier>,
    /// Whether the access tier is inferred.
    #[serde(rename = "AccessTierInferred", skip_serializing_if = "Option::is_none")]
    pub access_tier_inferred: Option<bool>,
    #[serde(rename = "ArchiveStatus", skip_serializing_if = "Option::is_none")]
    pub archive_status: Option<models::ArchiveStatus>,
    /// Customer provided key sha256
    #[serde(
        rename = "CustomerProvidedKeySha256",
        skip_serializing_if = "Option::is_none"
    )]
    pub customer_provided_key_sha256: Option<String>,
    /// The encryption scope of the blob.
    #[serde(rename = "EncryptionScope", skip_serializing_if = "Option::is_none")]
    pub encryption_scope: Option<String>,
    /// The access tier change time of the blob.
    #[serde(
        rename = "AccessTierChangeTime",
        skip_serializing_if = "Option::is_none"
    )]
    pub access_tier_change_time: Option<String>,
    /// The number of tags for the blob.
    #[serde(rename = "TagCount", skip_serializing_if = "Option::is_none")]
    pub tag_count: Option<i32>,
    /// The expire time of the blob.
    #[serde(rename = "Expiry-Time", skip_serializing_if = "Option::is_none")]
    pub expiry_time: Option<String>,
    /// Whether the blob is sealed.
    #[serde(rename = "Sealed", skip_serializing_if = "Option::is_none")]
    pub sealed: Option<bool>,
    #[serde(rename = "RehydratePriority", skip_serializing_if = "Option::is_none")]
    pub rehydrate_priority: Option<models::RehydratePriority>,
    /// The last access time of the blob.
    #[serde(rename = "LastAccessTime", skip_serializing_if = "Option::is_none")]
    pub last_access_time: Option<String>,
    /// The immutability policy until time of the blob.
    #[serde(
        rename = "ImmutabilityPolicyUntilDate",
        skip_serializing_if = "Option::is_none"
    )]
    pub immutability_policy_until_date: Option<String>,
    #[serde(
        rename = "ImmutabilityPolicyMode",
        skip_serializing_if = "Option::is_none"
    )]
    pub immutability_policy_mode: Option<models::BlobImmutabilityPolicyMode>,
    /// Whether the blob is under legal hold.
    #[serde(rename = "LegalHold", skip_serializing_if = "Option::is_none")]
    pub legal_hold: Option<bool>,
}

impl BlobPropertiesInternal {
    /// The properties of a blob.
    pub fn new(last_modified: String, etag: String) -> BlobPropertiesInternal {
        BlobPropertiesInternal {
            creation_time: None,
            last_modified,
            etag,
            content_length: None,
            content_type: None,
            content_encoding: None,
            content_language: None,
            content_md5: None,
            content_disposition: None,
            cache_control: None,
            x_ms_blob_sequence_number: None,
            blob_type: None,
            lease_status: None,
            lease_state: None,
            lease_duration: None,
            copy_id: None,
            copy_status: None,
            copy_source: None,
            copy_progress: None,
            copy_completion_time: None,
            copy_status_description: None,
            server_encrypted: None,
            incremental_copy: None,
            destination_snapshot: None,
            deleted_time: None,
            remaining_retention_days: None,
            access_tier: None,
            access_tier_inferred: None,
            archive_status: None,
            customer_provided_key_sha256: None,
            encryption_scope: None,
            access_tier_change_time: None,
            tag_count: None,
            expiry_time: None,
            sealed: None,
            rehydrate_priority: None,
            last_access_time: None,
            immutability_policy_until_date: None,
            immutability_policy_mode: None,
            legal_hold: None,
        }
    }
}