1#![allow(non_camel_case_types)]
2#![allow(unused_imports)]
3use serde::de::{value, Deserializer, IntoDeserializer};
4use serde::{Deserialize, Serialize, Serializer};
5use std::str::FromStr;
6#[doc = "An Access policy"]
7#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8pub struct AccessPolicy {
9 #[doc = "the date-time the policy is active"]
10 #[serde(rename = "Start", default, with = "azure_core::date::rfc3339::option")]
11 pub start: Option<::time::OffsetDateTime>,
12 #[doc = "the date-time the policy expires"]
13 #[serde(rename = "Expiry", default, with = "azure_core::date::rfc3339::option")]
14 pub expiry: Option<::time::OffsetDateTime>,
15 #[doc = "the permissions for the acl policy"]
16 #[serde(rename = "Permission", default, skip_serializing_if = "Option::is_none")]
17 pub permission: Option<String>,
18}
19impl AccessPolicy {
20 pub fn new() -> Self {
21 Self::default()
22 }
23}
24#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
25#[serde(remote = "AccessTier")]
26pub enum AccessTier {
27 P4,
28 P6,
29 P10,
30 P15,
31 P20,
32 P30,
33 P40,
34 P50,
35 P60,
36 P70,
37 P80,
38 Hot,
39 Cool,
40 Archive,
41 Premium,
42 Cold,
43 #[serde(skip_deserializing)]
44 UnknownValue(String),
45}
46impl FromStr for AccessTier {
47 type Err = value::Error;
48 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
49 Self::deserialize(s.into_deserializer())
50 }
51}
52impl<'de> Deserialize<'de> for AccessTier {
53 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
54 where
55 D: Deserializer<'de>,
56 {
57 let s = String::deserialize(deserializer)?;
58 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
59 Ok(deserialized)
60 }
61}
62impl Serialize for AccessTier {
63 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
64 where
65 S: Serializer,
66 {
67 match self {
68 Self::P4 => serializer.serialize_unit_variant("AccessTier", 0u32, "P4"),
69 Self::P6 => serializer.serialize_unit_variant("AccessTier", 1u32, "P6"),
70 Self::P10 => serializer.serialize_unit_variant("AccessTier", 2u32, "P10"),
71 Self::P15 => serializer.serialize_unit_variant("AccessTier", 3u32, "P15"),
72 Self::P20 => serializer.serialize_unit_variant("AccessTier", 4u32, "P20"),
73 Self::P30 => serializer.serialize_unit_variant("AccessTier", 5u32, "P30"),
74 Self::P40 => serializer.serialize_unit_variant("AccessTier", 6u32, "P40"),
75 Self::P50 => serializer.serialize_unit_variant("AccessTier", 7u32, "P50"),
76 Self::P60 => serializer.serialize_unit_variant("AccessTier", 8u32, "P60"),
77 Self::P70 => serializer.serialize_unit_variant("AccessTier", 9u32, "P70"),
78 Self::P80 => serializer.serialize_unit_variant("AccessTier", 10u32, "P80"),
79 Self::Hot => serializer.serialize_unit_variant("AccessTier", 11u32, "Hot"),
80 Self::Cool => serializer.serialize_unit_variant("AccessTier", 12u32, "Cool"),
81 Self::Archive => serializer.serialize_unit_variant("AccessTier", 13u32, "Archive"),
82 Self::Premium => serializer.serialize_unit_variant("AccessTier", 14u32, "Premium"),
83 Self::Cold => serializer.serialize_unit_variant("AccessTier", 15u32, "Cold"),
84 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
85 }
86 }
87}
88#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
89#[serde(remote = "ArchiveStatus")]
90pub enum ArchiveStatus {
91 #[serde(rename = "rehydrate-pending-to-hot")]
92 RehydratePendingToHot,
93 #[serde(rename = "rehydrate-pending-to-cool")]
94 RehydratePendingToCool,
95 #[serde(rename = "rehydrate-pending-to-cold")]
96 RehydratePendingToCold,
97 #[serde(skip_deserializing)]
98 UnknownValue(String),
99}
100impl FromStr for ArchiveStatus {
101 type Err = value::Error;
102 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
103 Self::deserialize(s.into_deserializer())
104 }
105}
106impl<'de> Deserialize<'de> for ArchiveStatus {
107 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
108 where
109 D: Deserializer<'de>,
110 {
111 let s = String::deserialize(deserializer)?;
112 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
113 Ok(deserialized)
114 }
115}
116impl Serialize for ArchiveStatus {
117 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
118 where
119 S: Serializer,
120 {
121 match self {
122 Self::RehydratePendingToHot => serializer.serialize_unit_variant("ArchiveStatus", 0u32, "rehydrate-pending-to-hot"),
123 Self::RehydratePendingToCool => serializer.serialize_unit_variant("ArchiveStatus", 1u32, "rehydrate-pending-to-cool"),
124 Self::RehydratePendingToCold => serializer.serialize_unit_variant("ArchiveStatus", 2u32, "rehydrate-pending-to-cold"),
125 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
126 }
127 }
128}
129#[doc = "Groups the settings used for formatting the response if the response should be Arrow formatted."]
130#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
131pub struct ArrowConfiguration {
132 #[serde(rename = "Schema")]
133 pub schema: arrow_configuration::Schema,
134}
135impl ArrowConfiguration {
136 pub fn new(schema: arrow_configuration::Schema) -> Self {
137 Self { schema }
138 }
139}
140pub mod arrow_configuration {
141 use super::*;
142 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
143 pub struct Schema {
144 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
145 pub items: Vec<ArrowField>,
146 }
147}
148#[doc = "Groups settings regarding specific field of an arrow schema"]
149#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
150pub struct ArrowField {
151 #[serde(rename = "Type")]
152 pub type_: String,
153 #[serde(rename = "Name", default, skip_serializing_if = "Option::is_none")]
154 pub name: Option<String>,
155 #[serde(rename = "Precision", default, skip_serializing_if = "Option::is_none")]
156 pub precision: Option<i64>,
157 #[serde(rename = "Scale", default, skip_serializing_if = "Option::is_none")]
158 pub scale: Option<i64>,
159}
160impl ArrowField {
161 pub fn new(type_: String) -> Self {
162 Self {
163 type_,
164 name: None,
165 precision: None,
166 scale: None,
167 }
168 }
169}
170#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
171pub struct BlobFlatListSegment {
172 #[serde(rename = "BlobItems")]
173 pub blob_items: Vec<BlobItemInternal>,
174}
175impl BlobFlatListSegment {
176 pub fn new(blob_items: Vec<BlobItemInternal>) -> Self {
177 Self { blob_items }
178 }
179}
180#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
181pub struct BlobHierarchyListSegment {
182 #[serde(
183 rename = "BlobPrefixes",
184 default,
185 deserialize_with = "azure_core::util::deserialize_null_as_default",
186 skip_serializing_if = "Vec::is_empty"
187 )]
188 pub blob_prefixes: Vec<BlobPrefix>,
189 #[serde(rename = "BlobItems")]
190 pub blob_items: Vec<BlobItemInternal>,
191}
192impl BlobHierarchyListSegment {
193 pub fn new(blob_items: Vec<BlobItemInternal>) -> Self {
194 Self {
195 blob_prefixes: Vec::new(),
196 blob_items,
197 }
198 }
199}
200#[doc = "An Azure Storage blob"]
201#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
202pub struct BlobItemInternal {
203 #[serde(rename = "Name")]
204 pub name: BlobName,
205 #[serde(rename = "Deleted")]
206 pub deleted: bool,
207 #[serde(rename = "Snapshot")]
208 pub snapshot: String,
209 #[serde(rename = "VersionId", default, skip_serializing_if = "Option::is_none")]
210 pub version_id: Option<String>,
211 #[serde(rename = "IsCurrentVersion", default, skip_serializing_if = "Option::is_none")]
212 pub is_current_version: Option<bool>,
213 #[doc = "Properties of a blob"]
214 #[serde(rename = "Properties")]
215 pub properties: BlobPropertiesInternal,
216 #[serde(rename = "Metadata", default, skip_serializing_if = "Option::is_none")]
217 pub metadata: Option<BlobMetadata>,
218 #[doc = "Blob tags"]
219 #[serde(rename = "Tags", default, skip_serializing_if = "Option::is_none")]
220 pub tags: Option<BlobTags>,
221 #[serde(rename = "OrMetadata", default, skip_serializing_if = "Option::is_none")]
222 pub or_metadata: Option<ObjectReplicationMetadata>,
223 #[serde(rename = "HasVersionsOnly", default, skip_serializing_if = "Option::is_none")]
224 pub has_versions_only: Option<bool>,
225}
226impl BlobItemInternal {
227 pub fn new(name: BlobName, deleted: bool, snapshot: String, properties: BlobPropertiesInternal) -> Self {
228 Self {
229 name,
230 deleted,
231 snapshot,
232 version_id: None,
233 is_current_version: None,
234 properties,
235 metadata: None,
236 tags: None,
237 or_metadata: None,
238 has_versions_only: None,
239 }
240 }
241}
242#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
243pub struct BlobMetadata {
244 #[serde(rename = "@Encrypted", default, skip_serializing_if = "Option::is_none")]
245 pub encrypted: Option<String>,
246}
247impl BlobMetadata {
248 pub fn new() -> Self {
249 Self::default()
250 }
251}
252#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
253pub struct BlobName {
254 #[doc = "Indicates if the blob name is encoded."]
255 #[serde(rename = "@Encoded", default, skip_serializing_if = "Option::is_none")]
256 pub encoded: Option<bool>,
257 #[doc = "The name of the blob."]
258 #[serde(default, skip_serializing_if = "Option::is_none")]
259 pub content: Option<String>,
260}
261impl BlobName {
262 pub fn new() -> Self {
263 Self::default()
264 }
265}
266#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
267pub struct BlobPrefix {
268 #[serde(rename = "Name")]
269 pub name: BlobName,
270}
271impl BlobPrefix {
272 pub fn new(name: BlobName) -> Self {
273 Self { name }
274 }
275}
276#[doc = "Properties of a blob"]
277#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
278pub struct BlobPropertiesInternal {
279 #[serde(rename = "Creation-Time", default, with = "azure_core::date::rfc1123::option")]
280 pub creation_time: Option<::time::OffsetDateTime>,
281 #[serde(rename = "Last-Modified", with = "azure_core::date::rfc1123")]
282 pub last_modified: ::time::OffsetDateTime,
283 #[serde(rename = "Etag")]
284 pub etag: String,
285 #[doc = "Size in bytes"]
286 #[serde(rename = "Content-Length", default, skip_serializing_if = "Option::is_none")]
287 pub content_length: Option<i64>,
288 #[serde(rename = "Content-Type", default, skip_serializing_if = "Option::is_none")]
289 pub content_type: Option<String>,
290 #[serde(rename = "Content-Encoding", default, skip_serializing_if = "Option::is_none")]
291 pub content_encoding: Option<String>,
292 #[serde(rename = "Content-Language", default, skip_serializing_if = "Option::is_none")]
293 pub content_language: Option<String>,
294 #[serde(rename = "Content-MD5", default, skip_serializing_if = "Option::is_none")]
295 pub content_md5: Option<String>,
296 #[serde(rename = "Content-Disposition", default, skip_serializing_if = "Option::is_none")]
297 pub content_disposition: Option<String>,
298 #[serde(rename = "Cache-Control", default, skip_serializing_if = "Option::is_none")]
299 pub cache_control: Option<String>,
300 #[serde(rename = "x-ms-blob-sequence-number", default, skip_serializing_if = "Option::is_none")]
301 pub x_ms_blob_sequence_number: Option<i64>,
302 #[serde(
303 rename = "BlobType",
304 default,
305 skip_serializing_if = "Option::is_none",
306 with = "azure_core::xml::text_content"
307 )]
308 pub blob_type: Option<blob_properties_internal::BlobType>,
309 #[serde(
310 rename = "LeaseStatus",
311 default,
312 skip_serializing_if = "Option::is_none",
313 with = "azure_core::xml::text_content"
314 )]
315 pub lease_status: Option<LeaseStatus>,
316 #[serde(
317 rename = "LeaseState",
318 default,
319 skip_serializing_if = "Option::is_none",
320 with = "azure_core::xml::text_content"
321 )]
322 pub lease_state: Option<LeaseState>,
323 #[serde(
324 rename = "LeaseDuration",
325 default,
326 skip_serializing_if = "Option::is_none",
327 with = "azure_core::xml::text_content"
328 )]
329 pub lease_duration: Option<LeaseDuration>,
330 #[serde(rename = "CopyId", default, skip_serializing_if = "Option::is_none")]
331 pub copy_id: Option<String>,
332 #[serde(
333 rename = "CopyStatus",
334 default,
335 skip_serializing_if = "Option::is_none",
336 with = "azure_core::xml::text_content"
337 )]
338 pub copy_status: Option<CopyStatus>,
339 #[serde(rename = "CopySource", default, skip_serializing_if = "Option::is_none")]
340 pub copy_source: Option<String>,
341 #[serde(rename = "CopyProgress", default, skip_serializing_if = "Option::is_none")]
342 pub copy_progress: Option<String>,
343 #[serde(rename = "CopyCompletionTime", default, with = "azure_core::date::rfc1123::option")]
344 pub copy_completion_time: Option<::time::OffsetDateTime>,
345 #[serde(rename = "CopyStatusDescription", default, skip_serializing_if = "Option::is_none")]
346 pub copy_status_description: Option<String>,
347 #[serde(rename = "ServerEncrypted", default, skip_serializing_if = "Option::is_none")]
348 pub server_encrypted: Option<bool>,
349 #[serde(rename = "IncrementalCopy", default, skip_serializing_if = "Option::is_none")]
350 pub incremental_copy: Option<bool>,
351 #[serde(rename = "DestinationSnapshot", default, skip_serializing_if = "Option::is_none")]
352 pub destination_snapshot: Option<String>,
353 #[serde(rename = "DeletedTime", default, with = "azure_core::date::rfc1123::option")]
354 pub deleted_time: Option<::time::OffsetDateTime>,
355 #[serde(rename = "RemainingRetentionDays", default, skip_serializing_if = "Option::is_none")]
356 pub remaining_retention_days: Option<i64>,
357 #[serde(
358 rename = "AccessTier",
359 default,
360 skip_serializing_if = "Option::is_none",
361 with = "azure_core::xml::text_content"
362 )]
363 pub access_tier: Option<AccessTier>,
364 #[serde(rename = "AccessTierInferred", default, skip_serializing_if = "Option::is_none")]
365 pub access_tier_inferred: Option<bool>,
366 #[serde(
367 rename = "ArchiveStatus",
368 default,
369 skip_serializing_if = "Option::is_none",
370 with = "azure_core::xml::text_content"
371 )]
372 pub archive_status: Option<ArchiveStatus>,
373 #[serde(rename = "CustomerProvidedKeySha256", default, skip_serializing_if = "Option::is_none")]
374 pub customer_provided_key_sha256: Option<String>,
375 #[doc = "The name of the encryption scope under which the blob is encrypted."]
376 #[serde(rename = "EncryptionScope", default, skip_serializing_if = "Option::is_none")]
377 pub encryption_scope: Option<String>,
378 #[serde(rename = "AccessTierChangeTime", default, with = "azure_core::date::rfc1123::option")]
379 pub access_tier_change_time: Option<::time::OffsetDateTime>,
380 #[serde(rename = "TagCount", default, skip_serializing_if = "Option::is_none")]
381 pub tag_count: Option<i64>,
382 #[serde(rename = "Expiry-Time", default, with = "azure_core::date::rfc1123::option")]
383 pub expiry_time: Option<::time::OffsetDateTime>,
384 #[serde(rename = "Sealed", default, skip_serializing_if = "Option::is_none")]
385 pub sealed: Option<bool>,
386 #[doc = "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard."]
387 #[serde(
388 rename = "RehydratePriority",
389 default,
390 skip_serializing_if = "Option::is_none",
391 with = "azure_core::xml::text_content"
392 )]
393 pub rehydrate_priority: Option<RehydratePriority>,
394 #[serde(rename = "LastAccessTime", default, with = "azure_core::date::rfc1123::option")]
395 pub last_access_time: Option<::time::OffsetDateTime>,
396 #[serde(rename = "ImmutabilityPolicyUntilDate", default, with = "azure_core::date::rfc1123::option")]
397 pub immutability_policy_until_date: Option<::time::OffsetDateTime>,
398 #[serde(
399 rename = "ImmutabilityPolicyMode",
400 default,
401 skip_serializing_if = "Option::is_none",
402 with = "azure_core::xml::text_content"
403 )]
404 pub immutability_policy_mode: Option<blob_properties_internal::ImmutabilityPolicyMode>,
405 #[serde(rename = "LegalHold", default, skip_serializing_if = "Option::is_none")]
406 pub legal_hold: Option<bool>,
407}
408impl BlobPropertiesInternal {
409 pub fn new(last_modified: ::time::OffsetDateTime, etag: String) -> Self {
410 Self {
411 creation_time: None,
412 last_modified,
413 etag,
414 content_length: None,
415 content_type: None,
416 content_encoding: None,
417 content_language: None,
418 content_md5: None,
419 content_disposition: None,
420 cache_control: None,
421 x_ms_blob_sequence_number: None,
422 blob_type: None,
423 lease_status: None,
424 lease_state: None,
425 lease_duration: None,
426 copy_id: None,
427 copy_status: None,
428 copy_source: None,
429 copy_progress: None,
430 copy_completion_time: None,
431 copy_status_description: None,
432 server_encrypted: None,
433 incremental_copy: None,
434 destination_snapshot: None,
435 deleted_time: None,
436 remaining_retention_days: None,
437 access_tier: None,
438 access_tier_inferred: None,
439 archive_status: None,
440 customer_provided_key_sha256: None,
441 encryption_scope: None,
442 access_tier_change_time: None,
443 tag_count: None,
444 expiry_time: None,
445 sealed: None,
446 rehydrate_priority: None,
447 last_access_time: None,
448 immutability_policy_until_date: None,
449 immutability_policy_mode: None,
450 legal_hold: None,
451 }
452 }
453}
454pub mod blob_properties_internal {
455 use super::*;
456 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
457 pub enum BlobType {
458 BlockBlob,
459 PageBlob,
460 AppendBlob,
461 }
462 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
463 pub enum ImmutabilityPolicyMode {
464 Mutable,
465 Unlocked,
466 Locked,
467 }
468}
469#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
470pub struct BlobTag {
471 #[serde(rename = "Key")]
472 pub key: String,
473 #[serde(rename = "Value")]
474 pub value: String,
475}
476impl BlobTag {
477 pub fn new(key: String, value: String) -> Self {
478 Self { key, value }
479 }
480}
481#[doc = "Blob tags"]
482#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
483pub struct BlobTags {
484 #[serde(rename = "TagSet", default, skip_serializing_if = "Option::is_none")]
485 pub tag_set: Option<blob_tags::TagSet>,
486}
487impl BlobTags {
488 pub fn new() -> Self {
489 Self { tag_set: None }
490 }
491}
492pub mod blob_tags {
493 use super::*;
494 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
495 pub struct TagSet {
496 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
497 pub items: Vec<BlobTag>,
498 }
499}
500#[doc = "Represents a single block in a block blob. It describes the block's ID and size."]
501#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
502pub struct Block {
503 #[doc = "The base64 encoded block ID."]
504 #[serde(rename = "Name")]
505 pub name: String,
506 #[doc = "The block size in bytes."]
507 #[serde(rename = "Size")]
508 pub size: i64,
509}
510impl Block {
511 pub fn new(name: String, size: i64) -> Self {
512 Self { name, size }
513 }
514}
515#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
516pub struct BlockList {
517 #[serde(rename = "CommittedBlocks", default, skip_serializing_if = "Option::is_none")]
518 pub committed_blocks: Option<block_list::CommittedBlocks>,
519 #[serde(rename = "UncommittedBlocks", default, skip_serializing_if = "Option::is_none")]
520 pub uncommitted_blocks: Option<block_list::UncommittedBlocks>,
521}
522impl BlockList {
523 pub fn new() -> Self {
524 Self::default()
525 }
526}
527pub mod block_list {
528 use super::*;
529 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
530 pub struct CommittedBlocks {
531 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
532 pub items: Vec<Block>,
533 }
534 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
535 pub struct UncommittedBlocks {
536 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
537 pub items: Vec<Block>,
538 }
539}
540#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
541pub struct BlockLookupList {
542 #[serde(
543 rename = "Committed",
544 default,
545 deserialize_with = "azure_core::util::deserialize_null_as_default",
546 skip_serializing_if = "Vec::is_empty"
547 )]
548 pub committed: Vec<String>,
549 #[serde(
550 rename = "Uncommitted",
551 default,
552 deserialize_with = "azure_core::util::deserialize_null_as_default",
553 skip_serializing_if = "Vec::is_empty"
554 )]
555 pub uncommitted: Vec<String>,
556 #[serde(
557 rename = "Latest",
558 default,
559 deserialize_with = "azure_core::util::deserialize_null_as_default",
560 skip_serializing_if = "Vec::is_empty"
561 )]
562 pub latest: Vec<String>,
563}
564impl BlockLookupList {
565 pub fn new() -> Self {
566 Self::default()
567 }
568}
569#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
570pub struct ClearRange {
571 #[serde(rename = "Start")]
572 pub start: i64,
573 #[serde(rename = "End")]
574 pub end: i64,
575}
576impl ClearRange {
577 pub fn new(start: i64, end: i64) -> Self {
578 Self { start, end }
579 }
580}
581#[doc = "An Azure Storage container"]
582#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
583pub struct ContainerItem {
584 #[serde(rename = "Name")]
585 pub name: String,
586 #[serde(rename = "Deleted", default, skip_serializing_if = "Option::is_none")]
587 pub deleted: Option<bool>,
588 #[serde(rename = "Version", default, skip_serializing_if = "Option::is_none")]
589 pub version: Option<String>,
590 #[doc = "Properties of a container"]
591 #[serde(rename = "Properties")]
592 pub properties: ContainerProperties,
593 #[serde(rename = "Metadata", default, skip_serializing_if = "Option::is_none")]
594 pub metadata: Option<ContainerMetadata>,
595}
596impl ContainerItem {
597 pub fn new(name: String, properties: ContainerProperties) -> Self {
598 Self {
599 name,
600 deleted: None,
601 version: None,
602 properties,
603 metadata: None,
604 }
605 }
606}
607#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
608pub struct ContainerMetadata {}
609impl ContainerMetadata {
610 pub fn new() -> Self {
611 Self::default()
612 }
613}
614#[doc = "Properties of a container"]
615#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
616pub struct ContainerProperties {
617 #[serde(rename = "Last-Modified", with = "azure_core::date::rfc1123")]
618 pub last_modified: ::time::OffsetDateTime,
619 #[serde(rename = "Etag")]
620 pub etag: String,
621 #[serde(
622 rename = "LeaseStatus",
623 default,
624 skip_serializing_if = "Option::is_none",
625 with = "azure_core::xml::text_content"
626 )]
627 pub lease_status: Option<LeaseStatus>,
628 #[serde(
629 rename = "LeaseState",
630 default,
631 skip_serializing_if = "Option::is_none",
632 with = "azure_core::xml::text_content"
633 )]
634 pub lease_state: Option<LeaseState>,
635 #[serde(
636 rename = "LeaseDuration",
637 default,
638 skip_serializing_if = "Option::is_none",
639 with = "azure_core::xml::text_content"
640 )]
641 pub lease_duration: Option<LeaseDuration>,
642 #[serde(
643 rename = "PublicAccess",
644 default,
645 skip_serializing_if = "Option::is_none",
646 with = "azure_core::xml::text_content"
647 )]
648 pub public_access: Option<PublicAccessType>,
649 #[serde(rename = "HasImmutabilityPolicy", default, skip_serializing_if = "Option::is_none")]
650 pub has_immutability_policy: Option<bool>,
651 #[serde(rename = "HasLegalHold", default, skip_serializing_if = "Option::is_none")]
652 pub has_legal_hold: Option<bool>,
653 #[serde(rename = "DefaultEncryptionScope", default, skip_serializing_if = "Option::is_none")]
654 pub default_encryption_scope: Option<String>,
655 #[serde(rename = "DenyEncryptionScopeOverride", default, skip_serializing_if = "Option::is_none")]
656 pub deny_encryption_scope_override: Option<bool>,
657 #[serde(rename = "DeletedTime", default, with = "azure_core::date::rfc1123::option")]
658 pub deleted_time: Option<::time::OffsetDateTime>,
659 #[serde(rename = "RemainingRetentionDays", default, skip_serializing_if = "Option::is_none")]
660 pub remaining_retention_days: Option<i64>,
661 #[doc = "Indicates if version level worm is enabled on this container."]
662 #[serde(rename = "ImmutableStorageWithVersioningEnabled", default, skip_serializing_if = "Option::is_none")]
663 pub immutable_storage_with_versioning_enabled: Option<bool>,
664}
665impl ContainerProperties {
666 pub fn new(last_modified: ::time::OffsetDateTime, etag: String) -> Self {
667 Self {
668 last_modified,
669 etag,
670 lease_status: None,
671 lease_state: None,
672 lease_duration: None,
673 public_access: None,
674 has_immutability_policy: None,
675 has_legal_hold: None,
676 default_encryption_scope: None,
677 deny_encryption_scope_override: None,
678 deleted_time: None,
679 remaining_retention_days: None,
680 immutable_storage_with_versioning_enabled: None,
681 }
682 }
683}
684#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
685pub enum CopyStatus {
686 #[serde(rename = "pending")]
687 Pending,
688 #[serde(rename = "success")]
689 Success,
690 #[serde(rename = "aborted")]
691 Aborted,
692 #[serde(rename = "failed")]
693 Failed,
694}
695#[doc = "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain"]
696#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
697pub struct CorsRule {
698 #[doc = "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS."]
699 #[serde(rename = "AllowedOrigins")]
700 pub allowed_origins: String,
701 #[doc = "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)"]
702 #[serde(rename = "AllowedMethods")]
703 pub allowed_methods: String,
704 #[doc = "the request headers that the origin domain may specify on the CORS request."]
705 #[serde(rename = "AllowedHeaders")]
706 pub allowed_headers: String,
707 #[doc = "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer"]
708 #[serde(rename = "ExposedHeaders")]
709 pub exposed_headers: String,
710 #[doc = "The maximum amount time that a browser should cache the preflight OPTIONS request."]
711 #[serde(rename = "MaxAgeInSeconds")]
712 pub max_age_in_seconds: i64,
713}
714impl CorsRule {
715 pub fn new(
716 allowed_origins: String,
717 allowed_methods: String,
718 allowed_headers: String,
719 exposed_headers: String,
720 max_age_in_seconds: i64,
721 ) -> Self {
722 Self {
723 allowed_origins,
724 allowed_methods,
725 allowed_headers,
726 exposed_headers,
727 max_age_in_seconds,
728 }
729 }
730}
731#[doc = "Groups the settings used for interpreting the blob data if the blob is delimited text formatted."]
732#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
733pub struct DelimitedTextConfiguration {
734 #[doc = "The string used to separate columns."]
735 #[serde(rename = "ColumnSeparator", default, skip_serializing_if = "Option::is_none")]
736 pub column_separator: Option<String>,
737 #[doc = "The string used to quote a specific field."]
738 #[serde(rename = "FieldQuote", default, skip_serializing_if = "Option::is_none")]
739 pub field_quote: Option<String>,
740 #[doc = "The string used to separate records."]
741 #[serde(rename = "RecordSeparator", default, skip_serializing_if = "Option::is_none")]
742 pub record_separator: Option<String>,
743 #[doc = "The string used as an escape character."]
744 #[serde(rename = "EscapeChar", default, skip_serializing_if = "Option::is_none")]
745 pub escape_char: Option<String>,
746 #[doc = "Represents whether the data has headers."]
747 #[serde(rename = "HasHeaders", default, skip_serializing_if = "Option::is_none")]
748 pub has_headers: Option<bool>,
749}
750impl DelimitedTextConfiguration {
751 pub fn new() -> Self {
752 Self::default()
753 }
754}
755#[doc = "Error codes returned by the service"]
756#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
757#[serde(remote = "ErrorCode")]
758pub enum ErrorCode {
759 AccountAlreadyExists,
760 AccountBeingCreated,
761 AccountIsDisabled,
762 AuthenticationFailed,
763 AuthorizationFailure,
764 ConditionHeadersNotSupported,
765 ConditionNotMet,
766 EmptyMetadataKey,
767 InsufficientAccountPermissions,
768 InternalError,
769 InvalidAuthenticationInfo,
770 InvalidHeaderValue,
771 InvalidHttpVerb,
772 InvalidInput,
773 InvalidMd5,
774 InvalidMetadata,
775 InvalidQueryParameterValue,
776 InvalidRange,
777 InvalidResourceName,
778 InvalidUri,
779 InvalidXmlDocument,
780 InvalidXmlNodeValue,
781 Md5Mismatch,
782 MetadataTooLarge,
783 MissingContentLengthHeader,
784 MissingRequiredQueryParameter,
785 MissingRequiredHeader,
786 MissingRequiredXmlNode,
787 MultipleConditionHeadersNotSupported,
788 OperationTimedOut,
789 OutOfRangeInput,
790 OutOfRangeQueryParameterValue,
791 RequestBodyTooLarge,
792 ResourceTypeMismatch,
793 RequestUrlFailedToParse,
794 ResourceAlreadyExists,
795 ResourceNotFound,
796 ServerBusy,
797 UnsupportedHeader,
798 UnsupportedXmlNode,
799 UnsupportedQueryParameter,
800 UnsupportedHttpVerb,
801 AppendPositionConditionNotMet,
802 BlobAlreadyExists,
803 BlobImmutableDueToPolicy,
804 BlobNotFound,
805 BlobOverwritten,
806 BlobTierInadequateForContentLength,
807 BlobUsesCustomerSpecifiedEncryption,
808 BlockCountExceedsLimit,
809 BlockListTooLong,
810 CannotChangeToLowerTier,
811 CannotVerifyCopySource,
812 ContainerAlreadyExists,
813 ContainerBeingDeleted,
814 ContainerDisabled,
815 ContainerNotFound,
816 ContentLengthLargerThanTierLimit,
817 CopyAcrossAccountsNotSupported,
818 CopyIdMismatch,
819 FeatureVersionMismatch,
820 IncrementalCopyBlobMismatch,
821 IncrementalCopyOfEarlierVersionSnapshotNotAllowed,
822 IncrementalCopySourceMustBeSnapshot,
823 InfiniteLeaseDurationRequired,
824 InvalidBlobOrBlock,
825 InvalidBlobTier,
826 InvalidBlobType,
827 InvalidBlockId,
828 InvalidBlockList,
829 InvalidOperation,
830 InvalidPageRange,
831 InvalidSourceBlobType,
832 InvalidSourceBlobUrl,
833 InvalidVersionForPageBlobOperation,
834 LeaseAlreadyPresent,
835 LeaseAlreadyBroken,
836 LeaseIdMismatchWithBlobOperation,
837 LeaseIdMismatchWithContainerOperation,
838 LeaseIdMismatchWithLeaseOperation,
839 LeaseIdMissing,
840 LeaseIsBreakingAndCannotBeAcquired,
841 LeaseIsBreakingAndCannotBeChanged,
842 LeaseIsBrokenAndCannotBeRenewed,
843 LeaseLost,
844 LeaseNotPresentWithBlobOperation,
845 LeaseNotPresentWithContainerOperation,
846 LeaseNotPresentWithLeaseOperation,
847 MaxBlobSizeConditionNotMet,
848 NoAuthenticationInformation,
849 NoPendingCopyOperation,
850 OperationNotAllowedOnIncrementalCopyBlob,
851 PendingCopyOperation,
852 PreviousSnapshotCannotBeNewer,
853 PreviousSnapshotNotFound,
854 PreviousSnapshotOperationNotSupported,
855 SequenceNumberConditionNotMet,
856 SequenceNumberIncrementTooLarge,
857 SnapshotCountExceeded,
858 SnapshotOperationRateExceeded,
859 SnapshotsPresent,
860 SourceConditionNotMet,
861 SystemInUse,
862 TargetConditionNotMet,
863 UnauthorizedBlobOverwrite,
864 BlobBeingRehydrated,
865 BlobArchived,
866 BlobNotArchived,
867 #[serde(rename = "AuthorizationSourceIPMismatch")]
868 AuthorizationSourceIpMismatch,
869 AuthorizationProtocolMismatch,
870 AuthorizationPermissionMismatch,
871 AuthorizationServiceMismatch,
872 AuthorizationResourceTypeMismatch,
873 #[serde(skip_deserializing)]
874 UnknownValue(String),
875}
876impl FromStr for ErrorCode {
877 type Err = value::Error;
878 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
879 Self::deserialize(s.into_deserializer())
880 }
881}
882impl<'de> Deserialize<'de> for ErrorCode {
883 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
884 where
885 D: Deserializer<'de>,
886 {
887 let s = String::deserialize(deserializer)?;
888 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
889 Ok(deserialized)
890 }
891}
892impl Serialize for ErrorCode {
893 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
894 where
895 S: Serializer,
896 {
897 match self {
898 Self::AccountAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 0u32, "AccountAlreadyExists"),
899 Self::AccountBeingCreated => serializer.serialize_unit_variant("ErrorCode", 1u32, "AccountBeingCreated"),
900 Self::AccountIsDisabled => serializer.serialize_unit_variant("ErrorCode", 2u32, "AccountIsDisabled"),
901 Self::AuthenticationFailed => serializer.serialize_unit_variant("ErrorCode", 3u32, "AuthenticationFailed"),
902 Self::AuthorizationFailure => serializer.serialize_unit_variant("ErrorCode", 4u32, "AuthorizationFailure"),
903 Self::ConditionHeadersNotSupported => serializer.serialize_unit_variant("ErrorCode", 5u32, "ConditionHeadersNotSupported"),
904 Self::ConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 6u32, "ConditionNotMet"),
905 Self::EmptyMetadataKey => serializer.serialize_unit_variant("ErrorCode", 7u32, "EmptyMetadataKey"),
906 Self::InsufficientAccountPermissions => serializer.serialize_unit_variant("ErrorCode", 8u32, "InsufficientAccountPermissions"),
907 Self::InternalError => serializer.serialize_unit_variant("ErrorCode", 9u32, "InternalError"),
908 Self::InvalidAuthenticationInfo => serializer.serialize_unit_variant("ErrorCode", 10u32, "InvalidAuthenticationInfo"),
909 Self::InvalidHeaderValue => serializer.serialize_unit_variant("ErrorCode", 11u32, "InvalidHeaderValue"),
910 Self::InvalidHttpVerb => serializer.serialize_unit_variant("ErrorCode", 12u32, "InvalidHttpVerb"),
911 Self::InvalidInput => serializer.serialize_unit_variant("ErrorCode", 13u32, "InvalidInput"),
912 Self::InvalidMd5 => serializer.serialize_unit_variant("ErrorCode", 14u32, "InvalidMd5"),
913 Self::InvalidMetadata => serializer.serialize_unit_variant("ErrorCode", 15u32, "InvalidMetadata"),
914 Self::InvalidQueryParameterValue => serializer.serialize_unit_variant("ErrorCode", 16u32, "InvalidQueryParameterValue"),
915 Self::InvalidRange => serializer.serialize_unit_variant("ErrorCode", 17u32, "InvalidRange"),
916 Self::InvalidResourceName => serializer.serialize_unit_variant("ErrorCode", 18u32, "InvalidResourceName"),
917 Self::InvalidUri => serializer.serialize_unit_variant("ErrorCode", 19u32, "InvalidUri"),
918 Self::InvalidXmlDocument => serializer.serialize_unit_variant("ErrorCode", 20u32, "InvalidXmlDocument"),
919 Self::InvalidXmlNodeValue => serializer.serialize_unit_variant("ErrorCode", 21u32, "InvalidXmlNodeValue"),
920 Self::Md5Mismatch => serializer.serialize_unit_variant("ErrorCode", 22u32, "Md5Mismatch"),
921 Self::MetadataTooLarge => serializer.serialize_unit_variant("ErrorCode", 23u32, "MetadataTooLarge"),
922 Self::MissingContentLengthHeader => serializer.serialize_unit_variant("ErrorCode", 24u32, "MissingContentLengthHeader"),
923 Self::MissingRequiredQueryParameter => serializer.serialize_unit_variant("ErrorCode", 25u32, "MissingRequiredQueryParameter"),
924 Self::MissingRequiredHeader => serializer.serialize_unit_variant("ErrorCode", 26u32, "MissingRequiredHeader"),
925 Self::MissingRequiredXmlNode => serializer.serialize_unit_variant("ErrorCode", 27u32, "MissingRequiredXmlNode"),
926 Self::MultipleConditionHeadersNotSupported => {
927 serializer.serialize_unit_variant("ErrorCode", 28u32, "MultipleConditionHeadersNotSupported")
928 }
929 Self::OperationTimedOut => serializer.serialize_unit_variant("ErrorCode", 29u32, "OperationTimedOut"),
930 Self::OutOfRangeInput => serializer.serialize_unit_variant("ErrorCode", 30u32, "OutOfRangeInput"),
931 Self::OutOfRangeQueryParameterValue => serializer.serialize_unit_variant("ErrorCode", 31u32, "OutOfRangeQueryParameterValue"),
932 Self::RequestBodyTooLarge => serializer.serialize_unit_variant("ErrorCode", 32u32, "RequestBodyTooLarge"),
933 Self::ResourceTypeMismatch => serializer.serialize_unit_variant("ErrorCode", 33u32, "ResourceTypeMismatch"),
934 Self::RequestUrlFailedToParse => serializer.serialize_unit_variant("ErrorCode", 34u32, "RequestUrlFailedToParse"),
935 Self::ResourceAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 35u32, "ResourceAlreadyExists"),
936 Self::ResourceNotFound => serializer.serialize_unit_variant("ErrorCode", 36u32, "ResourceNotFound"),
937 Self::ServerBusy => serializer.serialize_unit_variant("ErrorCode", 37u32, "ServerBusy"),
938 Self::UnsupportedHeader => serializer.serialize_unit_variant("ErrorCode", 38u32, "UnsupportedHeader"),
939 Self::UnsupportedXmlNode => serializer.serialize_unit_variant("ErrorCode", 39u32, "UnsupportedXmlNode"),
940 Self::UnsupportedQueryParameter => serializer.serialize_unit_variant("ErrorCode", 40u32, "UnsupportedQueryParameter"),
941 Self::UnsupportedHttpVerb => serializer.serialize_unit_variant("ErrorCode", 41u32, "UnsupportedHttpVerb"),
942 Self::AppendPositionConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 42u32, "AppendPositionConditionNotMet"),
943 Self::BlobAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 43u32, "BlobAlreadyExists"),
944 Self::BlobImmutableDueToPolicy => serializer.serialize_unit_variant("ErrorCode", 44u32, "BlobImmutableDueToPolicy"),
945 Self::BlobNotFound => serializer.serialize_unit_variant("ErrorCode", 45u32, "BlobNotFound"),
946 Self::BlobOverwritten => serializer.serialize_unit_variant("ErrorCode", 46u32, "BlobOverwritten"),
947 Self::BlobTierInadequateForContentLength => {
948 serializer.serialize_unit_variant("ErrorCode", 47u32, "BlobTierInadequateForContentLength")
949 }
950 Self::BlobUsesCustomerSpecifiedEncryption => {
951 serializer.serialize_unit_variant("ErrorCode", 48u32, "BlobUsesCustomerSpecifiedEncryption")
952 }
953 Self::BlockCountExceedsLimit => serializer.serialize_unit_variant("ErrorCode", 49u32, "BlockCountExceedsLimit"),
954 Self::BlockListTooLong => serializer.serialize_unit_variant("ErrorCode", 50u32, "BlockListTooLong"),
955 Self::CannotChangeToLowerTier => serializer.serialize_unit_variant("ErrorCode", 51u32, "CannotChangeToLowerTier"),
956 Self::CannotVerifyCopySource => serializer.serialize_unit_variant("ErrorCode", 52u32, "CannotVerifyCopySource"),
957 Self::ContainerAlreadyExists => serializer.serialize_unit_variant("ErrorCode", 53u32, "ContainerAlreadyExists"),
958 Self::ContainerBeingDeleted => serializer.serialize_unit_variant("ErrorCode", 54u32, "ContainerBeingDeleted"),
959 Self::ContainerDisabled => serializer.serialize_unit_variant("ErrorCode", 55u32, "ContainerDisabled"),
960 Self::ContainerNotFound => serializer.serialize_unit_variant("ErrorCode", 56u32, "ContainerNotFound"),
961 Self::ContentLengthLargerThanTierLimit => {
962 serializer.serialize_unit_variant("ErrorCode", 57u32, "ContentLengthLargerThanTierLimit")
963 }
964 Self::CopyAcrossAccountsNotSupported => serializer.serialize_unit_variant("ErrorCode", 58u32, "CopyAcrossAccountsNotSupported"),
965 Self::CopyIdMismatch => serializer.serialize_unit_variant("ErrorCode", 59u32, "CopyIdMismatch"),
966 Self::FeatureVersionMismatch => serializer.serialize_unit_variant("ErrorCode", 60u32, "FeatureVersionMismatch"),
967 Self::IncrementalCopyBlobMismatch => serializer.serialize_unit_variant("ErrorCode", 61u32, "IncrementalCopyBlobMismatch"),
968 Self::IncrementalCopyOfEarlierVersionSnapshotNotAllowed => {
969 serializer.serialize_unit_variant("ErrorCode", 62u32, "IncrementalCopyOfEarlierVersionSnapshotNotAllowed")
970 }
971 Self::IncrementalCopySourceMustBeSnapshot => {
972 serializer.serialize_unit_variant("ErrorCode", 63u32, "IncrementalCopySourceMustBeSnapshot")
973 }
974 Self::InfiniteLeaseDurationRequired => serializer.serialize_unit_variant("ErrorCode", 64u32, "InfiniteLeaseDurationRequired"),
975 Self::InvalidBlobOrBlock => serializer.serialize_unit_variant("ErrorCode", 65u32, "InvalidBlobOrBlock"),
976 Self::InvalidBlobTier => serializer.serialize_unit_variant("ErrorCode", 66u32, "InvalidBlobTier"),
977 Self::InvalidBlobType => serializer.serialize_unit_variant("ErrorCode", 67u32, "InvalidBlobType"),
978 Self::InvalidBlockId => serializer.serialize_unit_variant("ErrorCode", 68u32, "InvalidBlockId"),
979 Self::InvalidBlockList => serializer.serialize_unit_variant("ErrorCode", 69u32, "InvalidBlockList"),
980 Self::InvalidOperation => serializer.serialize_unit_variant("ErrorCode", 70u32, "InvalidOperation"),
981 Self::InvalidPageRange => serializer.serialize_unit_variant("ErrorCode", 71u32, "InvalidPageRange"),
982 Self::InvalidSourceBlobType => serializer.serialize_unit_variant("ErrorCode", 72u32, "InvalidSourceBlobType"),
983 Self::InvalidSourceBlobUrl => serializer.serialize_unit_variant("ErrorCode", 73u32, "InvalidSourceBlobUrl"),
984 Self::InvalidVersionForPageBlobOperation => {
985 serializer.serialize_unit_variant("ErrorCode", 74u32, "InvalidVersionForPageBlobOperation")
986 }
987 Self::LeaseAlreadyPresent => serializer.serialize_unit_variant("ErrorCode", 75u32, "LeaseAlreadyPresent"),
988 Self::LeaseAlreadyBroken => serializer.serialize_unit_variant("ErrorCode", 76u32, "LeaseAlreadyBroken"),
989 Self::LeaseIdMismatchWithBlobOperation => {
990 serializer.serialize_unit_variant("ErrorCode", 77u32, "LeaseIdMismatchWithBlobOperation")
991 }
992 Self::LeaseIdMismatchWithContainerOperation => {
993 serializer.serialize_unit_variant("ErrorCode", 78u32, "LeaseIdMismatchWithContainerOperation")
994 }
995 Self::LeaseIdMismatchWithLeaseOperation => {
996 serializer.serialize_unit_variant("ErrorCode", 79u32, "LeaseIdMismatchWithLeaseOperation")
997 }
998 Self::LeaseIdMissing => serializer.serialize_unit_variant("ErrorCode", 80u32, "LeaseIdMissing"),
999 Self::LeaseIsBreakingAndCannotBeAcquired => {
1000 serializer.serialize_unit_variant("ErrorCode", 81u32, "LeaseIsBreakingAndCannotBeAcquired")
1001 }
1002 Self::LeaseIsBreakingAndCannotBeChanged => {
1003 serializer.serialize_unit_variant("ErrorCode", 82u32, "LeaseIsBreakingAndCannotBeChanged")
1004 }
1005 Self::LeaseIsBrokenAndCannotBeRenewed => {
1006 serializer.serialize_unit_variant("ErrorCode", 83u32, "LeaseIsBrokenAndCannotBeRenewed")
1007 }
1008 Self::LeaseLost => serializer.serialize_unit_variant("ErrorCode", 84u32, "LeaseLost"),
1009 Self::LeaseNotPresentWithBlobOperation => {
1010 serializer.serialize_unit_variant("ErrorCode", 85u32, "LeaseNotPresentWithBlobOperation")
1011 }
1012 Self::LeaseNotPresentWithContainerOperation => {
1013 serializer.serialize_unit_variant("ErrorCode", 86u32, "LeaseNotPresentWithContainerOperation")
1014 }
1015 Self::LeaseNotPresentWithLeaseOperation => {
1016 serializer.serialize_unit_variant("ErrorCode", 87u32, "LeaseNotPresentWithLeaseOperation")
1017 }
1018 Self::MaxBlobSizeConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 88u32, "MaxBlobSizeConditionNotMet"),
1019 Self::NoAuthenticationInformation => serializer.serialize_unit_variant("ErrorCode", 89u32, "NoAuthenticationInformation"),
1020 Self::NoPendingCopyOperation => serializer.serialize_unit_variant("ErrorCode", 90u32, "NoPendingCopyOperation"),
1021 Self::OperationNotAllowedOnIncrementalCopyBlob => {
1022 serializer.serialize_unit_variant("ErrorCode", 91u32, "OperationNotAllowedOnIncrementalCopyBlob")
1023 }
1024 Self::PendingCopyOperation => serializer.serialize_unit_variant("ErrorCode", 92u32, "PendingCopyOperation"),
1025 Self::PreviousSnapshotCannotBeNewer => serializer.serialize_unit_variant("ErrorCode", 93u32, "PreviousSnapshotCannotBeNewer"),
1026 Self::PreviousSnapshotNotFound => serializer.serialize_unit_variant("ErrorCode", 94u32, "PreviousSnapshotNotFound"),
1027 Self::PreviousSnapshotOperationNotSupported => {
1028 serializer.serialize_unit_variant("ErrorCode", 95u32, "PreviousSnapshotOperationNotSupported")
1029 }
1030 Self::SequenceNumberConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 96u32, "SequenceNumberConditionNotMet"),
1031 Self::SequenceNumberIncrementTooLarge => {
1032 serializer.serialize_unit_variant("ErrorCode", 97u32, "SequenceNumberIncrementTooLarge")
1033 }
1034 Self::SnapshotCountExceeded => serializer.serialize_unit_variant("ErrorCode", 98u32, "SnapshotCountExceeded"),
1035 Self::SnapshotOperationRateExceeded => serializer.serialize_unit_variant("ErrorCode", 99u32, "SnapshotOperationRateExceeded"),
1036 Self::SnapshotsPresent => serializer.serialize_unit_variant("ErrorCode", 100u32, "SnapshotsPresent"),
1037 Self::SourceConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 101u32, "SourceConditionNotMet"),
1038 Self::SystemInUse => serializer.serialize_unit_variant("ErrorCode", 102u32, "SystemInUse"),
1039 Self::TargetConditionNotMet => serializer.serialize_unit_variant("ErrorCode", 103u32, "TargetConditionNotMet"),
1040 Self::UnauthorizedBlobOverwrite => serializer.serialize_unit_variant("ErrorCode", 104u32, "UnauthorizedBlobOverwrite"),
1041 Self::BlobBeingRehydrated => serializer.serialize_unit_variant("ErrorCode", 105u32, "BlobBeingRehydrated"),
1042 Self::BlobArchived => serializer.serialize_unit_variant("ErrorCode", 106u32, "BlobArchived"),
1043 Self::BlobNotArchived => serializer.serialize_unit_variant("ErrorCode", 107u32, "BlobNotArchived"),
1044 Self::AuthorizationSourceIpMismatch => serializer.serialize_unit_variant("ErrorCode", 108u32, "AuthorizationSourceIPMismatch"),
1045 Self::AuthorizationProtocolMismatch => serializer.serialize_unit_variant("ErrorCode", 109u32, "AuthorizationProtocolMismatch"),
1046 Self::AuthorizationPermissionMismatch => {
1047 serializer.serialize_unit_variant("ErrorCode", 110u32, "AuthorizationPermissionMismatch")
1048 }
1049 Self::AuthorizationServiceMismatch => serializer.serialize_unit_variant("ErrorCode", 111u32, "AuthorizationServiceMismatch"),
1050 Self::AuthorizationResourceTypeMismatch => {
1051 serializer.serialize_unit_variant("ErrorCode", 112u32, "AuthorizationResourceTypeMismatch")
1052 }
1053 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1054 }
1055 }
1056}
1057#[doc = "Blob info from a Filter Blobs API call"]
1058#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1059pub struct FilterBlobItem {
1060 #[serde(rename = "Name")]
1061 pub name: String,
1062 #[serde(rename = "ContainerName")]
1063 pub container_name: String,
1064 #[doc = "Blob tags"]
1065 #[serde(rename = "Tags", default, skip_serializing_if = "Option::is_none")]
1066 pub tags: Option<BlobTags>,
1067 #[serde(rename = "VersionId", default, skip_serializing_if = "Option::is_none")]
1068 pub version_id: Option<String>,
1069 #[serde(rename = "IsCurrentVersion", default, skip_serializing_if = "Option::is_none")]
1070 pub is_current_version: Option<bool>,
1071}
1072impl FilterBlobItem {
1073 pub fn new(name: String, container_name: String) -> Self {
1074 Self {
1075 name,
1076 container_name,
1077 tags: None,
1078 version_id: None,
1079 is_current_version: None,
1080 }
1081 }
1082}
1083#[doc = "The result of a Filter Blobs API call"]
1084#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1085pub struct FilterBlobSegment {
1086 #[serde(rename = "@ServiceEndpoint")]
1087 pub service_endpoint: String,
1088 #[serde(rename = "Where")]
1089 pub where_: String,
1090 #[serde(rename = "Blobs")]
1091 pub blobs: filter_blob_segment::Blobs,
1092 #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
1093 pub next_marker: Option<String>,
1094}
1095impl FilterBlobSegment {
1096 pub fn new(service_endpoint: String, where_: String, blobs: filter_blob_segment::Blobs) -> Self {
1097 Self {
1098 service_endpoint,
1099 where_,
1100 blobs,
1101 next_marker: None,
1102 }
1103 }
1104}
1105pub mod filter_blob_segment {
1106 use super::*;
1107 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1108 pub struct Blobs {
1109 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
1110 pub items: Vec<FilterBlobItem>,
1111 }
1112}
1113#[doc = "Geo-Replication information for the Secondary Storage Service"]
1114#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1115pub struct GeoReplication {
1116 #[doc = "The status of the secondary location"]
1117 #[serde(rename = "Status", with = "azure_core::xml::text_content")]
1118 pub status: geo_replication::Status,
1119 #[doc = "A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads."]
1120 #[serde(rename = "LastSyncTime", with = "azure_core::date::rfc1123")]
1121 pub last_sync_time: ::time::OffsetDateTime,
1122}
1123impl GeoReplication {
1124 pub fn new(status: geo_replication::Status, last_sync_time: ::time::OffsetDateTime) -> Self {
1125 Self { status, last_sync_time }
1126 }
1127}
1128pub mod geo_replication {
1129 use super::*;
1130 #[doc = "The status of the secondary location"]
1131 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1132 #[serde(remote = "Status")]
1133 pub enum Status {
1134 #[serde(rename = "live")]
1135 Live,
1136 #[serde(rename = "bootstrap")]
1137 Bootstrap,
1138 #[serde(rename = "unavailable")]
1139 Unavailable,
1140 #[serde(skip_deserializing)]
1141 UnknownValue(String),
1142 }
1143 impl FromStr for Status {
1144 type Err = value::Error;
1145 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1146 Self::deserialize(s.into_deserializer())
1147 }
1148 }
1149 impl<'de> Deserialize<'de> for Status {
1150 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1151 where
1152 D: Deserializer<'de>,
1153 {
1154 let s = String::deserialize(deserializer)?;
1155 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1156 Ok(deserialized)
1157 }
1158 }
1159 impl Serialize for Status {
1160 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1161 where
1162 S: Serializer,
1163 {
1164 match self {
1165 Self::Live => serializer.serialize_unit_variant("Status", 0u32, "live"),
1166 Self::Bootstrap => serializer.serialize_unit_variant("Status", 1u32, "bootstrap"),
1167 Self::Unavailable => serializer.serialize_unit_variant("Status", 2u32, "unavailable"),
1168 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1169 }
1170 }
1171 }
1172}
1173#[doc = "json text configuration"]
1174#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1175pub struct JsonTextConfiguration {
1176 #[doc = "The string used to separate records."]
1177 #[serde(rename = "RecordSeparator", default, skip_serializing_if = "Option::is_none")]
1178 pub record_separator: Option<String>,
1179}
1180impl JsonTextConfiguration {
1181 pub fn new() -> Self {
1182 Self::default()
1183 }
1184}
1185#[doc = "Key information"]
1186#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1187pub struct KeyInfo {
1188 #[doc = "The date-time the key is active in ISO 8601 UTC time"]
1189 #[serde(rename = "Start")]
1190 pub start: String,
1191 #[doc = "The date-time the key expires in ISO 8601 UTC time"]
1192 #[serde(rename = "Expiry")]
1193 pub expiry: String,
1194}
1195impl KeyInfo {
1196 pub fn new(start: String, expiry: String) -> Self {
1197 Self { start, expiry }
1198 }
1199}
1200#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1201pub enum LeaseDuration {
1202 #[serde(rename = "infinite")]
1203 Infinite,
1204 #[serde(rename = "fixed")]
1205 Fixed,
1206}
1207#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1208pub enum LeaseState {
1209 #[serde(rename = "available")]
1210 Available,
1211 #[serde(rename = "leased")]
1212 Leased,
1213 #[serde(rename = "expired")]
1214 Expired,
1215 #[serde(rename = "breaking")]
1216 Breaking,
1217 #[serde(rename = "broken")]
1218 Broken,
1219}
1220#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1221pub enum LeaseStatus {
1222 #[serde(rename = "locked")]
1223 Locked,
1224 #[serde(rename = "unlocked")]
1225 Unlocked,
1226}
1227#[doc = "An enumeration of blobs"]
1228#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1229pub struct ListBlobsFlatSegmentResponse {
1230 #[serde(rename = "@ServiceEndpoint")]
1231 pub service_endpoint: String,
1232 #[serde(rename = "@ContainerName")]
1233 pub container_name: String,
1234 #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
1235 pub prefix: Option<String>,
1236 #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
1237 pub marker: Option<String>,
1238 #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
1239 pub max_results: Option<i64>,
1240 #[serde(rename = "Blobs", default, skip_serializing_if = "Option::is_none")]
1241 pub blobs: Option<BlobFlatListSegment>,
1242 #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
1243 pub next_marker: Option<String>,
1244}
1245impl azure_core::Continuable for ListBlobsFlatSegmentResponse {
1246 type Continuation = String;
1247 fn continuation(&self) -> Option<Self::Continuation> {
1248 self.next_marker.clone().filter(|value| !value.is_empty())
1249 }
1250}
1251impl ListBlobsFlatSegmentResponse {
1252 pub fn new(service_endpoint: String, container_name: String) -> Self {
1253 Self {
1254 service_endpoint,
1255 container_name,
1256 prefix: None,
1257 marker: None,
1258 max_results: None,
1259 blobs: None,
1260 next_marker: None,
1261 }
1262 }
1263}
1264#[doc = "An enumeration of blobs"]
1265#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1266pub struct ListBlobsHierarchySegmentResponse {
1267 #[serde(rename = "@ServiceEndpoint")]
1268 pub service_endpoint: String,
1269 #[serde(rename = "@ContainerName")]
1270 pub container_name: String,
1271 #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
1272 pub prefix: Option<String>,
1273 #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
1274 pub marker: Option<String>,
1275 #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
1276 pub max_results: Option<i64>,
1277 #[serde(rename = "Delimiter", default, skip_serializing_if = "Option::is_none")]
1278 pub delimiter: Option<String>,
1279 #[serde(rename = "Blobs", default, skip_serializing_if = "Option::is_none")]
1280 pub blobs: Option<BlobHierarchyListSegment>,
1281 #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
1282 pub next_marker: Option<String>,
1283}
1284impl azure_core::Continuable for ListBlobsHierarchySegmentResponse {
1285 type Continuation = String;
1286 fn continuation(&self) -> Option<Self::Continuation> {
1287 self.next_marker.clone().filter(|value| !value.is_empty())
1288 }
1289}
1290impl ListBlobsHierarchySegmentResponse {
1291 pub fn new(service_endpoint: String, container_name: String) -> Self {
1292 Self {
1293 service_endpoint,
1294 container_name,
1295 prefix: None,
1296 marker: None,
1297 max_results: None,
1298 delimiter: None,
1299 blobs: None,
1300 next_marker: None,
1301 }
1302 }
1303}
1304#[doc = "An enumeration of containers"]
1305#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1306pub struct ListContainersSegmentResponse {
1307 #[serde(rename = "@ServiceEndpoint")]
1308 pub service_endpoint: String,
1309 #[serde(rename = "Prefix", default, skip_serializing_if = "Option::is_none")]
1310 pub prefix: Option<String>,
1311 #[serde(rename = "Marker", default, skip_serializing_if = "Option::is_none")]
1312 pub marker: Option<String>,
1313 #[serde(rename = "MaxResults", default, skip_serializing_if = "Option::is_none")]
1314 pub max_results: Option<i64>,
1315 #[serde(rename = "Containers", default, skip_serializing_if = "Option::is_none")]
1316 pub containers: Option<list_containers_segment_response::Containers>,
1317 #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
1318 pub next_marker: Option<String>,
1319}
1320impl azure_core::Continuable for ListContainersSegmentResponse {
1321 type Continuation = String;
1322 fn continuation(&self) -> Option<Self::Continuation> {
1323 self.next_marker.clone().filter(|value| !value.is_empty())
1324 }
1325}
1326impl ListContainersSegmentResponse {
1327 pub fn new(service_endpoint: String) -> Self {
1328 Self {
1329 service_endpoint,
1330 prefix: None,
1331 marker: None,
1332 max_results: None,
1333 containers: None,
1334 next_marker: None,
1335 }
1336 }
1337}
1338pub mod list_containers_segment_response {
1339 use super::*;
1340 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1341 pub struct Containers {
1342 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
1343 pub items: Vec<ContainerItem>,
1344 }
1345}
1346#[doc = "Azure Analytics Logging settings."]
1347#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1348pub struct Logging {
1349 #[doc = "The version of Storage Analytics to configure."]
1350 #[serde(rename = "Version")]
1351 pub version: String,
1352 #[doc = "Indicates whether all delete requests should be logged."]
1353 #[serde(rename = "Delete")]
1354 pub delete: bool,
1355 #[doc = "Indicates whether all read requests should be logged."]
1356 #[serde(rename = "Read")]
1357 pub read: bool,
1358 #[doc = "Indicates whether all write requests should be logged."]
1359 #[serde(rename = "Write")]
1360 pub write: bool,
1361 #[doc = "the retention policy which determines how long the associated data should persist"]
1362 #[serde(rename = "RetentionPolicy")]
1363 pub retention_policy: RetentionPolicy,
1364}
1365impl Logging {
1366 pub fn new(version: String, delete: bool, read: bool, write: bool, retention_policy: RetentionPolicy) -> Self {
1367 Self {
1368 version,
1369 delete,
1370 read,
1371 write,
1372 retention_policy,
1373 }
1374 }
1375}
1376#[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
1377#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1378pub struct Metrics {
1379 #[doc = "The version of Storage Analytics to configure."]
1380 #[serde(rename = "Version", default, skip_serializing_if = "Option::is_none")]
1381 pub version: Option<String>,
1382 #[doc = "Indicates whether metrics are enabled for the Blob service."]
1383 #[serde(rename = "Enabled")]
1384 pub enabled: bool,
1385 #[doc = "Indicates whether metrics should generate summary statistics for called API operations."]
1386 #[serde(rename = "IncludeAPIs", default, skip_serializing_if = "Option::is_none")]
1387 pub include_ap_is: Option<bool>,
1388 #[doc = "the retention policy which determines how long the associated data should persist"]
1389 #[serde(rename = "RetentionPolicy", default, skip_serializing_if = "Option::is_none")]
1390 pub retention_policy: Option<RetentionPolicy>,
1391}
1392impl Metrics {
1393 pub fn new(enabled: bool) -> Self {
1394 Self {
1395 version: None,
1396 enabled,
1397 include_ap_is: None,
1398 retention_policy: None,
1399 }
1400 }
1401}
1402#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1403pub struct ObjectReplicationMetadata {}
1404impl ObjectReplicationMetadata {
1405 pub fn new() -> Self {
1406 Self::default()
1407 }
1408}
1409#[doc = "the list of pages"]
1410#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1411pub struct PageList {
1412 #[serde(
1413 rename = "PageRange",
1414 default,
1415 deserialize_with = "azure_core::util::deserialize_null_as_default",
1416 skip_serializing_if = "Vec::is_empty"
1417 )]
1418 pub page_range: Vec<PageRange>,
1419 #[serde(
1420 rename = "ClearRange",
1421 default,
1422 deserialize_with = "azure_core::util::deserialize_null_as_default",
1423 skip_serializing_if = "Vec::is_empty"
1424 )]
1425 pub clear_range: Vec<ClearRange>,
1426 #[serde(rename = "NextMarker", default, skip_serializing_if = "Option::is_none")]
1427 pub next_marker: Option<String>,
1428}
1429impl azure_core::Continuable for PageList {
1430 type Continuation = String;
1431 fn continuation(&self) -> Option<Self::Continuation> {
1432 self.next_marker.clone().filter(|value| !value.is_empty())
1433 }
1434}
1435impl PageList {
1436 pub fn new() -> Self {
1437 Self::default()
1438 }
1439}
1440#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1441pub struct PageRange {
1442 #[serde(rename = "Start")]
1443 pub start: i64,
1444 #[serde(rename = "End")]
1445 pub end: i64,
1446}
1447impl PageRange {
1448 pub fn new(start: i64, end: i64) -> Self {
1449 Self { start, end }
1450 }
1451}
1452#[doc = "parquet configuration"]
1453#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1454pub struct ParquetConfiguration {}
1455impl ParquetConfiguration {
1456 pub fn new() -> Self {
1457 Self::default()
1458 }
1459}
1460#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1461#[serde(remote = "PublicAccessType")]
1462pub enum PublicAccessType {
1463 #[serde(rename = "container")]
1464 Container,
1465 #[serde(rename = "blob")]
1466 Blob,
1467 #[serde(skip_deserializing)]
1468 UnknownValue(String),
1469}
1470impl FromStr for PublicAccessType {
1471 type Err = value::Error;
1472 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1473 Self::deserialize(s.into_deserializer())
1474 }
1475}
1476impl<'de> Deserialize<'de> for PublicAccessType {
1477 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1478 where
1479 D: Deserializer<'de>,
1480 {
1481 let s = String::deserialize(deserializer)?;
1482 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1483 Ok(deserialized)
1484 }
1485}
1486impl Serialize for PublicAccessType {
1487 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1488 where
1489 S: Serializer,
1490 {
1491 match self {
1492 Self::Container => serializer.serialize_unit_variant("PublicAccessType", 0u32, "container"),
1493 Self::Blob => serializer.serialize_unit_variant("PublicAccessType", 1u32, "blob"),
1494 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1495 }
1496 }
1497}
1498#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1499pub struct QueryFormat {
1500 #[doc = "The quick query format type."]
1501 #[serde(rename = "Type", with = "azure_core::xml::text_content")]
1502 pub type_: QueryType,
1503 #[doc = "Groups the settings used for interpreting the blob data if the blob is delimited text formatted."]
1504 #[serde(rename = "DelimitedTextConfiguration", default, skip_serializing_if = "Option::is_none")]
1505 pub delimited_text_configuration: Option<DelimitedTextConfiguration>,
1506 #[doc = "json text configuration"]
1507 #[serde(rename = "JsonTextConfiguration", default, skip_serializing_if = "Option::is_none")]
1508 pub json_text_configuration: Option<JsonTextConfiguration>,
1509 #[doc = "Groups the settings used for formatting the response if the response should be Arrow formatted."]
1510 #[serde(rename = "ArrowConfiguration", default, skip_serializing_if = "Option::is_none")]
1511 pub arrow_configuration: Option<ArrowConfiguration>,
1512 #[doc = "parquet configuration"]
1513 #[serde(rename = "ParquetTextConfiguration", default, skip_serializing_if = "Option::is_none")]
1514 pub parquet_text_configuration: Option<ParquetConfiguration>,
1515}
1516impl QueryFormat {
1517 pub fn new(type_: QueryType) -> Self {
1518 Self {
1519 type_,
1520 delimited_text_configuration: None,
1521 json_text_configuration: None,
1522 arrow_configuration: None,
1523 parquet_text_configuration: None,
1524 }
1525 }
1526}
1527#[doc = "Groups the set of query request settings."]
1528#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1529pub struct QueryRequest {
1530 #[doc = "Required. The type of the provided query expression."]
1531 #[serde(rename = "QueryType", with = "azure_core::xml::text_content")]
1532 pub query_type: query_request::QueryType,
1533 #[doc = "The query expression in SQL. The maximum size of the query expression is 256KiB."]
1534 #[serde(rename = "Expression")]
1535 pub expression: String,
1536 #[serde(rename = "InputSerialization", default, skip_serializing_if = "Option::is_none")]
1537 pub input_serialization: Option<QuerySerialization>,
1538 #[serde(rename = "OutputSerialization", default, skip_serializing_if = "Option::is_none")]
1539 pub output_serialization: Option<QuerySerialization>,
1540}
1541impl QueryRequest {
1542 pub fn new(query_type: query_request::QueryType, expression: String) -> Self {
1543 Self {
1544 query_type,
1545 expression,
1546 input_serialization: None,
1547 output_serialization: None,
1548 }
1549 }
1550}
1551pub mod query_request {
1552 use super::*;
1553 #[doc = "Required. The type of the provided query expression."]
1554 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1555 pub enum QueryType {
1556 #[serde(rename = "SQL")]
1557 Sql,
1558 }
1559}
1560#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1561pub struct QuerySerialization {
1562 #[serde(rename = "Format")]
1563 pub format: QueryFormat,
1564}
1565impl QuerySerialization {
1566 pub fn new(format: QueryFormat) -> Self {
1567 Self { format }
1568 }
1569}
1570#[doc = "The quick query format type."]
1571#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1572pub enum QueryType {
1573 #[serde(rename = "delimited")]
1574 Delimited,
1575 #[serde(rename = "json")]
1576 Json,
1577 #[serde(rename = "arrow")]
1578 Arrow,
1579 #[serde(rename = "parquet")]
1580 Parquet,
1581}
1582#[doc = "If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard."]
1583#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1584#[serde(remote = "RehydratePriority")]
1585pub enum RehydratePriority {
1586 High,
1587 Standard,
1588 #[serde(skip_deserializing)]
1589 UnknownValue(String),
1590}
1591impl FromStr for RehydratePriority {
1592 type Err = value::Error;
1593 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1594 Self::deserialize(s.into_deserializer())
1595 }
1596}
1597impl<'de> Deserialize<'de> for RehydratePriority {
1598 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1599 where
1600 D: Deserializer<'de>,
1601 {
1602 let s = String::deserialize(deserializer)?;
1603 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1604 Ok(deserialized)
1605 }
1606}
1607impl Serialize for RehydratePriority {
1608 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1609 where
1610 S: Serializer,
1611 {
1612 match self {
1613 Self::High => serializer.serialize_unit_variant("RehydratePriority", 0u32, "High"),
1614 Self::Standard => serializer.serialize_unit_variant("RehydratePriority", 1u32, "Standard"),
1615 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1616 }
1617 }
1618}
1619#[doc = "the retention policy which determines how long the associated data should persist"]
1620#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1621pub struct RetentionPolicy {
1622 #[doc = "Indicates whether a retention policy is enabled for the storage service"]
1623 #[serde(rename = "Enabled")]
1624 pub enabled: bool,
1625 #[doc = "Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted"]
1626 #[serde(rename = "Days", default, skip_serializing_if = "Option::is_none")]
1627 pub days: Option<i64>,
1628 #[doc = "Indicates whether permanent delete is allowed on this storage account."]
1629 #[serde(rename = "AllowPermanentDelete", default, skip_serializing_if = "Option::is_none")]
1630 pub allow_permanent_delete: Option<bool>,
1631}
1632impl RetentionPolicy {
1633 pub fn new(enabled: bool) -> Self {
1634 Self {
1635 enabled,
1636 days: None,
1637 allow_permanent_delete: None,
1638 }
1639 }
1640}
1641#[doc = "signed identifier"]
1642#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1643pub struct SignedIdentifier {
1644 #[doc = "a unique id"]
1645 #[serde(rename = "Id")]
1646 pub id: String,
1647 #[doc = "An Access policy"]
1648 #[serde(rename = "AccessPolicy")]
1649 pub access_policy: AccessPolicy,
1650}
1651impl SignedIdentifier {
1652 pub fn new(id: String, access_policy: AccessPolicy) -> Self {
1653 Self { id, access_policy }
1654 }
1655}
1656pub type SignedIdentifiers = Vec<SignedIdentifier>;
1657#[doc = "The properties that enable an account to host a static website"]
1658#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1659pub struct StaticWebsite {
1660 #[doc = "Indicates whether this account is hosting a static website"]
1661 #[serde(rename = "Enabled")]
1662 pub enabled: bool,
1663 #[doc = "The default name of the index page under each directory"]
1664 #[serde(rename = "IndexDocument", default, skip_serializing_if = "Option::is_none")]
1665 pub index_document: Option<String>,
1666 #[doc = "The absolute path of the custom 404 page"]
1667 #[serde(rename = "ErrorDocument404Path", default, skip_serializing_if = "Option::is_none")]
1668 pub error_document404_path: Option<String>,
1669 #[doc = "Absolute path of the default index page"]
1670 #[serde(rename = "DefaultIndexDocumentPath", default, skip_serializing_if = "Option::is_none")]
1671 pub default_index_document_path: Option<String>,
1672}
1673impl StaticWebsite {
1674 pub fn new(enabled: bool) -> Self {
1675 Self {
1676 enabled,
1677 index_document: None,
1678 error_document404_path: None,
1679 default_index_document_path: None,
1680 }
1681 }
1682}
1683#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1684pub struct StorageError {
1685 #[serde(rename = "Message", default, skip_serializing_if = "Option::is_none")]
1686 pub message: Option<String>,
1687}
1688impl azure_core::Continuable for StorageError {
1689 type Continuation = String;
1690 fn continuation(&self) -> Option<Self::Continuation> {
1691 None
1692 }
1693}
1694impl StorageError {
1695 pub fn new() -> Self {
1696 Self::default()
1697 }
1698}
1699#[doc = "Storage Service Properties."]
1700#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1701pub struct StorageServiceProperties {
1702 #[doc = "Azure Analytics Logging settings."]
1703 #[serde(rename = "Logging", default, skip_serializing_if = "Option::is_none")]
1704 pub logging: Option<Logging>,
1705 #[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
1706 #[serde(rename = "HourMetrics", default, skip_serializing_if = "Option::is_none")]
1707 pub hour_metrics: Option<Metrics>,
1708 #[doc = "a summary of request statistics grouped by API in hour or minute aggregates for blobs"]
1709 #[serde(rename = "MinuteMetrics", default, skip_serializing_if = "Option::is_none")]
1710 pub minute_metrics: Option<Metrics>,
1711 #[doc = "The set of CORS rules."]
1712 #[serde(rename = "Cors", default, skip_serializing_if = "Option::is_none")]
1713 pub cors: Option<storage_service_properties::Cors>,
1714 #[doc = "The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions"]
1715 #[serde(rename = "DefaultServiceVersion", default, skip_serializing_if = "Option::is_none")]
1716 pub default_service_version: Option<String>,
1717 #[doc = "the retention policy which determines how long the associated data should persist"]
1718 #[serde(rename = "DeleteRetentionPolicy", default, skip_serializing_if = "Option::is_none")]
1719 pub delete_retention_policy: Option<RetentionPolicy>,
1720 #[doc = "The properties that enable an account to host a static website"]
1721 #[serde(rename = "StaticWebsite", default, skip_serializing_if = "Option::is_none")]
1722 pub static_website: Option<StaticWebsite>,
1723}
1724impl StorageServiceProperties {
1725 pub fn new() -> Self {
1726 Self::default()
1727 }
1728}
1729pub mod storage_service_properties {
1730 use super::*;
1731 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1732 pub struct Cors {
1733 #[serde(rename = "$value", default, skip_serializing_if = "Vec::is_empty")]
1734 pub items: Vec<CorsRule>,
1735 }
1736}
1737#[doc = "Stats for the storage service."]
1738#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1739pub struct StorageServiceStats {
1740 #[doc = "Geo-Replication information for the Secondary Storage Service"]
1741 #[serde(rename = "GeoReplication", default, skip_serializing_if = "Option::is_none")]
1742 pub geo_replication: Option<GeoReplication>,
1743}
1744impl StorageServiceStats {
1745 pub fn new() -> Self {
1746 Self::default()
1747 }
1748}
1749#[doc = "A user delegation key"]
1750#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1751pub struct UserDelegationKey {
1752 #[doc = "The Azure Active Directory object ID in GUID format."]
1753 #[serde(rename = "SignedOid")]
1754 pub signed_oid: String,
1755 #[doc = "The Azure Active Directory tenant ID in GUID format"]
1756 #[serde(rename = "SignedTid")]
1757 pub signed_tid: String,
1758 #[doc = "The date-time the key is active"]
1759 #[serde(rename = "SignedStart", with = "azure_core::date::rfc3339")]
1760 pub signed_start: ::time::OffsetDateTime,
1761 #[doc = "The date-time the key expires"]
1762 #[serde(rename = "SignedExpiry", with = "azure_core::date::rfc3339")]
1763 pub signed_expiry: ::time::OffsetDateTime,
1764 #[doc = "Abbreviation of the Azure Storage service that accepts the key"]
1765 #[serde(rename = "SignedService")]
1766 pub signed_service: String,
1767 #[doc = "The service version that created the key"]
1768 #[serde(rename = "SignedVersion")]
1769 pub signed_version: String,
1770 #[doc = "The key as a base64 string"]
1771 #[serde(rename = "Value")]
1772 pub value: String,
1773}
1774impl UserDelegationKey {
1775 pub fn new(
1776 signed_oid: String,
1777 signed_tid: String,
1778 signed_start: ::time::OffsetDateTime,
1779 signed_expiry: ::time::OffsetDateTime,
1780 signed_service: String,
1781 signed_version: String,
1782 value: String,
1783 ) -> Self {
1784 Self {
1785 signed_oid,
1786 signed_tid,
1787 signed_start,
1788 signed_expiry,
1789 signed_service,
1790 signed_version,
1791 value,
1792 }
1793 }
1794}