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