Skip to main content

azure_storage_blob/generated/models/
models.rs

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3//
4// Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT.
5
6use super::{
7    models_serde,
8    xml_helpers::{
9        Blob_itemsBlobItem, Blob_itemsFilterBlobItem, Blob_tag_setBlobTag, Committed_blocksBlock,
10        Container_itemsContainerItem, CorsCorsRule, Uncommitted_blocksBlock,
11    },
12    AccessTier, ArchiveStatus, BlobType, CopyStatus, GeoReplicationStatusType,
13    ImmutabilityPolicyMode, LeaseDuration, LeaseState, LeaseStatus, PublicAccessType,
14    RehydratePriority, StorageErrorCode,
15};
16use crate::models::BlobMetadata;
17use azure_core::{base64, fmt::SafeDebug, http::Etag, time::OffsetDateTime};
18use serde::{Deserialize, Serialize};
19use std::collections::HashMap;
20
21/// Represents an access policy.
22#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
23pub struct AccessPolicy {
24    /// The date-time the policy expires.
25    #[serde(
26        default,
27        rename = "Expiry",
28        skip_serializing_if = "Option::is_none",
29        with = "models_serde::option_offset_date_time_rfc3339_fixed_width"
30    )]
31    pub expiry: Option<OffsetDateTime>,
32
33    /// The permissions for the policy.
34    #[serde(rename = "Permission", skip_serializing_if = "Option::is_none")]
35    pub permission: Option<String>,
36
37    /// The date-time the policy is active.
38    #[serde(
39        default,
40        rename = "Start",
41        skip_serializing_if = "Option::is_none",
42        with = "models_serde::option_offset_date_time_rfc3339_fixed_width"
43    )]
44    pub start: Option<OffsetDateTime>,
45}
46
47/// Contains results for `AppendBlobClient::append_block_from_url()`
48#[derive(SafeDebug)]
49pub struct AppendBlobClientAppendBlockFromUrlResult;
50
51/// Contains results for `AppendBlobClient::append_block()`
52#[derive(SafeDebug)]
53pub struct AppendBlobClientAppendBlockResult;
54
55/// Contains results for `AppendBlobClient::create()`
56#[derive(SafeDebug)]
57pub struct AppendBlobClientCreateResult;
58
59/// Contains results for `AppendBlobClient::seal()`
60#[derive(SafeDebug)]
61pub struct AppendBlobClientSealResult;
62
63/// Contains results for `BlobClient::acquire_lease()`
64#[derive(SafeDebug)]
65pub struct BlobClientAcquireLeaseResult;
66
67/// Contains results for `BlobClient::break_lease()`
68#[derive(SafeDebug)]
69pub struct BlobClientBreakLeaseResult;
70
71/// Contains results for `BlobClient::change_lease()`
72#[derive(SafeDebug)]
73pub struct BlobClientChangeLeaseResult;
74
75/// Contains results for `BlobClient::create_snapshot()`
76#[derive(SafeDebug)]
77pub struct BlobClientCreateSnapshotResult;
78
79/// Contains results for `BlobClient::download_internal()`
80#[derive(SafeDebug)]
81pub(crate) struct BlobClientDownloadInternalResult;
82
83/// Contains results for `BlobClient::get_account_info()`
84#[derive(SafeDebug)]
85pub struct BlobClientGetAccountInfoResult;
86
87/// Contains results for `BlobClient::get_properties()`
88#[derive(SafeDebug)]
89pub struct BlobClientGetPropertiesResult;
90
91/// Contains results for `BlobClient::release_lease()`
92#[derive(SafeDebug)]
93pub struct BlobClientReleaseLeaseResult;
94
95/// Contains results for `BlobClient::renew_lease()`
96#[derive(SafeDebug)]
97pub struct BlobClientRenewLeaseResult;
98
99/// Contains results for `BlobClient::start_copy_from_url()`
100#[derive(SafeDebug)]
101pub struct BlobClientStartCopyFromUrlResult;
102
103/// Contains results for `BlobContainerClient::acquire_lease()`
104#[derive(SafeDebug)]
105pub struct BlobContainerClientAcquireLeaseResult;
106
107/// Contains results for `BlobContainerClient::break_lease()`
108#[derive(SafeDebug)]
109pub struct BlobContainerClientBreakLeaseResult;
110
111/// Contains results for `BlobContainerClient::change_lease()`
112#[derive(SafeDebug)]
113pub struct BlobContainerClientChangeLeaseResult;
114
115/// Contains results for `BlobContainerClient::get_account_info()`
116#[derive(SafeDebug)]
117pub struct BlobContainerClientGetAccountInfoResult;
118
119/// Contains results for `BlobContainerClient::get_properties()`
120#[derive(SafeDebug)]
121pub struct BlobContainerClientGetPropertiesResult;
122
123/// Contains results for `BlobContainerClient::release_lease()`
124#[derive(SafeDebug)]
125pub struct BlobContainerClientReleaseLeaseResult;
126
127/// Contains results for `BlobContainerClient::renew_lease()`
128#[derive(SafeDebug)]
129pub struct BlobContainerClientRenewLeaseResult;
130
131/// Represents a blob.
132#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
133#[non_exhaustive]
134#[serde(rename = "Blob")]
135pub struct BlobItem {
136    /// The tags of the blob.
137    #[serde(rename = "Tags", skip_serializing_if = "Option::is_none")]
138    pub blob_tags: Option<BlobTags>,
139
140    /// Whether the blob is deleted.
141    #[serde(rename = "Deleted", skip_serializing_if = "Option::is_none")]
142    pub deleted: Option<bool>,
143
144    /// Whether the blob has versions only.
145    #[serde(rename = "HasVersionsOnly", skip_serializing_if = "Option::is_none")]
146    pub has_versions_only: Option<bool>,
147
148    /// Whether the blob is the current version.
149    #[serde(rename = "IsCurrentVersion", skip_serializing_if = "Option::is_none")]
150    pub is_current_version: Option<bool>,
151
152    /// The metadata of the blob.
153    #[serde(rename = "Metadata", skip_serializing_if = "Option::is_none")]
154    pub metadata: Option<BlobMetadata>,
155
156    /// The name of the blob.
157    #[serde(
158        deserialize_with = "crate::models::blob_name::option::deserialize",
159        rename = "Name",
160        skip_serializing_if = "Option::is_none"
161    )]
162    pub name: Option<String>,
163
164    /// The object replication metadata of the blob.
165    #[serde(rename = "OrMetadata", skip_serializing_if = "Option::is_none")]
166    pub object_replication_metadata: Option<ObjectReplicationMetadata>,
167
168    /// The properties of the blob.
169    #[serde(rename = "Properties", skip_serializing_if = "Option::is_none")]
170    pub properties: Option<BlobProperties>,
171
172    /// The snapshot of the blob.
173    #[serde(rename = "Snapshot", skip_serializing_if = "Option::is_none")]
174    pub snapshot: Option<String>,
175
176    /// The version ID of the blob.
177    #[serde(rename = "VersionId", skip_serializing_if = "Option::is_none")]
178    pub version_id: Option<String>,
179}
180
181/// Represents a blob name.
182#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
183#[non_exhaustive]
184pub struct BlobName {
185    /// The blob name.
186    #[serde(rename = "$text", skip_serializing_if = "Option::is_none")]
187    pub content: Option<String>,
188
189    /// Whether the blob name is encoded.
190    #[serde(rename = "@Encoded", skip_serializing_if = "Option::is_none")]
191    pub encoded: Option<bool>,
192}
193
194/// The properties of a blob.
195#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
196#[non_exhaustive]
197#[serde(rename = "Properties")]
198pub struct BlobProperties {
199    /// The access tier of the blob.
200    #[serde(rename = "AccessTier", skip_serializing_if = "Option::is_none")]
201    pub access_tier: Option<AccessTier>,
202
203    /// The date-time that the access tier of the blob changed.
204    #[serde(
205        default,
206        rename = "AccessTierChangeTime",
207        skip_serializing_if = "Option::is_none",
208        with = "azure_core::time::rfc7231::option"
209    )]
210    pub access_tier_change_time: Option<OffsetDateTime>,
211
212    /// Whether the access tier is inferred.
213    #[serde(rename = "AccessTierInferred", skip_serializing_if = "Option::is_none")]
214    pub access_tier_inferred: Option<bool>,
215
216    /// The archive status of the blob.
217    #[serde(rename = "ArchiveStatus", skip_serializing_if = "Option::is_none")]
218    pub archive_status: Option<ArchiveStatus>,
219
220    /// The sequence number of the blob.
221    #[serde(
222        rename = "x-ms-blob-sequence-number",
223        skip_serializing_if = "Option::is_none"
224    )]
225    pub blob_sequence_number: Option<i64>,
226
227    /// The blob type.
228    #[serde(rename = "BlobType", skip_serializing_if = "Option::is_none")]
229    pub blob_type: Option<BlobType>,
230
231    /// The cache control of the blob.
232    #[serde(rename = "Cache-Control", skip_serializing_if = "Option::is_none")]
233    pub cache_control: Option<String>,
234
235    /// The content disposition of the blob.
236    #[serde(
237        rename = "Content-Disposition",
238        skip_serializing_if = "Option::is_none"
239    )]
240    pub content_disposition: Option<String>,
241
242    /// The content encoding of the blob.
243    #[serde(rename = "Content-Encoding", skip_serializing_if = "Option::is_none")]
244    pub content_encoding: Option<String>,
245
246    /// The content language of the blob.
247    #[serde(rename = "Content-Language", skip_serializing_if = "Option::is_none")]
248    pub content_language: Option<String>,
249
250    /// The content length of the blob.
251    #[serde(rename = "Content-Length", skip_serializing_if = "Option::is_none")]
252    pub content_length: Option<u64>,
253
254    /// The content MD5 of the blob.
255    #[serde(
256        default,
257        deserialize_with = "base64::option::deserialize",
258        rename = "Content-MD5",
259        serialize_with = "base64::option::serialize",
260        skip_serializing_if = "Option::is_none"
261    )]
262    pub content_md5: Option<Vec<u8>>,
263
264    /// The content type of the blob.
265    #[serde(rename = "Content-Type", skip_serializing_if = "Option::is_none")]
266    pub content_type: Option<String>,
267
268    /// The copy completion date-time of the blob.
269    #[serde(
270        default,
271        rename = "CopyCompletionTime",
272        skip_serializing_if = "Option::is_none",
273        with = "azure_core::time::rfc7231::option"
274    )]
275    pub copy_completion_time: Option<OffsetDateTime>,
276
277    /// The copy ID of the blob.
278    #[serde(rename = "CopyId", skip_serializing_if = "Option::is_none")]
279    pub copy_id: Option<String>,
280
281    /// The copy progress of the blob.
282    #[serde(rename = "CopyProgress", skip_serializing_if = "Option::is_none")]
283    pub copy_progress: Option<String>,
284
285    /// The copy source of the blob.
286    #[serde(rename = "CopySource", skip_serializing_if = "Option::is_none")]
287    pub copy_source: Option<String>,
288
289    /// The copy status of the blob.
290    #[serde(rename = "CopyStatus", skip_serializing_if = "Option::is_none")]
291    pub copy_status: Option<CopyStatus>,
292
293    /// The copy status description of the blob.
294    #[serde(
295        rename = "CopyStatusDescription",
296        skip_serializing_if = "Option::is_none"
297    )]
298    pub copy_status_description: Option<String>,
299
300    /// The date-time the blob was created.
301    #[serde(
302        default,
303        rename = "Creation-Time",
304        skip_serializing_if = "Option::is_none",
305        with = "azure_core::time::rfc7231::option"
306    )]
307    pub creation_time: Option<OffsetDateTime>,
308
309    /// The date-time the blob was deleted.
310    #[serde(
311        default,
312        rename = "DeletedTime",
313        skip_serializing_if = "Option::is_none",
314        with = "azure_core::time::rfc7231::option"
315    )]
316    pub deleted_time: Option<OffsetDateTime>,
317
318    /// The name of the destination snapshot.
319    #[serde(
320        rename = "DestinationSnapshot",
321        skip_serializing_if = "Option::is_none"
322    )]
323    pub destination_snapshot: Option<String>,
324
325    /// The SHA-256 hash of the blob's encryption key, if provided.
326    #[serde(
327        rename = "CustomerProvidedKeySha256",
328        skip_serializing_if = "Option::is_none"
329    )]
330    pub encryption_key_sha256: Option<String>,
331
332    /// The encryption scope of the blob.
333    #[serde(rename = "EncryptionScope", skip_serializing_if = "Option::is_none")]
334    pub encryption_scope: Option<String>,
335
336    /// The blob ETag.
337    #[serde(rename = "Etag", skip_serializing_if = "Option::is_none")]
338    pub etag: Option<Etag>,
339
340    /// The expiry time of the blob.
341    #[serde(
342        default,
343        rename = "Expiry-Time",
344        skip_serializing_if = "Option::is_none",
345        with = "azure_core::time::rfc7231::option"
346    )]
347    pub expires_on: Option<OffsetDateTime>,
348
349    /// The date-time the immutability policy of the blob expires.
350    #[serde(
351        default,
352        rename = "ImmutabilityPolicyUntilDate",
353        skip_serializing_if = "Option::is_none",
354        with = "azure_core::time::rfc7231::option"
355    )]
356    pub immutability_policy_expires_on: Option<OffsetDateTime>,
357
358    /// The immutability policy mode of the blob.
359    #[serde(
360        rename = "ImmutabilityPolicyMode",
361        skip_serializing_if = "Option::is_none"
362    )]
363    pub immutability_policy_mode: Option<ImmutabilityPolicyMode>,
364
365    /// Whether the blob is an incremental copy.
366    #[serde(rename = "IncrementalCopy", skip_serializing_if = "Option::is_none")]
367    pub incremental_copy: Option<bool>,
368
369    /// Whether the blob is sealed.
370    #[serde(rename = "Sealed", skip_serializing_if = "Option::is_none")]
371    pub is_sealed: Option<bool>,
372
373    /// The date-time the blob was last accessed.
374    #[serde(
375        default,
376        rename = "LastAccessTime",
377        skip_serializing_if = "Option::is_none",
378        with = "azure_core::time::rfc7231::option"
379    )]
380    pub last_accessed_on: Option<OffsetDateTime>,
381
382    /// The date-time the blob was last modified.
383    #[serde(
384        default,
385        rename = "Last-Modified",
386        skip_serializing_if = "Option::is_none",
387        with = "azure_core::time::rfc7231::option"
388    )]
389    pub last_modified: Option<OffsetDateTime>,
390
391    /// The lease duration of the blob.
392    #[serde(rename = "LeaseDuration", skip_serializing_if = "Option::is_none")]
393    pub lease_duration: Option<LeaseDuration>,
394
395    /// The lease state of the blob.
396    #[serde(rename = "LeaseState", skip_serializing_if = "Option::is_none")]
397    pub lease_state: Option<LeaseState>,
398
399    /// The lease status of the blob.
400    #[serde(rename = "LeaseStatus", skip_serializing_if = "Option::is_none")]
401    pub lease_status: Option<LeaseStatus>,
402
403    /// Whether the blob is under legal hold.
404    #[serde(rename = "LegalHold", skip_serializing_if = "Option::is_none")]
405    pub legal_hold: Option<bool>,
406
407    /// The rehydrate priority of the blob.
408    #[serde(rename = "RehydratePriority", skip_serializing_if = "Option::is_none")]
409    pub rehydrate_priority: Option<RehydratePriority>,
410
411    /// The remaining retention days of the blob.
412    #[serde(
413        rename = "RemainingRetentionDays",
414        skip_serializing_if = "Option::is_none"
415    )]
416    pub remaining_retention_days: Option<i32>,
417
418    /// Whether the blob is encrypted on the server.
419    #[serde(rename = "ServerEncrypted", skip_serializing_if = "Option::is_none")]
420    pub server_encrypted: Option<bool>,
421
422    /// The number of tags for the blob.
423    #[serde(rename = "TagCount", skip_serializing_if = "Option::is_none")]
424    pub tag_count: Option<i32>,
425}
426
427/// Contains results for `BlobServiceClient::get_account_info()`
428#[derive(SafeDebug)]
429pub struct BlobServiceClientGetAccountInfoResult;
430
431/// The blob service properties.
432#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
433#[serde(rename = "StorageServiceProperties")]
434pub struct BlobServiceProperties {
435    /// The CORS properties.
436    #[serde(
437        default,
438        deserialize_with = "CorsCorsRule::unwrap",
439        rename = "Cors",
440        serialize_with = "CorsCorsRule::wrap",
441        skip_serializing_if = "Option::is_none"
442    )]
443    pub cors: Option<Vec<CorsRule>>,
444
445    /// The default service version.
446    #[serde(
447        rename = "DefaultServiceVersion",
448        skip_serializing_if = "Option::is_none"
449    )]
450    pub default_service_version: Option<String>,
451
452    /// The delete retention policy.
453    #[serde(
454        rename = "DeleteRetentionPolicy",
455        skip_serializing_if = "Option::is_none"
456    )]
457    pub delete_retention_policy: Option<RetentionPolicy>,
458
459    /// The hour metrics properties.
460    #[serde(rename = "HourMetrics", skip_serializing_if = "Option::is_none")]
461    pub hour_metrics: Option<Metrics>,
462
463    /// The logging properties.
464    #[serde(rename = "Logging", skip_serializing_if = "Option::is_none")]
465    pub logging: Option<Logging>,
466
467    /// The minute metrics properties.
468    #[serde(rename = "MinuteMetrics", skip_serializing_if = "Option::is_none")]
469    pub minute_metrics: Option<Metrics>,
470
471    /// The static website properties.
472    #[serde(rename = "StaticWebsite", skip_serializing_if = "Option::is_none")]
473    pub static_website: Option<StaticWebsite>,
474}
475
476/// A key-value pair associated with a blob.
477#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
478#[serde(rename = "Tag")]
479pub struct BlobTag {
480    /// The key of the tag.
481    #[serde(rename = "Key", skip_serializing_if = "Option::is_none")]
482    pub key: Option<String>,
483
484    /// The value of the tag.
485    #[serde(rename = "Value", skip_serializing_if = "Option::is_none")]
486    pub value: Option<String>,
487}
488
489/// A list of blob tags.
490#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
491#[serde(rename = "Tags")]
492pub struct BlobTags {
493    /// A list of blob tags.
494    #[serde(
495        default,
496        deserialize_with = "Blob_tag_setBlobTag::unwrap",
497        rename = "TagSet",
498        serialize_with = "Blob_tag_setBlobTag::wrap",
499        skip_serializing_if = "Option::is_none"
500    )]
501    pub blob_tag_set: Option<Vec<BlobTag>>,
502}
503
504/// Represents a single block in a block blob.
505#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
506#[non_exhaustive]
507pub struct Block {
508    /// The base64 encoded block ID.
509    #[serde(
510        default,
511        deserialize_with = "base64::option::deserialize",
512        rename = "Name",
513        serialize_with = "base64::option::serialize",
514        skip_serializing_if = "Option::is_none"
515    )]
516    pub name: Option<Vec<u8>>,
517
518    /// The block size in bytes.
519    #[serde(rename = "Size", skip_serializing_if = "Option::is_none")]
520    pub size: Option<i64>,
521}
522
523/// Contains results for `BlockBlobClient::commit_block_list()`
524#[derive(SafeDebug)]
525pub struct BlockBlobClientCommitBlockListResult;
526
527/// Contains results for `BlockBlobClient::stage_block_from_url()`
528#[derive(SafeDebug)]
529pub struct BlockBlobClientStageBlockFromUrlResult;
530
531/// Contains results for `BlockBlobClient::stage_block()`
532#[derive(SafeDebug)]
533pub struct BlockBlobClientStageBlockResult;
534
535/// Contains results for `BlockBlobClient::upload_blob_from_url()`
536#[derive(SafeDebug)]
537pub struct BlockBlobClientUploadBlobFromUrlResult;
538
539/// Contains results for `BlockBlobClient::upload_internal()`
540#[derive(SafeDebug)]
541pub(crate) struct BlockBlobClientUploadInternalResult;
542
543/// Contains the committed and uncommitted blocks in a block blob.
544#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
545#[non_exhaustive]
546pub struct BlockList {
547    /// The list of committed blocks.
548    #[serde(
549        default,
550        deserialize_with = "Committed_blocksBlock::unwrap",
551        rename = "CommittedBlocks",
552        serialize_with = "Committed_blocksBlock::wrap",
553        skip_serializing_if = "Option::is_none"
554    )]
555    pub committed_blocks: Option<Vec<Block>>,
556
557    /// The list of uncommitted blocks.
558    #[serde(
559        default,
560        deserialize_with = "Uncommitted_blocksBlock::unwrap",
561        rename = "UncommittedBlocks",
562        serialize_with = "Uncommitted_blocksBlock::wrap",
563        skip_serializing_if = "Option::is_none"
564    )]
565    pub uncommitted_blocks: Option<Vec<Block>>,
566}
567
568/// The block lookup list.
569#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
570#[serde(rename = "BlockList")]
571pub struct BlockLookupList {
572    /// The committed blocks.
573    #[serde(
574        default,
575        rename = "Committed",
576        skip_serializing_if = "Option::is_none",
577        with = "models_serde::option_vec_encoded_bytes_std"
578    )]
579    pub committed: Option<Vec<Vec<u8>>>,
580
581    /// The latest blocks.
582    #[serde(
583        default,
584        rename = "Latest",
585        skip_serializing_if = "Option::is_none",
586        with = "models_serde::option_vec_encoded_bytes_std"
587    )]
588    pub latest: Option<Vec<Vec<u8>>>,
589
590    /// The uncommitted blocks.
591    #[serde(
592        default,
593        rename = "Uncommitted",
594        skip_serializing_if = "Option::is_none",
595        with = "models_serde::option_vec_encoded_bytes_std"
596    )]
597    pub uncommitted: Option<Vec<Vec<u8>>>,
598}
599
600/// A clear range.
601#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
602#[non_exhaustive]
603pub struct ClearRange {
604    /// The end of the byte range.
605    #[serde(rename = "End", skip_serializing_if = "Option::is_none")]
606    pub end: Option<i64>,
607
608    /// The start of the byte range.
609    #[serde(rename = "Start", skip_serializing_if = "Option::is_none")]
610    pub start: Option<i64>,
611}
612
613/// Represents a container.
614#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
615#[non_exhaustive]
616#[serde(rename = "Container")]
617pub struct ContainerItem {
618    /// Whether the container is soft-deleted.
619    #[serde(rename = "Deleted", skip_serializing_if = "Option::is_none")]
620    pub deleted: Option<bool>,
621
622    /// The metadata of the container.
623    #[serde(rename = "Metadata", skip_serializing_if = "Option::is_none")]
624    pub metadata: Option<HashMap<String, String>>,
625
626    /// The name of the container.
627    #[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
628    pub name: Option<String>,
629
630    /// The properties of the container.
631    #[serde(rename = "Properties", skip_serializing_if = "Option::is_none")]
632    pub properties: Option<ContainerProperties>,
633
634    /// The version of the container.
635    #[serde(rename = "Version", skip_serializing_if = "Option::is_none")]
636    pub version: Option<String>,
637}
638
639/// The properties of a container.
640#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
641#[non_exhaustive]
642pub struct ContainerProperties {
643    /// The default encryption scope of the container.
644    #[serde(
645        rename = "DefaultEncryptionScope",
646        skip_serializing_if = "Option::is_none"
647    )]
648    pub default_encryption_scope: Option<String>,
649
650    /// The date-time the container was deleted.
651    #[serde(
652        default,
653        rename = "DeletedTime",
654        skip_serializing_if = "Option::is_none",
655        with = "azure_core::time::rfc7231::option"
656    )]
657    pub deleted_time: Option<OffsetDateTime>,
658
659    /// The ETag of the container.
660    #[serde(rename = "Etag", skip_serializing_if = "Option::is_none")]
661    pub etag: Option<Etag>,
662
663    /// Whether the container has an immutability policy.
664    #[serde(
665        rename = "HasImmutabilityPolicy",
666        skip_serializing_if = "Option::is_none"
667    )]
668    pub has_immutability_policy: Option<bool>,
669
670    /// Whether the container has a legal hold.
671    #[serde(rename = "HasLegalHold", skip_serializing_if = "Option::is_none")]
672    pub has_legal_hold: Option<bool>,
673
674    /// Whether immutable storage with versioning is enabled.
675    #[serde(
676        rename = "ImmutableStorageWithVersioningEnabled",
677        skip_serializing_if = "Option::is_none"
678    )]
679    pub is_immutable_storage_with_versioning_enabled: Option<bool>,
680
681    /// The date-time that the container was last modified.
682    #[serde(
683        default,
684        rename = "Last-Modified",
685        skip_serializing_if = "Option::is_none",
686        with = "azure_core::time::rfc7231::option"
687    )]
688    pub last_modified: Option<OffsetDateTime>,
689
690    /// The lease duration of the container.
691    #[serde(rename = "LeaseDuration", skip_serializing_if = "Option::is_none")]
692    pub lease_duration: Option<LeaseDuration>,
693
694    /// The lease state of the container.
695    #[serde(rename = "LeaseState", skip_serializing_if = "Option::is_none")]
696    pub lease_state: Option<LeaseState>,
697
698    /// The lease status of the container.
699    #[serde(rename = "LeaseStatus", skip_serializing_if = "Option::is_none")]
700    pub lease_status: Option<LeaseStatus>,
701
702    /// Whether to prevent encryption scope override.
703    #[serde(
704        rename = "DenyEncryptionScopeOverride",
705        skip_serializing_if = "Option::is_none"
706    )]
707    pub prevent_encryption_scope_override: Option<bool>,
708
709    /// The public access type of the container.
710    #[serde(rename = "PublicAccess", skip_serializing_if = "Option::is_none")]
711    pub public_access: Option<PublicAccessType>,
712
713    /// The remaining retention days of the container.
714    #[serde(
715        rename = "RemainingRetentionDays",
716        skip_serializing_if = "Option::is_none"
717    )]
718    pub remaining_retention_days: Option<i32>,
719}
720
721/// A Cross-Origin Resource Sharing (CORS) rule.
722#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
723#[serde(rename = "CorsRule")]
724pub struct CorsRule {
725    /// The allowed headers.
726    #[serde(rename = "AllowedHeaders", skip_serializing_if = "Option::is_none")]
727    pub allowed_headers: Option<String>,
728
729    /// The allowed methods.
730    #[serde(rename = "AllowedMethods", skip_serializing_if = "Option::is_none")]
731    pub allowed_methods: Option<String>,
732
733    /// The allowed origins.
734    #[serde(rename = "AllowedOrigins", skip_serializing_if = "Option::is_none")]
735    pub allowed_origins: Option<String>,
736
737    /// The exposed headers.
738    #[serde(rename = "ExposedHeaders", skip_serializing_if = "Option::is_none")]
739    pub exposed_headers: Option<String>,
740
741    /// The maximum age in seconds.
742    #[serde(rename = "MaxAgeInSeconds", skip_serializing_if = "Option::is_none")]
743    pub max_age_in_seconds: Option<i32>,
744}
745
746/// The error response.
747///
748/// This defines the wire format only. Language SDKs wrap this in idiomatic error types.
749#[derive(Clone, Deserialize, SafeDebug, Serialize)]
750pub struct Error {
751    /// The error code.
752    #[serde(rename = "Code", skip_serializing_if = "Option::is_none")]
753    pub code: Option<StorageErrorCode>,
754
755    /// The copy source error code.
756    #[serde(
757        rename = "CopySourceErrorCode",
758        skip_serializing_if = "Option::is_none"
759    )]
760    pub copy_source_error_code: Option<String>,
761
762    /// The copy source error message.
763    #[serde(
764        rename = "CopySourceErrorMessage",
765        skip_serializing_if = "Option::is_none"
766    )]
767    pub copy_source_error_message: Option<String>,
768
769    /// The copy source status code.
770    #[serde(
771        rename = "CopySourceStatusCode",
772        skip_serializing_if = "Option::is_none"
773    )]
774    pub copy_source_status_code: Option<i32>,
775
776    /// The error code.
777    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
778    pub error_code: Option<String>,
779
780    /// The error message.
781    #[serde(rename = "Message", skip_serializing_if = "Option::is_none")]
782    pub message: Option<String>,
783
784    /// The error code for the copy source.
785    #[serde(
786        rename = "xMsCopySourceErrorCode",
787        skip_serializing_if = "Option::is_none"
788    )]
789    pub x_ms_copy_source_error_code: Option<String>,
790
791    /// The status code for the copy source.
792    #[serde(
793        rename = "xMsCopySourceStatusCode",
794        skip_serializing_if = "Option::is_none"
795    )]
796    pub x_ms_copy_source_status_code: Option<i32>,
797}
798
799/// The filtered blob item.
800#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
801#[non_exhaustive]
802#[serde(rename = "Blob")]
803pub struct FilterBlobItem {
804    /// The name of the container.
805    #[serde(rename = "ContainerName", skip_serializing_if = "Option::is_none")]
806    pub container_name: Option<String>,
807
808    /// Whether it is the current version of the blob.
809    #[serde(rename = "IsCurrentVersion", skip_serializing_if = "Option::is_none")]
810    pub is_current_version: Option<bool>,
811
812    /// The name of the blob.
813    #[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
814    pub name: Option<String>,
815
816    /// The tags of the blob.
817    #[serde(rename = "Tags", skip_serializing_if = "Option::is_none")]
818    pub tags: Option<BlobTags>,
819
820    /// The version ID of the blob.
821    #[serde(rename = "VersionId", skip_serializing_if = "Option::is_none")]
822    pub version_id: Option<String>,
823}
824
825/// The result of the Find Blobs by Tags API.
826#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
827#[non_exhaustive]
828#[serde(rename = "EnumerationResults")]
829pub struct FilteredBlobResponse {
830    /// The list of filtered blobs.
831    #[serde(
832        default,
833        deserialize_with = "Blob_itemsFilterBlobItem::unwrap",
834        rename = "Blobs",
835        serialize_with = "Blob_itemsFilterBlobItem::wrap"
836    )]
837    pub blob_items: Vec<FilterBlobItem>,
838
839    /// An opaque string value that identifies the portion of the result set to be returned with the next operation. Use this
840    /// value in the next request to continue the listing operation.
841    #[serde(rename = "NextMarker", skip_serializing_if = "Option::is_none")]
842    pub next_marker: Option<String>,
843
844    /// The service endpoint.
845    #[serde(rename = "@ServiceEndpoint", skip_serializing_if = "Option::is_none")]
846    pub service_endpoint: Option<String>,
847
848    /// The filter expression for the blobs.
849    #[serde(rename = "Where", skip_serializing_if = "Option::is_none")]
850    pub where_prop: Option<String>,
851}
852
853/// Geo-replication information for the secondary storage service.
854#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
855#[non_exhaustive]
856pub struct GeoReplication {
857    /// A date-time value that indicates where all primary writes preceding this value are guaranteed to be available for read
858    /// operations at the secondary. Primary writes after this point in time may or may not be available for reads.
859    #[serde(
860        default,
861        rename = "LastSyncTime",
862        skip_serializing_if = "Option::is_none",
863        with = "azure_core::time::rfc7231::option"
864    )]
865    pub last_sync_time: Option<OffsetDateTime>,
866
867    /// The status of the secondary location.
868    #[serde(rename = "Status", skip_serializing_if = "Option::is_none")]
869    pub status: Option<GeoReplicationStatusType>,
870}
871
872/// Key information.
873#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
874pub struct KeyInfo {
875    /// The delegated user tenant ID in Entra ID.
876    #[serde(rename = "DelegatedUserTid", skip_serializing_if = "Option::is_none")]
877    pub delegated_user_tid: Option<String>,
878
879    /// The date-time the key expires.
880    #[serde(
881        default,
882        deserialize_with = "models_serde::option_offset_date_time_rfc3339::deserialize",
883        rename = "Expiry",
884        serialize_with = "azure_storage_common::rfc3339::seconds_only::option::serialize",
885        skip_serializing_if = "Option::is_none"
886    )]
887    pub expiry: Option<OffsetDateTime>,
888
889    /// The date-time the key is active.
890    #[serde(
891        default,
892        deserialize_with = "models_serde::option_offset_date_time_rfc3339::deserialize",
893        rename = "Start",
894        serialize_with = "azure_storage_common::rfc3339::seconds_only::option::serialize",
895        skip_serializing_if = "Option::is_none"
896    )]
897    pub start: Option<OffsetDateTime>,
898}
899
900/// The result of the List Blobs API.
901#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
902#[non_exhaustive]
903#[serde(rename = "EnumerationResults")]
904pub struct ListBlobsResponse {
905    /// The list of blobs.
906    #[serde(
907        default,
908        deserialize_with = "Blob_itemsBlobItem::unwrap",
909        rename = "Blobs",
910        serialize_with = "Blob_itemsBlobItem::wrap"
911    )]
912    pub blob_items: Vec<BlobItem>,
913
914    /// The container name.
915    #[serde(rename = "@ContainerName", skip_serializing_if = "Option::is_none")]
916    pub container_name: Option<String>,
917
918    /// An opaque string value that identifies the portion of the result set returned with this operation.
919    #[serde(rename = "Marker", skip_serializing_if = "Option::is_none")]
920    pub marker: Option<String>,
921
922    /// The maximum number of blobs to be returned with this operation.
923    #[serde(rename = "MaxResults", skip_serializing_if = "Option::is_none")]
924    pub max_results: Option<i32>,
925
926    /// An opaque string value that identifies the portion of the result set to be returned with the next operation. Use this
927    /// value in the next request to continue the listing operation.
928    #[serde(rename = "NextMarker", skip_serializing_if = "Option::is_none")]
929    pub next_marker: Option<String>,
930
931    /// The prefix of the list operation.
932    #[serde(rename = "Prefix", skip_serializing_if = "Option::is_none")]
933    pub prefix: Option<String>,
934
935    /// The service endpoint.
936    #[serde(rename = "@ServiceEndpoint", skip_serializing_if = "Option::is_none")]
937    pub service_endpoint: Option<String>,
938}
939
940/// The result of the List Containers API.
941#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
942#[non_exhaustive]
943#[serde(rename = "EnumerationResults")]
944pub struct ListContainersResponse {
945    /// The list of containers.
946    #[serde(
947        default,
948        deserialize_with = "Container_itemsContainerItem::unwrap",
949        rename = "Containers",
950        serialize_with = "Container_itemsContainerItem::wrap"
951    )]
952    pub container_items: Vec<ContainerItem>,
953
954    /// An opaque string value that identifies the portion of the result set returned with this operation.
955    #[serde(rename = "Marker", skip_serializing_if = "Option::is_none")]
956    pub marker: Option<String>,
957
958    /// The maximum number of containers to be returned with this operation.
959    #[serde(rename = "MaxResults", skip_serializing_if = "Option::is_none")]
960    pub max_results: Option<i32>,
961
962    /// An opaque string value that identifies the portion of the result set to be returned with the next operation. Use this
963    /// value in the next request to continue the listing operation.
964    #[serde(rename = "NextMarker", skip_serializing_if = "Option::is_none")]
965    pub next_marker: Option<String>,
966
967    /// The prefix of the containers.
968    #[serde(rename = "Prefix", skip_serializing_if = "Option::is_none")]
969    pub prefix: Option<String>,
970
971    /// The service endpoint.
972    #[serde(rename = "@ServiceEndpoint", skip_serializing_if = "Option::is_none")]
973    pub service_endpoint: Option<String>,
974}
975
976/// Azure Analytics logging settings.
977#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
978pub struct Logging {
979    /// Whether delete operation is logged.
980    #[serde(rename = "Delete", skip_serializing_if = "Option::is_none")]
981    pub delete: Option<bool>,
982
983    /// Whether read operation is logged.
984    #[serde(rename = "Read", skip_serializing_if = "Option::is_none")]
985    pub read: Option<bool>,
986
987    /// The retention policy of the logs.
988    #[serde(rename = "RetentionPolicy", skip_serializing_if = "Option::is_none")]
989    pub retention_policy: Option<RetentionPolicy>,
990
991    /// The version of the logging properties.
992    #[serde(rename = "Version", skip_serializing_if = "Option::is_none")]
993    pub version: Option<String>,
994
995    /// Whether write operation is logged.
996    #[serde(rename = "Write", skip_serializing_if = "Option::is_none")]
997    pub write: Option<bool>,
998}
999
1000/// The metrics properties.
1001#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1002pub struct Metrics {
1003    /// Whether the metrics are enabled.
1004    #[serde(rename = "Enabled", skip_serializing_if = "Option::is_none")]
1005    pub enabled: Option<bool>,
1006
1007    /// Whether to include API in the metrics.
1008    #[serde(rename = "IncludeAPIs", skip_serializing_if = "Option::is_none")]
1009    pub include_apis: Option<bool>,
1010
1011    /// The retention policy of the metrics.
1012    #[serde(rename = "RetentionPolicy", skip_serializing_if = "Option::is_none")]
1013    pub retention_policy: Option<RetentionPolicy>,
1014
1015    /// The version of the metrics properties.
1016    #[serde(rename = "Version", skip_serializing_if = "Option::is_none")]
1017    pub version: Option<String>,
1018}
1019
1020/// The object replication metadata.
1021#[derive(Clone, Default, SafeDebug)]
1022#[non_exhaustive]
1023pub struct ObjectReplicationMetadata {
1024    /// Contains unnamed additional properties.
1025    pub additional_properties: Option<HashMap<String, String>>,
1026}
1027
1028/// Contains results for `PageBlobClient::clear_pages()`
1029#[derive(SafeDebug)]
1030pub struct PageBlobClientClearPagesResult;
1031
1032/// Contains results for `PageBlobClient::create()`
1033#[derive(SafeDebug)]
1034pub struct PageBlobClientCreateResult;
1035
1036/// Contains results for `PageBlobClient::resize()`
1037#[derive(SafeDebug)]
1038pub struct PageBlobClientResizeResult;
1039
1040/// Contains results for `PageBlobClient::set_sequence_number()`
1041#[derive(SafeDebug)]
1042pub struct PageBlobClientSetSequenceNumberResult;
1043
1044/// Contains results for `PageBlobClient::upload_pages_from_url()`
1045#[derive(SafeDebug)]
1046pub struct PageBlobClientUploadPagesFromUrlResult;
1047
1048/// Contains results for `PageBlobClient::upload_pages()`
1049#[derive(SafeDebug)]
1050pub struct PageBlobClientUploadPagesResult;
1051
1052/// The result of the Get Pages API.
1053#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1054#[non_exhaustive]
1055pub struct PageList {
1056    /// The clear ranges.
1057    #[serde(rename = "ClearRange", skip_serializing_if = "Option::is_none")]
1058    pub clear_ranges: Option<Vec<ClearRange>>,
1059
1060    /// An opaque string value that identifies the portion of the result set to be returned with the next operation. Use this
1061    /// value in the next request to continue the listing operation.
1062    #[serde(rename = "NextMarker", skip_serializing_if = "Option::is_none")]
1063    pub next_marker: Option<String>,
1064
1065    /// The page ranges.
1066    #[serde(default, rename = "PageRange")]
1067    pub page_ranges: Vec<PageRange>,
1068}
1069
1070/// A page range.
1071#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1072#[non_exhaustive]
1073pub struct PageRange {
1074    /// The end of the byte range.
1075    #[serde(rename = "End", skip_serializing_if = "Option::is_none")]
1076    pub end: Option<i64>,
1077
1078    /// The start of the byte range.
1079    #[serde(rename = "Start", skip_serializing_if = "Option::is_none")]
1080    pub start: Option<i64>,
1081}
1082
1083/// The retention policy.
1084#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1085pub struct RetentionPolicy {
1086    /// Whether to allow permanent delete.
1087    #[serde(
1088        rename = "AllowPermanentDelete",
1089        skip_serializing_if = "Option::is_none"
1090    )]
1091    pub allow_permanent_delete: Option<bool>,
1092
1093    /// The number of days to retain the logs.
1094    #[serde(rename = "Days", skip_serializing_if = "Option::is_none")]
1095    pub days: Option<i32>,
1096
1097    /// Whether the policy is enabled.
1098    #[serde(rename = "Enabled", skip_serializing_if = "Option::is_none")]
1099    pub enabled: Option<bool>,
1100}
1101
1102/// A signed identifier.
1103#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1104#[serde(rename = "SignedIdentifier")]
1105pub struct SignedIdentifier {
1106    /// The access policy for the signed identifier.
1107    #[serde(rename = "AccessPolicy", skip_serializing_if = "Option::is_none")]
1108    pub access_policy: Option<AccessPolicy>,
1109
1110    /// The unique ID for the signed identifier.
1111    #[serde(rename = "Id", skip_serializing_if = "Option::is_none")]
1112    pub id: Option<String>,
1113}
1114
1115/// List of signed identifiers.
1116#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1117pub struct SignedIdentifiers {
1118    /// The list of signed identifiers.
1119    #[serde(rename = "SignedIdentifier", skip_serializing_if = "Option::is_none")]
1120    pub items: Option<Vec<SignedIdentifier>>,
1121}
1122
1123/// The properties that enable an account to host a static website.
1124#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1125pub struct StaticWebsite {
1126    /// Absolute path of the default index page.
1127    #[serde(
1128        rename = "DefaultIndexDocumentPath",
1129        skip_serializing_if = "Option::is_none"
1130    )]
1131    pub default_index_document_path: Option<String>,
1132
1133    /// Indicates whether this account is hosting a static website.
1134    #[serde(rename = "Enabled", skip_serializing_if = "Option::is_none")]
1135    pub enabled: Option<bool>,
1136
1137    /// The error document.
1138    #[serde(
1139        rename = "ErrorDocument404Path",
1140        skip_serializing_if = "Option::is_none"
1141    )]
1142    pub error_document404_path: Option<String>,
1143
1144    /// The index document.
1145    #[serde(rename = "IndexDocument", skip_serializing_if = "Option::is_none")]
1146    pub index_document: Option<String>,
1147}
1148
1149/// Stats for the storage service.
1150#[derive(Clone, Default, Deserialize, SafeDebug, Serialize)]
1151#[non_exhaustive]
1152pub struct StorageServiceStats {
1153    /// The geo-replication stats.
1154    #[serde(rename = "GeoReplication", skip_serializing_if = "Option::is_none")]
1155    pub geo_replication: Option<GeoReplication>,
1156}