azure_mgmt_sql/package_preview_2024_05/
models.rs

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 = "A list of active directory administrators."]
7#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8pub struct AdministratorListResult {
9    #[doc = "Array of results."]
10    #[serde(
11        default,
12        deserialize_with = "azure_core::util::deserialize_null_as_default",
13        skip_serializing_if = "Vec::is_empty"
14    )]
15    pub value: Vec<ServerAzureAdAdministrator>,
16    #[doc = "Link to retrieve next page of results."]
17    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18    pub next_link: Option<String>,
19}
20impl azure_core::Continuable for AdministratorListResult {
21    type Continuation = String;
22    fn continuation(&self) -> Option<Self::Continuation> {
23        self.next_link.clone().filter(|value| !value.is_empty())
24    }
25}
26impl AdministratorListResult {
27    pub fn new() -> Self {
28        Self::default()
29    }
30}
31#[doc = "Properties of a active directory administrator."]
32#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
33pub struct AdministratorProperties {
34    #[doc = "Type of the sever administrator."]
35    #[serde(rename = "administratorType", default, skip_serializing_if = "Option::is_none")]
36    pub administrator_type: Option<administrator_properties::AdministratorType>,
37    #[doc = "Login name of the server administrator."]
38    pub login: String,
39    #[doc = "SID (object ID) of the server administrator."]
40    pub sid: String,
41    #[doc = "Tenant ID of the administrator."]
42    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
43    pub tenant_id: Option<String>,
44    #[doc = "Azure Active Directory only Authentication enabled."]
45    #[serde(rename = "azureADOnlyAuthentication", default, skip_serializing_if = "Option::is_none")]
46    pub azure_ad_only_authentication: Option<bool>,
47}
48impl AdministratorProperties {
49    pub fn new(login: String, sid: String) -> Self {
50        Self {
51            administrator_type: None,
52            login,
53            sid,
54            tenant_id: None,
55            azure_ad_only_authentication: None,
56        }
57    }
58}
59pub mod administrator_properties {
60    use super::*;
61    #[doc = "Type of the sever administrator."]
62    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
63    #[serde(remote = "AdministratorType")]
64    pub enum AdministratorType {
65        ActiveDirectory,
66        #[serde(skip_deserializing)]
67        UnknownValue(String),
68    }
69    impl FromStr for AdministratorType {
70        type Err = value::Error;
71        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
72            Self::deserialize(s.into_deserializer())
73        }
74    }
75    impl<'de> Deserialize<'de> for AdministratorType {
76        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
77        where
78            D: Deserializer<'de>,
79        {
80            let s = String::deserialize(deserializer)?;
81            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
82            Ok(deserialized)
83        }
84    }
85    impl Serialize for AdministratorType {
86        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
87        where
88            S: Serializer,
89        {
90            match self {
91                Self::ActiveDirectory => serializer.serialize_unit_variant("AdministratorType", 0u32, "ActiveDirectory"),
92                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
93            }
94        }
95    }
96}
97#[doc = "Properties of an Advanced Threat Protection state."]
98#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
99pub struct AdvancedThreatProtectionProperties {
100    #[doc = "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server."]
101    pub state: advanced_threat_protection_properties::State,
102    #[doc = "Specifies the UTC creation time of the policy."]
103    #[serde(rename = "creationTime", default, with = "azure_core::date::rfc3339::option")]
104    pub creation_time: Option<::time::OffsetDateTime>,
105}
106impl AdvancedThreatProtectionProperties {
107    pub fn new(state: advanced_threat_protection_properties::State) -> Self {
108        Self {
109            state,
110            creation_time: None,
111        }
112    }
113}
114pub mod advanced_threat_protection_properties {
115    use super::*;
116    #[doc = "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server."]
117    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
118    pub enum State {
119        New,
120        Enabled,
121        Disabled,
122    }
123}
124#[doc = "Database, Server or Elastic Pool Advisor."]
125#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
126pub struct Advisor {
127    #[serde(flatten)]
128    pub proxy_resource: ProxyResource,
129    #[doc = "Resource kind."]
130    #[serde(default, skip_serializing_if = "Option::is_none")]
131    pub kind: Option<String>,
132    #[doc = "Resource location."]
133    #[serde(default, skip_serializing_if = "Option::is_none")]
134    pub location: Option<String>,
135    #[doc = "Properties for a Database, Server or Elastic Pool Advisor."]
136    #[serde(default, skip_serializing_if = "Option::is_none")]
137    pub properties: Option<AdvisorProperties>,
138}
139impl Advisor {
140    pub fn new() -> Self {
141        Self::default()
142    }
143}
144#[doc = "Properties for a Database, Server or Elastic Pool Advisor."]
145#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
146pub struct AdvisorProperties {
147    #[doc = "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'."]
148    #[serde(rename = "advisorStatus", default, skip_serializing_if = "Option::is_none")]
149    pub advisor_status: Option<advisor_properties::AdvisorStatus>,
150    #[doc = "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'"]
151    #[serde(rename = "autoExecuteStatus")]
152    pub auto_execute_status: advisor_properties::AutoExecuteStatus,
153    #[doc = "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level)."]
154    #[serde(rename = "autoExecuteStatusInheritedFrom", default, skip_serializing_if = "Option::is_none")]
155    pub auto_execute_status_inherited_from: Option<advisor_properties::AutoExecuteStatusInheritedFrom>,
156    #[doc = "Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc."]
157    #[serde(rename = "recommendationsStatus", default, skip_serializing_if = "Option::is_none")]
158    pub recommendations_status: Option<String>,
159    #[doc = "Gets the time when the current resource was analyzed for recommendations by this advisor."]
160    #[serde(rename = "lastChecked", default, with = "azure_core::date::rfc3339::option")]
161    pub last_checked: Option<::time::OffsetDateTime>,
162    #[doc = "Gets the recommended actions for this advisor."]
163    #[serde(
164        rename = "recommendedActions",
165        default,
166        deserialize_with = "azure_core::util::deserialize_null_as_default",
167        skip_serializing_if = "Vec::is_empty"
168    )]
169    pub recommended_actions: Vec<RecommendedAction>,
170}
171impl AdvisorProperties {
172    pub fn new(auto_execute_status: advisor_properties::AutoExecuteStatus) -> Self {
173        Self {
174            advisor_status: None,
175            auto_execute_status,
176            auto_execute_status_inherited_from: None,
177            recommendations_status: None,
178            last_checked: None,
179            recommended_actions: Vec::new(),
180        }
181    }
182}
183pub mod advisor_properties {
184    use super::*;
185    #[doc = "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'."]
186    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
187    pub enum AdvisorStatus {
188        #[serde(rename = "GA")]
189        Ga,
190        PublicPreview,
191        LimitedPublicPreview,
192        PrivatePreview,
193    }
194    #[doc = "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'"]
195    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
196    pub enum AutoExecuteStatus {
197        Enabled,
198        Disabled,
199        Default,
200    }
201    #[doc = "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level)."]
202    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
203    pub enum AutoExecuteStatusInheritedFrom {
204        Default,
205        Subscription,
206        Server,
207        ElasticPool,
208        Database,
209    }
210}
211#[doc = "Supported auto pause delay time range"]
212#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
213pub struct AutoPauseDelayTimeRange {
214    #[doc = "Minimum value"]
215    #[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
216    pub min_value: Option<i32>,
217    #[doc = "Maximum value"]
218    #[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
219    pub max_value: Option<i32>,
220    #[doc = "Step value for discrete values between the minimum value and the maximum value."]
221    #[serde(rename = "stepSize", default, skip_serializing_if = "Option::is_none")]
222    pub step_size: Option<i32>,
223    #[doc = "Default value is no value is provided"]
224    #[serde(default, skip_serializing_if = "Option::is_none")]
225    pub default: Option<i32>,
226    #[doc = "Unit of time that delay is expressed in"]
227    #[serde(default, skip_serializing_if = "Option::is_none")]
228    pub unit: Option<auto_pause_delay_time_range::Unit>,
229    #[doc = "Value that is used to not pause (infinite delay before pause)"]
230    #[serde(rename = "doNotPauseValue", default, skip_serializing_if = "Option::is_none")]
231    pub do_not_pause_value: Option<i32>,
232}
233impl AutoPauseDelayTimeRange {
234    pub fn new() -> Self {
235        Self::default()
236    }
237}
238pub mod auto_pause_delay_time_range {
239    use super::*;
240    #[doc = "Unit of time that delay is expressed in"]
241    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
242    #[serde(remote = "Unit")]
243    pub enum Unit {
244        Minutes,
245        #[serde(skip_deserializing)]
246        UnknownValue(String),
247    }
248    impl FromStr for Unit {
249        type Err = value::Error;
250        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
251            Self::deserialize(s.into_deserializer())
252        }
253    }
254    impl<'de> Deserialize<'de> for Unit {
255        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
256        where
257            D: Deserializer<'de>,
258        {
259            let s = String::deserialize(deserializer)?;
260            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
261            Ok(deserialized)
262        }
263    }
264    impl Serialize for Unit {
265        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
266        where
267            S: Serializer,
268        {
269            match self {
270                Self::Minutes => serializer.serialize_unit_variant("Unit", 0u32, "Minutes"),
271                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
272            }
273        }
274    }
275}
276#[doc = "Automatic tuning properties for individual advisors."]
277#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
278pub struct AutomaticTuningOptions {
279    #[doc = "Automatic tuning option desired state."]
280    #[serde(rename = "desiredState", default, skip_serializing_if = "Option::is_none")]
281    pub desired_state: Option<automatic_tuning_options::DesiredState>,
282    #[doc = "Automatic tuning option actual state."]
283    #[serde(rename = "actualState", default, skip_serializing_if = "Option::is_none")]
284    pub actual_state: Option<automatic_tuning_options::ActualState>,
285    #[doc = "Reason code if desired and actual state are different."]
286    #[serde(rename = "reasonCode", default, skip_serializing_if = "Option::is_none")]
287    pub reason_code: Option<i32>,
288    #[doc = "Reason description if desired and actual state are different."]
289    #[serde(rename = "reasonDesc", default, skip_serializing_if = "Option::is_none")]
290    pub reason_desc: Option<automatic_tuning_options::ReasonDesc>,
291}
292impl AutomaticTuningOptions {
293    pub fn new() -> Self {
294        Self::default()
295    }
296}
297pub mod automatic_tuning_options {
298    use super::*;
299    #[doc = "Automatic tuning option desired state."]
300    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
301    pub enum DesiredState {
302        Off,
303        On,
304        Default,
305    }
306    #[doc = "Automatic tuning option actual state."]
307    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
308    pub enum ActualState {
309        Off,
310        On,
311    }
312    #[doc = "Reason description if desired and actual state are different."]
313    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
314    pub enum ReasonDesc {
315        Default,
316        Disabled,
317        AutoConfigured,
318        InheritedFromServer,
319        QueryStoreOff,
320        QueryStoreReadOnly,
321        NotSupported,
322    }
323}
324#[doc = "Automatic tuning properties for individual advisors."]
325#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
326pub struct AutomaticTuningServerOptions {
327    #[doc = "Automatic tuning option desired state."]
328    #[serde(rename = "desiredState", default, skip_serializing_if = "Option::is_none")]
329    pub desired_state: Option<automatic_tuning_server_options::DesiredState>,
330    #[doc = "Automatic tuning option actual state."]
331    #[serde(rename = "actualState", default, skip_serializing_if = "Option::is_none")]
332    pub actual_state: Option<automatic_tuning_server_options::ActualState>,
333    #[doc = "Reason code if desired and actual state are different."]
334    #[serde(rename = "reasonCode", default, skip_serializing_if = "Option::is_none")]
335    pub reason_code: Option<i32>,
336    #[doc = "Reason description if desired and actual state are different."]
337    #[serde(rename = "reasonDesc", default, skip_serializing_if = "Option::is_none")]
338    pub reason_desc: Option<automatic_tuning_server_options::ReasonDesc>,
339}
340impl AutomaticTuningServerOptions {
341    pub fn new() -> Self {
342        Self::default()
343    }
344}
345pub mod automatic_tuning_server_options {
346    use super::*;
347    #[doc = "Automatic tuning option desired state."]
348    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
349    pub enum DesiredState {
350        Off,
351        On,
352        Default,
353    }
354    #[doc = "Automatic tuning option actual state."]
355    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
356    pub enum ActualState {
357        Off,
358        On,
359    }
360    #[doc = "Reason description if desired and actual state are different."]
361    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
362    pub enum ReasonDesc {
363        Default,
364        Disabled,
365        AutoConfigured,
366    }
367}
368#[doc = "Server-level Automatic Tuning properties."]
369#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
370pub struct AutomaticTuningServerProperties {
371    #[doc = "Automatic tuning desired state."]
372    #[serde(rename = "desiredState", default, skip_serializing_if = "Option::is_none")]
373    pub desired_state: Option<automatic_tuning_server_properties::DesiredState>,
374    #[doc = "Automatic tuning actual state."]
375    #[serde(rename = "actualState", default, skip_serializing_if = "Option::is_none")]
376    pub actual_state: Option<automatic_tuning_server_properties::ActualState>,
377    #[doc = "Automatic tuning options definition."]
378    #[serde(default, skip_serializing_if = "Option::is_none")]
379    pub options: Option<serde_json::Value>,
380}
381impl AutomaticTuningServerProperties {
382    pub fn new() -> Self {
383        Self::default()
384    }
385}
386pub mod automatic_tuning_server_properties {
387    use super::*;
388    #[doc = "Automatic tuning desired state."]
389    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
390    pub enum DesiredState {
391        Custom,
392        Auto,
393        Unspecified,
394    }
395    #[doc = "Automatic tuning actual state."]
396    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
397    pub enum ActualState {
398        Custom,
399        Auto,
400        Unspecified,
401    }
402}
403#[doc = "A list of active directory only authentications."]
404#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
405pub struct AzureAdOnlyAuthListResult {
406    #[doc = "Array of results."]
407    #[serde(
408        default,
409        deserialize_with = "azure_core::util::deserialize_null_as_default",
410        skip_serializing_if = "Vec::is_empty"
411    )]
412    pub value: Vec<ServerAzureAdOnlyAuthentication>,
413    #[doc = "Link to retrieve next page of results."]
414    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
415    pub next_link: Option<String>,
416}
417impl azure_core::Continuable for AzureAdOnlyAuthListResult {
418    type Continuation = String;
419    fn continuation(&self) -> Option<Self::Continuation> {
420        self.next_link.clone().filter(|value| !value.is_empty())
421    }
422}
423impl AzureAdOnlyAuthListResult {
424    pub fn new() -> Self {
425        Self::default()
426    }
427}
428#[doc = "Properties of a active directory only authentication."]
429#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
430pub struct AzureAdOnlyAuthProperties {
431    #[doc = "Azure Active Directory only Authentication enabled."]
432    #[serde(rename = "azureADOnlyAuthentication")]
433    pub azure_ad_only_authentication: bool,
434}
435impl AzureAdOnlyAuthProperties {
436    pub fn new(azure_ad_only_authentication: bool) -> Self {
437        Self {
438            azure_ad_only_authentication,
439        }
440    }
441}
442#[doc = "A short term retention policy."]
443#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
444pub struct BackupShortTermRetentionPolicy {
445    #[serde(flatten)]
446    pub proxy_resource: ProxyResource,
447    #[doc = "Properties of a short term retention policy"]
448    #[serde(default, skip_serializing_if = "Option::is_none")]
449    pub properties: Option<BackupShortTermRetentionPolicyProperties>,
450}
451impl BackupShortTermRetentionPolicy {
452    pub fn new() -> Self {
453        Self::default()
454    }
455}
456#[doc = "A list of short term retention policies."]
457#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
458pub struct BackupShortTermRetentionPolicyListResult {
459    #[doc = "Array of results."]
460    #[serde(
461        default,
462        deserialize_with = "azure_core::util::deserialize_null_as_default",
463        skip_serializing_if = "Vec::is_empty"
464    )]
465    pub value: Vec<BackupShortTermRetentionPolicy>,
466    #[doc = "Link to retrieve next page of results."]
467    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
468    pub next_link: Option<String>,
469}
470impl azure_core::Continuable for BackupShortTermRetentionPolicyListResult {
471    type Continuation = String;
472    fn continuation(&self) -> Option<Self::Continuation> {
473        self.next_link.clone().filter(|value| !value.is_empty())
474    }
475}
476impl BackupShortTermRetentionPolicyListResult {
477    pub fn new() -> Self {
478        Self::default()
479    }
480}
481#[doc = "Properties of a short term retention policy"]
482#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
483pub struct BackupShortTermRetentionPolicyProperties {
484    #[doc = "The backup retention period in days. This is how many days Point-in-Time Restore will be supported."]
485    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
486    pub retention_days: Option<i32>,
487    #[doc = "The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases."]
488    #[serde(rename = "diffBackupIntervalInHours", default, skip_serializing_if = "Option::is_none")]
489    pub diff_backup_interval_in_hours: Option<backup_short_term_retention_policy_properties::DiffBackupIntervalInHours>,
490}
491impl BackupShortTermRetentionPolicyProperties {
492    pub fn new() -> Self {
493        Self::default()
494    }
495}
496pub mod backup_short_term_retention_policy_properties {
497    use super::*;
498    #[doc = "The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases."]
499    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
500    #[serde(remote = "DiffBackupIntervalInHours")]
501    pub enum DiffBackupIntervalInHours {
502        #[serde(rename = "12")]
503        N12,
504        #[serde(rename = "24")]
505        N24,
506        #[serde(skip_deserializing)]
507        UnknownValue(String),
508    }
509    impl FromStr for DiffBackupIntervalInHours {
510        type Err = value::Error;
511        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
512            Self::deserialize(s.into_deserializer())
513        }
514    }
515    impl<'de> Deserialize<'de> for DiffBackupIntervalInHours {
516        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
517        where
518            D: Deserializer<'de>,
519        {
520            let s = String::deserialize(deserializer)?;
521            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
522            Ok(deserialized)
523        }
524    }
525    impl Serialize for DiffBackupIntervalInHours {
526        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
527        where
528            S: Serializer,
529        {
530            match self {
531                Self::N12 => serializer.serialize_unit_variant("DiffBackupIntervalInHours", 0u32, "12"),
532                Self::N24 => serializer.serialize_unit_variant("DiffBackupIntervalInHours", 1u32, "24"),
533                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
534            }
535        }
536    }
537}
538#[doc = "Properties of a long term retention policy"]
539#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
540pub struct BaseLongTermRetentionPolicyProperties {
541    #[doc = "The weekly retention policy for an LTR backup in an ISO 8601 format."]
542    #[serde(rename = "weeklyRetention", default, skip_serializing_if = "Option::is_none")]
543    pub weekly_retention: Option<String>,
544    #[doc = "The monthly retention policy for an LTR backup in an ISO 8601 format."]
545    #[serde(rename = "monthlyRetention", default, skip_serializing_if = "Option::is_none")]
546    pub monthly_retention: Option<String>,
547    #[doc = "The yearly retention policy for an LTR backup in an ISO 8601 format."]
548    #[serde(rename = "yearlyRetention", default, skip_serializing_if = "Option::is_none")]
549    pub yearly_retention: Option<String>,
550    #[doc = "The week of year to take the yearly backup in an ISO 8601 format."]
551    #[serde(rename = "weekOfYear", default, skip_serializing_if = "Option::is_none")]
552    pub week_of_year: Option<i32>,
553}
554impl BaseLongTermRetentionPolicyProperties {
555    pub fn new() -> Self {
556        Self::default()
557    }
558}
559#[doc = "SQL Vulnerability Assessment baseline Details"]
560#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
561pub struct Baseline {
562    #[doc = "SQL Vulnerability Assessment baseline expected results"]
563    #[serde(
564        rename = "expectedResults",
565        default,
566        deserialize_with = "azure_core::util::deserialize_null_as_default",
567        skip_serializing_if = "Vec::is_empty"
568    )]
569    pub expected_results: Vec<Vec<String>>,
570    #[doc = "SQL Vulnerability Assessment baseline update time (UTC)"]
571    #[serde(rename = "updatedTime", default, with = "azure_core::date::rfc3339::option")]
572    pub updated_time: Option<::time::OffsetDateTime>,
573}
574impl Baseline {
575    pub fn new() -> Self {
576        Self::default()
577    }
578}
579#[doc = "SQL Vulnerability Assessment baseline adjusted results"]
580#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
581pub struct BaselineAdjustedResult {
582    #[doc = "SQL Vulnerability Assessment baseline Details"]
583    #[serde(default, skip_serializing_if = "Option::is_none")]
584    pub baseline: Option<Baseline>,
585    #[doc = "SQL Vulnerability Assessment baseline status"]
586    #[serde(default, skip_serializing_if = "Option::is_none")]
587    pub status: Option<baseline_adjusted_result::Status>,
588    #[doc = "SQL Vulnerability Assessment results that are not in baseline"]
589    #[serde(
590        rename = "resultsNotInBaseline",
591        default,
592        deserialize_with = "azure_core::util::deserialize_null_as_default",
593        skip_serializing_if = "Vec::is_empty"
594    )]
595    pub results_not_in_baseline: Vec<Vec<String>>,
596    #[doc = "SQL Vulnerability Assessment results that are in baseline."]
597    #[serde(
598        rename = "resultsOnlyInBaseline",
599        default,
600        deserialize_with = "azure_core::util::deserialize_null_as_default",
601        skip_serializing_if = "Vec::is_empty"
602    )]
603    pub results_only_in_baseline: Vec<Vec<String>>,
604}
605impl BaselineAdjustedResult {
606    pub fn new() -> Self {
607        Self::default()
608    }
609}
610pub mod baseline_adjusted_result {
611    use super::*;
612    #[doc = "SQL Vulnerability Assessment baseline status"]
613    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
614    #[serde(remote = "Status")]
615    pub enum Status {
616        NonFinding,
617        Finding,
618        InternalError,
619        #[serde(skip_deserializing)]
620        UnknownValue(String),
621    }
622    impl FromStr for Status {
623        type Err = value::Error;
624        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
625            Self::deserialize(s.into_deserializer())
626        }
627    }
628    impl<'de> Deserialize<'de> for Status {
629        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
630        where
631            D: Deserializer<'de>,
632        {
633            let s = String::deserialize(deserializer)?;
634            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
635            Ok(deserialized)
636        }
637    }
638    impl Serialize for Status {
639        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
640        where
641            S: Serializer,
642        {
643            match self {
644                Self::NonFinding => serializer.serialize_unit_variant("Status", 0u32, "NonFinding"),
645                Self::Finding => serializer.serialize_unit_variant("Status", 1u32, "Finding"),
646                Self::InternalError => serializer.serialize_unit_variant("Status", 2u32, "InternalError"),
647                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
648            }
649        }
650    }
651}
652#[doc = "SQL Vulnerability Assessment benchmark reference"]
653#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
654pub struct BenchmarkReference {
655    #[doc = "SQL Vulnerability Assessment benchmark name"]
656    #[serde(default, skip_serializing_if = "Option::is_none")]
657    pub benchmark: Option<String>,
658    #[doc = "SQL Vulnerability Assessment benchmark reference."]
659    #[serde(default, skip_serializing_if = "Option::is_none")]
660    pub reference: Option<String>,
661}
662impl BenchmarkReference {
663    pub fn new() -> Self {
664        Self::default()
665    }
666}
667#[doc = "Certificate information"]
668#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
669pub struct CertificateInfo {
670    #[doc = "The certificate name"]
671    #[serde(rename = "certificateName", default, skip_serializing_if = "Option::is_none")]
672    pub certificate_name: Option<String>,
673    #[doc = "The certificate expiry date"]
674    #[serde(rename = "expiryDate", default, with = "azure_core::date::rfc3339::option")]
675    pub expiry_date: Option<::time::OffsetDateTime>,
676}
677impl CertificateInfo {
678    pub fn new() -> Self {
679        Self::default()
680    }
681}
682#[doc = "Contains the information necessary to change long term retention backup access tier and related operation mode."]
683#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
684pub struct ChangeLongTermRetentionBackupAccessTierParameters {
685    #[doc = "The long term retention backup storage access tier"]
686    #[serde(rename = "backupStorageAccessTier")]
687    pub backup_storage_access_tier: String,
688    #[doc = "The operation mode when updating ltr backup storage access tier"]
689    #[serde(rename = "operationMode")]
690    pub operation_mode: String,
691}
692impl ChangeLongTermRetentionBackupAccessTierParameters {
693    pub fn new(backup_storage_access_tier: String, operation_mode: String) -> Self {
694        Self {
695            backup_storage_access_tier,
696            operation_mode,
697        }
698    }
699}
700#[doc = "A request to check whether the specified name for a resource is available."]
701#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
702pub struct CheckNameAvailabilityRequest {
703    pub name: String,
704    #[serde(rename = "type")]
705    pub type_: check_name_availability_request::Type,
706}
707impl CheckNameAvailabilityRequest {
708    pub fn new(name: String, type_: check_name_availability_request::Type) -> Self {
709        Self { name, type_ }
710    }
711}
712pub mod check_name_availability_request {
713    use super::*;
714    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
715    pub enum Type {
716        #[serde(rename = "Microsoft.Sql/servers")]
717        MicrosoftSqlServers,
718    }
719}
720#[doc = "The result of a name availability check."]
721#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
722pub struct CheckNameAvailabilityResponse {
723    #[doc = "The name whose availability was checked."]
724    #[serde(default, skip_serializing_if = "Option::is_none")]
725    pub name: Option<String>,
726    #[doc = "True if the name is available, otherwise false."]
727    #[serde(default, skip_serializing_if = "Option::is_none")]
728    pub available: Option<bool>,
729    #[doc = "The reason code explaining why the name is unavailable. Will be undefined if the name is available."]
730    #[serde(default, skip_serializing_if = "Option::is_none")]
731    pub reason: Option<check_name_availability_response::Reason>,
732    #[doc = "A message explaining why the name is unavailable. Will be undefined if the name is available."]
733    #[serde(default, skip_serializing_if = "Option::is_none")]
734    pub message: Option<String>,
735}
736impl CheckNameAvailabilityResponse {
737    pub fn new() -> Self {
738        Self::default()
739    }
740}
741pub mod check_name_availability_response {
742    use super::*;
743    #[doc = "The reason code explaining why the name is unavailable. Will be undefined if the name is available."]
744    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
745    pub enum Reason {
746        Invalid,
747        AlreadyExists,
748    }
749}
750#[doc = "Contains the information necessary to perform a complete database restore operation."]
751#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
752pub struct CompleteDatabaseRestoreDefinition {
753    #[doc = "The last backup name to apply"]
754    #[serde(rename = "lastBackupName")]
755    pub last_backup_name: String,
756}
757impl CompleteDatabaseRestoreDefinition {
758    pub fn new(last_backup_name: String) -> Self {
759        Self { last_backup_name }
760    }
761}
762#[doc = "Contains the information necessary to perform long term retention backup copy operation."]
763#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
764pub struct CopyLongTermRetentionBackupParameters {
765    #[doc = "Contains the properties to perform long term retention backup copy operation."]
766    #[serde(default, skip_serializing_if = "Option::is_none")]
767    pub properties: Option<CopyLongTermRetentionBackupParametersProperties>,
768}
769impl CopyLongTermRetentionBackupParameters {
770    pub fn new() -> Self {
771        Self::default()
772    }
773}
774#[doc = "Contains the properties to perform long term retention backup copy operation."]
775#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
776pub struct CopyLongTermRetentionBackupParametersProperties {
777    #[doc = "The subscription that owns the target server"]
778    #[serde(rename = "targetSubscriptionId", default, skip_serializing_if = "Option::is_none")]
779    pub target_subscription_id: Option<String>,
780    #[doc = "The resource group that owns the target server"]
781    #[serde(rename = "targetResourceGroup", default, skip_serializing_if = "Option::is_none")]
782    pub target_resource_group: Option<String>,
783    #[doc = "The resource Id of the target server that owns the database"]
784    #[serde(rename = "targetServerResourceId", default, skip_serializing_if = "Option::is_none")]
785    pub target_server_resource_id: Option<String>,
786    #[doc = "The fully qualified domain name of the target server"]
787    #[serde(rename = "targetServerFullyQualifiedDomainName", default, skip_serializing_if = "Option::is_none")]
788    pub target_server_fully_qualified_domain_name: Option<String>,
789    #[doc = "The name of the database owns the copied backup."]
790    #[serde(rename = "targetDatabaseName", default, skip_serializing_if = "Option::is_none")]
791    pub target_database_name: Option<String>,
792    #[doc = "The storage redundancy type of the copied backup"]
793    #[serde(rename = "targetBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
794    pub target_backup_storage_redundancy: Option<copy_long_term_retention_backup_parameters_properties::TargetBackupStorageRedundancy>,
795}
796impl CopyLongTermRetentionBackupParametersProperties {
797    pub fn new() -> Self {
798        Self::default()
799    }
800}
801pub mod copy_long_term_retention_backup_parameters_properties {
802    use super::*;
803    #[doc = "The storage redundancy type of the copied backup"]
804    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
805    #[serde(remote = "TargetBackupStorageRedundancy")]
806    pub enum TargetBackupStorageRedundancy {
807        Geo,
808        Local,
809        Zone,
810        GeoZone,
811        #[serde(skip_deserializing)]
812        UnknownValue(String),
813    }
814    impl FromStr for TargetBackupStorageRedundancy {
815        type Err = value::Error;
816        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
817            Self::deserialize(s.into_deserializer())
818        }
819    }
820    impl<'de> Deserialize<'de> for TargetBackupStorageRedundancy {
821        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
822        where
823            D: Deserializer<'de>,
824        {
825            let s = String::deserialize(deserializer)?;
826            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
827            Ok(deserialized)
828        }
829    }
830    impl Serialize for TargetBackupStorageRedundancy {
831        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
832        where
833            S: Serializer,
834        {
835            match self {
836                Self::Geo => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 0u32, "Geo"),
837                Self::Local => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 1u32, "Local"),
838                Self::Zone => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 2u32, "Zone"),
839                Self::GeoZone => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 3u32, "GeoZone"),
840                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
841            }
842        }
843    }
844}
845#[doc = "Contains the information necessary to perform a create database restore point operation."]
846#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
847pub struct CreateDatabaseRestorePointDefinition {
848    #[doc = "The restore point label to apply"]
849    #[serde(rename = "restorePointLabel")]
850    pub restore_point_label: String,
851}
852impl CreateDatabaseRestorePointDefinition {
853    pub fn new(restore_point_label: String) -> Self {
854        Self { restore_point_label }
855    }
856}
857#[doc = "A database data masking policy."]
858#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
859pub struct DataMaskingPolicy {
860    #[serde(flatten)]
861    pub proxy_resource: ProxyResource,
862    #[doc = "The location of the data masking policy."]
863    #[serde(default, skip_serializing_if = "Option::is_none")]
864    pub location: Option<String>,
865    #[doc = "The kind of Data Masking Policy. Metadata, used for Azure portal."]
866    #[serde(default, skip_serializing_if = "Option::is_none")]
867    pub kind: Option<String>,
868    #[doc = "The properties of a database data masking policy."]
869    #[serde(default, skip_serializing_if = "Option::is_none")]
870    pub properties: Option<DataMaskingPolicyProperties>,
871}
872impl DataMaskingPolicy {
873    pub fn new() -> Self {
874        Self::default()
875    }
876}
877#[doc = "The properties of a database data masking policy."]
878#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
879pub struct DataMaskingPolicyProperties {
880    #[doc = "The state of the data masking policy."]
881    #[serde(rename = "dataMaskingState")]
882    pub data_masking_state: data_masking_policy_properties::DataMaskingState,
883    #[doc = "The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries."]
884    #[serde(rename = "exemptPrincipals", default, skip_serializing_if = "Option::is_none")]
885    pub exempt_principals: Option<String>,
886    #[doc = "The list of the application principals. This is a legacy parameter and is no longer used."]
887    #[serde(rename = "applicationPrincipals", default, skip_serializing_if = "Option::is_none")]
888    pub application_principals: Option<String>,
889    #[doc = "The masking level. This is a legacy parameter and is no longer used."]
890    #[serde(rename = "maskingLevel", default, skip_serializing_if = "Option::is_none")]
891    pub masking_level: Option<String>,
892}
893impl DataMaskingPolicyProperties {
894    pub fn new(data_masking_state: data_masking_policy_properties::DataMaskingState) -> Self {
895        Self {
896            data_masking_state,
897            exempt_principals: None,
898            application_principals: None,
899            masking_level: None,
900        }
901    }
902}
903pub mod data_masking_policy_properties {
904    use super::*;
905    #[doc = "The state of the data masking policy."]
906    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
907    pub enum DataMaskingState {
908        Enabled,
909        Disabled,
910    }
911}
912#[doc = "A database data masking rule."]
913#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
914pub struct DataMaskingRule {
915    #[serde(flatten)]
916    pub proxy_resource: ProxyResource,
917    #[doc = "The location of the data masking rule."]
918    #[serde(default, skip_serializing_if = "Option::is_none")]
919    pub location: Option<String>,
920    #[doc = "The kind of Data Masking Rule. Metadata, used for Azure portal."]
921    #[serde(default, skip_serializing_if = "Option::is_none")]
922    pub kind: Option<String>,
923    #[doc = "The properties of a database data masking rule."]
924    #[serde(default, skip_serializing_if = "Option::is_none")]
925    pub properties: Option<DataMaskingRuleProperties>,
926}
927impl DataMaskingRule {
928    pub fn new() -> Self {
929        Self::default()
930    }
931}
932#[doc = "The list of database data masking rules."]
933#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
934pub struct DataMaskingRuleListResult {
935    #[doc = "Array of results."]
936    #[serde(
937        default,
938        deserialize_with = "azure_core::util::deserialize_null_as_default",
939        skip_serializing_if = "Vec::is_empty"
940    )]
941    pub value: Vec<DataMaskingRule>,
942    #[doc = "Link to retrieve next page of results."]
943    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
944    pub next_link: Option<String>,
945}
946impl azure_core::Continuable for DataMaskingRuleListResult {
947    type Continuation = String;
948    fn continuation(&self) -> Option<Self::Continuation> {
949        self.next_link.clone().filter(|value| !value.is_empty())
950    }
951}
952impl DataMaskingRuleListResult {
953    pub fn new() -> Self {
954        Self::default()
955    }
956}
957#[doc = "The properties of a database data masking rule."]
958#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
959pub struct DataMaskingRuleProperties {
960    #[doc = "The rule Id."]
961    #[serde(default, skip_serializing_if = "Option::is_none")]
962    pub id: Option<String>,
963    #[doc = "The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState."]
964    #[serde(rename = "ruleState", default, skip_serializing_if = "Option::is_none")]
965    pub rule_state: Option<data_masking_rule_properties::RuleState>,
966    #[doc = "The schema name on which the data masking rule is applied."]
967    #[serde(rename = "schemaName")]
968    pub schema_name: String,
969    #[doc = "The table name on which the data masking rule is applied."]
970    #[serde(rename = "tableName")]
971    pub table_name: String,
972    #[doc = "The column name on which the data masking rule is applied."]
973    #[serde(rename = "columnName")]
974    pub column_name: String,
975    #[doc = "The alias name. This is a legacy parameter and is no longer used."]
976    #[serde(rename = "aliasName", default, skip_serializing_if = "Option::is_none")]
977    pub alias_name: Option<String>,
978    #[doc = "The masking function that is used for the data masking rule."]
979    #[serde(rename = "maskingFunction")]
980    pub masking_function: data_masking_rule_properties::MaskingFunction,
981    #[doc = "The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored."]
982    #[serde(rename = "numberFrom", default, skip_serializing_if = "Option::is_none")]
983    pub number_from: Option<String>,
984    #[doc = "The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored."]
985    #[serde(rename = "numberTo", default, skip_serializing_if = "Option::is_none")]
986    pub number_to: Option<String>,
987    #[doc = "If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored."]
988    #[serde(rename = "prefixSize", default, skip_serializing_if = "Option::is_none")]
989    pub prefix_size: Option<String>,
990    #[doc = "If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored."]
991    #[serde(rename = "suffixSize", default, skip_serializing_if = "Option::is_none")]
992    pub suffix_size: Option<String>,
993    #[doc = "If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored."]
994    #[serde(rename = "replacementString", default, skip_serializing_if = "Option::is_none")]
995    pub replacement_string: Option<String>,
996}
997impl DataMaskingRuleProperties {
998    pub fn new(
999        schema_name: String,
1000        table_name: String,
1001        column_name: String,
1002        masking_function: data_masking_rule_properties::MaskingFunction,
1003    ) -> Self {
1004        Self {
1005            id: None,
1006            rule_state: None,
1007            schema_name,
1008            table_name,
1009            column_name,
1010            alias_name: None,
1011            masking_function,
1012            number_from: None,
1013            number_to: None,
1014            prefix_size: None,
1015            suffix_size: None,
1016            replacement_string: None,
1017        }
1018    }
1019}
1020pub mod data_masking_rule_properties {
1021    use super::*;
1022    #[doc = "The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState."]
1023    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1024    pub enum RuleState {
1025        Enabled,
1026        Disabled,
1027    }
1028    #[doc = "The masking function that is used for the data masking rule."]
1029    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1030    pub enum MaskingFunction {
1031        Default,
1032        #[serde(rename = "CCN")]
1033        Ccn,
1034        Email,
1035        Number,
1036        #[serde(rename = "SSN")]
1037        Ssn,
1038        Text,
1039    }
1040}
1041#[doc = "User activities of a data warehouse"]
1042#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1043pub struct DataWarehouseUserActivities {
1044    #[serde(flatten)]
1045    pub proxy_resource: ProxyResource,
1046    #[doc = "User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV)."]
1047    #[serde(default, skip_serializing_if = "Option::is_none")]
1048    pub properties: Option<DataWarehouseUserActivitiesProperties>,
1049}
1050impl DataWarehouseUserActivities {
1051    pub fn new() -> Self {
1052        Self::default()
1053    }
1054}
1055#[doc = "User activities of a data warehouse"]
1056#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1057pub struct DataWarehouseUserActivitiesListResult {
1058    #[doc = "Array of results."]
1059    #[serde(
1060        default,
1061        deserialize_with = "azure_core::util::deserialize_null_as_default",
1062        skip_serializing_if = "Vec::is_empty"
1063    )]
1064    pub value: Vec<DataWarehouseUserActivities>,
1065    #[doc = "Link to retrieve next page of results."]
1066    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1067    pub next_link: Option<String>,
1068}
1069impl azure_core::Continuable for DataWarehouseUserActivitiesListResult {
1070    type Continuation = String;
1071    fn continuation(&self) -> Option<Self::Continuation> {
1072        self.next_link.clone().filter(|value| !value.is_empty())
1073    }
1074}
1075impl DataWarehouseUserActivitiesListResult {
1076    pub fn new() -> Self {
1077        Self::default()
1078    }
1079}
1080#[doc = "User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV)."]
1081#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1082pub struct DataWarehouseUserActivitiesProperties {
1083    #[doc = "Count of running and suspended queries."]
1084    #[serde(rename = "activeQueriesCount", default, skip_serializing_if = "Option::is_none")]
1085    pub active_queries_count: Option<i32>,
1086}
1087impl DataWarehouseUserActivitiesProperties {
1088    pub fn new() -> Self {
1089        Self::default()
1090    }
1091}
1092#[doc = "A database resource."]
1093#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1094pub struct Database {
1095    #[serde(flatten)]
1096    pub tracked_resource: TrackedResource,
1097    #[doc = "An ARM Resource SKU."]
1098    #[serde(default, skip_serializing_if = "Option::is_none")]
1099    pub sku: Option<Sku>,
1100    #[doc = "Kind of database. This is metadata used for the Azure portal experience."]
1101    #[serde(default, skip_serializing_if = "Option::is_none")]
1102    pub kind: Option<String>,
1103    #[doc = "Resource that manages the database."]
1104    #[serde(rename = "managedBy", default, skip_serializing_if = "Option::is_none")]
1105    pub managed_by: Option<String>,
1106    #[doc = "Azure Active Directory identity configuration for a resource."]
1107    #[serde(default, skip_serializing_if = "Option::is_none")]
1108    pub identity: Option<DatabaseIdentity>,
1109    #[doc = "The database's properties."]
1110    #[serde(default, skip_serializing_if = "Option::is_none")]
1111    pub properties: Option<DatabaseProperties>,
1112}
1113impl Database {
1114    pub fn new(tracked_resource: TrackedResource) -> Self {
1115        Self {
1116            tracked_resource,
1117            sku: None,
1118            kind: None,
1119            managed_by: None,
1120            identity: None,
1121            properties: None,
1122        }
1123    }
1124}
1125#[doc = "A database Advanced Threat Protection."]
1126#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1127pub struct DatabaseAdvancedThreatProtection {
1128    #[serde(flatten)]
1129    pub proxy_resource: ProxyResource,
1130    #[doc = "Metadata pertaining to creation and last modification of the resource."]
1131    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
1132    pub system_data: Option<SystemData>,
1133    #[doc = "Properties of an Advanced Threat Protection state."]
1134    #[serde(default, skip_serializing_if = "Option::is_none")]
1135    pub properties: Option<AdvancedThreatProtectionProperties>,
1136}
1137impl DatabaseAdvancedThreatProtection {
1138    pub fn new() -> Self {
1139        Self::default()
1140    }
1141}
1142#[doc = "A list of the database's Advanced Threat Protection configurations."]
1143#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1144pub struct DatabaseAdvancedThreatProtectionListResult {
1145    #[doc = "Array of results."]
1146    #[serde(
1147        default,
1148        deserialize_with = "azure_core::util::deserialize_null_as_default",
1149        skip_serializing_if = "Vec::is_empty"
1150    )]
1151    pub value: Vec<DatabaseAdvancedThreatProtection>,
1152    #[doc = "Link to retrieve next page of results."]
1153    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1154    pub next_link: Option<String>,
1155}
1156impl azure_core::Continuable for DatabaseAdvancedThreatProtectionListResult {
1157    type Continuation = String;
1158    fn continuation(&self) -> Option<Self::Continuation> {
1159        self.next_link.clone().filter(|value| !value.is_empty())
1160    }
1161}
1162impl DatabaseAdvancedThreatProtectionListResult {
1163    pub fn new() -> Self {
1164        Self::default()
1165    }
1166}
1167#[doc = "Database-level Automatic Tuning."]
1168#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1169pub struct DatabaseAutomaticTuning {
1170    #[serde(flatten)]
1171    pub proxy_resource: ProxyResource,
1172    #[doc = "Database-level Automatic Tuning properties."]
1173    #[serde(default, skip_serializing_if = "Option::is_none")]
1174    pub properties: Option<DatabaseAutomaticTuningProperties>,
1175}
1176impl DatabaseAutomaticTuning {
1177    pub fn new() -> Self {
1178        Self::default()
1179    }
1180}
1181#[doc = "Database-level Automatic Tuning properties."]
1182#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1183pub struct DatabaseAutomaticTuningProperties {
1184    #[doc = "Automatic tuning desired state."]
1185    #[serde(rename = "desiredState", default, skip_serializing_if = "Option::is_none")]
1186    pub desired_state: Option<database_automatic_tuning_properties::DesiredState>,
1187    #[doc = "Automatic tuning actual state."]
1188    #[serde(rename = "actualState", default, skip_serializing_if = "Option::is_none")]
1189    pub actual_state: Option<database_automatic_tuning_properties::ActualState>,
1190    #[doc = "Automatic tuning options definition."]
1191    #[serde(default, skip_serializing_if = "Option::is_none")]
1192    pub options: Option<serde_json::Value>,
1193}
1194impl DatabaseAutomaticTuningProperties {
1195    pub fn new() -> Self {
1196        Self::default()
1197    }
1198}
1199pub mod database_automatic_tuning_properties {
1200    use super::*;
1201    #[doc = "Automatic tuning desired state."]
1202    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1203    pub enum DesiredState {
1204        Inherit,
1205        Custom,
1206        Auto,
1207        Unspecified,
1208    }
1209    #[doc = "Automatic tuning actual state."]
1210    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1211    pub enum ActualState {
1212        Inherit,
1213        Custom,
1214        Auto,
1215        Unspecified,
1216    }
1217}
1218#[doc = "A database blob auditing policy."]
1219#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1220pub struct DatabaseBlobAuditingPolicy {
1221    #[serde(flatten)]
1222    pub proxy_resource: ProxyResource,
1223    #[doc = "Resource kind."]
1224    #[serde(default, skip_serializing_if = "Option::is_none")]
1225    pub kind: Option<String>,
1226    #[doc = "Properties of a database blob auditing policy."]
1227    #[serde(default, skip_serializing_if = "Option::is_none")]
1228    pub properties: Option<DatabaseBlobAuditingPolicyProperties>,
1229}
1230impl DatabaseBlobAuditingPolicy {
1231    pub fn new() -> Self {
1232        Self::default()
1233    }
1234}
1235#[doc = "A list of database auditing settings."]
1236#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1237pub struct DatabaseBlobAuditingPolicyListResult {
1238    #[doc = "Array of results."]
1239    #[serde(
1240        default,
1241        deserialize_with = "azure_core::util::deserialize_null_as_default",
1242        skip_serializing_if = "Vec::is_empty"
1243    )]
1244    pub value: Vec<DatabaseBlobAuditingPolicy>,
1245    #[doc = "Link to retrieve next page of results."]
1246    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1247    pub next_link: Option<String>,
1248}
1249impl azure_core::Continuable for DatabaseBlobAuditingPolicyListResult {
1250    type Continuation = String;
1251    fn continuation(&self) -> Option<Self::Continuation> {
1252        self.next_link.clone().filter(|value| !value.is_empty())
1253    }
1254}
1255impl DatabaseBlobAuditingPolicyListResult {
1256    pub fn new() -> Self {
1257        Self::default()
1258    }
1259}
1260#[doc = "Properties of a database blob auditing policy."]
1261#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1262pub struct DatabaseBlobAuditingPolicyProperties {
1263    #[doc = "Specifies the number of days to keep in the audit logs in the storage account."]
1264    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
1265    pub retention_days: Option<i32>,
1266    #[doc = "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)"]
1267    #[serde(
1268        rename = "auditActionsAndGroups",
1269        default,
1270        deserialize_with = "azure_core::util::deserialize_null_as_default",
1271        skip_serializing_if = "Vec::is_empty"
1272    )]
1273    pub audit_actions_and_groups: Vec<String>,
1274    #[doc = "Specifies whether storageAccountAccessKey value is the storage's secondary key."]
1275    #[serde(rename = "isStorageSecondaryKeyInUse", default, skip_serializing_if = "Option::is_none")]
1276    pub is_storage_secondary_key_in_use: Option<bool>,
1277    #[doc = "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
1278    #[serde(rename = "isAzureMonitorTargetEnabled", default, skip_serializing_if = "Option::is_none")]
1279    pub is_azure_monitor_target_enabled: Option<bool>,
1280    #[doc = "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647."]
1281    #[serde(rename = "queueDelayMs", default, skip_serializing_if = "Option::is_none")]
1282    pub queue_delay_ms: Option<i32>,
1283    #[doc = "Specifies whether Managed Identity is used to access blob storage"]
1284    #[serde(rename = "isManagedIdentityInUse", default, skip_serializing_if = "Option::is_none")]
1285    pub is_managed_identity_in_use: Option<bool>,
1286    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
1287    pub state: database_blob_auditing_policy_properties::State,
1288    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required."]
1289    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
1290    pub storage_endpoint: Option<String>,
1291    #[doc = "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)"]
1292    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
1293    pub storage_account_access_key: Option<String>,
1294    #[doc = "Specifies the blob storage subscription Id."]
1295    #[serde(rename = "storageAccountSubscriptionId", default, skip_serializing_if = "Option::is_none")]
1296    pub storage_account_subscription_id: Option<String>,
1297}
1298impl DatabaseBlobAuditingPolicyProperties {
1299    pub fn new(state: database_blob_auditing_policy_properties::State) -> Self {
1300        Self {
1301            retention_days: None,
1302            audit_actions_and_groups: Vec::new(),
1303            is_storage_secondary_key_in_use: None,
1304            is_azure_monitor_target_enabled: None,
1305            queue_delay_ms: None,
1306            is_managed_identity_in_use: None,
1307            state,
1308            storage_endpoint: None,
1309            storage_account_access_key: None,
1310            storage_account_subscription_id: None,
1311        }
1312    }
1313}
1314pub mod database_blob_auditing_policy_properties {
1315    use super::*;
1316    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
1317    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1318    pub enum State {
1319        Enabled,
1320        Disabled,
1321    }
1322}
1323#[doc = "A database column resource."]
1324#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1325pub struct DatabaseColumn {
1326    #[serde(flatten)]
1327    pub proxy_resource: ProxyResource,
1328    #[doc = "Database column properties."]
1329    #[serde(default, skip_serializing_if = "Option::is_none")]
1330    pub properties: Option<DatabaseColumnProperties>,
1331}
1332impl DatabaseColumn {
1333    pub fn new() -> Self {
1334        Self::default()
1335    }
1336}
1337#[doc = "A list of database columns."]
1338#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1339pub struct DatabaseColumnListResult {
1340    #[doc = "Array of results."]
1341    #[serde(
1342        default,
1343        deserialize_with = "azure_core::util::deserialize_null_as_default",
1344        skip_serializing_if = "Vec::is_empty"
1345    )]
1346    pub value: Vec<DatabaseColumn>,
1347    #[doc = "Link to retrieve next page of results."]
1348    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1349    pub next_link: Option<String>,
1350}
1351impl azure_core::Continuable for DatabaseColumnListResult {
1352    type Continuation = String;
1353    fn continuation(&self) -> Option<Self::Continuation> {
1354        self.next_link.clone().filter(|value| !value.is_empty())
1355    }
1356}
1357impl DatabaseColumnListResult {
1358    pub fn new() -> Self {
1359        Self::default()
1360    }
1361}
1362#[doc = "Database column properties."]
1363#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1364pub struct DatabaseColumnProperties {
1365    #[doc = "The column data type."]
1366    #[serde(rename = "columnType", default, skip_serializing_if = "Option::is_none")]
1367    pub column_type: Option<database_column_properties::ColumnType>,
1368    #[doc = "The table temporal type."]
1369    #[serde(rename = "temporalType", default, skip_serializing_if = "Option::is_none")]
1370    pub temporal_type: Option<database_column_properties::TemporalType>,
1371    #[doc = "Whether or not the column belongs to a memory optimized table."]
1372    #[serde(rename = "memoryOptimized", default, skip_serializing_if = "Option::is_none")]
1373    pub memory_optimized: Option<bool>,
1374    #[doc = "Whether or not the column is computed."]
1375    #[serde(rename = "isComputed", default, skip_serializing_if = "Option::is_none")]
1376    pub is_computed: Option<bool>,
1377}
1378impl DatabaseColumnProperties {
1379    pub fn new() -> Self {
1380        Self::default()
1381    }
1382}
1383pub mod database_column_properties {
1384    use super::*;
1385    #[doc = "The column data type."]
1386    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1387    #[serde(remote = "ColumnType")]
1388    pub enum ColumnType {
1389        #[serde(rename = "image")]
1390        Image,
1391        #[serde(rename = "text")]
1392        Text,
1393        #[serde(rename = "uniqueidentifier")]
1394        Uniqueidentifier,
1395        #[serde(rename = "date")]
1396        Date,
1397        #[serde(rename = "time")]
1398        Time,
1399        #[serde(rename = "datetime2")]
1400        Datetime2,
1401        #[serde(rename = "datetimeoffset")]
1402        Datetimeoffset,
1403        #[serde(rename = "tinyint")]
1404        Tinyint,
1405        #[serde(rename = "smallint")]
1406        Smallint,
1407        #[serde(rename = "int")]
1408        Int,
1409        #[serde(rename = "smalldatetime")]
1410        Smalldatetime,
1411        #[serde(rename = "real")]
1412        Real,
1413        #[serde(rename = "money")]
1414        Money,
1415        #[serde(rename = "datetime")]
1416        Datetime,
1417        #[serde(rename = "float")]
1418        Float,
1419        #[serde(rename = "sql_variant")]
1420        SqlVariant,
1421        #[serde(rename = "ntext")]
1422        Ntext,
1423        #[serde(rename = "bit")]
1424        Bit,
1425        #[serde(rename = "decimal")]
1426        Decimal,
1427        #[serde(rename = "numeric")]
1428        Numeric,
1429        #[serde(rename = "smallmoney")]
1430        Smallmoney,
1431        #[serde(rename = "bigint")]
1432        Bigint,
1433        #[serde(rename = "hierarchyid")]
1434        Hierarchyid,
1435        #[serde(rename = "geometry")]
1436        Geometry,
1437        #[serde(rename = "geography")]
1438        Geography,
1439        #[serde(rename = "varbinary")]
1440        Varbinary,
1441        #[serde(rename = "varchar")]
1442        Varchar,
1443        #[serde(rename = "binary")]
1444        Binary,
1445        #[serde(rename = "char")]
1446        Char,
1447        #[serde(rename = "timestamp")]
1448        Timestamp,
1449        #[serde(rename = "nvarchar")]
1450        Nvarchar,
1451        #[serde(rename = "nchar")]
1452        Nchar,
1453        #[serde(rename = "xml")]
1454        Xml,
1455        #[serde(rename = "sysname")]
1456        Sysname,
1457        #[serde(skip_deserializing)]
1458        UnknownValue(String),
1459    }
1460    impl FromStr for ColumnType {
1461        type Err = value::Error;
1462        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1463            Self::deserialize(s.into_deserializer())
1464        }
1465    }
1466    impl<'de> Deserialize<'de> for ColumnType {
1467        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1468        where
1469            D: Deserializer<'de>,
1470        {
1471            let s = String::deserialize(deserializer)?;
1472            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1473            Ok(deserialized)
1474        }
1475    }
1476    impl Serialize for ColumnType {
1477        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1478        where
1479            S: Serializer,
1480        {
1481            match self {
1482                Self::Image => serializer.serialize_unit_variant("ColumnType", 0u32, "image"),
1483                Self::Text => serializer.serialize_unit_variant("ColumnType", 1u32, "text"),
1484                Self::Uniqueidentifier => serializer.serialize_unit_variant("ColumnType", 2u32, "uniqueidentifier"),
1485                Self::Date => serializer.serialize_unit_variant("ColumnType", 3u32, "date"),
1486                Self::Time => serializer.serialize_unit_variant("ColumnType", 4u32, "time"),
1487                Self::Datetime2 => serializer.serialize_unit_variant("ColumnType", 5u32, "datetime2"),
1488                Self::Datetimeoffset => serializer.serialize_unit_variant("ColumnType", 6u32, "datetimeoffset"),
1489                Self::Tinyint => serializer.serialize_unit_variant("ColumnType", 7u32, "tinyint"),
1490                Self::Smallint => serializer.serialize_unit_variant("ColumnType", 8u32, "smallint"),
1491                Self::Int => serializer.serialize_unit_variant("ColumnType", 9u32, "int"),
1492                Self::Smalldatetime => serializer.serialize_unit_variant("ColumnType", 10u32, "smalldatetime"),
1493                Self::Real => serializer.serialize_unit_variant("ColumnType", 11u32, "real"),
1494                Self::Money => serializer.serialize_unit_variant("ColumnType", 12u32, "money"),
1495                Self::Datetime => serializer.serialize_unit_variant("ColumnType", 13u32, "datetime"),
1496                Self::Float => serializer.serialize_unit_variant("ColumnType", 14u32, "float"),
1497                Self::SqlVariant => serializer.serialize_unit_variant("ColumnType", 15u32, "sql_variant"),
1498                Self::Ntext => serializer.serialize_unit_variant("ColumnType", 16u32, "ntext"),
1499                Self::Bit => serializer.serialize_unit_variant("ColumnType", 17u32, "bit"),
1500                Self::Decimal => serializer.serialize_unit_variant("ColumnType", 18u32, "decimal"),
1501                Self::Numeric => serializer.serialize_unit_variant("ColumnType", 19u32, "numeric"),
1502                Self::Smallmoney => serializer.serialize_unit_variant("ColumnType", 20u32, "smallmoney"),
1503                Self::Bigint => serializer.serialize_unit_variant("ColumnType", 21u32, "bigint"),
1504                Self::Hierarchyid => serializer.serialize_unit_variant("ColumnType", 22u32, "hierarchyid"),
1505                Self::Geometry => serializer.serialize_unit_variant("ColumnType", 23u32, "geometry"),
1506                Self::Geography => serializer.serialize_unit_variant("ColumnType", 24u32, "geography"),
1507                Self::Varbinary => serializer.serialize_unit_variant("ColumnType", 25u32, "varbinary"),
1508                Self::Varchar => serializer.serialize_unit_variant("ColumnType", 26u32, "varchar"),
1509                Self::Binary => serializer.serialize_unit_variant("ColumnType", 27u32, "binary"),
1510                Self::Char => serializer.serialize_unit_variant("ColumnType", 28u32, "char"),
1511                Self::Timestamp => serializer.serialize_unit_variant("ColumnType", 29u32, "timestamp"),
1512                Self::Nvarchar => serializer.serialize_unit_variant("ColumnType", 30u32, "nvarchar"),
1513                Self::Nchar => serializer.serialize_unit_variant("ColumnType", 31u32, "nchar"),
1514                Self::Xml => serializer.serialize_unit_variant("ColumnType", 32u32, "xml"),
1515                Self::Sysname => serializer.serialize_unit_variant("ColumnType", 33u32, "sysname"),
1516                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1517            }
1518        }
1519    }
1520    #[doc = "The table temporal type."]
1521    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1522    #[serde(remote = "TemporalType")]
1523    pub enum TemporalType {
1524        NonTemporalTable,
1525        HistoryTable,
1526        SystemVersionedTemporalTable,
1527        #[serde(skip_deserializing)]
1528        UnknownValue(String),
1529    }
1530    impl FromStr for TemporalType {
1531        type Err = value::Error;
1532        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1533            Self::deserialize(s.into_deserializer())
1534        }
1535    }
1536    impl<'de> Deserialize<'de> for TemporalType {
1537        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1538        where
1539            D: Deserializer<'de>,
1540        {
1541            let s = String::deserialize(deserializer)?;
1542            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1543            Ok(deserialized)
1544        }
1545    }
1546    impl Serialize for TemporalType {
1547        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1548        where
1549            S: Serializer,
1550        {
1551            match self {
1552                Self::NonTemporalTable => serializer.serialize_unit_variant("TemporalType", 0u32, "NonTemporalTable"),
1553                Self::HistoryTable => serializer.serialize_unit_variant("TemporalType", 1u32, "HistoryTable"),
1554                Self::SystemVersionedTemporalTable => {
1555                    serializer.serialize_unit_variant("TemporalType", 2u32, "SystemVersionedTemporalTable")
1556                }
1557                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1558            }
1559        }
1560    }
1561}
1562#[doc = "An Import, Export, or PolybaseImport resource."]
1563#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1564pub struct DatabaseExtensions {
1565    #[serde(flatten)]
1566    pub proxy_resource: ProxyResource,
1567    #[doc = "Contains the database information after a successful Import, Export, or PolybaseImport"]
1568    #[serde(default, skip_serializing_if = "Option::is_none")]
1569    pub properties: Option<DatabaseExtensionsProperties>,
1570}
1571impl DatabaseExtensions {
1572    pub fn new() -> Self {
1573        Self::default()
1574    }
1575}
1576#[doc = "Contains the database information after a successful Import, Export, or PolybaseImport"]
1577#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1578pub struct DatabaseExtensionsProperties {
1579    #[doc = "Operation mode of the operation: Import, Export, or PolybaseImport."]
1580    #[serde(rename = "operationMode")]
1581    pub operation_mode: database_extensions_properties::OperationMode,
1582    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity."]
1583    #[serde(rename = "storageKeyType")]
1584    pub storage_key_type: database_extensions_properties::StorageKeyType,
1585    #[doc = "Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
1586    #[serde(rename = "storageKey")]
1587    pub storage_key: String,
1588    #[doc = "Storage Uri for the storage account."]
1589    #[serde(rename = "storageUri")]
1590    pub storage_uri: String,
1591    #[doc = "Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
1592    #[serde(rename = "administratorLogin", default, skip_serializing_if = "Option::is_none")]
1593    pub administrator_login: Option<String>,
1594    #[doc = "Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified."]
1595    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
1596    pub administrator_login_password: Option<String>,
1597    #[doc = "Authentication type used to access the SQL: Sql, ADPassword or ManagedIdentity."]
1598    #[serde(rename = "authenticationType", default, skip_serializing_if = "Option::is_none")]
1599    pub authentication_type: Option<String>,
1600    #[doc = "Database edition for the newly created database in the case of an import operation."]
1601    #[serde(rename = "databaseEdition", default, skip_serializing_if = "Option::is_none")]
1602    pub database_edition: Option<String>,
1603    #[doc = "Database service level objective for the newly created database in the case of an import operation."]
1604    #[serde(rename = "serviceObjectiveName", default, skip_serializing_if = "Option::is_none")]
1605    pub service_objective_name: Option<String>,
1606    #[doc = "Database max size in bytes for the newly created database in the case of an import operation."]
1607    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
1608    pub max_size_bytes: Option<String>,
1609    #[doc = "Contains the ARM resources for which to create private endpoint connection."]
1610    #[serde(rename = "networkIsolation", default, skip_serializing_if = "Option::is_none")]
1611    pub network_isolation: Option<NetworkIsolationSettings>,
1612}
1613impl DatabaseExtensionsProperties {
1614    pub fn new(
1615        operation_mode: database_extensions_properties::OperationMode,
1616        storage_key_type: database_extensions_properties::StorageKeyType,
1617        storage_key: String,
1618        storage_uri: String,
1619    ) -> Self {
1620        Self {
1621            operation_mode,
1622            storage_key_type,
1623            storage_key,
1624            storage_uri,
1625            administrator_login: None,
1626            administrator_login_password: None,
1627            authentication_type: None,
1628            database_edition: None,
1629            service_objective_name: None,
1630            max_size_bytes: None,
1631            network_isolation: None,
1632        }
1633    }
1634}
1635pub mod database_extensions_properties {
1636    use super::*;
1637    #[doc = "Operation mode of the operation: Import, Export, or PolybaseImport."]
1638    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1639    #[serde(remote = "OperationMode")]
1640    pub enum OperationMode {
1641        PolybaseImport,
1642        Import,
1643        Export,
1644        #[serde(skip_deserializing)]
1645        UnknownValue(String),
1646    }
1647    impl FromStr for OperationMode {
1648        type Err = value::Error;
1649        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1650            Self::deserialize(s.into_deserializer())
1651        }
1652    }
1653    impl<'de> Deserialize<'de> for OperationMode {
1654        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1655        where
1656            D: Deserializer<'de>,
1657        {
1658            let s = String::deserialize(deserializer)?;
1659            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1660            Ok(deserialized)
1661        }
1662    }
1663    impl Serialize for OperationMode {
1664        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1665        where
1666            S: Serializer,
1667        {
1668            match self {
1669                Self::PolybaseImport => serializer.serialize_unit_variant("OperationMode", 0u32, "PolybaseImport"),
1670                Self::Import => serializer.serialize_unit_variant("OperationMode", 1u32, "Import"),
1671                Self::Export => serializer.serialize_unit_variant("OperationMode", 2u32, "Export"),
1672                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1673            }
1674        }
1675    }
1676    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity."]
1677    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1678    #[serde(remote = "StorageKeyType")]
1679    pub enum StorageKeyType {
1680        SharedAccessKey,
1681        StorageAccessKey,
1682        ManagedIdentity,
1683        #[serde(skip_deserializing)]
1684        UnknownValue(String),
1685    }
1686    impl FromStr for StorageKeyType {
1687        type Err = value::Error;
1688        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1689            Self::deserialize(s.into_deserializer())
1690        }
1691    }
1692    impl<'de> Deserialize<'de> for StorageKeyType {
1693        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1694        where
1695            D: Deserializer<'de>,
1696        {
1697            let s = String::deserialize(deserializer)?;
1698            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1699            Ok(deserialized)
1700        }
1701    }
1702    impl Serialize for StorageKeyType {
1703        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1704        where
1705            S: Serializer,
1706        {
1707            match self {
1708                Self::SharedAccessKey => serializer.serialize_unit_variant("StorageKeyType", 0u32, "SharedAccessKey"),
1709                Self::StorageAccessKey => serializer.serialize_unit_variant("StorageKeyType", 1u32, "StorageAccessKey"),
1710                Self::ManagedIdentity => serializer.serialize_unit_variant("StorageKeyType", 2u32, "ManagedIdentity"),
1711                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1712            }
1713        }
1714    }
1715}
1716#[doc = "Azure Active Directory identity configuration for a resource."]
1717#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1718pub struct DatabaseIdentity {
1719    #[doc = "The identity type"]
1720    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1721    pub type_: Option<database_identity::Type>,
1722    #[doc = "The Azure Active Directory tenant id."]
1723    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
1724    pub tenant_id: Option<String>,
1725    #[doc = "The resource ids of the user assigned identities to use"]
1726    #[serde(rename = "userAssignedIdentities", default, skip_serializing_if = "Option::is_none")]
1727    pub user_assigned_identities: Option<serde_json::Value>,
1728}
1729impl DatabaseIdentity {
1730    pub fn new() -> Self {
1731        Self::default()
1732    }
1733}
1734pub mod database_identity {
1735    use super::*;
1736    #[doc = "The identity type"]
1737    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1738    #[serde(remote = "Type")]
1739    pub enum Type {
1740        None,
1741        UserAssigned,
1742        #[serde(skip_deserializing)]
1743        UnknownValue(String),
1744    }
1745    impl FromStr for Type {
1746        type Err = value::Error;
1747        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1748            Self::deserialize(s.into_deserializer())
1749        }
1750    }
1751    impl<'de> Deserialize<'de> for Type {
1752        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1753        where
1754            D: Deserializer<'de>,
1755        {
1756            let s = String::deserialize(deserializer)?;
1757            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1758            Ok(deserialized)
1759        }
1760    }
1761    impl Serialize for Type {
1762        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1763        where
1764            S: Serializer,
1765        {
1766            match self {
1767                Self::None => serializer.serialize_unit_variant("Type", 0u32, "None"),
1768                Self::UserAssigned => serializer.serialize_unit_variant("Type", 1u32, "UserAssigned"),
1769                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1770            }
1771        }
1772    }
1773}
1774#[doc = "Database level key used for encryption at rest."]
1775#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1776pub struct DatabaseKey {
1777    #[doc = "The database key type. Only supported value is 'AzureKeyVault'."]
1778    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1779    pub type_: Option<database_key::Type>,
1780    #[doc = "Thumbprint of the database key."]
1781    #[serde(default, skip_serializing_if = "Option::is_none")]
1782    pub thumbprint: Option<String>,
1783    #[doc = "The database key creation date."]
1784    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
1785    pub creation_date: Option<::time::OffsetDateTime>,
1786    #[doc = "Subregion of the server key."]
1787    #[serde(default, skip_serializing_if = "Option::is_none")]
1788    pub subregion: Option<String>,
1789}
1790impl DatabaseKey {
1791    pub fn new() -> Self {
1792        Self::default()
1793    }
1794}
1795pub mod database_key {
1796    use super::*;
1797    #[doc = "The database key type. Only supported value is 'AzureKeyVault'."]
1798    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1799    #[serde(remote = "Type")]
1800    pub enum Type {
1801        AzureKeyVault,
1802        #[serde(skip_deserializing)]
1803        UnknownValue(String),
1804    }
1805    impl FromStr for Type {
1806        type Err = value::Error;
1807        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1808            Self::deserialize(s.into_deserializer())
1809        }
1810    }
1811    impl<'de> Deserialize<'de> for Type {
1812        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1813        where
1814            D: Deserializer<'de>,
1815        {
1816            let s = String::deserialize(deserializer)?;
1817            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1818            Ok(deserialized)
1819        }
1820    }
1821    impl Serialize for Type {
1822        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1823        where
1824            S: Serializer,
1825        {
1826            match self {
1827                Self::AzureKeyVault => serializer.serialize_unit_variant("Type", 0u32, "AzureKeyVault"),
1828                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1829            }
1830        }
1831    }
1832}
1833#[doc = "A list of databases."]
1834#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1835pub struct DatabaseListResult {
1836    #[doc = "Array of results."]
1837    #[serde(
1838        default,
1839        deserialize_with = "azure_core::util::deserialize_null_as_default",
1840        skip_serializing_if = "Vec::is_empty"
1841    )]
1842    pub value: Vec<Database>,
1843    #[doc = "Link to retrieve next page of results."]
1844    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1845    pub next_link: Option<String>,
1846}
1847impl azure_core::Continuable for DatabaseListResult {
1848    type Continuation = String;
1849    fn continuation(&self) -> Option<Self::Continuation> {
1850        self.next_link.clone().filter(|value| !value.is_empty())
1851    }
1852}
1853impl DatabaseListResult {
1854    pub fn new() -> Self {
1855        Self::default()
1856    }
1857}
1858#[doc = "A database operation."]
1859#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1860pub struct DatabaseOperation {
1861    #[serde(flatten)]
1862    pub proxy_resource: ProxyResource,
1863    #[doc = "The properties of a database operation."]
1864    #[serde(default, skip_serializing_if = "Option::is_none")]
1865    pub properties: Option<DatabaseOperationProperties>,
1866}
1867impl DatabaseOperation {
1868    pub fn new() -> Self {
1869        Self::default()
1870    }
1871}
1872#[doc = "The response to a list database operations request"]
1873#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1874pub struct DatabaseOperationListResult {
1875    #[doc = "Array of results."]
1876    #[serde(
1877        default,
1878        deserialize_with = "azure_core::util::deserialize_null_as_default",
1879        skip_serializing_if = "Vec::is_empty"
1880    )]
1881    pub value: Vec<DatabaseOperation>,
1882    #[doc = "Link to retrieve next page of results."]
1883    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1884    pub next_link: Option<String>,
1885}
1886impl azure_core::Continuable for DatabaseOperationListResult {
1887    type Continuation = String;
1888    fn continuation(&self) -> Option<Self::Continuation> {
1889        self.next_link.clone().filter(|value| !value.is_empty())
1890    }
1891}
1892impl DatabaseOperationListResult {
1893    pub fn new() -> Self {
1894        Self::default()
1895    }
1896}
1897#[doc = "The properties of a database operation."]
1898#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1899pub struct DatabaseOperationProperties {
1900    #[doc = "The name of the database the operation is being performed on."]
1901    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
1902    pub database_name: Option<String>,
1903    #[doc = "The name of operation."]
1904    #[serde(default, skip_serializing_if = "Option::is_none")]
1905    pub operation: Option<String>,
1906    #[doc = "The friendly name of operation."]
1907    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
1908    pub operation_friendly_name: Option<String>,
1909    #[doc = "The percentage of the operation completed."]
1910    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
1911    pub percent_complete: Option<i32>,
1912    #[doc = "The name of the server."]
1913    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
1914    pub server_name: Option<String>,
1915    #[doc = "The operation start time."]
1916    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
1917    pub start_time: Option<::time::OffsetDateTime>,
1918    #[doc = "The operation state."]
1919    #[serde(default, skip_serializing_if = "Option::is_none")]
1920    pub state: Option<database_operation_properties::State>,
1921    #[doc = "The operation error code."]
1922    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
1923    pub error_code: Option<i32>,
1924    #[doc = "The operation error description."]
1925    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
1926    pub error_description: Option<String>,
1927    #[doc = "The operation error severity."]
1928    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
1929    pub error_severity: Option<i32>,
1930    #[doc = "Whether or not the error is a user error."]
1931    #[serde(rename = "isUserError", default, skip_serializing_if = "Option::is_none")]
1932    pub is_user_error: Option<bool>,
1933    #[doc = "The estimated completion time of the operation."]
1934    #[serde(rename = "estimatedCompletionTime", default, with = "azure_core::date::rfc3339::option")]
1935    pub estimated_completion_time: Option<::time::OffsetDateTime>,
1936    #[doc = "The operation description."]
1937    #[serde(default, skip_serializing_if = "Option::is_none")]
1938    pub description: Option<String>,
1939    #[doc = "Whether the operation can be cancelled."]
1940    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
1941    pub is_cancellable: Option<bool>,
1942    #[doc = "The phase details properties of a database operation."]
1943    #[serde(rename = "operationPhaseDetails", default, skip_serializing_if = "Option::is_none")]
1944    pub operation_phase_details: Option<PhaseDetails>,
1945}
1946impl DatabaseOperationProperties {
1947    pub fn new() -> Self {
1948        Self::default()
1949    }
1950}
1951pub mod database_operation_properties {
1952    use super::*;
1953    #[doc = "The operation state."]
1954    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1955    #[serde(remote = "State")]
1956    pub enum State {
1957        Pending,
1958        InProgress,
1959        Succeeded,
1960        Failed,
1961        CancelInProgress,
1962        Cancelled,
1963        #[serde(skip_deserializing)]
1964        UnknownValue(String),
1965    }
1966    impl FromStr for State {
1967        type Err = value::Error;
1968        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1969            Self::deserialize(s.into_deserializer())
1970        }
1971    }
1972    impl<'de> Deserialize<'de> for State {
1973        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1974        where
1975            D: Deserializer<'de>,
1976        {
1977            let s = String::deserialize(deserializer)?;
1978            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1979            Ok(deserialized)
1980        }
1981    }
1982    impl Serialize for State {
1983        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1984        where
1985            S: Serializer,
1986        {
1987            match self {
1988                Self::Pending => serializer.serialize_unit_variant("State", 0u32, "Pending"),
1989                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
1990                Self::Succeeded => serializer.serialize_unit_variant("State", 2u32, "Succeeded"),
1991                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
1992                Self::CancelInProgress => serializer.serialize_unit_variant("State", 4u32, "CancelInProgress"),
1993                Self::Cancelled => serializer.serialize_unit_variant("State", 5u32, "Cancelled"),
1994                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1995            }
1996        }
1997    }
1998}
1999#[doc = "The database's properties."]
2000#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2001pub struct DatabaseProperties {
2002    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition."]
2003    #[serde(rename = "createMode", default, skip_serializing_if = "Option::is_none")]
2004    pub create_mode: Option<database_properties::CreateMode>,
2005    #[doc = "The collation of the database."]
2006    #[serde(default, skip_serializing_if = "Option::is_none")]
2007    pub collation: Option<String>,
2008    #[doc = "The max size of the database expressed in bytes."]
2009    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
2010    pub max_size_bytes: Option<i64>,
2011    #[doc = "The name of the sample schema to apply when creating this database."]
2012    #[serde(rename = "sampleName", default, skip_serializing_if = "Option::is_none")]
2013    pub sample_name: Option<database_properties::SampleName>,
2014    #[doc = "The resource identifier of the elastic pool containing this database."]
2015    #[serde(rename = "elasticPoolId", default, skip_serializing_if = "Option::is_none")]
2016    pub elastic_pool_id: Option<String>,
2017    #[doc = "The resource identifier of the source database associated with create operation of this database."]
2018    #[serde(rename = "sourceDatabaseId", default, skip_serializing_if = "Option::is_none")]
2019    pub source_database_id: Option<String>,
2020    #[doc = "The status of the database."]
2021    #[serde(default, skip_serializing_if = "Option::is_none")]
2022    pub status: Option<database_properties::Status>,
2023    #[doc = "The ID of the database."]
2024    #[serde(rename = "databaseId", default, skip_serializing_if = "Option::is_none")]
2025    pub database_id: Option<String>,
2026    #[doc = "The creation date of the database (ISO8601 format)."]
2027    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
2028    pub creation_date: Option<::time::OffsetDateTime>,
2029    #[doc = "The current service level objective name of the database."]
2030    #[serde(rename = "currentServiceObjectiveName", default, skip_serializing_if = "Option::is_none")]
2031    pub current_service_objective_name: Option<String>,
2032    #[doc = "The requested service level objective name of the database."]
2033    #[serde(rename = "requestedServiceObjectiveName", default, skip_serializing_if = "Option::is_none")]
2034    pub requested_service_objective_name: Option<String>,
2035    #[doc = "The default secondary region for this database."]
2036    #[serde(rename = "defaultSecondaryLocation", default, skip_serializing_if = "Option::is_none")]
2037    pub default_secondary_location: Option<String>,
2038    #[doc = "Failover Group resource identifier that this database belongs to."]
2039    #[serde(rename = "failoverGroupId", default, skip_serializing_if = "Option::is_none")]
2040    pub failover_group_id: Option<String>,
2041    #[doc = "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database."]
2042    #[serde(rename = "restorePointInTime", default, with = "azure_core::date::rfc3339::option")]
2043    pub restore_point_in_time: Option<::time::OffsetDateTime>,
2044    #[doc = "Specifies the time that the database was deleted."]
2045    #[serde(rename = "sourceDatabaseDeletionDate", default, with = "azure_core::date::rfc3339::option")]
2046    pub source_database_deletion_date: Option<::time::OffsetDateTime>,
2047    #[doc = "The resource identifier of the recovery point associated with create operation of this database."]
2048    #[serde(rename = "recoveryServicesRecoveryPointId", default, skip_serializing_if = "Option::is_none")]
2049    pub recovery_services_recovery_point_id: Option<String>,
2050    #[doc = "The resource identifier of the long term retention backup associated with create operation of this database."]
2051    #[serde(rename = "longTermRetentionBackupResourceId", default, skip_serializing_if = "Option::is_none")]
2052    pub long_term_retention_backup_resource_id: Option<String>,
2053    #[doc = "The resource identifier of the recoverable database associated with create operation of this database."]
2054    #[serde(rename = "recoverableDatabaseId", default, skip_serializing_if = "Option::is_none")]
2055    pub recoverable_database_id: Option<String>,
2056    #[doc = "The resource identifier of the restorable dropped database associated with create operation of this database."]
2057    #[serde(rename = "restorableDroppedDatabaseId", default, skip_serializing_if = "Option::is_none")]
2058    pub restorable_dropped_database_id: Option<String>,
2059    #[doc = "Collation of the metadata catalog."]
2060    #[serde(rename = "catalogCollation", default, skip_serializing_if = "Option::is_none")]
2061    pub catalog_collation: Option<database_properties::CatalogCollation>,
2062    #[doc = "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones."]
2063    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
2064    pub zone_redundant: Option<bool>,
2065    #[doc = "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit."]
2066    #[serde(rename = "licenseType", default, skip_serializing_if = "Option::is_none")]
2067    pub license_type: Option<database_properties::LicenseType>,
2068    #[doc = "The max log size for this database."]
2069    #[serde(rename = "maxLogSizeBytes", default, skip_serializing_if = "Option::is_none")]
2070    pub max_log_size_bytes: Option<i64>,
2071    #[doc = "This records the earliest start date and time that restore is available for this database (ISO8601 format)."]
2072    #[serde(rename = "earliestRestoreDate", default, with = "azure_core::date::rfc3339::option")]
2073    pub earliest_restore_date: Option<::time::OffsetDateTime>,
2074    #[doc = "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool."]
2075    #[serde(rename = "readScale", default, skip_serializing_if = "Option::is_none")]
2076    pub read_scale: Option<database_properties::ReadScale>,
2077    #[doc = "The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool."]
2078    #[serde(rename = "highAvailabilityReplicaCount", default, skip_serializing_if = "Option::is_none")]
2079    pub high_availability_replica_count: Option<i32>,
2080    #[doc = "The secondary type of the database if it is a secondary.  Valid values are Geo, Named and Standby."]
2081    #[serde(rename = "secondaryType", default, skip_serializing_if = "Option::is_none")]
2082    pub secondary_type: Option<database_properties::SecondaryType>,
2083    #[doc = "An ARM Resource SKU."]
2084    #[serde(rename = "currentSku", default, skip_serializing_if = "Option::is_none")]
2085    pub current_sku: Option<Sku>,
2086    #[doc = "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled"]
2087    #[serde(rename = "autoPauseDelay", default, skip_serializing_if = "Option::is_none")]
2088    pub auto_pause_delay: Option<i32>,
2089    #[doc = "The storage account type used to store backups for this database."]
2090    #[serde(rename = "currentBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
2091    pub current_backup_storage_redundancy: Option<database_properties::CurrentBackupStorageRedundancy>,
2092    #[doc = "The storage account type to be used to store backups for this database."]
2093    #[serde(rename = "requestedBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
2094    pub requested_backup_storage_redundancy: Option<database_properties::RequestedBackupStorageRedundancy>,
2095    #[doc = "Minimal capacity that database will always have allocated, if not paused"]
2096    #[serde(rename = "minCapacity", default, skip_serializing_if = "Option::is_none")]
2097    pub min_capacity: Option<f64>,
2098    #[doc = "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready."]
2099    #[serde(rename = "pausedDate", default, with = "azure_core::date::rfc3339::option")]
2100    pub paused_date: Option<::time::OffsetDateTime>,
2101    #[doc = "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused."]
2102    #[serde(rename = "resumedDate", default, with = "azure_core::date::rfc3339::option")]
2103    pub resumed_date: Option<::time::OffsetDateTime>,
2104    #[doc = "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur."]
2105    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
2106    pub maintenance_configuration_id: Option<String>,
2107    #[doc = "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created."]
2108    #[serde(rename = "isLedgerOn", default, skip_serializing_if = "Option::is_none")]
2109    pub is_ledger_on: Option<bool>,
2110    #[doc = "Infra encryption is enabled for this database."]
2111    #[serde(rename = "isInfraEncryptionEnabled", default, skip_serializing_if = "Option::is_none")]
2112    pub is_infra_encryption_enabled: Option<bool>,
2113    #[doc = "The Client id used for cross tenant per database CMK scenario"]
2114    #[serde(rename = "federatedClientId", default, skip_serializing_if = "Option::is_none")]
2115    pub federated_client_id: Option<String>,
2116    #[doc = "The resource ids of the user assigned identities to use"]
2117    #[serde(default, skip_serializing_if = "Option::is_none")]
2118    pub keys: Option<serde_json::Value>,
2119    #[doc = "The azure key vault URI of the database if it's configured with per Database Customer Managed Keys."]
2120    #[serde(rename = "encryptionProtector", default, skip_serializing_if = "Option::is_none")]
2121    pub encryption_protector: Option<String>,
2122    #[doc = "Type of enclave requested on the database i.e. Default or VBS enclaves."]
2123    #[serde(rename = "preferredEnclaveType", default, skip_serializing_if = "Option::is_none")]
2124    pub preferred_enclave_type: Option<database_properties::PreferredEnclaveType>,
2125    #[doc = "Whether or not the database uses free monthly limits. Allowed on one database in a subscription."]
2126    #[serde(rename = "useFreeLimit", default, skip_serializing_if = "Option::is_none")]
2127    pub use_free_limit: Option<bool>,
2128    #[doc = "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed."]
2129    #[serde(rename = "freeLimitExhaustionBehavior", default, skip_serializing_if = "Option::is_none")]
2130    pub free_limit_exhaustion_behavior: Option<database_properties::FreeLimitExhaustionBehavior>,
2131    #[doc = "The resource identifier of the source associated with the create operation of this database.\r\n\r\nThis property is only supported for DataWarehouse edition and allows to restore across subscriptions.\r\n\r\nWhen sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.\r\n\r\nWhen createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.\r\n\r\nWhen createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.\r\n\r\nWhen createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.\r\n\r\nWhen source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant "]
2132    #[serde(rename = "sourceResourceId", default, skip_serializing_if = "Option::is_none")]
2133    pub source_resource_id: Option<String>,
2134    #[doc = "Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.\r\n\r\nWhen manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.\r\n\r\nTo trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state."]
2135    #[serde(rename = "manualCutover", default, skip_serializing_if = "Option::is_none")]
2136    pub manual_cutover: Option<bool>,
2137    #[doc = "To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.\r\n\r\nThis property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.\r\n\r\nWhen performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database."]
2138    #[serde(rename = "performCutover", default, skip_serializing_if = "Option::is_none")]
2139    pub perform_cutover: Option<bool>,
2140    #[doc = "Specifies the availability zone the database is pinned to."]
2141    #[serde(rename = "availabilityZone", default, skip_serializing_if = "Option::is_none")]
2142    pub availability_zone: Option<database_properties::AvailabilityZone>,
2143    #[doc = "The flag to enable or disable auto rotation of database encryption protector AKV key."]
2144    #[serde(rename = "encryptionProtectorAutoRotation", default, skip_serializing_if = "Option::is_none")]
2145    pub encryption_protector_auto_rotation: Option<bool>,
2146}
2147impl DatabaseProperties {
2148    pub fn new() -> Self {
2149        Self::default()
2150    }
2151}
2152pub mod database_properties {
2153    use super::*;
2154    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition."]
2155    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2156    #[serde(remote = "CreateMode")]
2157    pub enum CreateMode {
2158        Default,
2159        Copy,
2160        Secondary,
2161        PointInTimeRestore,
2162        Restore,
2163        Recovery,
2164        RestoreExternalBackup,
2165        RestoreExternalBackupSecondary,
2166        RestoreLongTermRetentionBackup,
2167        OnlineSecondary,
2168        #[serde(skip_deserializing)]
2169        UnknownValue(String),
2170    }
2171    impl FromStr for CreateMode {
2172        type Err = value::Error;
2173        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2174            Self::deserialize(s.into_deserializer())
2175        }
2176    }
2177    impl<'de> Deserialize<'de> for CreateMode {
2178        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2179        where
2180            D: Deserializer<'de>,
2181        {
2182            let s = String::deserialize(deserializer)?;
2183            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2184            Ok(deserialized)
2185        }
2186    }
2187    impl Serialize for CreateMode {
2188        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2189        where
2190            S: Serializer,
2191        {
2192            match self {
2193                Self::Default => serializer.serialize_unit_variant("CreateMode", 0u32, "Default"),
2194                Self::Copy => serializer.serialize_unit_variant("CreateMode", 1u32, "Copy"),
2195                Self::Secondary => serializer.serialize_unit_variant("CreateMode", 2u32, "Secondary"),
2196                Self::PointInTimeRestore => serializer.serialize_unit_variant("CreateMode", 3u32, "PointInTimeRestore"),
2197                Self::Restore => serializer.serialize_unit_variant("CreateMode", 4u32, "Restore"),
2198                Self::Recovery => serializer.serialize_unit_variant("CreateMode", 5u32, "Recovery"),
2199                Self::RestoreExternalBackup => serializer.serialize_unit_variant("CreateMode", 6u32, "RestoreExternalBackup"),
2200                Self::RestoreExternalBackupSecondary => {
2201                    serializer.serialize_unit_variant("CreateMode", 7u32, "RestoreExternalBackupSecondary")
2202                }
2203                Self::RestoreLongTermRetentionBackup => {
2204                    serializer.serialize_unit_variant("CreateMode", 8u32, "RestoreLongTermRetentionBackup")
2205                }
2206                Self::OnlineSecondary => serializer.serialize_unit_variant("CreateMode", 9u32, "OnlineSecondary"),
2207                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2208            }
2209        }
2210    }
2211    #[doc = "The name of the sample schema to apply when creating this database."]
2212    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2213    #[serde(remote = "SampleName")]
2214    pub enum SampleName {
2215        #[serde(rename = "AdventureWorksLT")]
2216        AdventureWorksLt,
2217        WideWorldImportersStd,
2218        WideWorldImportersFull,
2219        #[serde(skip_deserializing)]
2220        UnknownValue(String),
2221    }
2222    impl FromStr for SampleName {
2223        type Err = value::Error;
2224        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2225            Self::deserialize(s.into_deserializer())
2226        }
2227    }
2228    impl<'de> Deserialize<'de> for SampleName {
2229        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2230        where
2231            D: Deserializer<'de>,
2232        {
2233            let s = String::deserialize(deserializer)?;
2234            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2235            Ok(deserialized)
2236        }
2237    }
2238    impl Serialize for SampleName {
2239        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2240        where
2241            S: Serializer,
2242        {
2243            match self {
2244                Self::AdventureWorksLt => serializer.serialize_unit_variant("SampleName", 0u32, "AdventureWorksLT"),
2245                Self::WideWorldImportersStd => serializer.serialize_unit_variant("SampleName", 1u32, "WideWorldImportersStd"),
2246                Self::WideWorldImportersFull => serializer.serialize_unit_variant("SampleName", 2u32, "WideWorldImportersFull"),
2247                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2248            }
2249        }
2250    }
2251    #[doc = "The status of the database."]
2252    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2253    #[serde(remote = "Status")]
2254    pub enum Status {
2255        Online,
2256        Restoring,
2257        RecoveryPending,
2258        Recovering,
2259        Suspect,
2260        Offline,
2261        Standby,
2262        Shutdown,
2263        EmergencyMode,
2264        AutoClosed,
2265        Copying,
2266        Creating,
2267        Inaccessible,
2268        OfflineSecondary,
2269        Pausing,
2270        Paused,
2271        Resuming,
2272        Scaling,
2273        OfflineChangingDwPerformanceTiers,
2274        OnlineChangingDwPerformanceTiers,
2275        Disabled,
2276        Stopping,
2277        Stopped,
2278        Starting,
2279        #[serde(skip_deserializing)]
2280        UnknownValue(String),
2281    }
2282    impl FromStr for Status {
2283        type Err = value::Error;
2284        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2285            Self::deserialize(s.into_deserializer())
2286        }
2287    }
2288    impl<'de> Deserialize<'de> for Status {
2289        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2290        where
2291            D: Deserializer<'de>,
2292        {
2293            let s = String::deserialize(deserializer)?;
2294            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2295            Ok(deserialized)
2296        }
2297    }
2298    impl Serialize for Status {
2299        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2300        where
2301            S: Serializer,
2302        {
2303            match self {
2304                Self::Online => serializer.serialize_unit_variant("Status", 0u32, "Online"),
2305                Self::Restoring => serializer.serialize_unit_variant("Status", 1u32, "Restoring"),
2306                Self::RecoveryPending => serializer.serialize_unit_variant("Status", 2u32, "RecoveryPending"),
2307                Self::Recovering => serializer.serialize_unit_variant("Status", 3u32, "Recovering"),
2308                Self::Suspect => serializer.serialize_unit_variant("Status", 4u32, "Suspect"),
2309                Self::Offline => serializer.serialize_unit_variant("Status", 5u32, "Offline"),
2310                Self::Standby => serializer.serialize_unit_variant("Status", 6u32, "Standby"),
2311                Self::Shutdown => serializer.serialize_unit_variant("Status", 7u32, "Shutdown"),
2312                Self::EmergencyMode => serializer.serialize_unit_variant("Status", 8u32, "EmergencyMode"),
2313                Self::AutoClosed => serializer.serialize_unit_variant("Status", 9u32, "AutoClosed"),
2314                Self::Copying => serializer.serialize_unit_variant("Status", 10u32, "Copying"),
2315                Self::Creating => serializer.serialize_unit_variant("Status", 11u32, "Creating"),
2316                Self::Inaccessible => serializer.serialize_unit_variant("Status", 12u32, "Inaccessible"),
2317                Self::OfflineSecondary => serializer.serialize_unit_variant("Status", 13u32, "OfflineSecondary"),
2318                Self::Pausing => serializer.serialize_unit_variant("Status", 14u32, "Pausing"),
2319                Self::Paused => serializer.serialize_unit_variant("Status", 15u32, "Paused"),
2320                Self::Resuming => serializer.serialize_unit_variant("Status", 16u32, "Resuming"),
2321                Self::Scaling => serializer.serialize_unit_variant("Status", 17u32, "Scaling"),
2322                Self::OfflineChangingDwPerformanceTiers => {
2323                    serializer.serialize_unit_variant("Status", 18u32, "OfflineChangingDwPerformanceTiers")
2324                }
2325                Self::OnlineChangingDwPerformanceTiers => {
2326                    serializer.serialize_unit_variant("Status", 19u32, "OnlineChangingDwPerformanceTiers")
2327                }
2328                Self::Disabled => serializer.serialize_unit_variant("Status", 20u32, "Disabled"),
2329                Self::Stopping => serializer.serialize_unit_variant("Status", 21u32, "Stopping"),
2330                Self::Stopped => serializer.serialize_unit_variant("Status", 22u32, "Stopped"),
2331                Self::Starting => serializer.serialize_unit_variant("Status", 23u32, "Starting"),
2332                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2333            }
2334        }
2335    }
2336    #[doc = "Collation of the metadata catalog."]
2337    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2338    #[serde(remote = "CatalogCollation")]
2339    pub enum CatalogCollation {
2340        #[serde(rename = "DATABASE_DEFAULT")]
2341        DatabaseDefault,
2342        #[serde(rename = "SQL_Latin1_General_CP1_CI_AS")]
2343        SqlLatin1GeneralCp1CiAs,
2344        #[serde(skip_deserializing)]
2345        UnknownValue(String),
2346    }
2347    impl FromStr for CatalogCollation {
2348        type Err = value::Error;
2349        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2350            Self::deserialize(s.into_deserializer())
2351        }
2352    }
2353    impl<'de> Deserialize<'de> for CatalogCollation {
2354        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2355        where
2356            D: Deserializer<'de>,
2357        {
2358            let s = String::deserialize(deserializer)?;
2359            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2360            Ok(deserialized)
2361        }
2362    }
2363    impl Serialize for CatalogCollation {
2364        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2365        where
2366            S: Serializer,
2367        {
2368            match self {
2369                Self::DatabaseDefault => serializer.serialize_unit_variant("CatalogCollation", 0u32, "DATABASE_DEFAULT"),
2370                Self::SqlLatin1GeneralCp1CiAs => {
2371                    serializer.serialize_unit_variant("CatalogCollation", 1u32, "SQL_Latin1_General_CP1_CI_AS")
2372                }
2373                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2374            }
2375        }
2376    }
2377    #[doc = "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit."]
2378    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2379    #[serde(remote = "LicenseType")]
2380    pub enum LicenseType {
2381        LicenseIncluded,
2382        BasePrice,
2383        #[serde(skip_deserializing)]
2384        UnknownValue(String),
2385    }
2386    impl FromStr for LicenseType {
2387        type Err = value::Error;
2388        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2389            Self::deserialize(s.into_deserializer())
2390        }
2391    }
2392    impl<'de> Deserialize<'de> for LicenseType {
2393        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2394        where
2395            D: Deserializer<'de>,
2396        {
2397            let s = String::deserialize(deserializer)?;
2398            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2399            Ok(deserialized)
2400        }
2401    }
2402    impl Serialize for LicenseType {
2403        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2404        where
2405            S: Serializer,
2406        {
2407            match self {
2408                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
2409                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
2410                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2411            }
2412        }
2413    }
2414    #[doc = "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool."]
2415    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2416    #[serde(remote = "ReadScale")]
2417    pub enum ReadScale {
2418        Enabled,
2419        Disabled,
2420        #[serde(skip_deserializing)]
2421        UnknownValue(String),
2422    }
2423    impl FromStr for ReadScale {
2424        type Err = value::Error;
2425        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2426            Self::deserialize(s.into_deserializer())
2427        }
2428    }
2429    impl<'de> Deserialize<'de> for ReadScale {
2430        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2431        where
2432            D: Deserializer<'de>,
2433        {
2434            let s = String::deserialize(deserializer)?;
2435            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2436            Ok(deserialized)
2437        }
2438    }
2439    impl Serialize for ReadScale {
2440        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2441        where
2442            S: Serializer,
2443        {
2444            match self {
2445                Self::Enabled => serializer.serialize_unit_variant("ReadScale", 0u32, "Enabled"),
2446                Self::Disabled => serializer.serialize_unit_variant("ReadScale", 1u32, "Disabled"),
2447                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2448            }
2449        }
2450    }
2451    #[doc = "The secondary type of the database if it is a secondary.  Valid values are Geo, Named and Standby."]
2452    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2453    #[serde(remote = "SecondaryType")]
2454    pub enum SecondaryType {
2455        Geo,
2456        Named,
2457        Standby,
2458        #[serde(skip_deserializing)]
2459        UnknownValue(String),
2460    }
2461    impl FromStr for SecondaryType {
2462        type Err = value::Error;
2463        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2464            Self::deserialize(s.into_deserializer())
2465        }
2466    }
2467    impl<'de> Deserialize<'de> for SecondaryType {
2468        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2469        where
2470            D: Deserializer<'de>,
2471        {
2472            let s = String::deserialize(deserializer)?;
2473            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2474            Ok(deserialized)
2475        }
2476    }
2477    impl Serialize for SecondaryType {
2478        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2479        where
2480            S: Serializer,
2481        {
2482            match self {
2483                Self::Geo => serializer.serialize_unit_variant("SecondaryType", 0u32, "Geo"),
2484                Self::Named => serializer.serialize_unit_variant("SecondaryType", 1u32, "Named"),
2485                Self::Standby => serializer.serialize_unit_variant("SecondaryType", 2u32, "Standby"),
2486                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2487            }
2488        }
2489    }
2490    #[doc = "The storage account type used to store backups for this database."]
2491    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2492    #[serde(remote = "CurrentBackupStorageRedundancy")]
2493    pub enum CurrentBackupStorageRedundancy {
2494        Geo,
2495        Local,
2496        Zone,
2497        GeoZone,
2498        #[serde(skip_deserializing)]
2499        UnknownValue(String),
2500    }
2501    impl FromStr for CurrentBackupStorageRedundancy {
2502        type Err = value::Error;
2503        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2504            Self::deserialize(s.into_deserializer())
2505        }
2506    }
2507    impl<'de> Deserialize<'de> for CurrentBackupStorageRedundancy {
2508        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2509        where
2510            D: Deserializer<'de>,
2511        {
2512            let s = String::deserialize(deserializer)?;
2513            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2514            Ok(deserialized)
2515        }
2516    }
2517    impl Serialize for CurrentBackupStorageRedundancy {
2518        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2519        where
2520            S: Serializer,
2521        {
2522            match self {
2523                Self::Geo => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 0u32, "Geo"),
2524                Self::Local => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 1u32, "Local"),
2525                Self::Zone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 2u32, "Zone"),
2526                Self::GeoZone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 3u32, "GeoZone"),
2527                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2528            }
2529        }
2530    }
2531    #[doc = "The storage account type to be used to store backups for this database."]
2532    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2533    #[serde(remote = "RequestedBackupStorageRedundancy")]
2534    pub enum RequestedBackupStorageRedundancy {
2535        Geo,
2536        Local,
2537        Zone,
2538        GeoZone,
2539        #[serde(skip_deserializing)]
2540        UnknownValue(String),
2541    }
2542    impl FromStr for RequestedBackupStorageRedundancy {
2543        type Err = value::Error;
2544        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2545            Self::deserialize(s.into_deserializer())
2546        }
2547    }
2548    impl<'de> Deserialize<'de> for RequestedBackupStorageRedundancy {
2549        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2550        where
2551            D: Deserializer<'de>,
2552        {
2553            let s = String::deserialize(deserializer)?;
2554            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2555            Ok(deserialized)
2556        }
2557    }
2558    impl Serialize for RequestedBackupStorageRedundancy {
2559        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2560        where
2561            S: Serializer,
2562        {
2563            match self {
2564                Self::Geo => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 0u32, "Geo"),
2565                Self::Local => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 1u32, "Local"),
2566                Self::Zone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 2u32, "Zone"),
2567                Self::GeoZone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 3u32, "GeoZone"),
2568                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2569            }
2570        }
2571    }
2572    #[doc = "Type of enclave requested on the database i.e. Default or VBS enclaves."]
2573    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2574    #[serde(remote = "PreferredEnclaveType")]
2575    pub enum PreferredEnclaveType {
2576        Default,
2577        #[serde(rename = "VBS")]
2578        Vbs,
2579        #[serde(skip_deserializing)]
2580        UnknownValue(String),
2581    }
2582    impl FromStr for PreferredEnclaveType {
2583        type Err = value::Error;
2584        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2585            Self::deserialize(s.into_deserializer())
2586        }
2587    }
2588    impl<'de> Deserialize<'de> for PreferredEnclaveType {
2589        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2590        where
2591            D: Deserializer<'de>,
2592        {
2593            let s = String::deserialize(deserializer)?;
2594            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2595            Ok(deserialized)
2596        }
2597    }
2598    impl Serialize for PreferredEnclaveType {
2599        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2600        where
2601            S: Serializer,
2602        {
2603            match self {
2604                Self::Default => serializer.serialize_unit_variant("PreferredEnclaveType", 0u32, "Default"),
2605                Self::Vbs => serializer.serialize_unit_variant("PreferredEnclaveType", 1u32, "VBS"),
2606                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2607            }
2608        }
2609    }
2610    #[doc = "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed."]
2611    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2612    #[serde(remote = "FreeLimitExhaustionBehavior")]
2613    pub enum FreeLimitExhaustionBehavior {
2614        AutoPause,
2615        BillOverUsage,
2616        #[serde(skip_deserializing)]
2617        UnknownValue(String),
2618    }
2619    impl FromStr for FreeLimitExhaustionBehavior {
2620        type Err = value::Error;
2621        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2622            Self::deserialize(s.into_deserializer())
2623        }
2624    }
2625    impl<'de> Deserialize<'de> for FreeLimitExhaustionBehavior {
2626        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2627        where
2628            D: Deserializer<'de>,
2629        {
2630            let s = String::deserialize(deserializer)?;
2631            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2632            Ok(deserialized)
2633        }
2634    }
2635    impl Serialize for FreeLimitExhaustionBehavior {
2636        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2637        where
2638            S: Serializer,
2639        {
2640            match self {
2641                Self::AutoPause => serializer.serialize_unit_variant("FreeLimitExhaustionBehavior", 0u32, "AutoPause"),
2642                Self::BillOverUsage => serializer.serialize_unit_variant("FreeLimitExhaustionBehavior", 1u32, "BillOverUsage"),
2643                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2644            }
2645        }
2646    }
2647    #[doc = "Specifies the availability zone the database is pinned to."]
2648    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2649    #[serde(remote = "AvailabilityZone")]
2650    pub enum AvailabilityZone {
2651        NoPreference,
2652        #[serde(rename = "1")]
2653        N1,
2654        #[serde(rename = "2")]
2655        N2,
2656        #[serde(rename = "3")]
2657        N3,
2658        #[serde(skip_deserializing)]
2659        UnknownValue(String),
2660    }
2661    impl FromStr for AvailabilityZone {
2662        type Err = value::Error;
2663        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2664            Self::deserialize(s.into_deserializer())
2665        }
2666    }
2667    impl<'de> Deserialize<'de> for AvailabilityZone {
2668        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2669        where
2670            D: Deserializer<'de>,
2671        {
2672            let s = String::deserialize(deserializer)?;
2673            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2674            Ok(deserialized)
2675        }
2676    }
2677    impl Serialize for AvailabilityZone {
2678        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2679        where
2680            S: Serializer,
2681        {
2682            match self {
2683                Self::NoPreference => serializer.serialize_unit_variant("AvailabilityZone", 0u32, "NoPreference"),
2684                Self::N1 => serializer.serialize_unit_variant("AvailabilityZone", 1u32, "1"),
2685                Self::N2 => serializer.serialize_unit_variant("AvailabilityZone", 2u32, "2"),
2686                Self::N3 => serializer.serialize_unit_variant("AvailabilityZone", 3u32, "3"),
2687                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2688            }
2689        }
2690    }
2691}
2692#[doc = "A database schema resource."]
2693#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2694pub struct DatabaseSchema {
2695    #[serde(flatten)]
2696    pub proxy_resource: ProxyResource,
2697}
2698impl DatabaseSchema {
2699    pub fn new() -> Self {
2700        Self::default()
2701    }
2702}
2703#[doc = "A list of database schemas."]
2704#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2705pub struct DatabaseSchemaListResult {
2706    #[doc = "Array of results."]
2707    #[serde(
2708        default,
2709        deserialize_with = "azure_core::util::deserialize_null_as_default",
2710        skip_serializing_if = "Vec::is_empty"
2711    )]
2712    pub value: Vec<DatabaseSchema>,
2713    #[doc = "Link to retrieve next page of results."]
2714    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2715    pub next_link: Option<String>,
2716}
2717impl azure_core::Continuable for DatabaseSchemaListResult {
2718    type Continuation = String;
2719    fn continuation(&self) -> Option<Self::Continuation> {
2720        self.next_link.clone().filter(|value| !value.is_empty())
2721    }
2722}
2723impl DatabaseSchemaListResult {
2724    pub fn new() -> Self {
2725        Self::default()
2726    }
2727}
2728#[doc = "A list of the database's security alert policies."]
2729#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2730pub struct DatabaseSecurityAlertListResult {
2731    #[doc = "Array of results."]
2732    #[serde(
2733        default,
2734        deserialize_with = "azure_core::util::deserialize_null_as_default",
2735        skip_serializing_if = "Vec::is_empty"
2736    )]
2737    pub value: Vec<DatabaseSecurityAlertPolicy>,
2738    #[doc = "Link to retrieve next page of results."]
2739    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2740    pub next_link: Option<String>,
2741}
2742impl azure_core::Continuable for DatabaseSecurityAlertListResult {
2743    type Continuation = String;
2744    fn continuation(&self) -> Option<Self::Continuation> {
2745        self.next_link.clone().filter(|value| !value.is_empty())
2746    }
2747}
2748impl DatabaseSecurityAlertListResult {
2749    pub fn new() -> Self {
2750        Self::default()
2751    }
2752}
2753#[doc = "A database security alert policy."]
2754#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2755pub struct DatabaseSecurityAlertPolicy {
2756    #[serde(flatten)]
2757    pub proxy_resource: ProxyResource,
2758    #[doc = "Metadata pertaining to creation and last modification of the resource."]
2759    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
2760    pub system_data: Option<SystemData>,
2761    #[doc = "Properties of a security alert policy."]
2762    #[serde(default, skip_serializing_if = "Option::is_none")]
2763    pub properties: Option<SecurityAlertsPolicyProperties>,
2764}
2765impl DatabaseSecurityAlertPolicy {
2766    pub fn new() -> Self {
2767        Self::default()
2768    }
2769}
2770#[doc = "A database sql vulnerability assessment baseline set."]
2771#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2772pub struct DatabaseSqlVulnerabilityAssessmentBaselineSet {
2773    #[serde(flatten)]
2774    pub proxy_resource: ProxyResource,
2775    #[doc = "Metadata pertaining to creation and last modification of the resource."]
2776    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
2777    pub system_data: Option<SystemData>,
2778    #[doc = "Properties of a database Sql Vulnerability Assessment baseline set."]
2779    #[serde(default, skip_serializing_if = "Option::is_none")]
2780    pub properties: Option<DatabaseSqlVulnerabilityAssessmentBaselineSetProperties>,
2781}
2782impl DatabaseSqlVulnerabilityAssessmentBaselineSet {
2783    pub fn new() -> Self {
2784        Self::default()
2785    }
2786}
2787#[doc = "A list of SQL Vulnerability Assessments baseline set."]
2788#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2789pub struct DatabaseSqlVulnerabilityAssessmentBaselineSetListResult {
2790    #[doc = "Array of results."]
2791    #[serde(
2792        default,
2793        deserialize_with = "azure_core::util::deserialize_null_as_default",
2794        skip_serializing_if = "Vec::is_empty"
2795    )]
2796    pub value: Vec<DatabaseSqlVulnerabilityAssessmentBaselineSet>,
2797    #[doc = "Link to retrieve next page of results."]
2798    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2799    pub next_link: Option<String>,
2800}
2801impl azure_core::Continuable for DatabaseSqlVulnerabilityAssessmentBaselineSetListResult {
2802    type Continuation = String;
2803    fn continuation(&self) -> Option<Self::Continuation> {
2804        self.next_link.clone().filter(|value| !value.is_empty())
2805    }
2806}
2807impl DatabaseSqlVulnerabilityAssessmentBaselineSetListResult {
2808    pub fn new() -> Self {
2809        Self::default()
2810    }
2811}
2812#[doc = "Properties of a database Sql Vulnerability Assessment baseline set."]
2813#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2814pub struct DatabaseSqlVulnerabilityAssessmentBaselineSetProperties {
2815    #[doc = "The baseline set result"]
2816    pub results: serde_json::Value,
2817}
2818impl DatabaseSqlVulnerabilityAssessmentBaselineSetProperties {
2819    pub fn new(results: serde_json::Value) -> Self {
2820        Self { results }
2821    }
2822}
2823#[doc = "A database sql vulnerability assessment rule baseline."]
2824#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2825pub struct DatabaseSqlVulnerabilityAssessmentRuleBaseline {
2826    #[serde(flatten)]
2827    pub proxy_resource: ProxyResource,
2828    #[doc = "Metadata pertaining to creation and last modification of the resource."]
2829    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
2830    pub system_data: Option<SystemData>,
2831    #[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2832    #[serde(default, skip_serializing_if = "Option::is_none")]
2833    pub properties: Option<DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties>,
2834}
2835impl DatabaseSqlVulnerabilityAssessmentRuleBaseline {
2836    pub fn new() -> Self {
2837        Self::default()
2838    }
2839}
2840#[doc = "A database sql vulnerability assessment rule baseline input."]
2841#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2842pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineInput {
2843    #[serde(flatten)]
2844    pub proxy_resource: ProxyResource,
2845    #[doc = "Metadata pertaining to creation and last modification of the resource."]
2846    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
2847    pub system_data: Option<SystemData>,
2848    #[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2849    #[serde(default, skip_serializing_if = "Option::is_none")]
2850    pub properties: Option<DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties>,
2851}
2852impl DatabaseSqlVulnerabilityAssessmentRuleBaselineInput {
2853    pub fn new() -> Self {
2854        Self::default()
2855    }
2856}
2857#[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2858#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2859pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties {
2860    #[doc = "The latest scan flag"]
2861    #[serde(rename = "latestScan")]
2862    pub latest_scan: bool,
2863    #[doc = "The rule baseline result"]
2864    pub results: Vec<Vec<String>>,
2865}
2866impl DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties {
2867    pub fn new(latest_scan: bool, results: Vec<Vec<String>>) -> Self {
2868        Self { latest_scan, results }
2869    }
2870}
2871#[doc = "A database sql vulnerability assessment rule baseline list input."]
2872#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2873pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput {
2874    #[serde(flatten)]
2875    pub proxy_resource: ProxyResource,
2876    #[doc = "Metadata pertaining to creation and last modification of the resource."]
2877    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
2878    pub system_data: Option<SystemData>,
2879    #[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2880    #[serde(default, skip_serializing_if = "Option::is_none")]
2881    pub properties: Option<DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties>,
2882}
2883impl DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput {
2884    pub fn new() -> Self {
2885        Self::default()
2886    }
2887}
2888#[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2889#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2890pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties {
2891    #[doc = "The latest scan flag"]
2892    #[serde(rename = "latestScan")]
2893    pub latest_scan: bool,
2894    #[doc = "The rule baseline result list"]
2895    pub results: serde_json::Value,
2896}
2897impl DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties {
2898    pub fn new(latest_scan: bool, results: serde_json::Value) -> Self {
2899        Self { latest_scan, results }
2900    }
2901}
2902#[doc = "A list of SQL Vulnerability Assessments rule baseline."]
2903#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2904pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult {
2905    #[doc = "Array of results."]
2906    #[serde(
2907        default,
2908        deserialize_with = "azure_core::util::deserialize_null_as_default",
2909        skip_serializing_if = "Vec::is_empty"
2910    )]
2911    pub value: Vec<DatabaseSqlVulnerabilityAssessmentRuleBaseline>,
2912    #[doc = "Link to retrieve next page of results."]
2913    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2914    pub next_link: Option<String>,
2915}
2916impl azure_core::Continuable for DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult {
2917    type Continuation = String;
2918    fn continuation(&self) -> Option<Self::Continuation> {
2919        self.next_link.clone().filter(|value| !value.is_empty())
2920    }
2921}
2922impl DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult {
2923    pub fn new() -> Self {
2924        Self::default()
2925    }
2926}
2927#[doc = "Properties of a database Sql Vulnerability Assessment rule baseline."]
2928#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2929pub struct DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties {
2930    #[doc = "The rule baseline result"]
2931    pub results: Vec<Vec<String>>,
2932}
2933impl DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties {
2934    pub fn new(results: Vec<Vec<String>>) -> Self {
2935        Self { results }
2936    }
2937}
2938#[doc = "A database table resource."]
2939#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2940pub struct DatabaseTable {
2941    #[serde(flatten)]
2942    pub proxy_resource: ProxyResource,
2943    #[doc = "Database table properties."]
2944    #[serde(default, skip_serializing_if = "Option::is_none")]
2945    pub properties: Option<DatabaseTableProperties>,
2946}
2947impl DatabaseTable {
2948    pub fn new() -> Self {
2949        Self::default()
2950    }
2951}
2952#[doc = "A list of database tables."]
2953#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2954pub struct DatabaseTableListResult {
2955    #[doc = "Array of results."]
2956    #[serde(
2957        default,
2958        deserialize_with = "azure_core::util::deserialize_null_as_default",
2959        skip_serializing_if = "Vec::is_empty"
2960    )]
2961    pub value: Vec<DatabaseTable>,
2962    #[doc = "Link to retrieve next page of results."]
2963    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2964    pub next_link: Option<String>,
2965}
2966impl azure_core::Continuable for DatabaseTableListResult {
2967    type Continuation = String;
2968    fn continuation(&self) -> Option<Self::Continuation> {
2969        self.next_link.clone().filter(|value| !value.is_empty())
2970    }
2971}
2972impl DatabaseTableListResult {
2973    pub fn new() -> Self {
2974        Self::default()
2975    }
2976}
2977#[doc = "Database table properties."]
2978#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2979pub struct DatabaseTableProperties {
2980    #[doc = "The table temporal type."]
2981    #[serde(rename = "temporalType", default, skip_serializing_if = "Option::is_none")]
2982    pub temporal_type: Option<database_table_properties::TemporalType>,
2983    #[doc = "Whether or not the table is memory optimized."]
2984    #[serde(rename = "memoryOptimized", default, skip_serializing_if = "Option::is_none")]
2985    pub memory_optimized: Option<bool>,
2986}
2987impl DatabaseTableProperties {
2988    pub fn new() -> Self {
2989        Self::default()
2990    }
2991}
2992pub mod database_table_properties {
2993    use super::*;
2994    #[doc = "The table temporal type."]
2995    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2996    #[serde(remote = "TemporalType")]
2997    pub enum TemporalType {
2998        NonTemporalTable,
2999        HistoryTable,
3000        SystemVersionedTemporalTable,
3001        #[serde(skip_deserializing)]
3002        UnknownValue(String),
3003    }
3004    impl FromStr for TemporalType {
3005        type Err = value::Error;
3006        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3007            Self::deserialize(s.into_deserializer())
3008        }
3009    }
3010    impl<'de> Deserialize<'de> for TemporalType {
3011        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3012        where
3013            D: Deserializer<'de>,
3014        {
3015            let s = String::deserialize(deserializer)?;
3016            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3017            Ok(deserialized)
3018        }
3019    }
3020    impl Serialize for TemporalType {
3021        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3022        where
3023            S: Serializer,
3024        {
3025            match self {
3026                Self::NonTemporalTable => serializer.serialize_unit_variant("TemporalType", 0u32, "NonTemporalTable"),
3027                Self::HistoryTable => serializer.serialize_unit_variant("TemporalType", 1u32, "HistoryTable"),
3028                Self::SystemVersionedTemporalTable => {
3029                    serializer.serialize_unit_variant("TemporalType", 2u32, "SystemVersionedTemporalTable")
3030                }
3031                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3032            }
3033        }
3034    }
3035}
3036#[doc = "A database update resource."]
3037#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3038pub struct DatabaseUpdate {
3039    #[doc = "An ARM Resource SKU."]
3040    #[serde(default, skip_serializing_if = "Option::is_none")]
3041    pub sku: Option<Sku>,
3042    #[doc = "Azure Active Directory identity configuration for a resource."]
3043    #[serde(default, skip_serializing_if = "Option::is_none")]
3044    pub identity: Option<DatabaseIdentity>,
3045    #[doc = "A database update properties."]
3046    #[serde(default, skip_serializing_if = "Option::is_none")]
3047    pub properties: Option<DatabaseUpdateProperties>,
3048    #[doc = "Resource tags."]
3049    #[serde(default, skip_serializing_if = "Option::is_none")]
3050    pub tags: Option<serde_json::Value>,
3051}
3052impl DatabaseUpdate {
3053    pub fn new() -> Self {
3054        Self::default()
3055    }
3056}
3057#[doc = "A database update properties."]
3058#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3059pub struct DatabaseUpdateProperties {
3060    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition."]
3061    #[serde(rename = "createMode", default, skip_serializing_if = "Option::is_none")]
3062    pub create_mode: Option<database_update_properties::CreateMode>,
3063    #[doc = "The collation of the database."]
3064    #[serde(default, skip_serializing_if = "Option::is_none")]
3065    pub collation: Option<String>,
3066    #[doc = "The max size of the database expressed in bytes."]
3067    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
3068    pub max_size_bytes: Option<i64>,
3069    #[doc = "The name of the sample schema to apply when creating this database."]
3070    #[serde(rename = "sampleName", default, skip_serializing_if = "Option::is_none")]
3071    pub sample_name: Option<database_update_properties::SampleName>,
3072    #[doc = "The resource identifier of the elastic pool containing this database."]
3073    #[serde(rename = "elasticPoolId", default, skip_serializing_if = "Option::is_none")]
3074    pub elastic_pool_id: Option<String>,
3075    #[doc = "The resource identifier of the source database associated with create operation of this database."]
3076    #[serde(rename = "sourceDatabaseId", default, skip_serializing_if = "Option::is_none")]
3077    pub source_database_id: Option<String>,
3078    #[doc = "The status of the database."]
3079    #[serde(default, skip_serializing_if = "Option::is_none")]
3080    pub status: Option<database_update_properties::Status>,
3081    #[doc = "The ID of the database."]
3082    #[serde(rename = "databaseId", default, skip_serializing_if = "Option::is_none")]
3083    pub database_id: Option<String>,
3084    #[doc = "The creation date of the database (ISO8601 format)."]
3085    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
3086    pub creation_date: Option<::time::OffsetDateTime>,
3087    #[doc = "The current service level objective name of the database."]
3088    #[serde(rename = "currentServiceObjectiveName", default, skip_serializing_if = "Option::is_none")]
3089    pub current_service_objective_name: Option<String>,
3090    #[doc = "The requested service level objective name of the database."]
3091    #[serde(rename = "requestedServiceObjectiveName", default, skip_serializing_if = "Option::is_none")]
3092    pub requested_service_objective_name: Option<String>,
3093    #[doc = "The default secondary region for this database."]
3094    #[serde(rename = "defaultSecondaryLocation", default, skip_serializing_if = "Option::is_none")]
3095    pub default_secondary_location: Option<String>,
3096    #[doc = "Failover Group resource identifier that this database belongs to."]
3097    #[serde(rename = "failoverGroupId", default, skip_serializing_if = "Option::is_none")]
3098    pub failover_group_id: Option<String>,
3099    #[doc = "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database."]
3100    #[serde(rename = "restorePointInTime", default, with = "azure_core::date::rfc3339::option")]
3101    pub restore_point_in_time: Option<::time::OffsetDateTime>,
3102    #[doc = "Specifies the time that the database was deleted."]
3103    #[serde(rename = "sourceDatabaseDeletionDate", default, with = "azure_core::date::rfc3339::option")]
3104    pub source_database_deletion_date: Option<::time::OffsetDateTime>,
3105    #[doc = "The resource identifier of the recovery point associated with create operation of this database."]
3106    #[serde(rename = "recoveryServicesRecoveryPointId", default, skip_serializing_if = "Option::is_none")]
3107    pub recovery_services_recovery_point_id: Option<String>,
3108    #[doc = "The resource identifier of the long term retention backup associated with create operation of this database."]
3109    #[serde(rename = "longTermRetentionBackupResourceId", default, skip_serializing_if = "Option::is_none")]
3110    pub long_term_retention_backup_resource_id: Option<String>,
3111    #[doc = "The resource identifier of the recoverable database associated with create operation of this database."]
3112    #[serde(rename = "recoverableDatabaseId", default, skip_serializing_if = "Option::is_none")]
3113    pub recoverable_database_id: Option<String>,
3114    #[doc = "The resource identifier of the restorable dropped database associated with create operation of this database."]
3115    #[serde(rename = "restorableDroppedDatabaseId", default, skip_serializing_if = "Option::is_none")]
3116    pub restorable_dropped_database_id: Option<String>,
3117    #[doc = "Collation of the metadata catalog."]
3118    #[serde(rename = "catalogCollation", default, skip_serializing_if = "Option::is_none")]
3119    pub catalog_collation: Option<database_update_properties::CatalogCollation>,
3120    #[doc = "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones."]
3121    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
3122    pub zone_redundant: Option<bool>,
3123    #[doc = "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit."]
3124    #[serde(rename = "licenseType", default, skip_serializing_if = "Option::is_none")]
3125    pub license_type: Option<database_update_properties::LicenseType>,
3126    #[doc = "The max log size for this database."]
3127    #[serde(rename = "maxLogSizeBytes", default, skip_serializing_if = "Option::is_none")]
3128    pub max_log_size_bytes: Option<i64>,
3129    #[doc = "This records the earliest start date and time that restore is available for this database (ISO8601 format)."]
3130    #[serde(rename = "earliestRestoreDate", default, with = "azure_core::date::rfc3339::option")]
3131    pub earliest_restore_date: Option<::time::OffsetDateTime>,
3132    #[doc = "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool."]
3133    #[serde(rename = "readScale", default, skip_serializing_if = "Option::is_none")]
3134    pub read_scale: Option<database_update_properties::ReadScale>,
3135    #[doc = "The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool."]
3136    #[serde(rename = "highAvailabilityReplicaCount", default, skip_serializing_if = "Option::is_none")]
3137    pub high_availability_replica_count: Option<i32>,
3138    #[doc = "The secondary type of the database if it is a secondary.  Valid values are Geo, Named and Standby."]
3139    #[serde(rename = "secondaryType", default, skip_serializing_if = "Option::is_none")]
3140    pub secondary_type: Option<database_update_properties::SecondaryType>,
3141    #[doc = "An ARM Resource SKU."]
3142    #[serde(rename = "currentSku", default, skip_serializing_if = "Option::is_none")]
3143    pub current_sku: Option<Sku>,
3144    #[doc = "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled"]
3145    #[serde(rename = "autoPauseDelay", default, skip_serializing_if = "Option::is_none")]
3146    pub auto_pause_delay: Option<i32>,
3147    #[doc = "The storage account type used to store backups for this database."]
3148    #[serde(rename = "currentBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
3149    pub current_backup_storage_redundancy: Option<database_update_properties::CurrentBackupStorageRedundancy>,
3150    #[doc = "The storage account type to be used to store backups for this database."]
3151    #[serde(rename = "requestedBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
3152    pub requested_backup_storage_redundancy: Option<database_update_properties::RequestedBackupStorageRedundancy>,
3153    #[doc = "Minimal capacity that database will always have allocated, if not paused"]
3154    #[serde(rename = "minCapacity", default, skip_serializing_if = "Option::is_none")]
3155    pub min_capacity: Option<f64>,
3156    #[doc = "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready."]
3157    #[serde(rename = "pausedDate", default, with = "azure_core::date::rfc3339::option")]
3158    pub paused_date: Option<::time::OffsetDateTime>,
3159    #[doc = "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused."]
3160    #[serde(rename = "resumedDate", default, with = "azure_core::date::rfc3339::option")]
3161    pub resumed_date: Option<::time::OffsetDateTime>,
3162    #[doc = "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur."]
3163    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
3164    pub maintenance_configuration_id: Option<String>,
3165    #[doc = "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created."]
3166    #[serde(rename = "isLedgerOn", default, skip_serializing_if = "Option::is_none")]
3167    pub is_ledger_on: Option<bool>,
3168    #[doc = "Infra encryption is enabled for this database."]
3169    #[serde(rename = "isInfraEncryptionEnabled", default, skip_serializing_if = "Option::is_none")]
3170    pub is_infra_encryption_enabled: Option<bool>,
3171    #[doc = "The Client id used for cross tenant per database CMK scenario"]
3172    #[serde(rename = "federatedClientId", default, skip_serializing_if = "Option::is_none")]
3173    pub federated_client_id: Option<String>,
3174    #[doc = "The resource ids of the user assigned identities to use"]
3175    #[serde(default, skip_serializing_if = "Option::is_none")]
3176    pub keys: Option<serde_json::Value>,
3177    #[doc = "The azure key vault URI of the database if it's configured with per Database Customer Managed Keys."]
3178    #[serde(rename = "encryptionProtector", default, skip_serializing_if = "Option::is_none")]
3179    pub encryption_protector: Option<String>,
3180    #[doc = "Type of enclave requested on the database i.e. Default or VBS enclaves."]
3181    #[serde(rename = "preferredEnclaveType", default, skip_serializing_if = "Option::is_none")]
3182    pub preferred_enclave_type: Option<database_update_properties::PreferredEnclaveType>,
3183    #[doc = "Whether or not the database uses free monthly limits. Allowed on one database in a subscription."]
3184    #[serde(rename = "useFreeLimit", default, skip_serializing_if = "Option::is_none")]
3185    pub use_free_limit: Option<bool>,
3186    #[doc = "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed."]
3187    #[serde(rename = "freeLimitExhaustionBehavior", default, skip_serializing_if = "Option::is_none")]
3188    pub free_limit_exhaustion_behavior: Option<database_update_properties::FreeLimitExhaustionBehavior>,
3189    #[doc = "Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.\r\n\r\nWhen manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.\r\n\r\nTo trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state."]
3190    #[serde(rename = "manualCutover", default, skip_serializing_if = "Option::is_none")]
3191    pub manual_cutover: Option<bool>,
3192    #[doc = "To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.\r\n\r\nThis property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.\r\n\r\nWhen performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database."]
3193    #[serde(rename = "performCutover", default, skip_serializing_if = "Option::is_none")]
3194    pub perform_cutover: Option<bool>,
3195    #[doc = "The flag to enable or disable auto rotation of database encryption protector AKV key."]
3196    #[serde(rename = "encryptionProtectorAutoRotation", default, skip_serializing_if = "Option::is_none")]
3197    pub encryption_protector_auto_rotation: Option<bool>,
3198}
3199impl DatabaseUpdateProperties {
3200    pub fn new() -> Self {
3201        Self::default()
3202    }
3203}
3204pub mod database_update_properties {
3205    use super::*;
3206    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition."]
3207    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3208    #[serde(remote = "CreateMode")]
3209    pub enum CreateMode {
3210        Default,
3211        Copy,
3212        Secondary,
3213        PointInTimeRestore,
3214        Restore,
3215        Recovery,
3216        RestoreExternalBackup,
3217        RestoreExternalBackupSecondary,
3218        RestoreLongTermRetentionBackup,
3219        OnlineSecondary,
3220        #[serde(skip_deserializing)]
3221        UnknownValue(String),
3222    }
3223    impl FromStr for CreateMode {
3224        type Err = value::Error;
3225        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3226            Self::deserialize(s.into_deserializer())
3227        }
3228    }
3229    impl<'de> Deserialize<'de> for CreateMode {
3230        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3231        where
3232            D: Deserializer<'de>,
3233        {
3234            let s = String::deserialize(deserializer)?;
3235            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3236            Ok(deserialized)
3237        }
3238    }
3239    impl Serialize for CreateMode {
3240        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3241        where
3242            S: Serializer,
3243        {
3244            match self {
3245                Self::Default => serializer.serialize_unit_variant("CreateMode", 0u32, "Default"),
3246                Self::Copy => serializer.serialize_unit_variant("CreateMode", 1u32, "Copy"),
3247                Self::Secondary => serializer.serialize_unit_variant("CreateMode", 2u32, "Secondary"),
3248                Self::PointInTimeRestore => serializer.serialize_unit_variant("CreateMode", 3u32, "PointInTimeRestore"),
3249                Self::Restore => serializer.serialize_unit_variant("CreateMode", 4u32, "Restore"),
3250                Self::Recovery => serializer.serialize_unit_variant("CreateMode", 5u32, "Recovery"),
3251                Self::RestoreExternalBackup => serializer.serialize_unit_variant("CreateMode", 6u32, "RestoreExternalBackup"),
3252                Self::RestoreExternalBackupSecondary => {
3253                    serializer.serialize_unit_variant("CreateMode", 7u32, "RestoreExternalBackupSecondary")
3254                }
3255                Self::RestoreLongTermRetentionBackup => {
3256                    serializer.serialize_unit_variant("CreateMode", 8u32, "RestoreLongTermRetentionBackup")
3257                }
3258                Self::OnlineSecondary => serializer.serialize_unit_variant("CreateMode", 9u32, "OnlineSecondary"),
3259                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3260            }
3261        }
3262    }
3263    #[doc = "The name of the sample schema to apply when creating this database."]
3264    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3265    #[serde(remote = "SampleName")]
3266    pub enum SampleName {
3267        #[serde(rename = "AdventureWorksLT")]
3268        AdventureWorksLt,
3269        WideWorldImportersStd,
3270        WideWorldImportersFull,
3271        #[serde(skip_deserializing)]
3272        UnknownValue(String),
3273    }
3274    impl FromStr for SampleName {
3275        type Err = value::Error;
3276        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3277            Self::deserialize(s.into_deserializer())
3278        }
3279    }
3280    impl<'de> Deserialize<'de> for SampleName {
3281        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3282        where
3283            D: Deserializer<'de>,
3284        {
3285            let s = String::deserialize(deserializer)?;
3286            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3287            Ok(deserialized)
3288        }
3289    }
3290    impl Serialize for SampleName {
3291        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3292        where
3293            S: Serializer,
3294        {
3295            match self {
3296                Self::AdventureWorksLt => serializer.serialize_unit_variant("SampleName", 0u32, "AdventureWorksLT"),
3297                Self::WideWorldImportersStd => serializer.serialize_unit_variant("SampleName", 1u32, "WideWorldImportersStd"),
3298                Self::WideWorldImportersFull => serializer.serialize_unit_variant("SampleName", 2u32, "WideWorldImportersFull"),
3299                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3300            }
3301        }
3302    }
3303    #[doc = "The status of the database."]
3304    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3305    #[serde(remote = "Status")]
3306    pub enum Status {
3307        Online,
3308        Restoring,
3309        RecoveryPending,
3310        Recovering,
3311        Suspect,
3312        Offline,
3313        Standby,
3314        Shutdown,
3315        EmergencyMode,
3316        AutoClosed,
3317        Copying,
3318        Creating,
3319        Inaccessible,
3320        OfflineSecondary,
3321        Pausing,
3322        Paused,
3323        Resuming,
3324        Scaling,
3325        OfflineChangingDwPerformanceTiers,
3326        OnlineChangingDwPerformanceTiers,
3327        Disabled,
3328        Stopping,
3329        Stopped,
3330        Starting,
3331        #[serde(skip_deserializing)]
3332        UnknownValue(String),
3333    }
3334    impl FromStr for Status {
3335        type Err = value::Error;
3336        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3337            Self::deserialize(s.into_deserializer())
3338        }
3339    }
3340    impl<'de> Deserialize<'de> for Status {
3341        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3342        where
3343            D: Deserializer<'de>,
3344        {
3345            let s = String::deserialize(deserializer)?;
3346            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3347            Ok(deserialized)
3348        }
3349    }
3350    impl Serialize for Status {
3351        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3352        where
3353            S: Serializer,
3354        {
3355            match self {
3356                Self::Online => serializer.serialize_unit_variant("Status", 0u32, "Online"),
3357                Self::Restoring => serializer.serialize_unit_variant("Status", 1u32, "Restoring"),
3358                Self::RecoveryPending => serializer.serialize_unit_variant("Status", 2u32, "RecoveryPending"),
3359                Self::Recovering => serializer.serialize_unit_variant("Status", 3u32, "Recovering"),
3360                Self::Suspect => serializer.serialize_unit_variant("Status", 4u32, "Suspect"),
3361                Self::Offline => serializer.serialize_unit_variant("Status", 5u32, "Offline"),
3362                Self::Standby => serializer.serialize_unit_variant("Status", 6u32, "Standby"),
3363                Self::Shutdown => serializer.serialize_unit_variant("Status", 7u32, "Shutdown"),
3364                Self::EmergencyMode => serializer.serialize_unit_variant("Status", 8u32, "EmergencyMode"),
3365                Self::AutoClosed => serializer.serialize_unit_variant("Status", 9u32, "AutoClosed"),
3366                Self::Copying => serializer.serialize_unit_variant("Status", 10u32, "Copying"),
3367                Self::Creating => serializer.serialize_unit_variant("Status", 11u32, "Creating"),
3368                Self::Inaccessible => serializer.serialize_unit_variant("Status", 12u32, "Inaccessible"),
3369                Self::OfflineSecondary => serializer.serialize_unit_variant("Status", 13u32, "OfflineSecondary"),
3370                Self::Pausing => serializer.serialize_unit_variant("Status", 14u32, "Pausing"),
3371                Self::Paused => serializer.serialize_unit_variant("Status", 15u32, "Paused"),
3372                Self::Resuming => serializer.serialize_unit_variant("Status", 16u32, "Resuming"),
3373                Self::Scaling => serializer.serialize_unit_variant("Status", 17u32, "Scaling"),
3374                Self::OfflineChangingDwPerformanceTiers => {
3375                    serializer.serialize_unit_variant("Status", 18u32, "OfflineChangingDwPerformanceTiers")
3376                }
3377                Self::OnlineChangingDwPerformanceTiers => {
3378                    serializer.serialize_unit_variant("Status", 19u32, "OnlineChangingDwPerformanceTiers")
3379                }
3380                Self::Disabled => serializer.serialize_unit_variant("Status", 20u32, "Disabled"),
3381                Self::Stopping => serializer.serialize_unit_variant("Status", 21u32, "Stopping"),
3382                Self::Stopped => serializer.serialize_unit_variant("Status", 22u32, "Stopped"),
3383                Self::Starting => serializer.serialize_unit_variant("Status", 23u32, "Starting"),
3384                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3385            }
3386        }
3387    }
3388    #[doc = "Collation of the metadata catalog."]
3389    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3390    #[serde(remote = "CatalogCollation")]
3391    pub enum CatalogCollation {
3392        #[serde(rename = "DATABASE_DEFAULT")]
3393        DatabaseDefault,
3394        #[serde(rename = "SQL_Latin1_General_CP1_CI_AS")]
3395        SqlLatin1GeneralCp1CiAs,
3396        #[serde(skip_deserializing)]
3397        UnknownValue(String),
3398    }
3399    impl FromStr for CatalogCollation {
3400        type Err = value::Error;
3401        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3402            Self::deserialize(s.into_deserializer())
3403        }
3404    }
3405    impl<'de> Deserialize<'de> for CatalogCollation {
3406        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3407        where
3408            D: Deserializer<'de>,
3409        {
3410            let s = String::deserialize(deserializer)?;
3411            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3412            Ok(deserialized)
3413        }
3414    }
3415    impl Serialize for CatalogCollation {
3416        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3417        where
3418            S: Serializer,
3419        {
3420            match self {
3421                Self::DatabaseDefault => serializer.serialize_unit_variant("CatalogCollation", 0u32, "DATABASE_DEFAULT"),
3422                Self::SqlLatin1GeneralCp1CiAs => {
3423                    serializer.serialize_unit_variant("CatalogCollation", 1u32, "SQL_Latin1_General_CP1_CI_AS")
3424                }
3425                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3426            }
3427        }
3428    }
3429    #[doc = "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit."]
3430    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3431    #[serde(remote = "LicenseType")]
3432    pub enum LicenseType {
3433        LicenseIncluded,
3434        BasePrice,
3435        #[serde(skip_deserializing)]
3436        UnknownValue(String),
3437    }
3438    impl FromStr for LicenseType {
3439        type Err = value::Error;
3440        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3441            Self::deserialize(s.into_deserializer())
3442        }
3443    }
3444    impl<'de> Deserialize<'de> for LicenseType {
3445        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3446        where
3447            D: Deserializer<'de>,
3448        {
3449            let s = String::deserialize(deserializer)?;
3450            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3451            Ok(deserialized)
3452        }
3453    }
3454    impl Serialize for LicenseType {
3455        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3456        where
3457            S: Serializer,
3458        {
3459            match self {
3460                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
3461                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
3462                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3463            }
3464        }
3465    }
3466    #[doc = "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool."]
3467    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3468    #[serde(remote = "ReadScale")]
3469    pub enum ReadScale {
3470        Enabled,
3471        Disabled,
3472        #[serde(skip_deserializing)]
3473        UnknownValue(String),
3474    }
3475    impl FromStr for ReadScale {
3476        type Err = value::Error;
3477        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3478            Self::deserialize(s.into_deserializer())
3479        }
3480    }
3481    impl<'de> Deserialize<'de> for ReadScale {
3482        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3483        where
3484            D: Deserializer<'de>,
3485        {
3486            let s = String::deserialize(deserializer)?;
3487            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3488            Ok(deserialized)
3489        }
3490    }
3491    impl Serialize for ReadScale {
3492        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3493        where
3494            S: Serializer,
3495        {
3496            match self {
3497                Self::Enabled => serializer.serialize_unit_variant("ReadScale", 0u32, "Enabled"),
3498                Self::Disabled => serializer.serialize_unit_variant("ReadScale", 1u32, "Disabled"),
3499                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3500            }
3501        }
3502    }
3503    #[doc = "The secondary type of the database if it is a secondary.  Valid values are Geo, Named and Standby."]
3504    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3505    #[serde(remote = "SecondaryType")]
3506    pub enum SecondaryType {
3507        Geo,
3508        Named,
3509        Standby,
3510        #[serde(skip_deserializing)]
3511        UnknownValue(String),
3512    }
3513    impl FromStr for SecondaryType {
3514        type Err = value::Error;
3515        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3516            Self::deserialize(s.into_deserializer())
3517        }
3518    }
3519    impl<'de> Deserialize<'de> for SecondaryType {
3520        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3521        where
3522            D: Deserializer<'de>,
3523        {
3524            let s = String::deserialize(deserializer)?;
3525            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3526            Ok(deserialized)
3527        }
3528    }
3529    impl Serialize for SecondaryType {
3530        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3531        where
3532            S: Serializer,
3533        {
3534            match self {
3535                Self::Geo => serializer.serialize_unit_variant("SecondaryType", 0u32, "Geo"),
3536                Self::Named => serializer.serialize_unit_variant("SecondaryType", 1u32, "Named"),
3537                Self::Standby => serializer.serialize_unit_variant("SecondaryType", 2u32, "Standby"),
3538                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3539            }
3540        }
3541    }
3542    #[doc = "The storage account type used to store backups for this database."]
3543    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3544    #[serde(remote = "CurrentBackupStorageRedundancy")]
3545    pub enum CurrentBackupStorageRedundancy {
3546        Geo,
3547        Local,
3548        Zone,
3549        GeoZone,
3550        #[serde(skip_deserializing)]
3551        UnknownValue(String),
3552    }
3553    impl FromStr for CurrentBackupStorageRedundancy {
3554        type Err = value::Error;
3555        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3556            Self::deserialize(s.into_deserializer())
3557        }
3558    }
3559    impl<'de> Deserialize<'de> for CurrentBackupStorageRedundancy {
3560        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3561        where
3562            D: Deserializer<'de>,
3563        {
3564            let s = String::deserialize(deserializer)?;
3565            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3566            Ok(deserialized)
3567        }
3568    }
3569    impl Serialize for CurrentBackupStorageRedundancy {
3570        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3571        where
3572            S: Serializer,
3573        {
3574            match self {
3575                Self::Geo => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 0u32, "Geo"),
3576                Self::Local => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 1u32, "Local"),
3577                Self::Zone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 2u32, "Zone"),
3578                Self::GeoZone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 3u32, "GeoZone"),
3579                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3580            }
3581        }
3582    }
3583    #[doc = "The storage account type to be used to store backups for this database."]
3584    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3585    #[serde(remote = "RequestedBackupStorageRedundancy")]
3586    pub enum RequestedBackupStorageRedundancy {
3587        Geo,
3588        Local,
3589        Zone,
3590        GeoZone,
3591        #[serde(skip_deserializing)]
3592        UnknownValue(String),
3593    }
3594    impl FromStr for RequestedBackupStorageRedundancy {
3595        type Err = value::Error;
3596        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3597            Self::deserialize(s.into_deserializer())
3598        }
3599    }
3600    impl<'de> Deserialize<'de> for RequestedBackupStorageRedundancy {
3601        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3602        where
3603            D: Deserializer<'de>,
3604        {
3605            let s = String::deserialize(deserializer)?;
3606            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3607            Ok(deserialized)
3608        }
3609    }
3610    impl Serialize for RequestedBackupStorageRedundancy {
3611        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3612        where
3613            S: Serializer,
3614        {
3615            match self {
3616                Self::Geo => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 0u32, "Geo"),
3617                Self::Local => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 1u32, "Local"),
3618                Self::Zone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 2u32, "Zone"),
3619                Self::GeoZone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 3u32, "GeoZone"),
3620                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3621            }
3622        }
3623    }
3624    #[doc = "Type of enclave requested on the database i.e. Default or VBS enclaves."]
3625    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3626    #[serde(remote = "PreferredEnclaveType")]
3627    pub enum PreferredEnclaveType {
3628        Default,
3629        #[serde(rename = "VBS")]
3630        Vbs,
3631        #[serde(skip_deserializing)]
3632        UnknownValue(String),
3633    }
3634    impl FromStr for PreferredEnclaveType {
3635        type Err = value::Error;
3636        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3637            Self::deserialize(s.into_deserializer())
3638        }
3639    }
3640    impl<'de> Deserialize<'de> for PreferredEnclaveType {
3641        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3642        where
3643            D: Deserializer<'de>,
3644        {
3645            let s = String::deserialize(deserializer)?;
3646            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3647            Ok(deserialized)
3648        }
3649    }
3650    impl Serialize for PreferredEnclaveType {
3651        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3652        where
3653            S: Serializer,
3654        {
3655            match self {
3656                Self::Default => serializer.serialize_unit_variant("PreferredEnclaveType", 0u32, "Default"),
3657                Self::Vbs => serializer.serialize_unit_variant("PreferredEnclaveType", 1u32, "VBS"),
3658                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3659            }
3660        }
3661    }
3662    #[doc = "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed."]
3663    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3664    #[serde(remote = "FreeLimitExhaustionBehavior")]
3665    pub enum FreeLimitExhaustionBehavior {
3666        AutoPause,
3667        BillOverUsage,
3668        #[serde(skip_deserializing)]
3669        UnknownValue(String),
3670    }
3671    impl FromStr for FreeLimitExhaustionBehavior {
3672        type Err = value::Error;
3673        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3674            Self::deserialize(s.into_deserializer())
3675        }
3676    }
3677    impl<'de> Deserialize<'de> for FreeLimitExhaustionBehavior {
3678        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3679        where
3680            D: Deserializer<'de>,
3681        {
3682            let s = String::deserialize(deserializer)?;
3683            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3684            Ok(deserialized)
3685        }
3686    }
3687    impl Serialize for FreeLimitExhaustionBehavior {
3688        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3689        where
3690            S: Serializer,
3691        {
3692            match self {
3693                Self::AutoPause => serializer.serialize_unit_variant("FreeLimitExhaustionBehavior", 0u32, "AutoPause"),
3694                Self::BillOverUsage => serializer.serialize_unit_variant("FreeLimitExhaustionBehavior", 1u32, "BillOverUsage"),
3695                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3696            }
3697        }
3698    }
3699}
3700#[doc = "Usage metric of a database."]
3701#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3702pub struct DatabaseUsage {
3703    #[serde(flatten)]
3704    pub proxy_resource: ProxyResource,
3705    #[doc = "Properties of a database usage."]
3706    #[serde(default, skip_serializing_if = "Option::is_none")]
3707    pub properties: Option<DatabaseUsageProperties>,
3708}
3709impl DatabaseUsage {
3710    pub fn new() -> Self {
3711        Self::default()
3712    }
3713}
3714#[doc = "A list of database usage metrics."]
3715#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3716pub struct DatabaseUsageListResult {
3717    #[doc = "Array of results."]
3718    #[serde(
3719        default,
3720        deserialize_with = "azure_core::util::deserialize_null_as_default",
3721        skip_serializing_if = "Vec::is_empty"
3722    )]
3723    pub value: Vec<DatabaseUsage>,
3724    #[doc = "Link to retrieve next page of results."]
3725    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3726    pub next_link: Option<String>,
3727}
3728impl azure_core::Continuable for DatabaseUsageListResult {
3729    type Continuation = String;
3730    fn continuation(&self) -> Option<Self::Continuation> {
3731        self.next_link.clone().filter(|value| !value.is_empty())
3732    }
3733}
3734impl DatabaseUsageListResult {
3735    pub fn new() -> Self {
3736        Self::default()
3737    }
3738}
3739#[doc = "Properties of a database usage."]
3740#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3741pub struct DatabaseUsageProperties {
3742    #[doc = "User-readable name of the metric."]
3743    #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
3744    pub display_name: Option<String>,
3745    #[doc = "Current value of the metric."]
3746    #[serde(rename = "currentValue", default, skip_serializing_if = "Option::is_none")]
3747    pub current_value: Option<f64>,
3748    #[doc = "Boundary value of the metric."]
3749    #[serde(default, skip_serializing_if = "Option::is_none")]
3750    pub limit: Option<f64>,
3751    #[doc = "Unit of the metric."]
3752    #[serde(default, skip_serializing_if = "Option::is_none")]
3753    pub unit: Option<String>,
3754}
3755impl DatabaseUsageProperties {
3756    pub fn new() -> Self {
3757        Self::default()
3758    }
3759}
3760#[doc = "Azure Active Directory identity configuration for a resource."]
3761#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3762pub struct DatabaseUserIdentity {
3763    #[doc = "The Azure Active Directory principal id."]
3764    #[serde(rename = "principalId", default, skip_serializing_if = "Option::is_none")]
3765    pub principal_id: Option<String>,
3766    #[doc = "The Azure Active Directory client id."]
3767    #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")]
3768    pub client_id: Option<String>,
3769}
3770impl DatabaseUserIdentity {
3771    pub fn new() -> Self {
3772        Self::default()
3773    }
3774}
3775#[doc = "A database vulnerability assessment."]
3776#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3777pub struct DatabaseVulnerabilityAssessment {
3778    #[serde(flatten)]
3779    pub proxy_resource: ProxyResource,
3780    #[doc = "Properties of a database Vulnerability Assessment."]
3781    #[serde(default, skip_serializing_if = "Option::is_none")]
3782    pub properties: Option<DatabaseVulnerabilityAssessmentProperties>,
3783}
3784impl DatabaseVulnerabilityAssessment {
3785    pub fn new() -> Self {
3786        Self::default()
3787    }
3788}
3789#[doc = "A list of the database's vulnerability assessments."]
3790#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3791pub struct DatabaseVulnerabilityAssessmentListResult {
3792    #[doc = "Array of results."]
3793    #[serde(
3794        default,
3795        deserialize_with = "azure_core::util::deserialize_null_as_default",
3796        skip_serializing_if = "Vec::is_empty"
3797    )]
3798    pub value: Vec<DatabaseVulnerabilityAssessment>,
3799    #[doc = "Link to retrieve next page of results."]
3800    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3801    pub next_link: Option<String>,
3802}
3803impl azure_core::Continuable for DatabaseVulnerabilityAssessmentListResult {
3804    type Continuation = String;
3805    fn continuation(&self) -> Option<Self::Continuation> {
3806        self.next_link.clone().filter(|value| !value.is_empty())
3807    }
3808}
3809impl DatabaseVulnerabilityAssessmentListResult {
3810    pub fn new() -> Self {
3811        Self::default()
3812    }
3813}
3814#[doc = "Properties of a database Vulnerability Assessment."]
3815#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3816pub struct DatabaseVulnerabilityAssessmentProperties {
3817    #[doc = "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).  It is required if server level vulnerability assessment policy doesn't set"]
3818    #[serde(rename = "storageContainerPath", default, skip_serializing_if = "Option::is_none")]
3819    pub storage_container_path: Option<String>,
3820    #[doc = "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
3821    #[serde(rename = "storageContainerSasKey", default, skip_serializing_if = "Option::is_none")]
3822    pub storage_container_sas_key: Option<String>,
3823    #[doc = "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
3824    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
3825    pub storage_account_access_key: Option<String>,
3826    #[doc = "Properties of a Vulnerability Assessment recurring scans."]
3827    #[serde(rename = "recurringScans", default, skip_serializing_if = "Option::is_none")]
3828    pub recurring_scans: Option<VulnerabilityAssessmentRecurringScansProperties>,
3829}
3830impl DatabaseVulnerabilityAssessmentProperties {
3831    pub fn new() -> Self {
3832        Self::default()
3833    }
3834}
3835#[doc = "A database vulnerability assessment rule baseline."]
3836#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3837pub struct DatabaseVulnerabilityAssessmentRuleBaseline {
3838    #[serde(flatten)]
3839    pub proxy_resource: ProxyResource,
3840    #[doc = "Properties of a database Vulnerability Assessment rule baseline."]
3841    #[serde(default, skip_serializing_if = "Option::is_none")]
3842    pub properties: Option<DatabaseVulnerabilityAssessmentRuleBaselineProperties>,
3843}
3844impl DatabaseVulnerabilityAssessmentRuleBaseline {
3845    pub fn new() -> Self {
3846        Self::default()
3847    }
3848}
3849#[doc = "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result."]
3850#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3851pub struct DatabaseVulnerabilityAssessmentRuleBaselineItem {
3852    #[doc = "The rule baseline result"]
3853    pub result: Vec<String>,
3854}
3855impl DatabaseVulnerabilityAssessmentRuleBaselineItem {
3856    pub fn new(result: Vec<String>) -> Self {
3857        Self { result }
3858    }
3859}
3860#[doc = "Properties of a database Vulnerability Assessment rule baseline."]
3861#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3862pub struct DatabaseVulnerabilityAssessmentRuleBaselineProperties {
3863    #[doc = "The rule baseline result"]
3864    #[serde(rename = "baselineResults")]
3865    pub baseline_results: Vec<DatabaseVulnerabilityAssessmentRuleBaselineItem>,
3866}
3867impl DatabaseVulnerabilityAssessmentRuleBaselineProperties {
3868    pub fn new(baseline_results: Vec<DatabaseVulnerabilityAssessmentRuleBaselineItem>) -> Self {
3869        Self { baseline_results }
3870    }
3871}
3872#[doc = "Properties of the export operation's result."]
3873#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3874pub struct DatabaseVulnerabilityAssessmentScanExportProperties {
3875    #[doc = "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx)."]
3876    #[serde(rename = "exportedReportLocation", default, skip_serializing_if = "Option::is_none")]
3877    pub exported_report_location: Option<String>,
3878}
3879impl DatabaseVulnerabilityAssessmentScanExportProperties {
3880    pub fn new() -> Self {
3881        Self::default()
3882    }
3883}
3884#[doc = "A database Vulnerability Assessment scan export resource."]
3885#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3886pub struct DatabaseVulnerabilityAssessmentScansExport {
3887    #[serde(flatten)]
3888    pub proxy_resource: ProxyResource,
3889    #[doc = "Properties of the export operation's result."]
3890    #[serde(default, skip_serializing_if = "Option::is_none")]
3891    pub properties: Option<DatabaseVulnerabilityAssessmentScanExportProperties>,
3892}
3893impl DatabaseVulnerabilityAssessmentScansExport {
3894    pub fn new() -> Self {
3895        Self::default()
3896    }
3897}
3898#[doc = "A deleted server."]
3899#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3900pub struct DeletedServer {
3901    #[serde(flatten)]
3902    pub proxy_resource: ProxyResource,
3903    #[doc = "The properties of a deleted server."]
3904    #[serde(default, skip_serializing_if = "Option::is_none")]
3905    pub properties: Option<DeletedServerProperties>,
3906}
3907impl DeletedServer {
3908    pub fn new() -> Self {
3909        Self::default()
3910    }
3911}
3912#[doc = "A list of deleted servers."]
3913#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3914pub struct DeletedServerListResult {
3915    #[doc = "Array of results."]
3916    #[serde(
3917        default,
3918        deserialize_with = "azure_core::util::deserialize_null_as_default",
3919        skip_serializing_if = "Vec::is_empty"
3920    )]
3921    pub value: Vec<DeletedServer>,
3922    #[doc = "Link to retrieve next page of results."]
3923    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3924    pub next_link: Option<String>,
3925}
3926impl azure_core::Continuable for DeletedServerListResult {
3927    type Continuation = String;
3928    fn continuation(&self) -> Option<Self::Continuation> {
3929        self.next_link.clone().filter(|value| !value.is_empty())
3930    }
3931}
3932impl DeletedServerListResult {
3933    pub fn new() -> Self {
3934        Self::default()
3935    }
3936}
3937#[doc = "The properties of a deleted server."]
3938#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3939pub struct DeletedServerProperties {
3940    #[doc = "The version of the deleted server."]
3941    #[serde(default, skip_serializing_if = "Option::is_none")]
3942    pub version: Option<String>,
3943    #[doc = "The deletion time of the deleted server."]
3944    #[serde(rename = "deletionTime", default, with = "azure_core::date::rfc3339::option")]
3945    pub deletion_time: Option<::time::OffsetDateTime>,
3946    #[doc = "The original ID of the server before deletion."]
3947    #[serde(rename = "originalId", default, skip_serializing_if = "Option::is_none")]
3948    pub original_id: Option<String>,
3949    #[doc = "The fully qualified domain name of the server."]
3950    #[serde(rename = "fullyQualifiedDomainName", default, skip_serializing_if = "Option::is_none")]
3951    pub fully_qualified_domain_name: Option<String>,
3952}
3953impl DeletedServerProperties {
3954    pub fn new() -> Self {
3955        Self::default()
3956    }
3957}
3958#[doc = "Distributed availability group between box and Sql Managed Instance."]
3959#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3960pub struct DistributedAvailabilityGroup {
3961    #[serde(flatten)]
3962    pub proxy_resource: ProxyResource,
3963    #[doc = "The properties of a distributed availability group."]
3964    #[serde(default, skip_serializing_if = "Option::is_none")]
3965    pub properties: Option<DistributedAvailabilityGroupProperties>,
3966}
3967impl DistributedAvailabilityGroup {
3968    pub fn new() -> Self {
3969        Self::default()
3970    }
3971}
3972#[doc = "Database specific information"]
3973#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3974pub struct DistributedAvailabilityGroupDatabase {
3975    #[doc = "The name of the database in link"]
3976    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
3977    pub database_name: Option<String>,
3978    #[doc = "Managed instance replica id"]
3979    #[serde(rename = "instanceReplicaId", default, skip_serializing_if = "Option::is_none")]
3980    pub instance_replica_id: Option<String>,
3981    #[doc = "SQL server replica id"]
3982    #[serde(rename = "partnerReplicaId", default, skip_serializing_if = "Option::is_none")]
3983    pub partner_replica_id: Option<String>,
3984    #[doc = "Current link state"]
3985    #[serde(rename = "replicaState", default, skip_serializing_if = "Option::is_none")]
3986    pub replica_state: Option<String>,
3987    #[doc = "Seeding progress"]
3988    #[serde(rename = "seedingProgress", default, skip_serializing_if = "Option::is_none")]
3989    pub seeding_progress: Option<String>,
3990    #[doc = "Link health state"]
3991    #[serde(rename = "synchronizationHealth", default, skip_serializing_if = "Option::is_none")]
3992    pub synchronization_health: Option<distributed_availability_group_database::SynchronizationHealth>,
3993    #[doc = "Link connected state"]
3994    #[serde(rename = "connectedState", default, skip_serializing_if = "Option::is_none")]
3995    pub connected_state: Option<distributed_availability_group_database::ConnectedState>,
3996    #[doc = "Last received LSN"]
3997    #[serde(rename = "lastReceivedLsn", default, skip_serializing_if = "Option::is_none")]
3998    pub last_received_lsn: Option<String>,
3999    #[doc = "Last received LSN time"]
4000    #[serde(rename = "lastReceivedTime", default, with = "azure_core::date::rfc3339::option")]
4001    pub last_received_time: Option<::time::OffsetDateTime>,
4002    #[doc = "Last sent LSN"]
4003    #[serde(rename = "lastSentLsn", default, skip_serializing_if = "Option::is_none")]
4004    pub last_sent_lsn: Option<String>,
4005    #[doc = "Last sent LSN time"]
4006    #[serde(rename = "lastSentTime", default, with = "azure_core::date::rfc3339::option")]
4007    pub last_sent_time: Option<::time::OffsetDateTime>,
4008    #[doc = "Last commit LSN"]
4009    #[serde(rename = "lastCommitLsn", default, skip_serializing_if = "Option::is_none")]
4010    pub last_commit_lsn: Option<String>,
4011    #[doc = "Last commit LSN time"]
4012    #[serde(rename = "lastCommitTime", default, with = "azure_core::date::rfc3339::option")]
4013    pub last_commit_time: Option<::time::OffsetDateTime>,
4014    #[doc = "Last hardened LSN"]
4015    #[serde(rename = "lastHardenedLsn", default, skip_serializing_if = "Option::is_none")]
4016    pub last_hardened_lsn: Option<String>,
4017    #[doc = "Last hardened LSN time"]
4018    #[serde(rename = "lastHardenedTime", default, with = "azure_core::date::rfc3339::option")]
4019    pub last_hardened_time: Option<::time::OffsetDateTime>,
4020    #[doc = "Last backup LSN"]
4021    #[serde(rename = "lastBackupLsn", default, skip_serializing_if = "Option::is_none")]
4022    pub last_backup_lsn: Option<String>,
4023    #[doc = "Last backup LSN time"]
4024    #[serde(rename = "lastBackupTime", default, with = "azure_core::date::rfc3339::option")]
4025    pub last_backup_time: Option<::time::OffsetDateTime>,
4026    #[doc = "The most recent link connection error description"]
4027    #[serde(rename = "mostRecentLinkError", default, skip_serializing_if = "Option::is_none")]
4028    pub most_recent_link_error: Option<String>,
4029    #[doc = "Certificate information"]
4030    #[serde(rename = "partnerAuthCertValidity", default, skip_serializing_if = "Option::is_none")]
4031    pub partner_auth_cert_validity: Option<CertificateInfo>,
4032    #[doc = "Replication lag when Managed Instance link side is primary"]
4033    #[serde(rename = "instanceSendReplicationLagSeconds", default, skip_serializing_if = "Option::is_none")]
4034    pub instance_send_replication_lag_seconds: Option<i32>,
4035    #[doc = "Redo lag when Managed Instance link side is primary"]
4036    #[serde(rename = "instanceRedoReplicationLagSeconds", default, skip_serializing_if = "Option::is_none")]
4037    pub instance_redo_replication_lag_seconds: Option<i32>,
4038}
4039impl DistributedAvailabilityGroupDatabase {
4040    pub fn new() -> Self {
4041        Self::default()
4042    }
4043}
4044pub mod distributed_availability_group_database {
4045    use super::*;
4046    #[doc = "Link health state"]
4047    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4048    #[serde(remote = "SynchronizationHealth")]
4049    pub enum SynchronizationHealth {
4050        #[serde(rename = "NOT_HEALTHY")]
4051        NotHealthy,
4052        #[serde(rename = "PARTIALLY_HEALTHY")]
4053        PartiallyHealthy,
4054        #[serde(rename = "HEALTHY")]
4055        Healthy,
4056        #[serde(skip_deserializing)]
4057        UnknownValue(String),
4058    }
4059    impl FromStr for SynchronizationHealth {
4060        type Err = value::Error;
4061        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4062            Self::deserialize(s.into_deserializer())
4063        }
4064    }
4065    impl<'de> Deserialize<'de> for SynchronizationHealth {
4066        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4067        where
4068            D: Deserializer<'de>,
4069        {
4070            let s = String::deserialize(deserializer)?;
4071            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4072            Ok(deserialized)
4073        }
4074    }
4075    impl Serialize for SynchronizationHealth {
4076        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4077        where
4078            S: Serializer,
4079        {
4080            match self {
4081                Self::NotHealthy => serializer.serialize_unit_variant("SynchronizationHealth", 0u32, "NOT_HEALTHY"),
4082                Self::PartiallyHealthy => serializer.serialize_unit_variant("SynchronizationHealth", 1u32, "PARTIALLY_HEALTHY"),
4083                Self::Healthy => serializer.serialize_unit_variant("SynchronizationHealth", 2u32, "HEALTHY"),
4084                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4085            }
4086        }
4087    }
4088    #[doc = "Link connected state"]
4089    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4090    #[serde(remote = "ConnectedState")]
4091    pub enum ConnectedState {
4092        #[serde(rename = "DISCONNECTED")]
4093        Disconnected,
4094        #[serde(rename = "CONNECTED")]
4095        Connected,
4096        #[serde(skip_deserializing)]
4097        UnknownValue(String),
4098    }
4099    impl FromStr for ConnectedState {
4100        type Err = value::Error;
4101        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4102            Self::deserialize(s.into_deserializer())
4103        }
4104    }
4105    impl<'de> Deserialize<'de> for ConnectedState {
4106        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4107        where
4108            D: Deserializer<'de>,
4109        {
4110            let s = String::deserialize(deserializer)?;
4111            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4112            Ok(deserialized)
4113        }
4114    }
4115    impl Serialize for ConnectedState {
4116        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4117        where
4118            S: Serializer,
4119        {
4120            match self {
4121                Self::Disconnected => serializer.serialize_unit_variant("ConnectedState", 0u32, "DISCONNECTED"),
4122                Self::Connected => serializer.serialize_unit_variant("ConnectedState", 1u32, "CONNECTED"),
4123                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4124            }
4125        }
4126    }
4127}
4128#[doc = "The properties of a distributed availability group."]
4129#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4130pub struct DistributedAvailabilityGroupProperties {
4131    #[doc = "Name of the distributed availability group"]
4132    #[serde(rename = "distributedAvailabilityGroupName", default, skip_serializing_if = "Option::is_none")]
4133    pub distributed_availability_group_name: Option<String>,
4134    #[doc = "ID of the distributed availability group"]
4135    #[serde(rename = "distributedAvailabilityGroupId", default, skip_serializing_if = "Option::is_none")]
4136    pub distributed_availability_group_id: Option<String>,
4137    #[doc = "Replication mode of the link"]
4138    #[serde(rename = "replicationMode", default, skip_serializing_if = "Option::is_none")]
4139    pub replication_mode: Option<distributed_availability_group_properties::ReplicationMode>,
4140    #[doc = "SQL server side link role"]
4141    #[serde(rename = "partnerLinkRole", default, skip_serializing_if = "Option::is_none")]
4142    pub partner_link_role: Option<distributed_availability_group_properties::PartnerLinkRole>,
4143    #[doc = "SQL server side availability group name"]
4144    #[serde(rename = "partnerAvailabilityGroupName", default, skip_serializing_if = "Option::is_none")]
4145    pub partner_availability_group_name: Option<String>,
4146    #[doc = "SQL server side endpoint - IP or DNS resolvable name"]
4147    #[serde(rename = "partnerEndpoint", default, skip_serializing_if = "Option::is_none")]
4148    pub partner_endpoint: Option<String>,
4149    #[doc = "Managed instance side link role"]
4150    #[serde(rename = "instanceLinkRole", default, skip_serializing_if = "Option::is_none")]
4151    pub instance_link_role: Option<distributed_availability_group_properties::InstanceLinkRole>,
4152    #[doc = "Managed instance side availability group name"]
4153    #[serde(rename = "instanceAvailabilityGroupName", default, skip_serializing_if = "Option::is_none")]
4154    pub instance_availability_group_name: Option<String>,
4155    #[doc = "The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure."]
4156    #[serde(rename = "failoverMode", default, skip_serializing_if = "Option::is_none")]
4157    pub failover_mode: Option<distributed_availability_group_properties::FailoverMode>,
4158    #[doc = "Database seeding mode – can be Automatic (default), or Manual for supported scenarios."]
4159    #[serde(rename = "seedingMode", default, skip_serializing_if = "Option::is_none")]
4160    pub seeding_mode: Option<distributed_availability_group_properties::SeedingMode>,
4161    #[doc = "Databases in the distributed availability group"]
4162    #[serde(
4163        default,
4164        deserialize_with = "azure_core::util::deserialize_null_as_default",
4165        skip_serializing_if = "Vec::is_empty"
4166    )]
4167    pub databases: Vec<DistributedAvailabilityGroupDatabase>,
4168}
4169impl DistributedAvailabilityGroupProperties {
4170    pub fn new() -> Self {
4171        Self::default()
4172    }
4173}
4174pub mod distributed_availability_group_properties {
4175    use super::*;
4176    #[doc = "Replication mode of the link"]
4177    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4178    #[serde(remote = "ReplicationMode")]
4179    pub enum ReplicationMode {
4180        Async,
4181        Sync,
4182        #[serde(skip_deserializing)]
4183        UnknownValue(String),
4184    }
4185    impl FromStr for ReplicationMode {
4186        type Err = value::Error;
4187        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4188            Self::deserialize(s.into_deserializer())
4189        }
4190    }
4191    impl<'de> Deserialize<'de> for ReplicationMode {
4192        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4193        where
4194            D: Deserializer<'de>,
4195        {
4196            let s = String::deserialize(deserializer)?;
4197            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4198            Ok(deserialized)
4199        }
4200    }
4201    impl Serialize for ReplicationMode {
4202        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4203        where
4204            S: Serializer,
4205        {
4206            match self {
4207                Self::Async => serializer.serialize_unit_variant("ReplicationMode", 0u32, "Async"),
4208                Self::Sync => serializer.serialize_unit_variant("ReplicationMode", 1u32, "Sync"),
4209                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4210            }
4211        }
4212    }
4213    #[doc = "SQL server side link role"]
4214    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4215    #[serde(remote = "PartnerLinkRole")]
4216    pub enum PartnerLinkRole {
4217        Primary,
4218        Secondary,
4219        #[serde(skip_deserializing)]
4220        UnknownValue(String),
4221    }
4222    impl FromStr for PartnerLinkRole {
4223        type Err = value::Error;
4224        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4225            Self::deserialize(s.into_deserializer())
4226        }
4227    }
4228    impl<'de> Deserialize<'de> for PartnerLinkRole {
4229        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4230        where
4231            D: Deserializer<'de>,
4232        {
4233            let s = String::deserialize(deserializer)?;
4234            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4235            Ok(deserialized)
4236        }
4237    }
4238    impl Serialize for PartnerLinkRole {
4239        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4240        where
4241            S: Serializer,
4242        {
4243            match self {
4244                Self::Primary => serializer.serialize_unit_variant("PartnerLinkRole", 0u32, "Primary"),
4245                Self::Secondary => serializer.serialize_unit_variant("PartnerLinkRole", 1u32, "Secondary"),
4246                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4247            }
4248        }
4249    }
4250    #[doc = "Managed instance side link role"]
4251    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4252    #[serde(remote = "InstanceLinkRole")]
4253    pub enum InstanceLinkRole {
4254        Primary,
4255        Secondary,
4256        #[serde(skip_deserializing)]
4257        UnknownValue(String),
4258    }
4259    impl FromStr for InstanceLinkRole {
4260        type Err = value::Error;
4261        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4262            Self::deserialize(s.into_deserializer())
4263        }
4264    }
4265    impl<'de> Deserialize<'de> for InstanceLinkRole {
4266        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4267        where
4268            D: Deserializer<'de>,
4269        {
4270            let s = String::deserialize(deserializer)?;
4271            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4272            Ok(deserialized)
4273        }
4274    }
4275    impl Serialize for InstanceLinkRole {
4276        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4277        where
4278            S: Serializer,
4279        {
4280            match self {
4281                Self::Primary => serializer.serialize_unit_variant("InstanceLinkRole", 0u32, "Primary"),
4282                Self::Secondary => serializer.serialize_unit_variant("InstanceLinkRole", 1u32, "Secondary"),
4283                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4284            }
4285        }
4286    }
4287    #[doc = "The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure."]
4288    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4289    #[serde(remote = "FailoverMode")]
4290    pub enum FailoverMode {
4291        None,
4292        Manual,
4293        #[serde(skip_deserializing)]
4294        UnknownValue(String),
4295    }
4296    impl FromStr for FailoverMode {
4297        type Err = value::Error;
4298        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4299            Self::deserialize(s.into_deserializer())
4300        }
4301    }
4302    impl<'de> Deserialize<'de> for FailoverMode {
4303        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4304        where
4305            D: Deserializer<'de>,
4306        {
4307            let s = String::deserialize(deserializer)?;
4308            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4309            Ok(deserialized)
4310        }
4311    }
4312    impl Serialize for FailoverMode {
4313        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4314        where
4315            S: Serializer,
4316        {
4317            match self {
4318                Self::None => serializer.serialize_unit_variant("FailoverMode", 0u32, "None"),
4319                Self::Manual => serializer.serialize_unit_variant("FailoverMode", 1u32, "Manual"),
4320                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4321            }
4322        }
4323    }
4324    #[doc = "Database seeding mode – can be Automatic (default), or Manual for supported scenarios."]
4325    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4326    #[serde(remote = "SeedingMode")]
4327    pub enum SeedingMode {
4328        Automatic,
4329        Manual,
4330        #[serde(skip_deserializing)]
4331        UnknownValue(String),
4332    }
4333    impl FromStr for SeedingMode {
4334        type Err = value::Error;
4335        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4336            Self::deserialize(s.into_deserializer())
4337        }
4338    }
4339    impl<'de> Deserialize<'de> for SeedingMode {
4340        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4341        where
4342            D: Deserializer<'de>,
4343        {
4344            let s = String::deserialize(deserializer)?;
4345            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4346            Ok(deserialized)
4347        }
4348    }
4349    impl Serialize for SeedingMode {
4350        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4351        where
4352            S: Serializer,
4353        {
4354            match self {
4355                Self::Automatic => serializer.serialize_unit_variant("SeedingMode", 0u32, "Automatic"),
4356                Self::Manual => serializer.serialize_unit_variant("SeedingMode", 1u32, "Manual"),
4357                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4358            }
4359        }
4360    }
4361}
4362#[doc = "Distributed availability group failover request."]
4363#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4364pub struct DistributedAvailabilityGroupSetRole {
4365    #[doc = "New role of managed instance in a distributed availability group, can be Primary or Secondary."]
4366    #[serde(rename = "instanceRole")]
4367    pub instance_role: distributed_availability_group_set_role::InstanceRole,
4368    #[doc = "The type of the role change, can be Planned or Forced."]
4369    #[serde(rename = "roleChangeType")]
4370    pub role_change_type: distributed_availability_group_set_role::RoleChangeType,
4371}
4372impl DistributedAvailabilityGroupSetRole {
4373    pub fn new(
4374        instance_role: distributed_availability_group_set_role::InstanceRole,
4375        role_change_type: distributed_availability_group_set_role::RoleChangeType,
4376    ) -> Self {
4377        Self {
4378            instance_role,
4379            role_change_type,
4380        }
4381    }
4382}
4383pub mod distributed_availability_group_set_role {
4384    use super::*;
4385    #[doc = "New role of managed instance in a distributed availability group, can be Primary or Secondary."]
4386    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4387    #[serde(remote = "InstanceRole")]
4388    pub enum InstanceRole {
4389        Primary,
4390        Secondary,
4391        #[serde(skip_deserializing)]
4392        UnknownValue(String),
4393    }
4394    impl FromStr for InstanceRole {
4395        type Err = value::Error;
4396        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4397            Self::deserialize(s.into_deserializer())
4398        }
4399    }
4400    impl<'de> Deserialize<'de> for InstanceRole {
4401        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4402        where
4403            D: Deserializer<'de>,
4404        {
4405            let s = String::deserialize(deserializer)?;
4406            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4407            Ok(deserialized)
4408        }
4409    }
4410    impl Serialize for InstanceRole {
4411        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4412        where
4413            S: Serializer,
4414        {
4415            match self {
4416                Self::Primary => serializer.serialize_unit_variant("InstanceRole", 0u32, "Primary"),
4417                Self::Secondary => serializer.serialize_unit_variant("InstanceRole", 1u32, "Secondary"),
4418                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4419            }
4420        }
4421    }
4422    #[doc = "The type of the role change, can be Planned or Forced."]
4423    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4424    #[serde(remote = "RoleChangeType")]
4425    pub enum RoleChangeType {
4426        Forced,
4427        Planned,
4428        #[serde(skip_deserializing)]
4429        UnknownValue(String),
4430    }
4431    impl FromStr for RoleChangeType {
4432        type Err = value::Error;
4433        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4434            Self::deserialize(s.into_deserializer())
4435        }
4436    }
4437    impl<'de> Deserialize<'de> for RoleChangeType {
4438        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4439        where
4440            D: Deserializer<'de>,
4441        {
4442            let s = String::deserialize(deserializer)?;
4443            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4444            Ok(deserialized)
4445        }
4446    }
4447    impl Serialize for RoleChangeType {
4448        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4449        where
4450            S: Serializer,
4451        {
4452            match self {
4453                Self::Forced => serializer.serialize_unit_variant("RoleChangeType", 0u32, "Forced"),
4454                Self::Planned => serializer.serialize_unit_variant("RoleChangeType", 1u32, "Planned"),
4455                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4456            }
4457        }
4458    }
4459}
4460#[doc = "Distributed availability group failover."]
4461#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4462pub struct DistributedAvailabilityGroupsFailoverRequest {
4463    #[doc = "The failover type, can be ForcedAllowDataLoss or Planned."]
4464    #[serde(rename = "failoverType")]
4465    pub failover_type: distributed_availability_groups_failover_request::FailoverType,
4466}
4467impl DistributedAvailabilityGroupsFailoverRequest {
4468    pub fn new(failover_type: distributed_availability_groups_failover_request::FailoverType) -> Self {
4469        Self { failover_type }
4470    }
4471}
4472pub mod distributed_availability_groups_failover_request {
4473    use super::*;
4474    #[doc = "The failover type, can be ForcedAllowDataLoss or Planned."]
4475    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4476    #[serde(remote = "FailoverType")]
4477    pub enum FailoverType {
4478        ForcedAllowDataLoss,
4479        Planned,
4480        #[serde(skip_deserializing)]
4481        UnknownValue(String),
4482    }
4483    impl FromStr for FailoverType {
4484        type Err = value::Error;
4485        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4486            Self::deserialize(s.into_deserializer())
4487        }
4488    }
4489    impl<'de> Deserialize<'de> for FailoverType {
4490        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4491        where
4492            D: Deserializer<'de>,
4493        {
4494            let s = String::deserialize(deserializer)?;
4495            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4496            Ok(deserialized)
4497        }
4498    }
4499    impl Serialize for FailoverType {
4500        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4501        where
4502            S: Serializer,
4503        {
4504            match self {
4505                Self::ForcedAllowDataLoss => serializer.serialize_unit_variant("FailoverType", 0u32, "ForcedAllowDataLoss"),
4506                Self::Planned => serializer.serialize_unit_variant("FailoverType", 1u32, "Planned"),
4507                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4508            }
4509        }
4510    }
4511}
4512#[doc = "A list of distributed availability groups in instance."]
4513#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4514pub struct DistributedAvailabilityGroupsListResult {
4515    #[doc = "Array of results."]
4516    #[serde(
4517        default,
4518        deserialize_with = "azure_core::util::deserialize_null_as_default",
4519        skip_serializing_if = "Vec::is_empty"
4520    )]
4521    pub value: Vec<DistributedAvailabilityGroup>,
4522    #[doc = "Link to retrieve next page of results."]
4523    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4524    pub next_link: Option<String>,
4525}
4526impl azure_core::Continuable for DistributedAvailabilityGroupsListResult {
4527    type Continuation = String;
4528    fn continuation(&self) -> Option<Self::Continuation> {
4529        self.next_link.clone().filter(|value| !value.is_empty())
4530    }
4531}
4532impl DistributedAvailabilityGroupsListResult {
4533    pub fn new() -> Self {
4534        Self::default()
4535    }
4536}
4537#[doc = "The edition capability."]
4538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4539pub struct EditionCapability {
4540    #[doc = "The database edition name."]
4541    #[serde(default, skip_serializing_if = "Option::is_none")]
4542    pub name: Option<String>,
4543    #[doc = "The list of supported service objectives for the edition."]
4544    #[serde(
4545        rename = "supportedServiceLevelObjectives",
4546        default,
4547        deserialize_with = "azure_core::util::deserialize_null_as_default",
4548        skip_serializing_if = "Vec::is_empty"
4549    )]
4550    pub supported_service_level_objectives: Vec<ServiceObjectiveCapability>,
4551    #[doc = "Whether or not zone redundancy is supported for the edition."]
4552    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
4553    pub zone_redundant: Option<bool>,
4554    #[doc = "The read scale capability."]
4555    #[serde(rename = "readScale", default, skip_serializing_if = "Option::is_none")]
4556    pub read_scale: Option<ReadScaleCapability>,
4557    #[doc = "The list of supported storage capabilities for this edition"]
4558    #[serde(
4559        rename = "supportedStorageCapabilities",
4560        default,
4561        deserialize_with = "azure_core::util::deserialize_null_as_default",
4562        skip_serializing_if = "Vec::is_empty"
4563    )]
4564    pub supported_storage_capabilities: Vec<StorageCapability>,
4565    #[doc = "Whether or not zone pinning is supported for the edition."]
4566    #[serde(rename = "zonePinning", default, skip_serializing_if = "Option::is_none")]
4567    pub zone_pinning: Option<bool>,
4568    #[doc = "The status of the capability."]
4569    #[serde(default, skip_serializing_if = "Option::is_none")]
4570    pub status: Option<edition_capability::Status>,
4571    #[doc = "The reason for the capability not being available."]
4572    #[serde(default, skip_serializing_if = "Option::is_none")]
4573    pub reason: Option<String>,
4574}
4575impl EditionCapability {
4576    pub fn new() -> Self {
4577        Self::default()
4578    }
4579}
4580pub mod edition_capability {
4581    use super::*;
4582    #[doc = "The status of the capability."]
4583    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4584    pub enum Status {
4585        Visible,
4586        Available,
4587        Default,
4588        Disabled,
4589    }
4590}
4591#[doc = "An elastic pool."]
4592#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4593pub struct ElasticPool {
4594    #[serde(flatten)]
4595    pub tracked_resource: TrackedResource,
4596    #[doc = "An ARM Resource SKU."]
4597    #[serde(default, skip_serializing_if = "Option::is_none")]
4598    pub sku: Option<Sku>,
4599    #[doc = "Kind of elastic pool. This is metadata used for the Azure portal experience."]
4600    #[serde(default, skip_serializing_if = "Option::is_none")]
4601    pub kind: Option<String>,
4602    #[doc = "Properties of an elastic pool"]
4603    #[serde(default, skip_serializing_if = "Option::is_none")]
4604    pub properties: Option<ElasticPoolProperties>,
4605}
4606impl ElasticPool {
4607    pub fn new(tracked_resource: TrackedResource) -> Self {
4608        Self {
4609            tracked_resource,
4610            sku: None,
4611            kind: None,
4612            properties: None,
4613        }
4614    }
4615}
4616#[doc = "The elastic pool edition capability."]
4617#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4618pub struct ElasticPoolEditionCapability {
4619    #[doc = "The elastic pool edition name."]
4620    #[serde(default, skip_serializing_if = "Option::is_none")]
4621    pub name: Option<String>,
4622    #[doc = "The list of supported elastic pool DTU levels for the edition."]
4623    #[serde(
4624        rename = "supportedElasticPoolPerformanceLevels",
4625        default,
4626        deserialize_with = "azure_core::util::deserialize_null_as_default",
4627        skip_serializing_if = "Vec::is_empty"
4628    )]
4629    pub supported_elastic_pool_performance_levels: Vec<ElasticPoolPerformanceLevelCapability>,
4630    #[doc = "Whether or not zone redundancy is supported for the edition."]
4631    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
4632    pub zone_redundant: Option<bool>,
4633    #[doc = "Whether or not zone pinning is supported for the edition."]
4634    #[serde(rename = "zonePinning", default, skip_serializing_if = "Option::is_none")]
4635    pub zone_pinning: Option<bool>,
4636    #[doc = "The status of the capability."]
4637    #[serde(default, skip_serializing_if = "Option::is_none")]
4638    pub status: Option<elastic_pool_edition_capability::Status>,
4639    #[doc = "The reason for the capability not being available."]
4640    #[serde(default, skip_serializing_if = "Option::is_none")]
4641    pub reason: Option<String>,
4642}
4643impl ElasticPoolEditionCapability {
4644    pub fn new() -> Self {
4645        Self::default()
4646    }
4647}
4648pub mod elastic_pool_edition_capability {
4649    use super::*;
4650    #[doc = "The status of the capability."]
4651    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4652    pub enum Status {
4653        Visible,
4654        Available,
4655        Default,
4656        Disabled,
4657    }
4658}
4659#[doc = "The result of an elastic pool list request."]
4660#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4661pub struct ElasticPoolListResult {
4662    #[doc = "Array of results."]
4663    #[serde(
4664        default,
4665        deserialize_with = "azure_core::util::deserialize_null_as_default",
4666        skip_serializing_if = "Vec::is_empty"
4667    )]
4668    pub value: Vec<ElasticPool>,
4669    #[doc = "Link to retrieve next page of results."]
4670    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4671    pub next_link: Option<String>,
4672}
4673impl azure_core::Continuable for ElasticPoolListResult {
4674    type Continuation = String;
4675    fn continuation(&self) -> Option<Self::Continuation> {
4676        self.next_link.clone().filter(|value| !value.is_empty())
4677    }
4678}
4679impl ElasticPoolListResult {
4680    pub fn new() -> Self {
4681        Self::default()
4682    }
4683}
4684#[doc = "A elastic pool operation."]
4685#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4686pub struct ElasticPoolOperation {
4687    #[serde(flatten)]
4688    pub proxy_resource: ProxyResource,
4689    #[doc = "The properties of a elastic pool operation."]
4690    #[serde(default, skip_serializing_if = "Option::is_none")]
4691    pub properties: Option<ElasticPoolOperationProperties>,
4692}
4693impl ElasticPoolOperation {
4694    pub fn new() -> Self {
4695        Self::default()
4696    }
4697}
4698#[doc = "The response to a list elastic pool operations request"]
4699#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4700pub struct ElasticPoolOperationListResult {
4701    #[doc = "Array of results."]
4702    #[serde(
4703        default,
4704        deserialize_with = "azure_core::util::deserialize_null_as_default",
4705        skip_serializing_if = "Vec::is_empty"
4706    )]
4707    pub value: Vec<ElasticPoolOperation>,
4708    #[doc = "Link to retrieve next page of results."]
4709    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4710    pub next_link: Option<String>,
4711}
4712impl azure_core::Continuable for ElasticPoolOperationListResult {
4713    type Continuation = String;
4714    fn continuation(&self) -> Option<Self::Continuation> {
4715        self.next_link.clone().filter(|value| !value.is_empty())
4716    }
4717}
4718impl ElasticPoolOperationListResult {
4719    pub fn new() -> Self {
4720        Self::default()
4721    }
4722}
4723#[doc = "The properties of a elastic pool operation."]
4724#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4725pub struct ElasticPoolOperationProperties {
4726    #[doc = "The name of the elastic pool the operation is being performed on."]
4727    #[serde(rename = "elasticPoolName", default, skip_serializing_if = "Option::is_none")]
4728    pub elastic_pool_name: Option<String>,
4729    #[doc = "The name of operation."]
4730    #[serde(default, skip_serializing_if = "Option::is_none")]
4731    pub operation: Option<String>,
4732    #[doc = "The friendly name of operation."]
4733    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
4734    pub operation_friendly_name: Option<String>,
4735    #[doc = "The percentage of the operation completed."]
4736    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
4737    pub percent_complete: Option<i32>,
4738    #[doc = "The name of the server."]
4739    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
4740    pub server_name: Option<String>,
4741    #[doc = "The operation start time."]
4742    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
4743    pub start_time: Option<::time::OffsetDateTime>,
4744    #[doc = "The operation state."]
4745    #[serde(default, skip_serializing_if = "Option::is_none")]
4746    pub state: Option<String>,
4747    #[doc = "The operation error code."]
4748    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
4749    pub error_code: Option<i32>,
4750    #[doc = "The operation error description."]
4751    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
4752    pub error_description: Option<String>,
4753    #[doc = "The operation error severity."]
4754    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
4755    pub error_severity: Option<i32>,
4756    #[doc = "Whether or not the error is a user error."]
4757    #[serde(rename = "isUserError", default, skip_serializing_if = "Option::is_none")]
4758    pub is_user_error: Option<bool>,
4759    #[doc = "The estimated completion time of the operation."]
4760    #[serde(rename = "estimatedCompletionTime", default, with = "azure_core::date::rfc3339::option")]
4761    pub estimated_completion_time: Option<::time::OffsetDateTime>,
4762    #[doc = "The operation description."]
4763    #[serde(default, skip_serializing_if = "Option::is_none")]
4764    pub description: Option<String>,
4765    #[doc = "Whether the operation can be cancelled."]
4766    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
4767    pub is_cancellable: Option<bool>,
4768}
4769impl ElasticPoolOperationProperties {
4770    pub fn new() -> Self {
4771        Self::default()
4772    }
4773}
4774#[doc = "The max per-database performance level capability."]
4775#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4776pub struct ElasticPoolPerDatabaseMaxPerformanceLevelCapability {
4777    #[doc = "The maximum performance level per database."]
4778    #[serde(default, skip_serializing_if = "Option::is_none")]
4779    pub limit: Option<f64>,
4780    #[doc = "Unit type used to measure performance level."]
4781    #[serde(default, skip_serializing_if = "Option::is_none")]
4782    pub unit: Option<elastic_pool_per_database_max_performance_level_capability::Unit>,
4783    #[doc = "The list of supported min database performance levels."]
4784    #[serde(
4785        rename = "supportedPerDatabaseMinPerformanceLevels",
4786        default,
4787        deserialize_with = "azure_core::util::deserialize_null_as_default",
4788        skip_serializing_if = "Vec::is_empty"
4789    )]
4790    pub supported_per_database_min_performance_levels: Vec<ElasticPoolPerDatabaseMinPerformanceLevelCapability>,
4791    #[doc = "The status of the capability."]
4792    #[serde(default, skip_serializing_if = "Option::is_none")]
4793    pub status: Option<elastic_pool_per_database_max_performance_level_capability::Status>,
4794    #[doc = "The reason for the capability not being available."]
4795    #[serde(default, skip_serializing_if = "Option::is_none")]
4796    pub reason: Option<String>,
4797}
4798impl ElasticPoolPerDatabaseMaxPerformanceLevelCapability {
4799    pub fn new() -> Self {
4800        Self::default()
4801    }
4802}
4803pub mod elastic_pool_per_database_max_performance_level_capability {
4804    use super::*;
4805    #[doc = "Unit type used to measure performance level."]
4806    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4807    #[serde(remote = "Unit")]
4808    pub enum Unit {
4809        #[serde(rename = "DTU")]
4810        Dtu,
4811        VCores,
4812        #[serde(skip_deserializing)]
4813        UnknownValue(String),
4814    }
4815    impl FromStr for Unit {
4816        type Err = value::Error;
4817        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4818            Self::deserialize(s.into_deserializer())
4819        }
4820    }
4821    impl<'de> Deserialize<'de> for Unit {
4822        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4823        where
4824            D: Deserializer<'de>,
4825        {
4826            let s = String::deserialize(deserializer)?;
4827            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4828            Ok(deserialized)
4829        }
4830    }
4831    impl Serialize for Unit {
4832        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4833        where
4834            S: Serializer,
4835        {
4836            match self {
4837                Self::Dtu => serializer.serialize_unit_variant("Unit", 0u32, "DTU"),
4838                Self::VCores => serializer.serialize_unit_variant("Unit", 1u32, "VCores"),
4839                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4840            }
4841        }
4842    }
4843    #[doc = "The status of the capability."]
4844    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4845    pub enum Status {
4846        Visible,
4847        Available,
4848        Default,
4849        Disabled,
4850    }
4851}
4852#[doc = "The minimum per-database performance level capability."]
4853#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4854pub struct ElasticPoolPerDatabaseMinPerformanceLevelCapability {
4855    #[doc = "The minimum performance level per database."]
4856    #[serde(default, skip_serializing_if = "Option::is_none")]
4857    pub limit: Option<f64>,
4858    #[doc = "Unit type used to measure performance level."]
4859    #[serde(default, skip_serializing_if = "Option::is_none")]
4860    pub unit: Option<elastic_pool_per_database_min_performance_level_capability::Unit>,
4861    #[doc = "The status of the capability."]
4862    #[serde(default, skip_serializing_if = "Option::is_none")]
4863    pub status: Option<elastic_pool_per_database_min_performance_level_capability::Status>,
4864    #[doc = "The reason for the capability not being available."]
4865    #[serde(default, skip_serializing_if = "Option::is_none")]
4866    pub reason: Option<String>,
4867}
4868impl ElasticPoolPerDatabaseMinPerformanceLevelCapability {
4869    pub fn new() -> Self {
4870        Self::default()
4871    }
4872}
4873pub mod elastic_pool_per_database_min_performance_level_capability {
4874    use super::*;
4875    #[doc = "Unit type used to measure performance level."]
4876    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4877    #[serde(remote = "Unit")]
4878    pub enum Unit {
4879        #[serde(rename = "DTU")]
4880        Dtu,
4881        VCores,
4882        #[serde(skip_deserializing)]
4883        UnknownValue(String),
4884    }
4885    impl FromStr for Unit {
4886        type Err = value::Error;
4887        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4888            Self::deserialize(s.into_deserializer())
4889        }
4890    }
4891    impl<'de> Deserialize<'de> for Unit {
4892        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4893        where
4894            D: Deserializer<'de>,
4895        {
4896            let s = String::deserialize(deserializer)?;
4897            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4898            Ok(deserialized)
4899        }
4900    }
4901    impl Serialize for Unit {
4902        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4903        where
4904            S: Serializer,
4905        {
4906            match self {
4907                Self::Dtu => serializer.serialize_unit_variant("Unit", 0u32, "DTU"),
4908                Self::VCores => serializer.serialize_unit_variant("Unit", 1u32, "VCores"),
4909                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4910            }
4911        }
4912    }
4913    #[doc = "The status of the capability."]
4914    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4915    pub enum Status {
4916        Visible,
4917        Available,
4918        Default,
4919        Disabled,
4920    }
4921}
4922#[doc = "Per database settings of an elastic pool."]
4923#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4924pub struct ElasticPoolPerDatabaseSettings {
4925    #[doc = "The minimum capacity all databases are guaranteed."]
4926    #[serde(rename = "minCapacity", default, skip_serializing_if = "Option::is_none")]
4927    pub min_capacity: Option<f64>,
4928    #[doc = "The maximum capacity any one database can consume."]
4929    #[serde(rename = "maxCapacity", default, skip_serializing_if = "Option::is_none")]
4930    pub max_capacity: Option<f64>,
4931    #[doc = "Auto Pause Delay for per database within pool"]
4932    #[serde(rename = "autoPauseDelay", default, skip_serializing_if = "Option::is_none")]
4933    pub auto_pause_delay: Option<i32>,
4934}
4935impl ElasticPoolPerDatabaseSettings {
4936    pub fn new() -> Self {
4937        Self::default()
4938    }
4939}
4940#[doc = "The Elastic Pool performance level capability."]
4941#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4942pub struct ElasticPoolPerformanceLevelCapability {
4943    #[doc = "The performance level capability."]
4944    #[serde(rename = "performanceLevel", default, skip_serializing_if = "Option::is_none")]
4945    pub performance_level: Option<PerformanceLevelCapability>,
4946    #[doc = "An ARM Resource SKU."]
4947    #[serde(default, skip_serializing_if = "Option::is_none")]
4948    pub sku: Option<Sku>,
4949    #[doc = "List of supported license types."]
4950    #[serde(
4951        rename = "supportedLicenseTypes",
4952        default,
4953        deserialize_with = "azure_core::util::deserialize_null_as_default",
4954        skip_serializing_if = "Vec::is_empty"
4955    )]
4956    pub supported_license_types: Vec<LicenseTypeCapability>,
4957    #[doc = "The maximum number of databases supported."]
4958    #[serde(rename = "maxDatabaseCount", default, skip_serializing_if = "Option::is_none")]
4959    pub max_database_count: Option<i32>,
4960    #[doc = "The maximum size capability."]
4961    #[serde(rename = "includedMaxSize", default, skip_serializing_if = "Option::is_none")]
4962    pub included_max_size: Option<MaxSizeCapability>,
4963    #[doc = "The list of supported max sizes."]
4964    #[serde(
4965        rename = "supportedMaxSizes",
4966        default,
4967        deserialize_with = "azure_core::util::deserialize_null_as_default",
4968        skip_serializing_if = "Vec::is_empty"
4969    )]
4970    pub supported_max_sizes: Vec<MaxSizeRangeCapability>,
4971    #[doc = "The list of supported per database max sizes."]
4972    #[serde(
4973        rename = "supportedPerDatabaseMaxSizes",
4974        default,
4975        deserialize_with = "azure_core::util::deserialize_null_as_default",
4976        skip_serializing_if = "Vec::is_empty"
4977    )]
4978    pub supported_per_database_max_sizes: Vec<MaxSizeRangeCapability>,
4979    #[doc = "The list of supported per database max performance levels."]
4980    #[serde(
4981        rename = "supportedPerDatabaseMaxPerformanceLevels",
4982        default,
4983        deserialize_with = "azure_core::util::deserialize_null_as_default",
4984        skip_serializing_if = "Vec::is_empty"
4985    )]
4986    pub supported_per_database_max_performance_levels: Vec<ElasticPoolPerDatabaseMaxPerformanceLevelCapability>,
4987    #[doc = "Whether or not zone redundancy is supported for the performance level."]
4988    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
4989    pub zone_redundant: Option<bool>,
4990    #[doc = "List of supported maintenance configurations"]
4991    #[serde(
4992        rename = "supportedMaintenanceConfigurations",
4993        default,
4994        deserialize_with = "azure_core::util::deserialize_null_as_default",
4995        skip_serializing_if = "Vec::is_empty"
4996    )]
4997    pub supported_maintenance_configurations: Vec<MaintenanceConfigurationCapability>,
4998    #[doc = "List of supported min capacities"]
4999    #[serde(
5000        rename = "supportedMinCapacities",
5001        default,
5002        deserialize_with = "azure_core::util::deserialize_null_as_default",
5003        skip_serializing_if = "Vec::is_empty"
5004    )]
5005    pub supported_min_capacities: Vec<MinCapacityCapability>,
5006    #[doc = "Supported auto pause delay time range"]
5007    #[serde(rename = "supportedAutoPauseDelay", default, skip_serializing_if = "Option::is_none")]
5008    pub supported_auto_pause_delay: Option<AutoPauseDelayTimeRange>,
5009    #[doc = "Supported auto pause delay time range"]
5010    #[serde(rename = "supportedPerDatabaseAutoPauseDelay", default, skip_serializing_if = "Option::is_none")]
5011    pub supported_per_database_auto_pause_delay: Option<PerDatabaseAutoPauseDelayTimeRange>,
5012    #[doc = "List of supported availability zones"]
5013    #[serde(
5014        rename = "supportedZones",
5015        default,
5016        deserialize_with = "azure_core::util::deserialize_null_as_default",
5017        skip_serializing_if = "Vec::is_empty"
5018    )]
5019    pub supported_zones: Vec<ZonePinningCapability>,
5020    #[doc = "The status of the capability."]
5021    #[serde(default, skip_serializing_if = "Option::is_none")]
5022    pub status: Option<elastic_pool_performance_level_capability::Status>,
5023    #[doc = "The reason for the capability not being available."]
5024    #[serde(default, skip_serializing_if = "Option::is_none")]
5025    pub reason: Option<String>,
5026}
5027impl ElasticPoolPerformanceLevelCapability {
5028    pub fn new() -> Self {
5029        Self::default()
5030    }
5031}
5032pub mod elastic_pool_performance_level_capability {
5033    use super::*;
5034    #[doc = "The status of the capability."]
5035    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5036    pub enum Status {
5037        Visible,
5038        Available,
5039        Default,
5040        Disabled,
5041    }
5042}
5043#[doc = "Properties of an elastic pool"]
5044#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5045pub struct ElasticPoolProperties {
5046    #[doc = "The state of the elastic pool."]
5047    #[serde(default, skip_serializing_if = "Option::is_none")]
5048    pub state: Option<elastic_pool_properties::State>,
5049    #[doc = "The creation date of the elastic pool (ISO8601 format)."]
5050    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
5051    pub creation_date: Option<::time::OffsetDateTime>,
5052    #[doc = "The storage limit for the database elastic pool in bytes."]
5053    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
5054    pub max_size_bytes: Option<i64>,
5055    #[doc = "Minimal capacity that serverless pool will not shrink below, if not paused"]
5056    #[serde(rename = "minCapacity", default, skip_serializing_if = "Option::is_none")]
5057    pub min_capacity: Option<f64>,
5058    #[doc = "Per database settings of an elastic pool."]
5059    #[serde(rename = "perDatabaseSettings", default, skip_serializing_if = "Option::is_none")]
5060    pub per_database_settings: Option<ElasticPoolPerDatabaseSettings>,
5061    #[doc = "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones."]
5062    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
5063    pub zone_redundant: Option<bool>,
5064    #[doc = "The license type to apply for this elastic pool."]
5065    #[serde(rename = "licenseType", default, skip_serializing_if = "Option::is_none")]
5066    pub license_type: Option<elastic_pool_properties::LicenseType>,
5067    #[doc = "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur."]
5068    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
5069    pub maintenance_configuration_id: Option<String>,
5070    #[doc = "The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools."]
5071    #[serde(rename = "highAvailabilityReplicaCount", default, skip_serializing_if = "Option::is_none")]
5072    pub high_availability_replica_count: Option<i32>,
5073    #[doc = "Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled"]
5074    #[serde(rename = "autoPauseDelay", default, skip_serializing_if = "Option::is_none")]
5075    pub auto_pause_delay: Option<i32>,
5076    #[doc = "Type of enclave requested on the elastic pool."]
5077    #[serde(rename = "preferredEnclaveType", default, skip_serializing_if = "Option::is_none")]
5078    pub preferred_enclave_type: Option<elastic_pool_properties::PreferredEnclaveType>,
5079    #[doc = "Specifies the availability zone the pool's primary replica is pinned to."]
5080    #[serde(rename = "availabilityZone", default, skip_serializing_if = "Option::is_none")]
5081    pub availability_zone: Option<elastic_pool_properties::AvailabilityZone>,
5082}
5083impl ElasticPoolProperties {
5084    pub fn new() -> Self {
5085        Self::default()
5086    }
5087}
5088pub mod elastic_pool_properties {
5089    use super::*;
5090    #[doc = "The state of the elastic pool."]
5091    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5092    #[serde(remote = "State")]
5093    pub enum State {
5094        Creating,
5095        Ready,
5096        Disabled,
5097        #[serde(skip_deserializing)]
5098        UnknownValue(String),
5099    }
5100    impl FromStr for State {
5101        type Err = value::Error;
5102        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5103            Self::deserialize(s.into_deserializer())
5104        }
5105    }
5106    impl<'de> Deserialize<'de> for State {
5107        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5108        where
5109            D: Deserializer<'de>,
5110        {
5111            let s = String::deserialize(deserializer)?;
5112            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5113            Ok(deserialized)
5114        }
5115    }
5116    impl Serialize for State {
5117        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5118        where
5119            S: Serializer,
5120        {
5121            match self {
5122                Self::Creating => serializer.serialize_unit_variant("State", 0u32, "Creating"),
5123                Self::Ready => serializer.serialize_unit_variant("State", 1u32, "Ready"),
5124                Self::Disabled => serializer.serialize_unit_variant("State", 2u32, "Disabled"),
5125                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5126            }
5127        }
5128    }
5129    #[doc = "The license type to apply for this elastic pool."]
5130    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5131    #[serde(remote = "LicenseType")]
5132    pub enum LicenseType {
5133        LicenseIncluded,
5134        BasePrice,
5135        #[serde(skip_deserializing)]
5136        UnknownValue(String),
5137    }
5138    impl FromStr for LicenseType {
5139        type Err = value::Error;
5140        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5141            Self::deserialize(s.into_deserializer())
5142        }
5143    }
5144    impl<'de> Deserialize<'de> for LicenseType {
5145        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5146        where
5147            D: Deserializer<'de>,
5148        {
5149            let s = String::deserialize(deserializer)?;
5150            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5151            Ok(deserialized)
5152        }
5153    }
5154    impl Serialize for LicenseType {
5155        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5156        where
5157            S: Serializer,
5158        {
5159            match self {
5160                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
5161                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
5162                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5163            }
5164        }
5165    }
5166    #[doc = "Type of enclave requested on the elastic pool."]
5167    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5168    #[serde(remote = "PreferredEnclaveType")]
5169    pub enum PreferredEnclaveType {
5170        Default,
5171        #[serde(rename = "VBS")]
5172        Vbs,
5173        #[serde(skip_deserializing)]
5174        UnknownValue(String),
5175    }
5176    impl FromStr for PreferredEnclaveType {
5177        type Err = value::Error;
5178        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5179            Self::deserialize(s.into_deserializer())
5180        }
5181    }
5182    impl<'de> Deserialize<'de> for PreferredEnclaveType {
5183        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5184        where
5185            D: Deserializer<'de>,
5186        {
5187            let s = String::deserialize(deserializer)?;
5188            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5189            Ok(deserialized)
5190        }
5191    }
5192    impl Serialize for PreferredEnclaveType {
5193        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5194        where
5195            S: Serializer,
5196        {
5197            match self {
5198                Self::Default => serializer.serialize_unit_variant("PreferredEnclaveType", 0u32, "Default"),
5199                Self::Vbs => serializer.serialize_unit_variant("PreferredEnclaveType", 1u32, "VBS"),
5200                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5201            }
5202        }
5203    }
5204    #[doc = "Specifies the availability zone the pool's primary replica is pinned to."]
5205    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5206    #[serde(remote = "AvailabilityZone")]
5207    pub enum AvailabilityZone {
5208        NoPreference,
5209        #[serde(rename = "1")]
5210        N1,
5211        #[serde(rename = "2")]
5212        N2,
5213        #[serde(rename = "3")]
5214        N3,
5215        #[serde(skip_deserializing)]
5216        UnknownValue(String),
5217    }
5218    impl FromStr for AvailabilityZone {
5219        type Err = value::Error;
5220        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5221            Self::deserialize(s.into_deserializer())
5222        }
5223    }
5224    impl<'de> Deserialize<'de> for AvailabilityZone {
5225        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5226        where
5227            D: Deserializer<'de>,
5228        {
5229            let s = String::deserialize(deserializer)?;
5230            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5231            Ok(deserialized)
5232        }
5233    }
5234    impl Serialize for AvailabilityZone {
5235        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5236        where
5237            S: Serializer,
5238        {
5239            match self {
5240                Self::NoPreference => serializer.serialize_unit_variant("AvailabilityZone", 0u32, "NoPreference"),
5241                Self::N1 => serializer.serialize_unit_variant("AvailabilityZone", 1u32, "1"),
5242                Self::N2 => serializer.serialize_unit_variant("AvailabilityZone", 2u32, "2"),
5243                Self::N3 => serializer.serialize_unit_variant("AvailabilityZone", 3u32, "3"),
5244                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5245            }
5246        }
5247    }
5248}
5249#[doc = "An elastic pool update."]
5250#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5251pub struct ElasticPoolUpdate {
5252    #[doc = "An ARM Resource SKU."]
5253    #[serde(default, skip_serializing_if = "Option::is_none")]
5254    pub sku: Option<Sku>,
5255    #[doc = "Properties of an elastic pool"]
5256    #[serde(default, skip_serializing_if = "Option::is_none")]
5257    pub properties: Option<ElasticPoolUpdateProperties>,
5258    #[doc = "Resource tags."]
5259    #[serde(default, skip_serializing_if = "Option::is_none")]
5260    pub tags: Option<serde_json::Value>,
5261}
5262impl ElasticPoolUpdate {
5263    pub fn new() -> Self {
5264        Self::default()
5265    }
5266}
5267#[doc = "Properties of an elastic pool"]
5268#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5269pub struct ElasticPoolUpdateProperties {
5270    #[doc = "The storage limit for the database elastic pool in bytes."]
5271    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
5272    pub max_size_bytes: Option<i64>,
5273    #[doc = "Minimal capacity that serverless pool will not shrink below, if not paused"]
5274    #[serde(rename = "minCapacity", default, skip_serializing_if = "Option::is_none")]
5275    pub min_capacity: Option<f64>,
5276    #[doc = "Per database settings of an elastic pool."]
5277    #[serde(rename = "perDatabaseSettings", default, skip_serializing_if = "Option::is_none")]
5278    pub per_database_settings: Option<ElasticPoolPerDatabaseSettings>,
5279    #[doc = "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones."]
5280    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
5281    pub zone_redundant: Option<bool>,
5282    #[doc = "The license type to apply for this elastic pool."]
5283    #[serde(rename = "licenseType", default, skip_serializing_if = "Option::is_none")]
5284    pub license_type: Option<elastic_pool_update_properties::LicenseType>,
5285    #[doc = "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur."]
5286    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
5287    pub maintenance_configuration_id: Option<String>,
5288    #[doc = "The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools."]
5289    #[serde(rename = "highAvailabilityReplicaCount", default, skip_serializing_if = "Option::is_none")]
5290    pub high_availability_replica_count: Option<i32>,
5291    #[doc = "Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled"]
5292    #[serde(rename = "autoPauseDelay", default, skip_serializing_if = "Option::is_none")]
5293    pub auto_pause_delay: Option<i32>,
5294    #[doc = "Type of enclave requested on the elastic pool."]
5295    #[serde(rename = "preferredEnclaveType", default, skip_serializing_if = "Option::is_none")]
5296    pub preferred_enclave_type: Option<elastic_pool_update_properties::PreferredEnclaveType>,
5297    #[doc = "Specifies the availability zone the pool's primary replica is pinned to."]
5298    #[serde(rename = "availabilityZone", default, skip_serializing_if = "Option::is_none")]
5299    pub availability_zone: Option<elastic_pool_update_properties::AvailabilityZone>,
5300}
5301impl ElasticPoolUpdateProperties {
5302    pub fn new() -> Self {
5303        Self::default()
5304    }
5305}
5306pub mod elastic_pool_update_properties {
5307    use super::*;
5308    #[doc = "The license type to apply for this elastic pool."]
5309    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5310    #[serde(remote = "LicenseType")]
5311    pub enum LicenseType {
5312        LicenseIncluded,
5313        BasePrice,
5314        #[serde(skip_deserializing)]
5315        UnknownValue(String),
5316    }
5317    impl FromStr for LicenseType {
5318        type Err = value::Error;
5319        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5320            Self::deserialize(s.into_deserializer())
5321        }
5322    }
5323    impl<'de> Deserialize<'de> for LicenseType {
5324        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5325        where
5326            D: Deserializer<'de>,
5327        {
5328            let s = String::deserialize(deserializer)?;
5329            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5330            Ok(deserialized)
5331        }
5332    }
5333    impl Serialize for LicenseType {
5334        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5335        where
5336            S: Serializer,
5337        {
5338            match self {
5339                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
5340                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
5341                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5342            }
5343        }
5344    }
5345    #[doc = "Type of enclave requested on the elastic pool."]
5346    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5347    #[serde(remote = "PreferredEnclaveType")]
5348    pub enum PreferredEnclaveType {
5349        Default,
5350        #[serde(rename = "VBS")]
5351        Vbs,
5352        #[serde(skip_deserializing)]
5353        UnknownValue(String),
5354    }
5355    impl FromStr for PreferredEnclaveType {
5356        type Err = value::Error;
5357        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5358            Self::deserialize(s.into_deserializer())
5359        }
5360    }
5361    impl<'de> Deserialize<'de> for PreferredEnclaveType {
5362        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5363        where
5364            D: Deserializer<'de>,
5365        {
5366            let s = String::deserialize(deserializer)?;
5367            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5368            Ok(deserialized)
5369        }
5370    }
5371    impl Serialize for PreferredEnclaveType {
5372        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5373        where
5374            S: Serializer,
5375        {
5376            match self {
5377                Self::Default => serializer.serialize_unit_variant("PreferredEnclaveType", 0u32, "Default"),
5378                Self::Vbs => serializer.serialize_unit_variant("PreferredEnclaveType", 1u32, "VBS"),
5379                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5380            }
5381        }
5382    }
5383    #[doc = "Specifies the availability zone the pool's primary replica is pinned to."]
5384    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5385    #[serde(remote = "AvailabilityZone")]
5386    pub enum AvailabilityZone {
5387        NoPreference,
5388        #[serde(rename = "1")]
5389        N1,
5390        #[serde(rename = "2")]
5391        N2,
5392        #[serde(rename = "3")]
5393        N3,
5394        #[serde(skip_deserializing)]
5395        UnknownValue(String),
5396    }
5397    impl FromStr for AvailabilityZone {
5398        type Err = value::Error;
5399        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5400            Self::deserialize(s.into_deserializer())
5401        }
5402    }
5403    impl<'de> Deserialize<'de> for AvailabilityZone {
5404        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5405        where
5406            D: Deserializer<'de>,
5407        {
5408            let s = String::deserialize(deserializer)?;
5409            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5410            Ok(deserialized)
5411        }
5412    }
5413    impl Serialize for AvailabilityZone {
5414        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5415        where
5416            S: Serializer,
5417        {
5418            match self {
5419                Self::NoPreference => serializer.serialize_unit_variant("AvailabilityZone", 0u32, "NoPreference"),
5420                Self::N1 => serializer.serialize_unit_variant("AvailabilityZone", 1u32, "1"),
5421                Self::N2 => serializer.serialize_unit_variant("AvailabilityZone", 2u32, "2"),
5422                Self::N3 => serializer.serialize_unit_variant("AvailabilityZone", 3u32, "3"),
5423                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5424            }
5425        }
5426    }
5427}
5428#[doc = "The server encryption protector."]
5429#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5430pub struct EncryptionProtector {
5431    #[serde(flatten)]
5432    pub proxy_resource: ProxyResource,
5433    #[doc = "Kind of encryption protector. This is metadata used for the Azure portal experience."]
5434    #[serde(default, skip_serializing_if = "Option::is_none")]
5435    pub kind: Option<String>,
5436    #[doc = "Resource location."]
5437    #[serde(default, skip_serializing_if = "Option::is_none")]
5438    pub location: Option<String>,
5439    #[doc = "Properties for an encryption protector execution."]
5440    #[serde(default, skip_serializing_if = "Option::is_none")]
5441    pub properties: Option<EncryptionProtectorProperties>,
5442}
5443impl EncryptionProtector {
5444    pub fn new() -> Self {
5445        Self::default()
5446    }
5447}
5448#[doc = "A list of server encryption protectors."]
5449#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5450pub struct EncryptionProtectorListResult {
5451    #[doc = "Array of results."]
5452    #[serde(
5453        default,
5454        deserialize_with = "azure_core::util::deserialize_null_as_default",
5455        skip_serializing_if = "Vec::is_empty"
5456    )]
5457    pub value: Vec<EncryptionProtector>,
5458    #[doc = "Link to retrieve next page of results."]
5459    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5460    pub next_link: Option<String>,
5461}
5462impl azure_core::Continuable for EncryptionProtectorListResult {
5463    type Continuation = String;
5464    fn continuation(&self) -> Option<Self::Continuation> {
5465        self.next_link.clone().filter(|value| !value.is_empty())
5466    }
5467}
5468impl EncryptionProtectorListResult {
5469    pub fn new() -> Self {
5470        Self::default()
5471    }
5472}
5473#[doc = "Properties for an encryption protector execution."]
5474#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5475pub struct EncryptionProtectorProperties {
5476    #[doc = "Subregion of the encryption protector."]
5477    #[serde(default, skip_serializing_if = "Option::is_none")]
5478    pub subregion: Option<String>,
5479    #[doc = "The name of the server key."]
5480    #[serde(rename = "serverKeyName", default, skip_serializing_if = "Option::is_none")]
5481    pub server_key_name: Option<String>,
5482    #[doc = "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'."]
5483    #[serde(rename = "serverKeyType")]
5484    pub server_key_type: encryption_protector_properties::ServerKeyType,
5485    #[doc = "The URI of the server key."]
5486    #[serde(default, skip_serializing_if = "Option::is_none")]
5487    pub uri: Option<String>,
5488    #[doc = "Thumbprint of the server key."]
5489    #[serde(default, skip_serializing_if = "Option::is_none")]
5490    pub thumbprint: Option<String>,
5491    #[doc = "Key auto rotation opt-in flag. Either true or false."]
5492    #[serde(rename = "autoRotationEnabled", default, skip_serializing_if = "Option::is_none")]
5493    pub auto_rotation_enabled: Option<bool>,
5494}
5495impl EncryptionProtectorProperties {
5496    pub fn new(server_key_type: encryption_protector_properties::ServerKeyType) -> Self {
5497        Self {
5498            subregion: None,
5499            server_key_name: None,
5500            server_key_type,
5501            uri: None,
5502            thumbprint: None,
5503            auto_rotation_enabled: None,
5504        }
5505    }
5506}
5507pub mod encryption_protector_properties {
5508    use super::*;
5509    #[doc = "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'."]
5510    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5511    #[serde(remote = "ServerKeyType")]
5512    pub enum ServerKeyType {
5513        ServiceManaged,
5514        AzureKeyVault,
5515        #[serde(skip_deserializing)]
5516        UnknownValue(String),
5517    }
5518    impl FromStr for ServerKeyType {
5519        type Err = value::Error;
5520        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5521            Self::deserialize(s.into_deserializer())
5522        }
5523    }
5524    impl<'de> Deserialize<'de> for ServerKeyType {
5525        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5526        where
5527            D: Deserializer<'de>,
5528        {
5529            let s = String::deserialize(deserializer)?;
5530            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5531            Ok(deserialized)
5532        }
5533    }
5534    impl Serialize for ServerKeyType {
5535        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5536        where
5537            S: Serializer,
5538        {
5539            match self {
5540                Self::ServiceManaged => serializer.serialize_unit_variant("ServerKeyType", 0u32, "ServiceManaged"),
5541                Self::AzureKeyVault => serializer.serialize_unit_variant("ServerKeyType", 1u32, "AzureKeyVault"),
5542                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5543            }
5544        }
5545    }
5546}
5547#[doc = "Certificate used on an endpoint on the Managed Instance."]
5548#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5549pub struct EndpointCertificate {
5550    #[serde(flatten)]
5551    pub proxy_resource: ProxyResource,
5552    #[doc = "The properties of an endpoint certificate."]
5553    #[serde(default, skip_serializing_if = "Option::is_none")]
5554    pub properties: Option<EndpointCertificateProperties>,
5555}
5556impl EndpointCertificate {
5557    pub fn new() -> Self {
5558        Self::default()
5559    }
5560}
5561#[doc = "A list of endpoint certificates on the target instance."]
5562#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5563pub struct EndpointCertificateListResult {
5564    #[doc = "Array of results."]
5565    #[serde(
5566        default,
5567        deserialize_with = "azure_core::util::deserialize_null_as_default",
5568        skip_serializing_if = "Vec::is_empty"
5569    )]
5570    pub value: Vec<EndpointCertificate>,
5571    #[doc = "Link to retrieve next page of results."]
5572    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5573    pub next_link: Option<String>,
5574}
5575impl azure_core::Continuable for EndpointCertificateListResult {
5576    type Continuation = String;
5577    fn continuation(&self) -> Option<Self::Continuation> {
5578        self.next_link.clone().filter(|value| !value.is_empty())
5579    }
5580}
5581impl EndpointCertificateListResult {
5582    pub fn new() -> Self {
5583        Self::default()
5584    }
5585}
5586#[doc = "The properties of an endpoint certificate."]
5587#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5588pub struct EndpointCertificateProperties {
5589    #[doc = "The certificate public blob"]
5590    #[serde(rename = "publicBlob", default, skip_serializing_if = "Option::is_none")]
5591    pub public_blob: Option<String>,
5592}
5593impl EndpointCertificateProperties {
5594    pub fn new() -> Self {
5595        Self::default()
5596    }
5597}
5598#[doc = "A domain name that the managed instance service needs to communicate with, along with additional details."]
5599#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5600pub struct EndpointDependency {
5601    #[doc = "The domain name of the dependency."]
5602    #[serde(rename = "domainName", default, skip_serializing_if = "Option::is_none")]
5603    pub domain_name: Option<String>,
5604    #[doc = "The IP Addresses and Ports used when connecting to DomainName."]
5605    #[serde(
5606        rename = "endpointDetails",
5607        default,
5608        deserialize_with = "azure_core::util::deserialize_null_as_default",
5609        skip_serializing_if = "Vec::is_empty"
5610    )]
5611    pub endpoint_details: Vec<EndpointDetail>,
5612}
5613impl EndpointDependency {
5614    pub fn new() -> Self {
5615        Self::default()
5616    }
5617}
5618#[doc = "A domain name that the managed instance service needs to communicate with, along with additional details."]
5619#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5620pub struct EndpointDetail {
5621    #[doc = "The port an endpoint is connected to."]
5622    #[serde(default, skip_serializing_if = "Option::is_none")]
5623    pub port: Option<i32>,
5624}
5625impl EndpointDetail {
5626    pub fn new() -> Self {
5627        Self::default()
5628    }
5629}
5630#[doc = "The resource management error additional info."]
5631#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5632pub struct ErrorAdditionalInfo {
5633    #[doc = "The additional info type."]
5634    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5635    pub type_: Option<String>,
5636    #[doc = "The additional info."]
5637    #[serde(default, skip_serializing_if = "Option::is_none")]
5638    pub info: Option<serde_json::Value>,
5639}
5640impl ErrorAdditionalInfo {
5641    pub fn new() -> Self {
5642        Self::default()
5643    }
5644}
5645#[doc = "The error detail."]
5646#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5647pub struct ErrorDetail {
5648    #[doc = "The error code."]
5649    #[serde(default, skip_serializing_if = "Option::is_none")]
5650    pub code: Option<String>,
5651    #[doc = "The error message."]
5652    #[serde(default, skip_serializing_if = "Option::is_none")]
5653    pub message: Option<String>,
5654    #[doc = "The error target."]
5655    #[serde(default, skip_serializing_if = "Option::is_none")]
5656    pub target: Option<String>,
5657    #[doc = "The error details."]
5658    #[serde(
5659        default,
5660        deserialize_with = "azure_core::util::deserialize_null_as_default",
5661        skip_serializing_if = "Vec::is_empty"
5662    )]
5663    pub details: Vec<ErrorDetail>,
5664    #[doc = "The error additional info."]
5665    #[serde(
5666        rename = "additionalInfo",
5667        default,
5668        deserialize_with = "azure_core::util::deserialize_null_as_default",
5669        skip_serializing_if = "Vec::is_empty"
5670    )]
5671    pub additional_info: Vec<ErrorAdditionalInfo>,
5672}
5673impl ErrorDetail {
5674    pub fn new() -> Self {
5675        Self::default()
5676    }
5677}
5678#[doc = "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)."]
5679#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5680pub struct ErrorResponse {
5681    #[doc = "The error detail."]
5682    #[serde(default, skip_serializing_if = "Option::is_none")]
5683    pub error: Option<ErrorDetail>,
5684}
5685impl azure_core::Continuable for ErrorResponse {
5686    type Continuation = String;
5687    fn continuation(&self) -> Option<Self::Continuation> {
5688        None
5689    }
5690}
5691impl ErrorResponse {
5692    pub fn new() -> Self {
5693        Self::default()
5694    }
5695}
5696#[doc = "Contains the information necessary to perform export database operation."]
5697#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5698pub struct ExportDatabaseDefinition {
5699    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
5700    #[serde(rename = "storageKeyType")]
5701    pub storage_key_type: export_database_definition::StorageKeyType,
5702    #[doc = "Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
5703    #[serde(rename = "storageKey")]
5704    pub storage_key: String,
5705    #[doc = "Storage Uri."]
5706    #[serde(rename = "storageUri")]
5707    pub storage_uri: String,
5708    #[doc = "Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
5709    #[serde(rename = "administratorLogin")]
5710    pub administrator_login: String,
5711    #[doc = "Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified."]
5712    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
5713    pub administrator_login_password: Option<String>,
5714    #[doc = "Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity."]
5715    #[serde(rename = "authenticationType", default, skip_serializing_if = "Option::is_none")]
5716    pub authentication_type: Option<String>,
5717    #[doc = "Contains the ARM resources for which to create private endpoint connection."]
5718    #[serde(rename = "networkIsolation", default, skip_serializing_if = "Option::is_none")]
5719    pub network_isolation: Option<NetworkIsolationSettings>,
5720}
5721impl ExportDatabaseDefinition {
5722    pub fn new(
5723        storage_key_type: export_database_definition::StorageKeyType,
5724        storage_key: String,
5725        storage_uri: String,
5726        administrator_login: String,
5727    ) -> Self {
5728        Self {
5729            storage_key_type,
5730            storage_key,
5731            storage_uri,
5732            administrator_login,
5733            administrator_login_password: None,
5734            authentication_type: None,
5735            network_isolation: None,
5736        }
5737    }
5738}
5739pub mod export_database_definition {
5740    use super::*;
5741    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
5742    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5743    #[serde(remote = "StorageKeyType")]
5744    pub enum StorageKeyType {
5745        SharedAccessKey,
5746        StorageAccessKey,
5747        ManagedIdentity,
5748        #[serde(skip_deserializing)]
5749        UnknownValue(String),
5750    }
5751    impl FromStr for StorageKeyType {
5752        type Err = value::Error;
5753        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5754            Self::deserialize(s.into_deserializer())
5755        }
5756    }
5757    impl<'de> Deserialize<'de> for StorageKeyType {
5758        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5759        where
5760            D: Deserializer<'de>,
5761        {
5762            let s = String::deserialize(deserializer)?;
5763            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5764            Ok(deserialized)
5765        }
5766    }
5767    impl Serialize for StorageKeyType {
5768        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5769        where
5770            S: Serializer,
5771        {
5772            match self {
5773                Self::SharedAccessKey => serializer.serialize_unit_variant("StorageKeyType", 0u32, "SharedAccessKey"),
5774                Self::StorageAccessKey => serializer.serialize_unit_variant("StorageKeyType", 1u32, "StorageAccessKey"),
5775                Self::ManagedIdentity => serializer.serialize_unit_variant("StorageKeyType", 2u32, "ManagedIdentity"),
5776                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5777            }
5778        }
5779    }
5780}
5781#[doc = "An extended database blob auditing policy."]
5782#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5783pub struct ExtendedDatabaseBlobAuditingPolicy {
5784    #[serde(flatten)]
5785    pub proxy_resource: ProxyResource,
5786    #[doc = "Properties of an extended database blob auditing policy."]
5787    #[serde(default, skip_serializing_if = "Option::is_none")]
5788    pub properties: Option<ExtendedDatabaseBlobAuditingPolicyProperties>,
5789}
5790impl ExtendedDatabaseBlobAuditingPolicy {
5791    pub fn new() -> Self {
5792        Self::default()
5793    }
5794}
5795#[doc = "A list of database extended auditing settings."]
5796#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5797pub struct ExtendedDatabaseBlobAuditingPolicyListResult {
5798    #[doc = "Array of results."]
5799    #[serde(
5800        default,
5801        deserialize_with = "azure_core::util::deserialize_null_as_default",
5802        skip_serializing_if = "Vec::is_empty"
5803    )]
5804    pub value: Vec<ExtendedDatabaseBlobAuditingPolicy>,
5805    #[doc = "Link to retrieve next page of results."]
5806    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5807    pub next_link: Option<String>,
5808}
5809impl azure_core::Continuable for ExtendedDatabaseBlobAuditingPolicyListResult {
5810    type Continuation = String;
5811    fn continuation(&self) -> Option<Self::Continuation> {
5812        self.next_link.clone().filter(|value| !value.is_empty())
5813    }
5814}
5815impl ExtendedDatabaseBlobAuditingPolicyListResult {
5816    pub fn new() -> Self {
5817        Self::default()
5818    }
5819}
5820#[doc = "Properties of an extended database blob auditing policy."]
5821#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5822pub struct ExtendedDatabaseBlobAuditingPolicyProperties {
5823    #[doc = "Specifies condition of where clause when creating an audit."]
5824    #[serde(rename = "predicateExpression", default, skip_serializing_if = "Option::is_none")]
5825    pub predicate_expression: Option<String>,
5826    #[doc = "Specifies the number of days to keep in the audit logs in the storage account."]
5827    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
5828    pub retention_days: Option<i32>,
5829    #[doc = "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)"]
5830    #[serde(
5831        rename = "auditActionsAndGroups",
5832        default,
5833        deserialize_with = "azure_core::util::deserialize_null_as_default",
5834        skip_serializing_if = "Vec::is_empty"
5835    )]
5836    pub audit_actions_and_groups: Vec<String>,
5837    #[doc = "Specifies whether storageAccountAccessKey value is the storage's secondary key."]
5838    #[serde(rename = "isStorageSecondaryKeyInUse", default, skip_serializing_if = "Option::is_none")]
5839    pub is_storage_secondary_key_in_use: Option<bool>,
5840    #[doc = "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
5841    #[serde(rename = "isAzureMonitorTargetEnabled", default, skip_serializing_if = "Option::is_none")]
5842    pub is_azure_monitor_target_enabled: Option<bool>,
5843    #[doc = "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647."]
5844    #[serde(rename = "queueDelayMs", default, skip_serializing_if = "Option::is_none")]
5845    pub queue_delay_ms: Option<i32>,
5846    #[doc = "Specifies whether Managed Identity is used to access blob storage"]
5847    #[serde(rename = "isManagedIdentityInUse", default, skip_serializing_if = "Option::is_none")]
5848    pub is_managed_identity_in_use: Option<bool>,
5849    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
5850    pub state: extended_database_blob_auditing_policy_properties::State,
5851    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required."]
5852    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
5853    pub storage_endpoint: Option<String>,
5854    #[doc = "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)"]
5855    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
5856    pub storage_account_access_key: Option<String>,
5857    #[doc = "Specifies the blob storage subscription Id."]
5858    #[serde(rename = "storageAccountSubscriptionId", default, skip_serializing_if = "Option::is_none")]
5859    pub storage_account_subscription_id: Option<String>,
5860}
5861impl ExtendedDatabaseBlobAuditingPolicyProperties {
5862    pub fn new(state: extended_database_blob_auditing_policy_properties::State) -> Self {
5863        Self {
5864            predicate_expression: None,
5865            retention_days: None,
5866            audit_actions_and_groups: Vec::new(),
5867            is_storage_secondary_key_in_use: None,
5868            is_azure_monitor_target_enabled: None,
5869            queue_delay_ms: None,
5870            is_managed_identity_in_use: None,
5871            state,
5872            storage_endpoint: None,
5873            storage_account_access_key: None,
5874            storage_account_subscription_id: None,
5875        }
5876    }
5877}
5878pub mod extended_database_blob_auditing_policy_properties {
5879    use super::*;
5880    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
5881    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5882    pub enum State {
5883        Enabled,
5884        Disabled,
5885    }
5886}
5887#[doc = "An extended server blob auditing policy."]
5888#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5889pub struct ExtendedServerBlobAuditingPolicy {
5890    #[serde(flatten)]
5891    pub proxy_resource: ProxyResource,
5892    #[doc = "Properties of an extended server blob auditing policy."]
5893    #[serde(default, skip_serializing_if = "Option::is_none")]
5894    pub properties: Option<ExtendedServerBlobAuditingPolicyProperties>,
5895}
5896impl ExtendedServerBlobAuditingPolicy {
5897    pub fn new() -> Self {
5898        Self::default()
5899    }
5900}
5901#[doc = "A list of server extended auditing settings."]
5902#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5903pub struct ExtendedServerBlobAuditingPolicyListResult {
5904    #[doc = "Array of results."]
5905    #[serde(
5906        default,
5907        deserialize_with = "azure_core::util::deserialize_null_as_default",
5908        skip_serializing_if = "Vec::is_empty"
5909    )]
5910    pub value: Vec<ExtendedServerBlobAuditingPolicy>,
5911    #[doc = "Link to retrieve next page of results."]
5912    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5913    pub next_link: Option<String>,
5914}
5915impl azure_core::Continuable for ExtendedServerBlobAuditingPolicyListResult {
5916    type Continuation = String;
5917    fn continuation(&self) -> Option<Self::Continuation> {
5918        self.next_link.clone().filter(|value| !value.is_empty())
5919    }
5920}
5921impl ExtendedServerBlobAuditingPolicyListResult {
5922    pub fn new() -> Self {
5923        Self::default()
5924    }
5925}
5926#[doc = "Properties of an extended server blob auditing policy."]
5927#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5928pub struct ExtendedServerBlobAuditingPolicyProperties {
5929    #[doc = "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
5930    #[serde(rename = "isDevopsAuditEnabled", default, skip_serializing_if = "Option::is_none")]
5931    pub is_devops_audit_enabled: Option<bool>,
5932    #[doc = "Specifies condition of where clause when creating an audit."]
5933    #[serde(rename = "predicateExpression", default, skip_serializing_if = "Option::is_none")]
5934    pub predicate_expression: Option<String>,
5935    #[doc = "Specifies the number of days to keep in the audit logs in the storage account."]
5936    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
5937    pub retention_days: Option<i32>,
5938    #[doc = "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)"]
5939    #[serde(
5940        rename = "auditActionsAndGroups",
5941        default,
5942        deserialize_with = "azure_core::util::deserialize_null_as_default",
5943        skip_serializing_if = "Vec::is_empty"
5944    )]
5945    pub audit_actions_and_groups: Vec<String>,
5946    #[doc = "Specifies whether storageAccountAccessKey value is the storage's secondary key."]
5947    #[serde(rename = "isStorageSecondaryKeyInUse", default, skip_serializing_if = "Option::is_none")]
5948    pub is_storage_secondary_key_in_use: Option<bool>,
5949    #[doc = "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
5950    #[serde(rename = "isAzureMonitorTargetEnabled", default, skip_serializing_if = "Option::is_none")]
5951    pub is_azure_monitor_target_enabled: Option<bool>,
5952    #[doc = "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647."]
5953    #[serde(rename = "queueDelayMs", default, skip_serializing_if = "Option::is_none")]
5954    pub queue_delay_ms: Option<i32>,
5955    #[doc = "Specifies whether Managed Identity is used to access blob storage"]
5956    #[serde(rename = "isManagedIdentityInUse", default, skip_serializing_if = "Option::is_none")]
5957    pub is_managed_identity_in_use: Option<bool>,
5958    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
5959    pub state: extended_server_blob_auditing_policy_properties::State,
5960    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required."]
5961    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
5962    pub storage_endpoint: Option<String>,
5963    #[doc = "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)"]
5964    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
5965    pub storage_account_access_key: Option<String>,
5966    #[doc = "Specifies the blob storage subscription Id."]
5967    #[serde(rename = "storageAccountSubscriptionId", default, skip_serializing_if = "Option::is_none")]
5968    pub storage_account_subscription_id: Option<String>,
5969}
5970impl ExtendedServerBlobAuditingPolicyProperties {
5971    pub fn new(state: extended_server_blob_auditing_policy_properties::State) -> Self {
5972        Self {
5973            is_devops_audit_enabled: None,
5974            predicate_expression: None,
5975            retention_days: None,
5976            audit_actions_and_groups: Vec::new(),
5977            is_storage_secondary_key_in_use: None,
5978            is_azure_monitor_target_enabled: None,
5979            queue_delay_ms: None,
5980            is_managed_identity_in_use: None,
5981            state,
5982            storage_endpoint: None,
5983            storage_account_access_key: None,
5984            storage_account_subscription_id: None,
5985        }
5986    }
5987}
5988pub mod extended_server_blob_auditing_policy_properties {
5989    use super::*;
5990    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
5991    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5992    pub enum State {
5993        Enabled,
5994        Disabled,
5995    }
5996}
5997#[doc = "A failover group."]
5998#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5999pub struct FailoverGroup {
6000    #[serde(flatten)]
6001    pub proxy_resource: ProxyResource,
6002    #[doc = "Resource location."]
6003    #[serde(default, skip_serializing_if = "Option::is_none")]
6004    pub location: Option<String>,
6005    #[doc = "Resource tags."]
6006    #[serde(default, skip_serializing_if = "Option::is_none")]
6007    pub tags: Option<serde_json::Value>,
6008    #[doc = "Properties of a failover group."]
6009    #[serde(default, skip_serializing_if = "Option::is_none")]
6010    pub properties: Option<FailoverGroupProperties>,
6011}
6012impl FailoverGroup {
6013    pub fn new() -> Self {
6014        Self::default()
6015    }
6016}
6017#[doc = "A list of failover groups."]
6018#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6019pub struct FailoverGroupListResult {
6020    #[doc = "Array of results."]
6021    #[serde(
6022        default,
6023        deserialize_with = "azure_core::util::deserialize_null_as_default",
6024        skip_serializing_if = "Vec::is_empty"
6025    )]
6026    pub value: Vec<FailoverGroup>,
6027    #[doc = "Link to retrieve next page of results."]
6028    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6029    pub next_link: Option<String>,
6030}
6031impl azure_core::Continuable for FailoverGroupListResult {
6032    type Continuation = String;
6033    fn continuation(&self) -> Option<Self::Continuation> {
6034        self.next_link.clone().filter(|value| !value.is_empty())
6035    }
6036}
6037impl FailoverGroupListResult {
6038    pub fn new() -> Self {
6039        Self::default()
6040    }
6041}
6042#[doc = "Properties of a failover group."]
6043#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6044pub struct FailoverGroupProperties {
6045    #[doc = "Read-write endpoint of the failover group instance."]
6046    #[serde(rename = "readWriteEndpoint")]
6047    pub read_write_endpoint: FailoverGroupReadWriteEndpoint,
6048    #[doc = "Read-only endpoint of the failover group instance."]
6049    #[serde(rename = "readOnlyEndpoint", default, skip_serializing_if = "Option::is_none")]
6050    pub read_only_endpoint: Option<FailoverGroupReadOnlyEndpoint>,
6051    #[doc = "Local replication role of the failover group instance."]
6052    #[serde(rename = "replicationRole", default, skip_serializing_if = "Option::is_none")]
6053    pub replication_role: Option<failover_group_properties::ReplicationRole>,
6054    #[doc = "Replication state of the failover group instance."]
6055    #[serde(rename = "replicationState", default, skip_serializing_if = "Option::is_none")]
6056    pub replication_state: Option<String>,
6057    #[doc = "List of partner server information for the failover group."]
6058    #[serde(rename = "partnerServers")]
6059    pub partner_servers: Vec<PartnerInfo>,
6060    #[doc = "List of databases in the failover group."]
6061    #[serde(
6062        default,
6063        deserialize_with = "azure_core::util::deserialize_null_as_default",
6064        skip_serializing_if = "Vec::is_empty"
6065    )]
6066    pub databases: Vec<String>,
6067    #[doc = "Databases secondary type on partner server."]
6068    #[serde(rename = "secondaryType", default, skip_serializing_if = "Option::is_none")]
6069    pub secondary_type: Option<failover_group_properties::SecondaryType>,
6070}
6071impl FailoverGroupProperties {
6072    pub fn new(read_write_endpoint: FailoverGroupReadWriteEndpoint, partner_servers: Vec<PartnerInfo>) -> Self {
6073        Self {
6074            read_write_endpoint,
6075            read_only_endpoint: None,
6076            replication_role: None,
6077            replication_state: None,
6078            partner_servers,
6079            databases: Vec::new(),
6080            secondary_type: None,
6081        }
6082    }
6083}
6084pub mod failover_group_properties {
6085    use super::*;
6086    #[doc = "Local replication role of the failover group instance."]
6087    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6088    #[serde(remote = "ReplicationRole")]
6089    pub enum ReplicationRole {
6090        Primary,
6091        Secondary,
6092        #[serde(skip_deserializing)]
6093        UnknownValue(String),
6094    }
6095    impl FromStr for ReplicationRole {
6096        type Err = value::Error;
6097        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6098            Self::deserialize(s.into_deserializer())
6099        }
6100    }
6101    impl<'de> Deserialize<'de> for ReplicationRole {
6102        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6103        where
6104            D: Deserializer<'de>,
6105        {
6106            let s = String::deserialize(deserializer)?;
6107            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6108            Ok(deserialized)
6109        }
6110    }
6111    impl Serialize for ReplicationRole {
6112        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6113        where
6114            S: Serializer,
6115        {
6116            match self {
6117                Self::Primary => serializer.serialize_unit_variant("ReplicationRole", 0u32, "Primary"),
6118                Self::Secondary => serializer.serialize_unit_variant("ReplicationRole", 1u32, "Secondary"),
6119                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6120            }
6121        }
6122    }
6123    #[doc = "Databases secondary type on partner server."]
6124    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6125    #[serde(remote = "SecondaryType")]
6126    pub enum SecondaryType {
6127        Geo,
6128        Standby,
6129        #[serde(skip_deserializing)]
6130        UnknownValue(String),
6131    }
6132    impl FromStr for SecondaryType {
6133        type Err = value::Error;
6134        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6135            Self::deserialize(s.into_deserializer())
6136        }
6137    }
6138    impl<'de> Deserialize<'de> for SecondaryType {
6139        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6140        where
6141            D: Deserializer<'de>,
6142        {
6143            let s = String::deserialize(deserializer)?;
6144            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6145            Ok(deserialized)
6146        }
6147    }
6148    impl Serialize for SecondaryType {
6149        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6150        where
6151            S: Serializer,
6152        {
6153            match self {
6154                Self::Geo => serializer.serialize_unit_variant("SecondaryType", 0u32, "Geo"),
6155                Self::Standby => serializer.serialize_unit_variant("SecondaryType", 1u32, "Standby"),
6156                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6157            }
6158        }
6159    }
6160}
6161#[doc = "Read-only endpoint of the failover group instance."]
6162#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6163pub struct FailoverGroupReadOnlyEndpoint {
6164    #[doc = "Failover policy of the read-only endpoint for the failover group."]
6165    #[serde(rename = "failoverPolicy", default, skip_serializing_if = "Option::is_none")]
6166    pub failover_policy: Option<failover_group_read_only_endpoint::FailoverPolicy>,
6167    #[doc = "The target partner server where the read-only endpoint points to."]
6168    #[serde(rename = "targetServer", default, skip_serializing_if = "Option::is_none")]
6169    pub target_server: Option<String>,
6170}
6171impl FailoverGroupReadOnlyEndpoint {
6172    pub fn new() -> Self {
6173        Self::default()
6174    }
6175}
6176pub mod failover_group_read_only_endpoint {
6177    use super::*;
6178    #[doc = "Failover policy of the read-only endpoint for the failover group."]
6179    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6180    #[serde(remote = "FailoverPolicy")]
6181    pub enum FailoverPolicy {
6182        Disabled,
6183        Enabled,
6184        #[serde(skip_deserializing)]
6185        UnknownValue(String),
6186    }
6187    impl FromStr for FailoverPolicy {
6188        type Err = value::Error;
6189        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6190            Self::deserialize(s.into_deserializer())
6191        }
6192    }
6193    impl<'de> Deserialize<'de> for FailoverPolicy {
6194        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6195        where
6196            D: Deserializer<'de>,
6197        {
6198            let s = String::deserialize(deserializer)?;
6199            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6200            Ok(deserialized)
6201        }
6202    }
6203    impl Serialize for FailoverPolicy {
6204        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6205        where
6206            S: Serializer,
6207        {
6208            match self {
6209                Self::Disabled => serializer.serialize_unit_variant("FailoverPolicy", 0u32, "Disabled"),
6210                Self::Enabled => serializer.serialize_unit_variant("FailoverPolicy", 1u32, "Enabled"),
6211                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6212            }
6213        }
6214    }
6215}
6216#[doc = "Read-write endpoint of the failover group instance."]
6217#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6218pub struct FailoverGroupReadWriteEndpoint {
6219    #[doc = "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
6220    #[serde(rename = "failoverPolicy")]
6221    pub failover_policy: failover_group_read_write_endpoint::FailoverPolicy,
6222    #[doc = "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
6223    #[serde(
6224        rename = "failoverWithDataLossGracePeriodMinutes",
6225        default,
6226        skip_serializing_if = "Option::is_none"
6227    )]
6228    pub failover_with_data_loss_grace_period_minutes: Option<i32>,
6229}
6230impl FailoverGroupReadWriteEndpoint {
6231    pub fn new(failover_policy: failover_group_read_write_endpoint::FailoverPolicy) -> Self {
6232        Self {
6233            failover_policy,
6234            failover_with_data_loss_grace_period_minutes: None,
6235        }
6236    }
6237}
6238pub mod failover_group_read_write_endpoint {
6239    use super::*;
6240    #[doc = "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
6241    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6242    #[serde(remote = "FailoverPolicy")]
6243    pub enum FailoverPolicy {
6244        Manual,
6245        Automatic,
6246        #[serde(skip_deserializing)]
6247        UnknownValue(String),
6248    }
6249    impl FromStr for FailoverPolicy {
6250        type Err = value::Error;
6251        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6252            Self::deserialize(s.into_deserializer())
6253        }
6254    }
6255    impl<'de> Deserialize<'de> for FailoverPolicy {
6256        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6257        where
6258            D: Deserializer<'de>,
6259        {
6260            let s = String::deserialize(deserializer)?;
6261            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6262            Ok(deserialized)
6263        }
6264    }
6265    impl Serialize for FailoverPolicy {
6266        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6267        where
6268            S: Serializer,
6269        {
6270            match self {
6271                Self::Manual => serializer.serialize_unit_variant("FailoverPolicy", 0u32, "Manual"),
6272                Self::Automatic => serializer.serialize_unit_variant("FailoverPolicy", 1u32, "Automatic"),
6273                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6274            }
6275        }
6276    }
6277}
6278#[doc = "A failover group update request."]
6279#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6280pub struct FailoverGroupUpdate {
6281    #[doc = "Properties of a failover group update."]
6282    #[serde(default, skip_serializing_if = "Option::is_none")]
6283    pub properties: Option<FailoverGroupUpdateProperties>,
6284    #[doc = "Resource tags."]
6285    #[serde(default, skip_serializing_if = "Option::is_none")]
6286    pub tags: Option<serde_json::Value>,
6287}
6288impl FailoverGroupUpdate {
6289    pub fn new() -> Self {
6290        Self::default()
6291    }
6292}
6293#[doc = "Properties of a failover group update."]
6294#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6295pub struct FailoverGroupUpdateProperties {
6296    #[doc = "Read-write endpoint of the failover group instance."]
6297    #[serde(rename = "readWriteEndpoint", default, skip_serializing_if = "Option::is_none")]
6298    pub read_write_endpoint: Option<FailoverGroupReadWriteEndpoint>,
6299    #[doc = "Read-only endpoint of the failover group instance."]
6300    #[serde(rename = "readOnlyEndpoint", default, skip_serializing_if = "Option::is_none")]
6301    pub read_only_endpoint: Option<FailoverGroupReadOnlyEndpoint>,
6302    #[doc = "List of databases in the failover group."]
6303    #[serde(
6304        default,
6305        deserialize_with = "azure_core::util::deserialize_null_as_default",
6306        skip_serializing_if = "Vec::is_empty"
6307    )]
6308    pub databases: Vec<String>,
6309    #[doc = "List of partner server information for the failover group."]
6310    #[serde(
6311        rename = "partnerServers",
6312        default,
6313        deserialize_with = "azure_core::util::deserialize_null_as_default",
6314        skip_serializing_if = "Vec::is_empty"
6315    )]
6316    pub partner_servers: Vec<PartnerInfo>,
6317    #[doc = "Databases secondary type on partner server."]
6318    #[serde(rename = "secondaryType", default, skip_serializing_if = "Option::is_none")]
6319    pub secondary_type: Option<failover_group_update_properties::SecondaryType>,
6320}
6321impl FailoverGroupUpdateProperties {
6322    pub fn new() -> Self {
6323        Self::default()
6324    }
6325}
6326pub mod failover_group_update_properties {
6327    use super::*;
6328    #[doc = "Databases secondary type on partner server."]
6329    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6330    #[serde(remote = "SecondaryType")]
6331    pub enum SecondaryType {
6332        Geo,
6333        Standby,
6334        #[serde(skip_deserializing)]
6335        UnknownValue(String),
6336    }
6337    impl FromStr for SecondaryType {
6338        type Err = value::Error;
6339        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6340            Self::deserialize(s.into_deserializer())
6341        }
6342    }
6343    impl<'de> Deserialize<'de> for SecondaryType {
6344        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6345        where
6346            D: Deserializer<'de>,
6347        {
6348            let s = String::deserialize(deserializer)?;
6349            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6350            Ok(deserialized)
6351        }
6352    }
6353    impl Serialize for SecondaryType {
6354        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6355        where
6356            S: Serializer,
6357        {
6358            match self {
6359                Self::Geo => serializer.serialize_unit_variant("SecondaryType", 0u32, "Geo"),
6360                Self::Standby => serializer.serialize_unit_variant("SecondaryType", 1u32, "Standby"),
6361                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6362            }
6363        }
6364    }
6365}
6366#[doc = "A server firewall rule."]
6367#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6368pub struct FirewallRule {
6369    #[serde(flatten)]
6370    pub proxy_resource_with_writable_name: ProxyResourceWithWritableName,
6371    #[doc = "The properties of a server firewall rule."]
6372    #[serde(default, skip_serializing_if = "Option::is_none")]
6373    pub properties: Option<ServerFirewallRuleProperties>,
6374}
6375impl FirewallRule {
6376    pub fn new() -> Self {
6377        Self::default()
6378    }
6379}
6380#[doc = "A list of server firewall rules."]
6381#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6382pub struct FirewallRuleList {
6383    #[serde(
6384        default,
6385        deserialize_with = "azure_core::util::deserialize_null_as_default",
6386        skip_serializing_if = "Vec::is_empty"
6387    )]
6388    pub values: Vec<FirewallRule>,
6389}
6390impl FirewallRuleList {
6391    pub fn new() -> Self {
6392        Self::default()
6393    }
6394}
6395#[doc = "The response to a list firewall rules request"]
6396#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6397pub struct FirewallRuleListResult {
6398    #[doc = "Array of results."]
6399    #[serde(
6400        default,
6401        deserialize_with = "azure_core::util::deserialize_null_as_default",
6402        skip_serializing_if = "Vec::is_empty"
6403    )]
6404    pub value: Vec<FirewallRule>,
6405    #[doc = "Link to retrieve next page of results."]
6406    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6407    pub next_link: Option<String>,
6408}
6409impl azure_core::Continuable for FirewallRuleListResult {
6410    type Continuation = String;
6411    fn continuation(&self) -> Option<Self::Continuation> {
6412        self.next_link.clone().filter(|value| !value.is_empty())
6413    }
6414}
6415impl FirewallRuleListResult {
6416    pub fn new() -> Self {
6417        Self::default()
6418    }
6419}
6420#[doc = "Supported free limit exhaustion behavior options"]
6421#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6422pub struct FreeLimitExhaustionBehaviorCapability {
6423    #[doc = "Free limit exhaustion behavior type"]
6424    #[serde(rename = "exhaustionBehaviorType", default, skip_serializing_if = "Option::is_none")]
6425    pub exhaustion_behavior_type: Option<free_limit_exhaustion_behavior_capability::ExhaustionBehaviorType>,
6426    #[doc = "Free limit exhaustion behavior status"]
6427    #[serde(default, skip_serializing_if = "Option::is_none")]
6428    pub status: Option<free_limit_exhaustion_behavior_capability::Status>,
6429}
6430impl FreeLimitExhaustionBehaviorCapability {
6431    pub fn new() -> Self {
6432        Self::default()
6433    }
6434}
6435pub mod free_limit_exhaustion_behavior_capability {
6436    use super::*;
6437    #[doc = "Free limit exhaustion behavior type"]
6438    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6439    #[serde(remote = "ExhaustionBehaviorType")]
6440    pub enum ExhaustionBehaviorType {
6441        AutoPause,
6442        BillOverUsage,
6443        #[serde(skip_deserializing)]
6444        UnknownValue(String),
6445    }
6446    impl FromStr for ExhaustionBehaviorType {
6447        type Err = value::Error;
6448        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6449            Self::deserialize(s.into_deserializer())
6450        }
6451    }
6452    impl<'de> Deserialize<'de> for ExhaustionBehaviorType {
6453        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6454        where
6455            D: Deserializer<'de>,
6456        {
6457            let s = String::deserialize(deserializer)?;
6458            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6459            Ok(deserialized)
6460        }
6461    }
6462    impl Serialize for ExhaustionBehaviorType {
6463        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6464        where
6465            S: Serializer,
6466        {
6467            match self {
6468                Self::AutoPause => serializer.serialize_unit_variant("ExhaustionBehaviorType", 0u32, "AutoPause"),
6469                Self::BillOverUsage => serializer.serialize_unit_variant("ExhaustionBehaviorType", 1u32, "BillOverUsage"),
6470                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6471            }
6472        }
6473    }
6474    #[doc = "Free limit exhaustion behavior status"]
6475    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6476    pub enum Status {
6477        Visible,
6478        Available,
6479        Default,
6480        Disabled,
6481    }
6482}
6483#[doc = "A Geo backup policy."]
6484#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6485pub struct GeoBackupPolicy {
6486    #[serde(flatten)]
6487    pub proxy_resource: ProxyResource,
6488    #[doc = "Backup policy location."]
6489    #[serde(default, skip_serializing_if = "Option::is_none")]
6490    pub location: Option<String>,
6491    #[doc = "Kind of geo backup policy.  This is metadata used for the Azure portal experience."]
6492    #[serde(default, skip_serializing_if = "Option::is_none")]
6493    pub kind: Option<String>,
6494    #[doc = "The properties of the geo backup policy."]
6495    #[serde(default, skip_serializing_if = "Option::is_none")]
6496    pub properties: Option<GeoBackupPolicyProperties>,
6497}
6498impl GeoBackupPolicy {
6499    pub fn new() -> Self {
6500        Self::default()
6501    }
6502}
6503#[doc = "The list of geo backup policies."]
6504#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6505pub struct GeoBackupPolicyListResult {
6506    #[doc = "Array of results."]
6507    #[serde(
6508        default,
6509        deserialize_with = "azure_core::util::deserialize_null_as_default",
6510        skip_serializing_if = "Vec::is_empty"
6511    )]
6512    pub value: Vec<GeoBackupPolicy>,
6513    #[doc = "Link to retrieve next page of results."]
6514    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6515    pub next_link: Option<String>,
6516}
6517impl azure_core::Continuable for GeoBackupPolicyListResult {
6518    type Continuation = String;
6519    fn continuation(&self) -> Option<Self::Continuation> {
6520        self.next_link.clone().filter(|value| !value.is_empty())
6521    }
6522}
6523impl GeoBackupPolicyListResult {
6524    pub fn new() -> Self {
6525        Self::default()
6526    }
6527}
6528#[doc = "The properties of the geo backup policy."]
6529#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6530pub struct GeoBackupPolicyProperties {
6531    #[doc = "The state of the geo backup policy."]
6532    pub state: geo_backup_policy_properties::State,
6533    #[doc = "The storage type of the geo backup policy."]
6534    #[serde(rename = "storageType", default, skip_serializing_if = "Option::is_none")]
6535    pub storage_type: Option<String>,
6536}
6537impl GeoBackupPolicyProperties {
6538    pub fn new(state: geo_backup_policy_properties::State) -> Self {
6539        Self { state, storage_type: None }
6540    }
6541}
6542pub mod geo_backup_policy_properties {
6543    use super::*;
6544    #[doc = "The state of the geo backup policy."]
6545    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6546    pub enum State {
6547        Enabled,
6548        Disabled,
6549    }
6550}
6551#[doc = "An IPv6 server firewall rule."]
6552#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6553pub struct IPv6FirewallRule {
6554    #[serde(flatten)]
6555    pub proxy_resource_with_writable_name: ProxyResourceWithWritableName,
6556    #[doc = "The properties of an IPv6 server firewall rule."]
6557    #[serde(default, skip_serializing_if = "Option::is_none")]
6558    pub properties: Option<IPv6ServerFirewallRuleProperties>,
6559}
6560impl IPv6FirewallRule {
6561    pub fn new() -> Self {
6562        Self::default()
6563    }
6564}
6565#[doc = "The response to a list IPv6 firewall rules request"]
6566#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6567pub struct IPv6FirewallRuleListResult {
6568    #[doc = "Array of results."]
6569    #[serde(
6570        default,
6571        deserialize_with = "azure_core::util::deserialize_null_as_default",
6572        skip_serializing_if = "Vec::is_empty"
6573    )]
6574    pub value: Vec<IPv6FirewallRule>,
6575    #[doc = "Link to retrieve next page of results."]
6576    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6577    pub next_link: Option<String>,
6578}
6579impl azure_core::Continuable for IPv6FirewallRuleListResult {
6580    type Continuation = String;
6581    fn continuation(&self) -> Option<Self::Continuation> {
6582        self.next_link.clone().filter(|value| !value.is_empty())
6583    }
6584}
6585impl IPv6FirewallRuleListResult {
6586    pub fn new() -> Self {
6587        Self::default()
6588    }
6589}
6590#[doc = "The properties of an IPv6 server firewall rule."]
6591#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6592pub struct IPv6ServerFirewallRuleProperties {
6593    #[doc = "The start IP address of the firewall rule. Must be IPv6 format."]
6594    #[serde(rename = "startIPv6Address", default, skip_serializing_if = "Option::is_none")]
6595    pub start_i_pv6_address: Option<String>,
6596    #[doc = "The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address."]
6597    #[serde(rename = "endIPv6Address", default, skip_serializing_if = "Option::is_none")]
6598    pub end_i_pv6_address: Option<String>,
6599}
6600impl IPv6ServerFirewallRuleProperties {
6601    pub fn new() -> Self {
6602        Self::default()
6603    }
6604}
6605#[doc = "Contains the information necessary to perform import operation for existing database."]
6606#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6607pub struct ImportExistingDatabaseDefinition {
6608    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
6609    #[serde(rename = "storageKeyType")]
6610    pub storage_key_type: import_existing_database_definition::StorageKeyType,
6611    #[doc = "Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
6612    #[serde(rename = "storageKey")]
6613    pub storage_key: String,
6614    #[doc = "Storage Uri."]
6615    #[serde(rename = "storageUri")]
6616    pub storage_uri: String,
6617    #[doc = "Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
6618    #[serde(rename = "administratorLogin")]
6619    pub administrator_login: String,
6620    #[doc = "Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified."]
6621    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
6622    pub administrator_login_password: Option<String>,
6623    #[doc = "Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity."]
6624    #[serde(rename = "authenticationType", default, skip_serializing_if = "Option::is_none")]
6625    pub authentication_type: Option<String>,
6626    #[doc = "Contains the ARM resources for which to create private endpoint connection."]
6627    #[serde(rename = "networkIsolation", default, skip_serializing_if = "Option::is_none")]
6628    pub network_isolation: Option<NetworkIsolationSettings>,
6629}
6630impl ImportExistingDatabaseDefinition {
6631    pub fn new(
6632        storage_key_type: import_existing_database_definition::StorageKeyType,
6633        storage_key: String,
6634        storage_uri: String,
6635        administrator_login: String,
6636    ) -> Self {
6637        Self {
6638            storage_key_type,
6639            storage_key,
6640            storage_uri,
6641            administrator_login,
6642            administrator_login_password: None,
6643            authentication_type: None,
6644            network_isolation: None,
6645        }
6646    }
6647}
6648pub mod import_existing_database_definition {
6649    use super::*;
6650    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
6651    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6652    #[serde(remote = "StorageKeyType")]
6653    pub enum StorageKeyType {
6654        SharedAccessKey,
6655        StorageAccessKey,
6656        ManagedIdentity,
6657        #[serde(skip_deserializing)]
6658        UnknownValue(String),
6659    }
6660    impl FromStr for StorageKeyType {
6661        type Err = value::Error;
6662        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6663            Self::deserialize(s.into_deserializer())
6664        }
6665    }
6666    impl<'de> Deserialize<'de> for StorageKeyType {
6667        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6668        where
6669            D: Deserializer<'de>,
6670        {
6671            let s = String::deserialize(deserializer)?;
6672            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6673            Ok(deserialized)
6674        }
6675    }
6676    impl Serialize for StorageKeyType {
6677        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6678        where
6679            S: Serializer,
6680        {
6681            match self {
6682                Self::SharedAccessKey => serializer.serialize_unit_variant("StorageKeyType", 0u32, "SharedAccessKey"),
6683                Self::StorageAccessKey => serializer.serialize_unit_variant("StorageKeyType", 1u32, "StorageAccessKey"),
6684                Self::ManagedIdentity => serializer.serialize_unit_variant("StorageKeyType", 2u32, "ManagedIdentity"),
6685                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6686            }
6687        }
6688    }
6689}
6690#[doc = "Import export operation extensions list."]
6691#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6692pub struct ImportExportExtensionsOperationListResult {
6693    #[doc = "Array of results."]
6694    #[serde(
6695        default,
6696        deserialize_with = "azure_core::util::deserialize_null_as_default",
6697        skip_serializing_if = "Vec::is_empty"
6698    )]
6699    pub value: Vec<ImportExportExtensionsOperationResult>,
6700    #[doc = "Link to retrieve next page of results."]
6701    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6702    pub next_link: Option<String>,
6703}
6704impl azure_core::Continuable for ImportExportExtensionsOperationListResult {
6705    type Continuation = String;
6706    fn continuation(&self) -> Option<Self::Continuation> {
6707        self.next_link.clone().filter(|value| !value.is_empty())
6708    }
6709}
6710impl ImportExportExtensionsOperationListResult {
6711    pub fn new() -> Self {
6712        Self::default()
6713    }
6714}
6715#[doc = "An Extension operation result resource."]
6716#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6717pub struct ImportExportExtensionsOperationResult {
6718    #[serde(flatten)]
6719    pub proxy_resource: ProxyResource,
6720    #[doc = "Contains the operation result properties for import/export operation."]
6721    #[serde(default, skip_serializing_if = "Option::is_none")]
6722    pub properties: Option<ImportExportExtensionsOperationResultProperties>,
6723}
6724impl ImportExportExtensionsOperationResult {
6725    pub fn new() -> Self {
6726        Self::default()
6727    }
6728}
6729#[doc = "Contains the operation result properties for import/export operation."]
6730#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6731pub struct ImportExportExtensionsOperationResultProperties {
6732    #[doc = "Request Id."]
6733    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
6734    pub request_id: Option<String>,
6735    #[doc = "Request type."]
6736    #[serde(rename = "requestType", default, skip_serializing_if = "Option::is_none")]
6737    pub request_type: Option<String>,
6738    #[doc = "Last modified time."]
6739    #[serde(rename = "lastModifiedTime", default, skip_serializing_if = "Option::is_none")]
6740    pub last_modified_time: Option<String>,
6741    #[doc = "Server name."]
6742    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
6743    pub server_name: Option<String>,
6744    #[doc = "Database name."]
6745    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
6746    pub database_name: Option<String>,
6747    #[doc = "Operation status."]
6748    #[serde(default, skip_serializing_if = "Option::is_none")]
6749    pub status: Option<String>,
6750    #[doc = "Error message."]
6751    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
6752    pub error_message: Option<String>,
6753    #[doc = "Queued time."]
6754    #[serde(rename = "queuedTime", default, skip_serializing_if = "Option::is_none")]
6755    pub queued_time: Option<String>,
6756    #[doc = "Blob URI."]
6757    #[serde(rename = "blobUri", default, skip_serializing_if = "Option::is_none")]
6758    pub blob_uri: Option<String>,
6759    #[doc = "Gets the status of private endpoints associated with this request."]
6760    #[serde(
6761        rename = "privateEndpointConnections",
6762        default,
6763        deserialize_with = "azure_core::util::deserialize_null_as_default",
6764        skip_serializing_if = "Vec::is_empty"
6765    )]
6766    pub private_endpoint_connections: Vec<PrivateEndpointConnectionRequestStatus>,
6767}
6768impl ImportExportExtensionsOperationResultProperties {
6769    pub fn new() -> Self {
6770        Self::default()
6771    }
6772}
6773#[doc = "An ImportExport operation result resource."]
6774#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6775pub struct ImportExportOperationResult {
6776    #[serde(flatten)]
6777    pub proxy_resource: ProxyResource,
6778    #[doc = "Contains the operation result properties for import/export operation."]
6779    #[serde(default, skip_serializing_if = "Option::is_none")]
6780    pub properties: Option<ImportExportOperationResultProperties>,
6781}
6782impl ImportExportOperationResult {
6783    pub fn new() -> Self {
6784        Self::default()
6785    }
6786}
6787#[doc = "Contains the operation result properties for import/export operation."]
6788#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6789pub struct ImportExportOperationResultProperties {
6790    #[doc = "Request Id."]
6791    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
6792    pub request_id: Option<String>,
6793    #[doc = "Request type."]
6794    #[serde(rename = "requestType", default, skip_serializing_if = "Option::is_none")]
6795    pub request_type: Option<String>,
6796    #[doc = "Queued time."]
6797    #[serde(rename = "queuedTime", default, skip_serializing_if = "Option::is_none")]
6798    pub queued_time: Option<String>,
6799    #[doc = "Last modified time."]
6800    #[serde(rename = "lastModifiedTime", default, skip_serializing_if = "Option::is_none")]
6801    pub last_modified_time: Option<String>,
6802    #[doc = "Blob Uri."]
6803    #[serde(rename = "blobUri", default, skip_serializing_if = "Option::is_none")]
6804    pub blob_uri: Option<String>,
6805    #[doc = "Server name."]
6806    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
6807    pub server_name: Option<String>,
6808    #[doc = "Database name."]
6809    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
6810    pub database_name: Option<String>,
6811    #[doc = "Operation status."]
6812    #[serde(default, skip_serializing_if = "Option::is_none")]
6813    pub status: Option<String>,
6814    #[doc = "Error message."]
6815    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
6816    pub error_message: Option<String>,
6817    #[doc = "Gets the status of private endpoints associated with this request."]
6818    #[serde(
6819        rename = "privateEndpointConnections",
6820        default,
6821        deserialize_with = "azure_core::util::deserialize_null_as_default",
6822        skip_serializing_if = "Vec::is_empty"
6823    )]
6824    pub private_endpoint_connections: Vec<PrivateEndpointConnectionRequestStatus>,
6825}
6826impl ImportExportOperationResultProperties {
6827    pub fn new() -> Self {
6828        Self::default()
6829    }
6830}
6831#[doc = "Contains the information necessary to perform import operation for new database."]
6832#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6833pub struct ImportNewDatabaseDefinition {
6834    #[doc = "Name of the import database."]
6835    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
6836    pub database_name: Option<String>,
6837    #[doc = "Edition of the import database."]
6838    #[serde(default, skip_serializing_if = "Option::is_none")]
6839    pub edition: Option<String>,
6840    #[doc = "Service level objective name of the import database."]
6841    #[serde(rename = "serviceObjectiveName", default, skip_serializing_if = "Option::is_none")]
6842    pub service_objective_name: Option<String>,
6843    #[doc = "Max size in bytes for the import database."]
6844    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
6845    pub max_size_bytes: Option<String>,
6846    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
6847    #[serde(rename = "storageKeyType")]
6848    pub storage_key_type: import_new_database_definition::StorageKeyType,
6849    #[doc = "Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
6850    #[serde(rename = "storageKey")]
6851    pub storage_key: String,
6852    #[doc = "Storage Uri."]
6853    #[serde(rename = "storageUri")]
6854    pub storage_uri: String,
6855    #[doc = "Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID."]
6856    #[serde(rename = "administratorLogin")]
6857    pub administrator_login: String,
6858    #[doc = "Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified."]
6859    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
6860    pub administrator_login_password: Option<String>,
6861    #[doc = "Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity."]
6862    #[serde(rename = "authenticationType", default, skip_serializing_if = "Option::is_none")]
6863    pub authentication_type: Option<String>,
6864    #[doc = "Contains the ARM resources for which to create private endpoint connection."]
6865    #[serde(rename = "networkIsolation", default, skip_serializing_if = "Option::is_none")]
6866    pub network_isolation: Option<NetworkIsolationSettings>,
6867}
6868impl ImportNewDatabaseDefinition {
6869    pub fn new(
6870        storage_key_type: import_new_database_definition::StorageKeyType,
6871        storage_key: String,
6872        storage_uri: String,
6873        administrator_login: String,
6874    ) -> Self {
6875        Self {
6876            database_name: None,
6877            edition: None,
6878            service_objective_name: None,
6879            max_size_bytes: None,
6880            storage_key_type,
6881            storage_key,
6882            storage_uri,
6883            administrator_login,
6884            administrator_login_password: None,
6885            authentication_type: None,
6886            network_isolation: None,
6887        }
6888    }
6889}
6890pub mod import_new_database_definition {
6891    use super::*;
6892    #[doc = "Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity."]
6893    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6894    #[serde(remote = "StorageKeyType")]
6895    pub enum StorageKeyType {
6896        SharedAccessKey,
6897        StorageAccessKey,
6898        ManagedIdentity,
6899        #[serde(skip_deserializing)]
6900        UnknownValue(String),
6901    }
6902    impl FromStr for StorageKeyType {
6903        type Err = value::Error;
6904        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6905            Self::deserialize(s.into_deserializer())
6906        }
6907    }
6908    impl<'de> Deserialize<'de> for StorageKeyType {
6909        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6910        where
6911            D: Deserializer<'de>,
6912        {
6913            let s = String::deserialize(deserializer)?;
6914            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6915            Ok(deserialized)
6916        }
6917    }
6918    impl Serialize for StorageKeyType {
6919        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6920        where
6921            S: Serializer,
6922        {
6923            match self {
6924                Self::SharedAccessKey => serializer.serialize_unit_variant("StorageKeyType", 0u32, "SharedAccessKey"),
6925                Self::StorageAccessKey => serializer.serialize_unit_variant("StorageKeyType", 1u32, "StorageAccessKey"),
6926                Self::ManagedIdentity => serializer.serialize_unit_variant("StorageKeyType", 2u32, "ManagedIdentity"),
6927                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6928            }
6929        }
6930    }
6931}
6932#[doc = "An instance failover group."]
6933#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6934pub struct InstanceFailoverGroup {
6935    #[serde(flatten)]
6936    pub proxy_resource: ProxyResource,
6937    #[doc = "Properties of a instance failover group."]
6938    #[serde(default, skip_serializing_if = "Option::is_none")]
6939    pub properties: Option<InstanceFailoverGroupProperties>,
6940}
6941impl InstanceFailoverGroup {
6942    pub fn new() -> Self {
6943        Self::default()
6944    }
6945}
6946#[doc = "A list of instance failover groups."]
6947#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6948pub struct InstanceFailoverGroupListResult {
6949    #[doc = "Array of results."]
6950    #[serde(
6951        default,
6952        deserialize_with = "azure_core::util::deserialize_null_as_default",
6953        skip_serializing_if = "Vec::is_empty"
6954    )]
6955    pub value: Vec<InstanceFailoverGroup>,
6956    #[doc = "Link to retrieve next page of results."]
6957    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6958    pub next_link: Option<String>,
6959}
6960impl azure_core::Continuable for InstanceFailoverGroupListResult {
6961    type Continuation = String;
6962    fn continuation(&self) -> Option<Self::Continuation> {
6963        self.next_link.clone().filter(|value| !value.is_empty())
6964    }
6965}
6966impl InstanceFailoverGroupListResult {
6967    pub fn new() -> Self {
6968        Self::default()
6969    }
6970}
6971#[doc = "Properties of a instance failover group."]
6972#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6973pub struct InstanceFailoverGroupProperties {
6974    #[doc = "Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only."]
6975    #[serde(rename = "secondaryType", default, skip_serializing_if = "Option::is_none")]
6976    pub secondary_type: Option<instance_failover_group_properties::SecondaryType>,
6977    #[doc = "Read-write endpoint of the failover group instance."]
6978    #[serde(rename = "readWriteEndpoint")]
6979    pub read_write_endpoint: InstanceFailoverGroupReadWriteEndpoint,
6980    #[doc = "Read-only endpoint of the failover group instance."]
6981    #[serde(rename = "readOnlyEndpoint", default, skip_serializing_if = "Option::is_none")]
6982    pub read_only_endpoint: Option<InstanceFailoverGroupReadOnlyEndpoint>,
6983    #[doc = "Local replication role of the failover group instance."]
6984    #[serde(rename = "replicationRole", default, skip_serializing_if = "Option::is_none")]
6985    pub replication_role: Option<instance_failover_group_properties::ReplicationRole>,
6986    #[doc = "Replication state of the failover group instance."]
6987    #[serde(rename = "replicationState", default, skip_serializing_if = "Option::is_none")]
6988    pub replication_state: Option<String>,
6989    #[doc = "Partner region information for the failover group."]
6990    #[serde(rename = "partnerRegions")]
6991    pub partner_regions: Vec<PartnerRegionInfo>,
6992    #[doc = "List of managed instance pairs in the failover group."]
6993    #[serde(rename = "managedInstancePairs")]
6994    pub managed_instance_pairs: Vec<ManagedInstancePairInfo>,
6995}
6996impl InstanceFailoverGroupProperties {
6997    pub fn new(
6998        read_write_endpoint: InstanceFailoverGroupReadWriteEndpoint,
6999        partner_regions: Vec<PartnerRegionInfo>,
7000        managed_instance_pairs: Vec<ManagedInstancePairInfo>,
7001    ) -> Self {
7002        Self {
7003            secondary_type: None,
7004            read_write_endpoint,
7005            read_only_endpoint: None,
7006            replication_role: None,
7007            replication_state: None,
7008            partner_regions,
7009            managed_instance_pairs,
7010        }
7011    }
7012}
7013pub mod instance_failover_group_properties {
7014    use super::*;
7015    #[doc = "Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only."]
7016    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7017    #[serde(remote = "SecondaryType")]
7018    pub enum SecondaryType {
7019        Geo,
7020        Standby,
7021        #[serde(skip_deserializing)]
7022        UnknownValue(String),
7023    }
7024    impl FromStr for SecondaryType {
7025        type Err = value::Error;
7026        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7027            Self::deserialize(s.into_deserializer())
7028        }
7029    }
7030    impl<'de> Deserialize<'de> for SecondaryType {
7031        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7032        where
7033            D: Deserializer<'de>,
7034        {
7035            let s = String::deserialize(deserializer)?;
7036            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7037            Ok(deserialized)
7038        }
7039    }
7040    impl Serialize for SecondaryType {
7041        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7042        where
7043            S: Serializer,
7044        {
7045            match self {
7046                Self::Geo => serializer.serialize_unit_variant("SecondaryType", 0u32, "Geo"),
7047                Self::Standby => serializer.serialize_unit_variant("SecondaryType", 1u32, "Standby"),
7048                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7049            }
7050        }
7051    }
7052    #[doc = "Local replication role of the failover group instance."]
7053    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7054    #[serde(remote = "ReplicationRole")]
7055    pub enum ReplicationRole {
7056        Primary,
7057        Secondary,
7058        #[serde(skip_deserializing)]
7059        UnknownValue(String),
7060    }
7061    impl FromStr for ReplicationRole {
7062        type Err = value::Error;
7063        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7064            Self::deserialize(s.into_deserializer())
7065        }
7066    }
7067    impl<'de> Deserialize<'de> for ReplicationRole {
7068        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7069        where
7070            D: Deserializer<'de>,
7071        {
7072            let s = String::deserialize(deserializer)?;
7073            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7074            Ok(deserialized)
7075        }
7076    }
7077    impl Serialize for ReplicationRole {
7078        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7079        where
7080            S: Serializer,
7081        {
7082            match self {
7083                Self::Primary => serializer.serialize_unit_variant("ReplicationRole", 0u32, "Primary"),
7084                Self::Secondary => serializer.serialize_unit_variant("ReplicationRole", 1u32, "Secondary"),
7085                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7086            }
7087        }
7088    }
7089}
7090#[doc = "Read-only endpoint of the failover group instance."]
7091#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7092pub struct InstanceFailoverGroupReadOnlyEndpoint {
7093    #[doc = "Failover policy of the read-only endpoint for the failover group."]
7094    #[serde(rename = "failoverPolicy", default, skip_serializing_if = "Option::is_none")]
7095    pub failover_policy: Option<instance_failover_group_read_only_endpoint::FailoverPolicy>,
7096}
7097impl InstanceFailoverGroupReadOnlyEndpoint {
7098    pub fn new() -> Self {
7099        Self::default()
7100    }
7101}
7102pub mod instance_failover_group_read_only_endpoint {
7103    use super::*;
7104    #[doc = "Failover policy of the read-only endpoint for the failover group."]
7105    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7106    #[serde(remote = "FailoverPolicy")]
7107    pub enum FailoverPolicy {
7108        Disabled,
7109        Enabled,
7110        #[serde(skip_deserializing)]
7111        UnknownValue(String),
7112    }
7113    impl FromStr for FailoverPolicy {
7114        type Err = value::Error;
7115        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7116            Self::deserialize(s.into_deserializer())
7117        }
7118    }
7119    impl<'de> Deserialize<'de> for FailoverPolicy {
7120        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7121        where
7122            D: Deserializer<'de>,
7123        {
7124            let s = String::deserialize(deserializer)?;
7125            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7126            Ok(deserialized)
7127        }
7128    }
7129    impl Serialize for FailoverPolicy {
7130        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7131        where
7132            S: Serializer,
7133        {
7134            match self {
7135                Self::Disabled => serializer.serialize_unit_variant("FailoverPolicy", 0u32, "Disabled"),
7136                Self::Enabled => serializer.serialize_unit_variant("FailoverPolicy", 1u32, "Enabled"),
7137                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7138            }
7139        }
7140    }
7141}
7142#[doc = "Read-write endpoint of the failover group instance."]
7143#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7144pub struct InstanceFailoverGroupReadWriteEndpoint {
7145    #[doc = "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
7146    #[serde(rename = "failoverPolicy")]
7147    pub failover_policy: instance_failover_group_read_write_endpoint::FailoverPolicy,
7148    #[doc = "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
7149    #[serde(
7150        rename = "failoverWithDataLossGracePeriodMinutes",
7151        default,
7152        skip_serializing_if = "Option::is_none"
7153    )]
7154    pub failover_with_data_loss_grace_period_minutes: Option<i32>,
7155}
7156impl InstanceFailoverGroupReadWriteEndpoint {
7157    pub fn new(failover_policy: instance_failover_group_read_write_endpoint::FailoverPolicy) -> Self {
7158        Self {
7159            failover_policy,
7160            failover_with_data_loss_grace_period_minutes: None,
7161        }
7162    }
7163}
7164pub mod instance_failover_group_read_write_endpoint {
7165    use super::*;
7166    #[doc = "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required."]
7167    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7168    #[serde(remote = "FailoverPolicy")]
7169    pub enum FailoverPolicy {
7170        Manual,
7171        Automatic,
7172        #[serde(skip_deserializing)]
7173        UnknownValue(String),
7174    }
7175    impl FromStr for FailoverPolicy {
7176        type Err = value::Error;
7177        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7178            Self::deserialize(s.into_deserializer())
7179        }
7180    }
7181    impl<'de> Deserialize<'de> for FailoverPolicy {
7182        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7183        where
7184            D: Deserializer<'de>,
7185        {
7186            let s = String::deserialize(deserializer)?;
7187            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7188            Ok(deserialized)
7189        }
7190    }
7191    impl Serialize for FailoverPolicy {
7192        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7193        where
7194            S: Serializer,
7195        {
7196            match self {
7197                Self::Manual => serializer.serialize_unit_variant("FailoverPolicy", 0u32, "Manual"),
7198                Self::Automatic => serializer.serialize_unit_variant("FailoverPolicy", 1u32, "Automatic"),
7199                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7200            }
7201        }
7202    }
7203}
7204#[doc = "An Azure SQL instance pool."]
7205#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7206pub struct InstancePool {
7207    #[serde(flatten)]
7208    pub tracked_resource: TrackedResource,
7209    #[doc = "An ARM Resource SKU."]
7210    #[serde(default, skip_serializing_if = "Option::is_none")]
7211    pub sku: Option<Sku>,
7212    #[doc = "Properties of an instance pool."]
7213    #[serde(default, skip_serializing_if = "Option::is_none")]
7214    pub properties: Option<InstancePoolProperties>,
7215}
7216impl InstancePool {
7217    pub fn new(tracked_resource: TrackedResource) -> Self {
7218        Self {
7219            tracked_resource,
7220            sku: None,
7221            properties: None,
7222        }
7223    }
7224}
7225#[doc = "The instance pool capability"]
7226#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7227pub struct InstancePoolEditionCapability {
7228    #[doc = "The instance pool version name."]
7229    #[serde(default, skip_serializing_if = "Option::is_none")]
7230    pub name: Option<String>,
7231    #[doc = "The supported families."]
7232    #[serde(
7233        rename = "supportedFamilies",
7234        default,
7235        deserialize_with = "azure_core::util::deserialize_null_as_default",
7236        skip_serializing_if = "Vec::is_empty"
7237    )]
7238    pub supported_families: Vec<InstancePoolFamilyCapability>,
7239    #[doc = "The status of the capability."]
7240    #[serde(default, skip_serializing_if = "Option::is_none")]
7241    pub status: Option<instance_pool_edition_capability::Status>,
7242    #[doc = "The reason for the capability not being available."]
7243    #[serde(default, skip_serializing_if = "Option::is_none")]
7244    pub reason: Option<String>,
7245}
7246impl InstancePoolEditionCapability {
7247    pub fn new() -> Self {
7248        Self::default()
7249    }
7250}
7251pub mod instance_pool_edition_capability {
7252    use super::*;
7253    #[doc = "The status of the capability."]
7254    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7255    pub enum Status {
7256        Visible,
7257        Available,
7258        Default,
7259        Disabled,
7260    }
7261}
7262#[doc = "The instance pool family capability."]
7263#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7264pub struct InstancePoolFamilyCapability {
7265    #[doc = "Family name."]
7266    #[serde(default, skip_serializing_if = "Option::is_none")]
7267    pub name: Option<String>,
7268    #[doc = "List of supported license types."]
7269    #[serde(
7270        rename = "supportedLicenseTypes",
7271        default,
7272        deserialize_with = "azure_core::util::deserialize_null_as_default",
7273        skip_serializing_if = "Vec::is_empty"
7274    )]
7275    pub supported_license_types: Vec<LicenseTypeCapability>,
7276    #[doc = "List of supported virtual cores values."]
7277    #[serde(
7278        rename = "supportedVcoresValues",
7279        default,
7280        deserialize_with = "azure_core::util::deserialize_null_as_default",
7281        skip_serializing_if = "Vec::is_empty"
7282    )]
7283    pub supported_vcores_values: Vec<InstancePoolVcoresCapability>,
7284    #[doc = "The status of the capability."]
7285    #[serde(default, skip_serializing_if = "Option::is_none")]
7286    pub status: Option<instance_pool_family_capability::Status>,
7287    #[doc = "The reason for the capability not being available."]
7288    #[serde(default, skip_serializing_if = "Option::is_none")]
7289    pub reason: Option<String>,
7290}
7291impl InstancePoolFamilyCapability {
7292    pub fn new() -> Self {
7293        Self::default()
7294    }
7295}
7296pub mod instance_pool_family_capability {
7297    use super::*;
7298    #[doc = "The status of the capability."]
7299    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7300    pub enum Status {
7301        Visible,
7302        Available,
7303        Default,
7304        Disabled,
7305    }
7306}
7307#[doc = "A list of Azure SQL instance pools."]
7308#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7309pub struct InstancePoolListResult {
7310    #[doc = "Array of results."]
7311    #[serde(
7312        default,
7313        deserialize_with = "azure_core::util::deserialize_null_as_default",
7314        skip_serializing_if = "Vec::is_empty"
7315    )]
7316    pub value: Vec<InstancePool>,
7317    #[doc = "Link to retrieve next page of results."]
7318    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
7319    pub next_link: Option<String>,
7320}
7321impl azure_core::Continuable for InstancePoolListResult {
7322    type Continuation = String;
7323    fn continuation(&self) -> Option<Self::Continuation> {
7324        self.next_link.clone().filter(|value| !value.is_empty())
7325    }
7326}
7327impl InstancePoolListResult {
7328    pub fn new() -> Self {
7329        Self::default()
7330    }
7331}
7332#[doc = "A instance pool operation."]
7333#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7334pub struct InstancePoolOperation {
7335    #[serde(flatten)]
7336    pub proxy_resource: ProxyResource,
7337    #[doc = "The properties of a instance pool operation."]
7338    #[serde(default, skip_serializing_if = "Option::is_none")]
7339    pub properties: Option<InstancePoolOperationProperties>,
7340}
7341impl InstancePoolOperation {
7342    pub fn new() -> Self {
7343        Self::default()
7344    }
7345}
7346#[doc = "The response to a list instance pool operations request"]
7347#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7348pub struct InstancePoolOperationListResult {
7349    #[doc = "Array of results."]
7350    #[serde(
7351        default,
7352        deserialize_with = "azure_core::util::deserialize_null_as_default",
7353        skip_serializing_if = "Vec::is_empty"
7354    )]
7355    pub value: Vec<InstancePoolOperation>,
7356    #[doc = "Link to retrieve next page of results."]
7357    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
7358    pub next_link: Option<String>,
7359}
7360impl azure_core::Continuable for InstancePoolOperationListResult {
7361    type Continuation = String;
7362    fn continuation(&self) -> Option<Self::Continuation> {
7363        self.next_link.clone().filter(|value| !value.is_empty())
7364    }
7365}
7366impl InstancePoolOperationListResult {
7367    pub fn new() -> Self {
7368        Self::default()
7369    }
7370}
7371#[doc = "The properties of a instance pool operation."]
7372#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7373pub struct InstancePoolOperationProperties {
7374    #[doc = "The name of the instance pool the operation is being performed on."]
7375    #[serde(rename = "instancePoolName", default, skip_serializing_if = "Option::is_none")]
7376    pub instance_pool_name: Option<String>,
7377    #[doc = "The name of operation."]
7378    #[serde(default, skip_serializing_if = "Option::is_none")]
7379    pub operation: Option<String>,
7380    #[doc = "The friendly name of operation."]
7381    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
7382    pub operation_friendly_name: Option<String>,
7383    #[doc = "The percentage of the operation completed."]
7384    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
7385    pub percent_complete: Option<i32>,
7386    #[doc = "The operation start time."]
7387    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
7388    pub start_time: Option<::time::OffsetDateTime>,
7389    #[doc = "The operation state."]
7390    #[serde(default, skip_serializing_if = "Option::is_none")]
7391    pub state: Option<instance_pool_operation_properties::State>,
7392    #[doc = "The operation error code."]
7393    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
7394    pub error_code: Option<i32>,
7395    #[doc = "The operation error description."]
7396    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
7397    pub error_description: Option<String>,
7398    #[doc = "The operation error severity."]
7399    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
7400    pub error_severity: Option<i32>,
7401    #[doc = "Error type (e.g. None, User)."]
7402    #[serde(rename = "errorType", default, skip_serializing_if = "Option::is_none")]
7403    pub error_type: Option<instance_pool_operation_properties::ErrorType>,
7404    #[doc = "The estimated completion time of the operation."]
7405    #[serde(rename = "estimatedCompletionTime", default, with = "azure_core::date::rfc3339::option")]
7406    pub estimated_completion_time: Option<::time::OffsetDateTime>,
7407    #[doc = "The operation description."]
7408    #[serde(default, skip_serializing_if = "Option::is_none")]
7409    pub description: Option<String>,
7410    #[doc = "Whether the operation can be cancelled."]
7411    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
7412    pub is_cancellable: Option<bool>,
7413}
7414impl InstancePoolOperationProperties {
7415    pub fn new() -> Self {
7416        Self::default()
7417    }
7418}
7419pub mod instance_pool_operation_properties {
7420    use super::*;
7421    #[doc = "The operation state."]
7422    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7423    #[serde(remote = "State")]
7424    pub enum State {
7425        Pending,
7426        InProgress,
7427        Succeeded,
7428        Failed,
7429        CancelInProgress,
7430        Cancelled,
7431        #[serde(skip_deserializing)]
7432        UnknownValue(String),
7433    }
7434    impl FromStr for State {
7435        type Err = value::Error;
7436        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7437            Self::deserialize(s.into_deserializer())
7438        }
7439    }
7440    impl<'de> Deserialize<'de> for State {
7441        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7442        where
7443            D: Deserializer<'de>,
7444        {
7445            let s = String::deserialize(deserializer)?;
7446            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7447            Ok(deserialized)
7448        }
7449    }
7450    impl Serialize for State {
7451        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7452        where
7453            S: Serializer,
7454        {
7455            match self {
7456                Self::Pending => serializer.serialize_unit_variant("State", 0u32, "Pending"),
7457                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
7458                Self::Succeeded => serializer.serialize_unit_variant("State", 2u32, "Succeeded"),
7459                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
7460                Self::CancelInProgress => serializer.serialize_unit_variant("State", 4u32, "CancelInProgress"),
7461                Self::Cancelled => serializer.serialize_unit_variant("State", 5u32, "Cancelled"),
7462                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7463            }
7464        }
7465    }
7466    #[doc = "Error type (e.g. None, User)."]
7467    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7468    #[serde(remote = "ErrorType")]
7469    pub enum ErrorType {
7470        None,
7471        User,
7472        #[serde(skip_deserializing)]
7473        UnknownValue(String),
7474    }
7475    impl FromStr for ErrorType {
7476        type Err = value::Error;
7477        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7478            Self::deserialize(s.into_deserializer())
7479        }
7480    }
7481    impl<'de> Deserialize<'de> for ErrorType {
7482        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7483        where
7484            D: Deserializer<'de>,
7485        {
7486            let s = String::deserialize(deserializer)?;
7487            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7488            Ok(deserialized)
7489        }
7490    }
7491    impl Serialize for ErrorType {
7492        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7493        where
7494            S: Serializer,
7495        {
7496            match self {
7497                Self::None => serializer.serialize_unit_variant("ErrorType", 0u32, "None"),
7498                Self::User => serializer.serialize_unit_variant("ErrorType", 1u32, "User"),
7499                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7500            }
7501        }
7502    }
7503}
7504#[doc = "Properties of an instance pool."]
7505#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7506pub struct InstancePoolProperties {
7507    #[doc = "Resource ID of the subnet to place this instance pool in."]
7508    #[serde(rename = "subnetId")]
7509    pub subnet_id: String,
7510    #[doc = "Count of vCores belonging to this instance pool."]
7511    #[serde(rename = "vCores")]
7512    pub v_cores: i32,
7513    #[doc = "The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price)."]
7514    #[serde(rename = "licenseType")]
7515    pub license_type: instance_pool_properties::LicenseType,
7516    #[doc = "The Dns Zone that the managed instance pool is in."]
7517    #[serde(rename = "dnsZone", default, skip_serializing_if = "Option::is_none")]
7518    pub dns_zone: Option<String>,
7519    #[doc = "Specifies maintenance configuration id to apply to this managed instance."]
7520    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
7521    pub maintenance_configuration_id: Option<String>,
7522}
7523impl InstancePoolProperties {
7524    pub fn new(subnet_id: String, v_cores: i32, license_type: instance_pool_properties::LicenseType) -> Self {
7525        Self {
7526            subnet_id,
7527            v_cores,
7528            license_type,
7529            dns_zone: None,
7530            maintenance_configuration_id: None,
7531        }
7532    }
7533}
7534pub mod instance_pool_properties {
7535    use super::*;
7536    #[doc = "The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price)."]
7537    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7538    #[serde(remote = "LicenseType")]
7539    pub enum LicenseType {
7540        LicenseIncluded,
7541        BasePrice,
7542        #[serde(skip_deserializing)]
7543        UnknownValue(String),
7544    }
7545    impl FromStr for LicenseType {
7546        type Err = value::Error;
7547        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7548            Self::deserialize(s.into_deserializer())
7549        }
7550    }
7551    impl<'de> Deserialize<'de> for LicenseType {
7552        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7553        where
7554            D: Deserializer<'de>,
7555        {
7556            let s = String::deserialize(deserializer)?;
7557            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7558            Ok(deserialized)
7559        }
7560    }
7561    impl Serialize for LicenseType {
7562        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7563        where
7564            S: Serializer,
7565        {
7566            match self {
7567                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
7568                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
7569                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7570            }
7571        }
7572    }
7573}
7574#[doc = "An update to an Instance pool."]
7575#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7576pub struct InstancePoolUpdate {
7577    #[doc = "An ARM Resource SKU."]
7578    #[serde(default, skip_serializing_if = "Option::is_none")]
7579    pub sku: Option<Sku>,
7580    #[doc = "Properties of an instance pool."]
7581    #[serde(default, skip_serializing_if = "Option::is_none")]
7582    pub properties: Option<InstancePoolProperties>,
7583    #[doc = "Resource tags."]
7584    #[serde(default, skip_serializing_if = "Option::is_none")]
7585    pub tags: Option<serde_json::Value>,
7586}
7587impl InstancePoolUpdate {
7588    pub fn new() -> Self {
7589        Self::default()
7590    }
7591}
7592#[doc = "The managed instance virtual cores capability."]
7593#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7594pub struct InstancePoolVcoresCapability {
7595    #[doc = "The virtual cores identifier."]
7596    #[serde(default, skip_serializing_if = "Option::is_none")]
7597    pub name: Option<String>,
7598    #[doc = "The virtual cores value."]
7599    #[serde(default, skip_serializing_if = "Option::is_none")]
7600    pub value: Option<i32>,
7601    #[doc = "The maximum size capability."]
7602    #[serde(rename = "storageLimit", default, skip_serializing_if = "Option::is_none")]
7603    pub storage_limit: Option<MaxSizeCapability>,
7604    #[doc = "The status of the capability."]
7605    #[serde(default, skip_serializing_if = "Option::is_none")]
7606    pub status: Option<instance_pool_vcores_capability::Status>,
7607    #[doc = "The reason for the capability not being available."]
7608    #[serde(default, skip_serializing_if = "Option::is_none")]
7609    pub reason: Option<String>,
7610}
7611impl InstancePoolVcoresCapability {
7612    pub fn new() -> Self {
7613        Self::default()
7614    }
7615}
7616pub mod instance_pool_vcores_capability {
7617    use super::*;
7618    #[doc = "The status of the capability."]
7619    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7620    pub enum Status {
7621        Visible,
7622        Available,
7623        Default,
7624        Disabled,
7625    }
7626}
7627#[doc = "A job."]
7628#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7629pub struct Job {
7630    #[serde(flatten)]
7631    pub proxy_resource: ProxyResource,
7632    #[doc = "Properties of a job."]
7633    #[serde(default, skip_serializing_if = "Option::is_none")]
7634    pub properties: Option<JobProperties>,
7635}
7636impl Job {
7637    pub fn new() -> Self {
7638        Self::default()
7639    }
7640}
7641#[doc = "An Azure SQL job agent."]
7642#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7643pub struct JobAgent {
7644    #[serde(flatten)]
7645    pub tracked_resource: TrackedResource,
7646    #[doc = "An ARM Resource SKU."]
7647    #[serde(default, skip_serializing_if = "Option::is_none")]
7648    pub sku: Option<Sku>,
7649    #[doc = "Azure Active Directory identity configuration for a resource."]
7650    #[serde(default, skip_serializing_if = "Option::is_none")]
7651    pub identity: Option<JobAgentIdentity>,
7652    #[doc = "Properties of a job agent."]
7653    #[serde(default, skip_serializing_if = "Option::is_none")]
7654    pub properties: Option<JobAgentProperties>,
7655}
7656impl JobAgent {
7657    pub fn new(tracked_resource: TrackedResource) -> Self {
7658        Self {
7659            tracked_resource,
7660            sku: None,
7661            identity: None,
7662            properties: None,
7663        }
7664    }
7665}
7666#[doc = "The job agent edition capability."]
7667#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7668pub struct JobAgentEditionCapability {
7669    #[doc = "The job agent edition name."]
7670    #[serde(default, skip_serializing_if = "Option::is_none")]
7671    pub name: Option<String>,
7672    #[doc = "The list of supported service level objectives for the edition."]
7673    #[serde(
7674        rename = "supportedServiceLevelObjectives",
7675        default,
7676        deserialize_with = "azure_core::util::deserialize_null_as_default",
7677        skip_serializing_if = "Vec::is_empty"
7678    )]
7679    pub supported_service_level_objectives: Vec<JobAgentServiceLevelObjectiveCapability>,
7680    #[doc = "The status of the capability."]
7681    #[serde(default, skip_serializing_if = "Option::is_none")]
7682    pub status: Option<job_agent_edition_capability::Status>,
7683    #[doc = "The reason for the capability not being available."]
7684    #[serde(default, skip_serializing_if = "Option::is_none")]
7685    pub reason: Option<String>,
7686}
7687impl JobAgentEditionCapability {
7688    pub fn new() -> Self {
7689        Self::default()
7690    }
7691}
7692pub mod job_agent_edition_capability {
7693    use super::*;
7694    #[doc = "The status of the capability."]
7695    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7696    pub enum Status {
7697        Visible,
7698        Available,
7699        Default,
7700        Disabled,
7701    }
7702}
7703#[doc = "Azure Active Directory identity configuration for a resource."]
7704#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7705pub struct JobAgentIdentity {
7706    #[doc = "The job agent identity tenant id"]
7707    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
7708    pub tenant_id: Option<String>,
7709    #[doc = "The job agent identity type"]
7710    #[serde(rename = "type")]
7711    pub type_: job_agent_identity::Type,
7712    #[doc = "The resource ids of the user assigned identities to use"]
7713    #[serde(rename = "userAssignedIdentities", default, skip_serializing_if = "Option::is_none")]
7714    pub user_assigned_identities: Option<serde_json::Value>,
7715}
7716impl JobAgentIdentity {
7717    pub fn new(type_: job_agent_identity::Type) -> Self {
7718        Self {
7719            tenant_id: None,
7720            type_,
7721            user_assigned_identities: None,
7722        }
7723    }
7724}
7725pub mod job_agent_identity {
7726    use super::*;
7727    #[doc = "The job agent identity type"]
7728    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7729    #[serde(remote = "Type")]
7730    pub enum Type {
7731        None,
7732        SystemAssigned,
7733        UserAssigned,
7734        SystemAssignedUserAssigned,
7735        #[serde(skip_deserializing)]
7736        UnknownValue(String),
7737    }
7738    impl FromStr for Type {
7739        type Err = value::Error;
7740        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7741            Self::deserialize(s.into_deserializer())
7742        }
7743    }
7744    impl<'de> Deserialize<'de> for Type {
7745        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7746        where
7747            D: Deserializer<'de>,
7748        {
7749            let s = String::deserialize(deserializer)?;
7750            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7751            Ok(deserialized)
7752        }
7753    }
7754    impl Serialize for Type {
7755        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7756        where
7757            S: Serializer,
7758        {
7759            match self {
7760                Self::None => serializer.serialize_unit_variant("Type", 0u32, "None"),
7761                Self::SystemAssigned => serializer.serialize_unit_variant("Type", 1u32, "SystemAssigned"),
7762                Self::UserAssigned => serializer.serialize_unit_variant("Type", 2u32, "UserAssigned"),
7763                Self::SystemAssignedUserAssigned => serializer.serialize_unit_variant("Type", 3u32, "SystemAssignedUserAssigned"),
7764                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7765            }
7766        }
7767    }
7768}
7769#[doc = "A list of Azure SQL job agents."]
7770#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7771pub struct JobAgentListResult {
7772    #[doc = "Array of results."]
7773    #[serde(
7774        default,
7775        deserialize_with = "azure_core::util::deserialize_null_as_default",
7776        skip_serializing_if = "Vec::is_empty"
7777    )]
7778    pub value: Vec<JobAgent>,
7779    #[doc = "Link to retrieve next page of results."]
7780    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
7781    pub next_link: Option<String>,
7782}
7783impl azure_core::Continuable for JobAgentListResult {
7784    type Continuation = String;
7785    fn continuation(&self) -> Option<Self::Continuation> {
7786        self.next_link.clone().filter(|value| !value.is_empty())
7787    }
7788}
7789impl JobAgentListResult {
7790    pub fn new() -> Self {
7791        Self::default()
7792    }
7793}
7794#[doc = "Properties of a job agent."]
7795#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7796pub struct JobAgentProperties {
7797    #[doc = "Resource ID of the database to store job metadata in."]
7798    #[serde(rename = "databaseId")]
7799    pub database_id: String,
7800    #[doc = "The state of the job agent."]
7801    #[serde(default, skip_serializing_if = "Option::is_none")]
7802    pub state: Option<job_agent_properties::State>,
7803}
7804impl JobAgentProperties {
7805    pub fn new(database_id: String) -> Self {
7806        Self { database_id, state: None }
7807    }
7808}
7809pub mod job_agent_properties {
7810    use super::*;
7811    #[doc = "The state of the job agent."]
7812    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7813    #[serde(remote = "State")]
7814    pub enum State {
7815        Creating,
7816        Ready,
7817        Updating,
7818        Deleting,
7819        Disabled,
7820        #[serde(skip_deserializing)]
7821        UnknownValue(String),
7822    }
7823    impl FromStr for State {
7824        type Err = value::Error;
7825        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7826            Self::deserialize(s.into_deserializer())
7827        }
7828    }
7829    impl<'de> Deserialize<'de> for State {
7830        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7831        where
7832            D: Deserializer<'de>,
7833        {
7834            let s = String::deserialize(deserializer)?;
7835            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7836            Ok(deserialized)
7837        }
7838    }
7839    impl Serialize for State {
7840        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7841        where
7842            S: Serializer,
7843        {
7844            match self {
7845                Self::Creating => serializer.serialize_unit_variant("State", 0u32, "Creating"),
7846                Self::Ready => serializer.serialize_unit_variant("State", 1u32, "Ready"),
7847                Self::Updating => serializer.serialize_unit_variant("State", 2u32, "Updating"),
7848                Self::Deleting => serializer.serialize_unit_variant("State", 3u32, "Deleting"),
7849                Self::Disabled => serializer.serialize_unit_variant("State", 4u32, "Disabled"),
7850                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7851            }
7852        }
7853    }
7854}
7855#[doc = "The job agent service level objective capability."]
7856#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7857pub struct JobAgentServiceLevelObjectiveCapability {
7858    #[doc = "The service objective name."]
7859    #[serde(default, skip_serializing_if = "Option::is_none")]
7860    pub name: Option<String>,
7861    #[doc = "An ARM Resource SKU."]
7862    #[serde(default, skip_serializing_if = "Option::is_none")]
7863    pub sku: Option<Sku>,
7864    #[doc = "The status of the capability."]
7865    #[serde(default, skip_serializing_if = "Option::is_none")]
7866    pub status: Option<job_agent_service_level_objective_capability::Status>,
7867    #[doc = "The reason for the capability not being available."]
7868    #[serde(default, skip_serializing_if = "Option::is_none")]
7869    pub reason: Option<String>,
7870}
7871impl JobAgentServiceLevelObjectiveCapability {
7872    pub fn new() -> Self {
7873        Self::default()
7874    }
7875}
7876pub mod job_agent_service_level_objective_capability {
7877    use super::*;
7878    #[doc = "The status of the capability."]
7879    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7880    pub enum Status {
7881        Visible,
7882        Available,
7883        Default,
7884        Disabled,
7885    }
7886}
7887#[doc = "An update to an Azure SQL job agent."]
7888#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7889pub struct JobAgentUpdate {
7890    #[doc = "Azure Active Directory identity configuration for a resource."]
7891    #[serde(default, skip_serializing_if = "Option::is_none")]
7892    pub identity: Option<JobAgentIdentity>,
7893    #[doc = "An ARM Resource SKU."]
7894    #[serde(default, skip_serializing_if = "Option::is_none")]
7895    pub sku: Option<Sku>,
7896    #[doc = "Resource tags."]
7897    #[serde(default, skip_serializing_if = "Option::is_none")]
7898    pub tags: Option<serde_json::Value>,
7899}
7900impl JobAgentUpdate {
7901    pub fn new() -> Self {
7902        Self::default()
7903    }
7904}
7905#[doc = "Azure Active Directory identity configuration for a resource."]
7906#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7907pub struct JobAgentUserAssignedIdentity {
7908    #[doc = "The Azure Active Directory principal id."]
7909    #[serde(rename = "principalId", default, skip_serializing_if = "Option::is_none")]
7910    pub principal_id: Option<String>,
7911    #[doc = "The Azure Active Directory client id."]
7912    #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")]
7913    pub client_id: Option<String>,
7914}
7915impl JobAgentUserAssignedIdentity {
7916    pub fn new() -> Self {
7917        Self::default()
7918    }
7919}
7920#[doc = "The job agent version capability."]
7921#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7922pub struct JobAgentVersionCapability {
7923    #[doc = "The job agent version name."]
7924    #[serde(default, skip_serializing_if = "Option::is_none")]
7925    pub name: Option<String>,
7926    #[doc = "The list of supported editions."]
7927    #[serde(
7928        rename = "supportedEditions",
7929        default,
7930        deserialize_with = "azure_core::util::deserialize_null_as_default",
7931        skip_serializing_if = "Vec::is_empty"
7932    )]
7933    pub supported_editions: Vec<JobAgentEditionCapability>,
7934    #[doc = "The status of the capability."]
7935    #[serde(default, skip_serializing_if = "Option::is_none")]
7936    pub status: Option<job_agent_version_capability::Status>,
7937    #[doc = "The reason for the capability not being available."]
7938    #[serde(default, skip_serializing_if = "Option::is_none")]
7939    pub reason: Option<String>,
7940}
7941impl JobAgentVersionCapability {
7942    pub fn new() -> Self {
7943        Self::default()
7944    }
7945}
7946pub mod job_agent_version_capability {
7947    use super::*;
7948    #[doc = "The status of the capability."]
7949    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7950    pub enum Status {
7951        Visible,
7952        Available,
7953        Default,
7954        Disabled,
7955    }
7956}
7957#[doc = "A stored credential that can be used by a job to connect to target databases."]
7958#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7959pub struct JobCredential {
7960    #[serde(flatten)]
7961    pub proxy_resource: ProxyResource,
7962    #[doc = "Properties of a job credential."]
7963    #[serde(default, skip_serializing_if = "Option::is_none")]
7964    pub properties: Option<JobCredentialProperties>,
7965}
7966impl JobCredential {
7967    pub fn new() -> Self {
7968        Self::default()
7969    }
7970}
7971#[doc = "A list of job credentials."]
7972#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7973pub struct JobCredentialListResult {
7974    #[doc = "Array of results."]
7975    #[serde(
7976        default,
7977        deserialize_with = "azure_core::util::deserialize_null_as_default",
7978        skip_serializing_if = "Vec::is_empty"
7979    )]
7980    pub value: Vec<JobCredential>,
7981    #[doc = "Link to retrieve next page of results."]
7982    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
7983    pub next_link: Option<String>,
7984}
7985impl azure_core::Continuable for JobCredentialListResult {
7986    type Continuation = String;
7987    fn continuation(&self) -> Option<Self::Continuation> {
7988        self.next_link.clone().filter(|value| !value.is_empty())
7989    }
7990}
7991impl JobCredentialListResult {
7992    pub fn new() -> Self {
7993        Self::default()
7994    }
7995}
7996#[doc = "Properties of a job credential."]
7997#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7998pub struct JobCredentialProperties {
7999    #[doc = "The credential user name."]
8000    pub username: String,
8001    #[doc = "The credential password."]
8002    pub password: String,
8003}
8004impl JobCredentialProperties {
8005    pub fn new(username: String, password: String) -> Self {
8006        Self { username, password }
8007    }
8008}
8009#[doc = "An execution of a job"]
8010#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8011pub struct JobExecution {
8012    #[serde(flatten)]
8013    pub proxy_resource: ProxyResource,
8014    #[doc = "Properties for an Azure SQL Database Elastic job execution."]
8015    #[serde(default, skip_serializing_if = "Option::is_none")]
8016    pub properties: Option<JobExecutionProperties>,
8017}
8018impl JobExecution {
8019    pub fn new() -> Self {
8020        Self::default()
8021    }
8022}
8023#[doc = "A list of job executions."]
8024#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8025pub struct JobExecutionListResult {
8026    #[doc = "Array of results."]
8027    #[serde(
8028        default,
8029        deserialize_with = "azure_core::util::deserialize_null_as_default",
8030        skip_serializing_if = "Vec::is_empty"
8031    )]
8032    pub value: Vec<JobExecution>,
8033    #[doc = "Link to retrieve next page of results."]
8034    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8035    pub next_link: Option<String>,
8036}
8037impl azure_core::Continuable for JobExecutionListResult {
8038    type Continuation = String;
8039    fn continuation(&self) -> Option<Self::Continuation> {
8040        self.next_link.clone().filter(|value| !value.is_empty())
8041    }
8042}
8043impl JobExecutionListResult {
8044    pub fn new() -> Self {
8045        Self::default()
8046    }
8047}
8048#[doc = "Properties for an Azure SQL Database Elastic job execution."]
8049#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8050pub struct JobExecutionProperties {
8051    #[doc = "The job version number."]
8052    #[serde(rename = "jobVersion", default, skip_serializing_if = "Option::is_none")]
8053    pub job_version: Option<i32>,
8054    #[doc = "The job step name."]
8055    #[serde(rename = "stepName", default, skip_serializing_if = "Option::is_none")]
8056    pub step_name: Option<String>,
8057    #[doc = "The job step id."]
8058    #[serde(rename = "stepId", default, skip_serializing_if = "Option::is_none")]
8059    pub step_id: Option<i32>,
8060    #[doc = "The unique identifier of the job execution."]
8061    #[serde(rename = "jobExecutionId", default, skip_serializing_if = "Option::is_none")]
8062    pub job_execution_id: Option<String>,
8063    #[doc = "The detailed state of the job execution."]
8064    #[serde(default, skip_serializing_if = "Option::is_none")]
8065    pub lifecycle: Option<job_execution_properties::Lifecycle>,
8066    #[doc = "The ARM provisioning state of the job execution."]
8067    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
8068    pub provisioning_state: Option<job_execution_properties::ProvisioningState>,
8069    #[doc = "The time that the job execution was created."]
8070    #[serde(rename = "createTime", default, with = "azure_core::date::rfc3339::option")]
8071    pub create_time: Option<::time::OffsetDateTime>,
8072    #[doc = "The time that the job execution started."]
8073    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
8074    pub start_time: Option<::time::OffsetDateTime>,
8075    #[doc = "The time that the job execution completed."]
8076    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
8077    pub end_time: Option<::time::OffsetDateTime>,
8078    #[doc = "Number of times the job execution has been attempted."]
8079    #[serde(rename = "currentAttempts", default, skip_serializing_if = "Option::is_none")]
8080    pub current_attempts: Option<i32>,
8081    #[doc = "Start time of the current attempt."]
8082    #[serde(rename = "currentAttemptStartTime", default, with = "azure_core::date::rfc3339::option")]
8083    pub current_attempt_start_time: Option<::time::OffsetDateTime>,
8084    #[doc = "The last status or error message."]
8085    #[serde(rename = "lastMessage", default, skip_serializing_if = "Option::is_none")]
8086    pub last_message: Option<String>,
8087    #[doc = "The target that a job execution is executed on."]
8088    #[serde(default, skip_serializing_if = "Option::is_none")]
8089    pub target: Option<JobExecutionTarget>,
8090}
8091impl JobExecutionProperties {
8092    pub fn new() -> Self {
8093        Self::default()
8094    }
8095}
8096pub mod job_execution_properties {
8097    use super::*;
8098    #[doc = "The detailed state of the job execution."]
8099    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8100    #[serde(remote = "Lifecycle")]
8101    pub enum Lifecycle {
8102        Created,
8103        InProgress,
8104        WaitingForChildJobExecutions,
8105        WaitingForRetry,
8106        Succeeded,
8107        SucceededWithSkipped,
8108        Failed,
8109        TimedOut,
8110        Canceled,
8111        Skipped,
8112        #[serde(skip_deserializing)]
8113        UnknownValue(String),
8114    }
8115    impl FromStr for Lifecycle {
8116        type Err = value::Error;
8117        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8118            Self::deserialize(s.into_deserializer())
8119        }
8120    }
8121    impl<'de> Deserialize<'de> for Lifecycle {
8122        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8123        where
8124            D: Deserializer<'de>,
8125        {
8126            let s = String::deserialize(deserializer)?;
8127            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8128            Ok(deserialized)
8129        }
8130    }
8131    impl Serialize for Lifecycle {
8132        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8133        where
8134            S: Serializer,
8135        {
8136            match self {
8137                Self::Created => serializer.serialize_unit_variant("Lifecycle", 0u32, "Created"),
8138                Self::InProgress => serializer.serialize_unit_variant("Lifecycle", 1u32, "InProgress"),
8139                Self::WaitingForChildJobExecutions => serializer.serialize_unit_variant("Lifecycle", 2u32, "WaitingForChildJobExecutions"),
8140                Self::WaitingForRetry => serializer.serialize_unit_variant("Lifecycle", 3u32, "WaitingForRetry"),
8141                Self::Succeeded => serializer.serialize_unit_variant("Lifecycle", 4u32, "Succeeded"),
8142                Self::SucceededWithSkipped => serializer.serialize_unit_variant("Lifecycle", 5u32, "SucceededWithSkipped"),
8143                Self::Failed => serializer.serialize_unit_variant("Lifecycle", 6u32, "Failed"),
8144                Self::TimedOut => serializer.serialize_unit_variant("Lifecycle", 7u32, "TimedOut"),
8145                Self::Canceled => serializer.serialize_unit_variant("Lifecycle", 8u32, "Canceled"),
8146                Self::Skipped => serializer.serialize_unit_variant("Lifecycle", 9u32, "Skipped"),
8147                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8148            }
8149        }
8150    }
8151    #[doc = "The ARM provisioning state of the job execution."]
8152    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8153    #[serde(remote = "ProvisioningState")]
8154    pub enum ProvisioningState {
8155        Created,
8156        InProgress,
8157        Succeeded,
8158        Failed,
8159        Canceled,
8160        #[serde(skip_deserializing)]
8161        UnknownValue(String),
8162    }
8163    impl FromStr for ProvisioningState {
8164        type Err = value::Error;
8165        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8166            Self::deserialize(s.into_deserializer())
8167        }
8168    }
8169    impl<'de> Deserialize<'de> for ProvisioningState {
8170        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8171        where
8172            D: Deserializer<'de>,
8173        {
8174            let s = String::deserialize(deserializer)?;
8175            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8176            Ok(deserialized)
8177        }
8178    }
8179    impl Serialize for ProvisioningState {
8180        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8181        where
8182            S: Serializer,
8183        {
8184            match self {
8185                Self::Created => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Created"),
8186                Self::InProgress => serializer.serialize_unit_variant("ProvisioningState", 1u32, "InProgress"),
8187                Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
8188                Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
8189                Self::Canceled => serializer.serialize_unit_variant("ProvisioningState", 4u32, "Canceled"),
8190                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8191            }
8192        }
8193    }
8194}
8195#[doc = "The target that a job execution is executed on."]
8196#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8197pub struct JobExecutionTarget {
8198    #[doc = "The type of the target."]
8199    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8200    pub type_: Option<job_execution_target::Type>,
8201    #[doc = "The server name."]
8202    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
8203    pub server_name: Option<String>,
8204    #[doc = "The database name."]
8205    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
8206    pub database_name: Option<String>,
8207}
8208impl JobExecutionTarget {
8209    pub fn new() -> Self {
8210        Self::default()
8211    }
8212}
8213pub mod job_execution_target {
8214    use super::*;
8215    #[doc = "The type of the target."]
8216    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8217    #[serde(remote = "Type")]
8218    pub enum Type {
8219        TargetGroup,
8220        SqlDatabase,
8221        SqlElasticPool,
8222        SqlShardMap,
8223        SqlServer,
8224        #[serde(skip_deserializing)]
8225        UnknownValue(String),
8226    }
8227    impl FromStr for Type {
8228        type Err = value::Error;
8229        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8230            Self::deserialize(s.into_deserializer())
8231        }
8232    }
8233    impl<'de> Deserialize<'de> for Type {
8234        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8235        where
8236            D: Deserializer<'de>,
8237        {
8238            let s = String::deserialize(deserializer)?;
8239            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8240            Ok(deserialized)
8241        }
8242    }
8243    impl Serialize for Type {
8244        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8245        where
8246            S: Serializer,
8247        {
8248            match self {
8249                Self::TargetGroup => serializer.serialize_unit_variant("Type", 0u32, "TargetGroup"),
8250                Self::SqlDatabase => serializer.serialize_unit_variant("Type", 1u32, "SqlDatabase"),
8251                Self::SqlElasticPool => serializer.serialize_unit_variant("Type", 2u32, "SqlElasticPool"),
8252                Self::SqlShardMap => serializer.serialize_unit_variant("Type", 3u32, "SqlShardMap"),
8253                Self::SqlServer => serializer.serialize_unit_variant("Type", 4u32, "SqlServer"),
8254                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8255            }
8256        }
8257    }
8258}
8259#[doc = "A list of jobs."]
8260#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8261pub struct JobListResult {
8262    #[doc = "Array of results."]
8263    #[serde(
8264        default,
8265        deserialize_with = "azure_core::util::deserialize_null_as_default",
8266        skip_serializing_if = "Vec::is_empty"
8267    )]
8268    pub value: Vec<Job>,
8269    #[doc = "Link to retrieve next page of results."]
8270    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8271    pub next_link: Option<String>,
8272}
8273impl azure_core::Continuable for JobListResult {
8274    type Continuation = String;
8275    fn continuation(&self) -> Option<Self::Continuation> {
8276        self.next_link.clone().filter(|value| !value.is_empty())
8277    }
8278}
8279impl JobListResult {
8280    pub fn new() -> Self {
8281        Self::default()
8282    }
8283}
8284#[doc = "A job agent private endpoint."]
8285#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8286pub struct JobPrivateEndpoint {
8287    #[serde(flatten)]
8288    pub proxy_resource: ProxyResource,
8289    #[doc = "Properties of job agent private endpoint."]
8290    #[serde(default, skip_serializing_if = "Option::is_none")]
8291    pub properties: Option<JobPrivateEndpointProperties>,
8292}
8293impl JobPrivateEndpoint {
8294    pub fn new() -> Self {
8295        Self::default()
8296    }
8297}
8298#[doc = "A list of job agent private endpoints."]
8299#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8300pub struct JobPrivateEndpointListResult {
8301    #[doc = "Array of results."]
8302    #[serde(
8303        default,
8304        deserialize_with = "azure_core::util::deserialize_null_as_default",
8305        skip_serializing_if = "Vec::is_empty"
8306    )]
8307    pub value: Vec<JobPrivateEndpoint>,
8308    #[doc = "Link to retrieve next page of results."]
8309    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8310    pub next_link: Option<String>,
8311}
8312impl azure_core::Continuable for JobPrivateEndpointListResult {
8313    type Continuation = String;
8314    fn continuation(&self) -> Option<Self::Continuation> {
8315        self.next_link.clone().filter(|value| !value.is_empty())
8316    }
8317}
8318impl JobPrivateEndpointListResult {
8319    pub fn new() -> Self {
8320        Self::default()
8321    }
8322}
8323#[doc = "Properties of job agent private endpoint."]
8324#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8325pub struct JobPrivateEndpointProperties {
8326    #[doc = "ARM resource id of the server the private endpoint will target."]
8327    #[serde(rename = "targetServerAzureResourceId")]
8328    pub target_server_azure_resource_id: String,
8329    #[doc = "Private endpoint id of the private endpoint."]
8330    #[serde(rename = "privateEndpointId", default, skip_serializing_if = "Option::is_none")]
8331    pub private_endpoint_id: Option<String>,
8332}
8333impl JobPrivateEndpointProperties {
8334    pub fn new(target_server_azure_resource_id: String) -> Self {
8335        Self {
8336            target_server_azure_resource_id,
8337            private_endpoint_id: None,
8338        }
8339    }
8340}
8341#[doc = "Properties of a job."]
8342#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8343pub struct JobProperties {
8344    #[doc = "User-defined description of the job."]
8345    #[serde(default, skip_serializing_if = "Option::is_none")]
8346    pub description: Option<String>,
8347    #[doc = "The job version number."]
8348    #[serde(default, skip_serializing_if = "Option::is_none")]
8349    pub version: Option<i32>,
8350    #[doc = "Scheduling properties of a job."]
8351    #[serde(default, skip_serializing_if = "Option::is_none")]
8352    pub schedule: Option<JobSchedule>,
8353}
8354impl JobProperties {
8355    pub fn new() -> Self {
8356        Self::default()
8357    }
8358}
8359#[doc = "Scheduling properties of a job."]
8360#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8361pub struct JobSchedule {
8362    #[doc = "Schedule start time."]
8363    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
8364    pub start_time: Option<::time::OffsetDateTime>,
8365    #[doc = "Schedule end time."]
8366    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
8367    pub end_time: Option<::time::OffsetDateTime>,
8368    #[doc = "Schedule interval type"]
8369    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8370    pub type_: Option<job_schedule::Type>,
8371    #[doc = "Whether or not the schedule is enabled."]
8372    #[serde(default, skip_serializing_if = "Option::is_none")]
8373    pub enabled: Option<bool>,
8374    #[doc = "Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format."]
8375    #[serde(default, skip_serializing_if = "Option::is_none")]
8376    pub interval: Option<String>,
8377}
8378impl JobSchedule {
8379    pub fn new() -> Self {
8380        Self::default()
8381    }
8382}
8383pub mod job_schedule {
8384    use super::*;
8385    #[doc = "Schedule interval type"]
8386    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8387    pub enum Type {
8388        Once,
8389        Recurring,
8390    }
8391    impl Default for Type {
8392        fn default() -> Self {
8393            Self::Once
8394        }
8395    }
8396}
8397#[doc = "A job step."]
8398#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8399pub struct JobStep {
8400    #[serde(flatten)]
8401    pub proxy_resource: ProxyResource,
8402    #[doc = "Properties of a job step."]
8403    #[serde(default, skip_serializing_if = "Option::is_none")]
8404    pub properties: Option<JobStepProperties>,
8405}
8406impl JobStep {
8407    pub fn new() -> Self {
8408        Self::default()
8409    }
8410}
8411#[doc = "The action to be executed by a job step."]
8412#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8413pub struct JobStepAction {
8414    #[doc = "Type of action being executed by the job step."]
8415    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8416    pub type_: Option<job_step_action::Type>,
8417    #[doc = "The source of the action to execute."]
8418    #[serde(default, skip_serializing_if = "Option::is_none")]
8419    pub source: Option<job_step_action::Source>,
8420    #[doc = "The action value, for example the text of the T-SQL script to execute."]
8421    pub value: String,
8422}
8423impl JobStepAction {
8424    pub fn new(value: String) -> Self {
8425        Self {
8426            type_: None,
8427            source: None,
8428            value,
8429        }
8430    }
8431}
8432pub mod job_step_action {
8433    use super::*;
8434    #[doc = "Type of action being executed by the job step."]
8435    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8436    #[serde(remote = "Type")]
8437    pub enum Type {
8438        TSql,
8439        #[serde(skip_deserializing)]
8440        UnknownValue(String),
8441    }
8442    impl FromStr for Type {
8443        type Err = value::Error;
8444        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8445            Self::deserialize(s.into_deserializer())
8446        }
8447    }
8448    impl<'de> Deserialize<'de> for Type {
8449        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8450        where
8451            D: Deserializer<'de>,
8452        {
8453            let s = String::deserialize(deserializer)?;
8454            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8455            Ok(deserialized)
8456        }
8457    }
8458    impl Serialize for Type {
8459        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8460        where
8461            S: Serializer,
8462        {
8463            match self {
8464                Self::TSql => serializer.serialize_unit_variant("Type", 0u32, "TSql"),
8465                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8466            }
8467        }
8468    }
8469    impl Default for Type {
8470        fn default() -> Self {
8471            Self::TSql
8472        }
8473    }
8474    #[doc = "The source of the action to execute."]
8475    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8476    #[serde(remote = "Source")]
8477    pub enum Source {
8478        Inline,
8479        #[serde(skip_deserializing)]
8480        UnknownValue(String),
8481    }
8482    impl FromStr for Source {
8483        type Err = value::Error;
8484        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8485            Self::deserialize(s.into_deserializer())
8486        }
8487    }
8488    impl<'de> Deserialize<'de> for Source {
8489        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8490        where
8491            D: Deserializer<'de>,
8492        {
8493            let s = String::deserialize(deserializer)?;
8494            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8495            Ok(deserialized)
8496        }
8497    }
8498    impl Serialize for Source {
8499        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8500        where
8501            S: Serializer,
8502        {
8503            match self {
8504                Self::Inline => serializer.serialize_unit_variant("Source", 0u32, "Inline"),
8505                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8506            }
8507        }
8508    }
8509    impl Default for Source {
8510        fn default() -> Self {
8511            Self::Inline
8512        }
8513    }
8514}
8515#[doc = "The execution options of a job step."]
8516#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8517pub struct JobStepExecutionOptions {
8518    #[doc = "Execution timeout for the job step."]
8519    #[serde(rename = "timeoutSeconds", default, skip_serializing_if = "Option::is_none")]
8520    pub timeout_seconds: Option<i32>,
8521    #[doc = "Maximum number of times the job step will be reattempted if the first attempt fails."]
8522    #[serde(rename = "retryAttempts", default, skip_serializing_if = "Option::is_none")]
8523    pub retry_attempts: Option<i32>,
8524    #[doc = "Initial delay between retries for job step execution."]
8525    #[serde(rename = "initialRetryIntervalSeconds", default, skip_serializing_if = "Option::is_none")]
8526    pub initial_retry_interval_seconds: Option<i32>,
8527    #[doc = "The maximum amount of time to wait between retries for job step execution."]
8528    #[serde(rename = "maximumRetryIntervalSeconds", default, skip_serializing_if = "Option::is_none")]
8529    pub maximum_retry_interval_seconds: Option<i32>,
8530    #[doc = "The backoff multiplier for the time between retries."]
8531    #[serde(rename = "retryIntervalBackoffMultiplier", default, skip_serializing_if = "Option::is_none")]
8532    pub retry_interval_backoff_multiplier: Option<f32>,
8533}
8534impl JobStepExecutionOptions {
8535    pub fn new() -> Self {
8536        Self::default()
8537    }
8538}
8539#[doc = "A list of job steps."]
8540#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8541pub struct JobStepListResult {
8542    #[doc = "Array of results."]
8543    #[serde(
8544        default,
8545        deserialize_with = "azure_core::util::deserialize_null_as_default",
8546        skip_serializing_if = "Vec::is_empty"
8547    )]
8548    pub value: Vec<JobStep>,
8549    #[doc = "Link to retrieve next page of results."]
8550    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8551    pub next_link: Option<String>,
8552}
8553impl azure_core::Continuable for JobStepListResult {
8554    type Continuation = String;
8555    fn continuation(&self) -> Option<Self::Continuation> {
8556        self.next_link.clone().filter(|value| !value.is_empty())
8557    }
8558}
8559impl JobStepListResult {
8560    pub fn new() -> Self {
8561        Self::default()
8562    }
8563}
8564#[doc = "The output configuration of a job step."]
8565#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8566pub struct JobStepOutput {
8567    #[doc = "The output destination type."]
8568    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8569    pub type_: Option<job_step_output::Type>,
8570    #[doc = "The output destination subscription id."]
8571    #[serde(rename = "subscriptionId", default, skip_serializing_if = "Option::is_none")]
8572    pub subscription_id: Option<String>,
8573    #[doc = "The output destination resource group."]
8574    #[serde(rename = "resourceGroupName", default, skip_serializing_if = "Option::is_none")]
8575    pub resource_group_name: Option<String>,
8576    #[doc = "The output destination server name."]
8577    #[serde(rename = "serverName")]
8578    pub server_name: String,
8579    #[doc = "The output destination database."]
8580    #[serde(rename = "databaseName")]
8581    pub database_name: String,
8582    #[doc = "The output destination schema."]
8583    #[serde(rename = "schemaName", default, skip_serializing_if = "Option::is_none")]
8584    pub schema_name: Option<String>,
8585    #[doc = "The output destination table."]
8586    #[serde(rename = "tableName")]
8587    pub table_name: String,
8588    #[doc = "The resource ID of the credential to use to connect to the output destination."]
8589    #[serde(default, skip_serializing_if = "Option::is_none")]
8590    pub credential: Option<String>,
8591}
8592impl JobStepOutput {
8593    pub fn new(server_name: String, database_name: String, table_name: String) -> Self {
8594        Self {
8595            type_: None,
8596            subscription_id: None,
8597            resource_group_name: None,
8598            server_name,
8599            database_name,
8600            schema_name: None,
8601            table_name,
8602            credential: None,
8603        }
8604    }
8605}
8606pub mod job_step_output {
8607    use super::*;
8608    #[doc = "The output destination type."]
8609    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8610    #[serde(remote = "Type")]
8611    pub enum Type {
8612        SqlDatabase,
8613        #[serde(skip_deserializing)]
8614        UnknownValue(String),
8615    }
8616    impl FromStr for Type {
8617        type Err = value::Error;
8618        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8619            Self::deserialize(s.into_deserializer())
8620        }
8621    }
8622    impl<'de> Deserialize<'de> for Type {
8623        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8624        where
8625            D: Deserializer<'de>,
8626        {
8627            let s = String::deserialize(deserializer)?;
8628            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8629            Ok(deserialized)
8630        }
8631    }
8632    impl Serialize for Type {
8633        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8634        where
8635            S: Serializer,
8636        {
8637            match self {
8638                Self::SqlDatabase => serializer.serialize_unit_variant("Type", 0u32, "SqlDatabase"),
8639                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8640            }
8641        }
8642    }
8643    impl Default for Type {
8644        fn default() -> Self {
8645            Self::SqlDatabase
8646        }
8647    }
8648}
8649#[doc = "Properties of a job step."]
8650#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8651pub struct JobStepProperties {
8652    #[doc = "The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified."]
8653    #[serde(rename = "stepId", default, skip_serializing_if = "Option::is_none")]
8654    pub step_id: Option<i32>,
8655    #[doc = "The resource ID of the target group that the job step will be executed on."]
8656    #[serde(rename = "targetGroup")]
8657    pub target_group: String,
8658    #[doc = "The resource ID of the job credential that will be used to connect to the targets."]
8659    #[serde(default, skip_serializing_if = "Option::is_none")]
8660    pub credential: Option<String>,
8661    #[doc = "The action to be executed by a job step."]
8662    pub action: JobStepAction,
8663    #[doc = "The output configuration of a job step."]
8664    #[serde(default, skip_serializing_if = "Option::is_none")]
8665    pub output: Option<JobStepOutput>,
8666    #[doc = "The execution options of a job step."]
8667    #[serde(rename = "executionOptions", default, skip_serializing_if = "Option::is_none")]
8668    pub execution_options: Option<JobStepExecutionOptions>,
8669}
8670impl JobStepProperties {
8671    pub fn new(target_group: String, action: JobStepAction) -> Self {
8672        Self {
8673            step_id: None,
8674            target_group,
8675            credential: None,
8676            action,
8677            output: None,
8678            execution_options: None,
8679        }
8680    }
8681}
8682#[doc = "A job target, for example a specific database or a container of databases that is evaluated during job execution."]
8683#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8684pub struct JobTarget {
8685    #[doc = "Whether the target is included or excluded from the group."]
8686    #[serde(rename = "membershipType", default, skip_serializing_if = "Option::is_none")]
8687    pub membership_type: Option<job_target::MembershipType>,
8688    #[doc = "The target type."]
8689    #[serde(rename = "type")]
8690    pub type_: job_target::Type,
8691    #[doc = "The target server name."]
8692    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
8693    pub server_name: Option<String>,
8694    #[doc = "The target database name."]
8695    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
8696    pub database_name: Option<String>,
8697    #[doc = "The target elastic pool name."]
8698    #[serde(rename = "elasticPoolName", default, skip_serializing_if = "Option::is_none")]
8699    pub elastic_pool_name: Option<String>,
8700    #[doc = "The target shard map."]
8701    #[serde(rename = "shardMapName", default, skip_serializing_if = "Option::is_none")]
8702    pub shard_map_name: Option<String>,
8703    #[doc = "The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target."]
8704    #[serde(rename = "refreshCredential", default, skip_serializing_if = "Option::is_none")]
8705    pub refresh_credential: Option<String>,
8706}
8707impl JobTarget {
8708    pub fn new(type_: job_target::Type) -> Self {
8709        Self {
8710            membership_type: None,
8711            type_,
8712            server_name: None,
8713            database_name: None,
8714            elastic_pool_name: None,
8715            shard_map_name: None,
8716            refresh_credential: None,
8717        }
8718    }
8719}
8720pub mod job_target {
8721    use super::*;
8722    #[doc = "Whether the target is included or excluded from the group."]
8723    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8724    pub enum MembershipType {
8725        Include,
8726        Exclude,
8727    }
8728    impl Default for MembershipType {
8729        fn default() -> Self {
8730            Self::Include
8731        }
8732    }
8733    #[doc = "The target type."]
8734    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8735    #[serde(remote = "Type")]
8736    pub enum Type {
8737        TargetGroup,
8738        SqlDatabase,
8739        SqlElasticPool,
8740        SqlShardMap,
8741        SqlServer,
8742        #[serde(skip_deserializing)]
8743        UnknownValue(String),
8744    }
8745    impl FromStr for Type {
8746        type Err = value::Error;
8747        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
8748            Self::deserialize(s.into_deserializer())
8749        }
8750    }
8751    impl<'de> Deserialize<'de> for Type {
8752        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8753        where
8754            D: Deserializer<'de>,
8755        {
8756            let s = String::deserialize(deserializer)?;
8757            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
8758            Ok(deserialized)
8759        }
8760    }
8761    impl Serialize for Type {
8762        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8763        where
8764            S: Serializer,
8765        {
8766            match self {
8767                Self::TargetGroup => serializer.serialize_unit_variant("Type", 0u32, "TargetGroup"),
8768                Self::SqlDatabase => serializer.serialize_unit_variant("Type", 1u32, "SqlDatabase"),
8769                Self::SqlElasticPool => serializer.serialize_unit_variant("Type", 2u32, "SqlElasticPool"),
8770                Self::SqlShardMap => serializer.serialize_unit_variant("Type", 3u32, "SqlShardMap"),
8771                Self::SqlServer => serializer.serialize_unit_variant("Type", 4u32, "SqlServer"),
8772                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
8773            }
8774        }
8775    }
8776}
8777#[doc = "A group of job targets."]
8778#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8779pub struct JobTargetGroup {
8780    #[serde(flatten)]
8781    pub proxy_resource: ProxyResource,
8782    #[doc = "Properties of job target group."]
8783    #[serde(default, skip_serializing_if = "Option::is_none")]
8784    pub properties: Option<JobTargetGroupProperties>,
8785}
8786impl JobTargetGroup {
8787    pub fn new() -> Self {
8788        Self::default()
8789    }
8790}
8791#[doc = "A list of target groups."]
8792#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8793pub struct JobTargetGroupListResult {
8794    #[doc = "Array of results."]
8795    #[serde(
8796        default,
8797        deserialize_with = "azure_core::util::deserialize_null_as_default",
8798        skip_serializing_if = "Vec::is_empty"
8799    )]
8800    pub value: Vec<JobTargetGroup>,
8801    #[doc = "Link to retrieve next page of results."]
8802    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8803    pub next_link: Option<String>,
8804}
8805impl azure_core::Continuable for JobTargetGroupListResult {
8806    type Continuation = String;
8807    fn continuation(&self) -> Option<Self::Continuation> {
8808        self.next_link.clone().filter(|value| !value.is_empty())
8809    }
8810}
8811impl JobTargetGroupListResult {
8812    pub fn new() -> Self {
8813        Self::default()
8814    }
8815}
8816#[doc = "Properties of job target group."]
8817#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8818pub struct JobTargetGroupProperties {
8819    #[doc = "Members of the target group."]
8820    pub members: Vec<JobTarget>,
8821}
8822impl JobTargetGroupProperties {
8823    pub fn new(members: Vec<JobTarget>) -> Self {
8824        Self { members }
8825    }
8826}
8827#[doc = "A job version."]
8828#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8829pub struct JobVersion {
8830    #[serde(flatten)]
8831    pub proxy_resource: ProxyResource,
8832}
8833impl JobVersion {
8834    pub fn new() -> Self {
8835        Self::default()
8836    }
8837}
8838#[doc = "A list of job versions."]
8839#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8840pub struct JobVersionListResult {
8841    #[doc = "Array of results."]
8842    #[serde(
8843        default,
8844        deserialize_with = "azure_core::util::deserialize_null_as_default",
8845        skip_serializing_if = "Vec::is_empty"
8846    )]
8847    pub value: Vec<JobVersion>,
8848    #[doc = "Link to retrieve next page of results."]
8849    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8850    pub next_link: Option<String>,
8851}
8852impl azure_core::Continuable for JobVersionListResult {
8853    type Continuation = String;
8854    fn continuation(&self) -> Option<Self::Continuation> {
8855        self.next_link.clone().filter(|value| !value.is_empty())
8856    }
8857}
8858impl JobVersionListResult {
8859    pub fn new() -> Self {
8860        Self::default()
8861    }
8862}
8863#[doc = "Azure SQL Database ledger digest upload settings."]
8864#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8865pub struct LedgerDigestUploads {
8866    #[serde(flatten)]
8867    pub proxy_resource: ProxyResource,
8868    #[doc = "The properties of a database ledger digest upload settings."]
8869    #[serde(default, skip_serializing_if = "Option::is_none")]
8870    pub properties: Option<LedgerDigestUploadsProperties>,
8871}
8872impl LedgerDigestUploads {
8873    pub fn new() -> Self {
8874        Self::default()
8875    }
8876}
8877#[doc = "A list of ledger digest upload settings."]
8878#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8879pub struct LedgerDigestUploadsListResult {
8880    #[doc = "Array of results."]
8881    #[serde(
8882        default,
8883        deserialize_with = "azure_core::util::deserialize_null_as_default",
8884        skip_serializing_if = "Vec::is_empty"
8885    )]
8886    pub value: Vec<LedgerDigestUploads>,
8887    #[doc = "Link to retrieve next page of results."]
8888    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
8889    pub next_link: Option<String>,
8890}
8891impl azure_core::Continuable for LedgerDigestUploadsListResult {
8892    type Continuation = String;
8893    fn continuation(&self) -> Option<Self::Continuation> {
8894        self.next_link.clone().filter(|value| !value.is_empty())
8895    }
8896}
8897impl LedgerDigestUploadsListResult {
8898    pub fn new() -> Self {
8899        Self::default()
8900    }
8901}
8902#[doc = "The properties of a database ledger digest upload settings."]
8903#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8904pub struct LedgerDigestUploadsProperties {
8905    #[doc = "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger."]
8906    #[serde(rename = "digestStorageEndpoint", default, skip_serializing_if = "Option::is_none")]
8907    pub digest_storage_endpoint: Option<String>,
8908    #[doc = "Specifies the state of ledger digest upload."]
8909    #[serde(default, skip_serializing_if = "Option::is_none")]
8910    pub state: Option<ledger_digest_uploads_properties::State>,
8911}
8912impl LedgerDigestUploadsProperties {
8913    pub fn new() -> Self {
8914        Self::default()
8915    }
8916}
8917pub mod ledger_digest_uploads_properties {
8918    use super::*;
8919    #[doc = "Specifies the state of ledger digest upload."]
8920    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8921    pub enum State {
8922        Enabled,
8923        Disabled,
8924    }
8925}
8926#[doc = "The license type capability"]
8927#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8928pub struct LicenseTypeCapability {
8929    #[doc = "License type identifier."]
8930    #[serde(default, skip_serializing_if = "Option::is_none")]
8931    pub name: Option<String>,
8932    #[doc = "The status of the capability."]
8933    #[serde(default, skip_serializing_if = "Option::is_none")]
8934    pub status: Option<license_type_capability::Status>,
8935    #[doc = "The reason for the capability not being available."]
8936    #[serde(default, skip_serializing_if = "Option::is_none")]
8937    pub reason: Option<String>,
8938}
8939impl LicenseTypeCapability {
8940    pub fn new() -> Self {
8941        Self::default()
8942    }
8943}
8944pub mod license_type_capability {
8945    use super::*;
8946    #[doc = "The status of the capability."]
8947    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8948    pub enum Status {
8949        Visible,
8950        Available,
8951        Default,
8952        Disabled,
8953    }
8954}
8955#[doc = "The location capability."]
8956#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8957pub struct LocationCapabilities {
8958    #[doc = "The location name."]
8959    #[serde(default, skip_serializing_if = "Option::is_none")]
8960    pub name: Option<String>,
8961    #[doc = "The list of supported server versions."]
8962    #[serde(
8963        rename = "supportedServerVersions",
8964        default,
8965        deserialize_with = "azure_core::util::deserialize_null_as_default",
8966        skip_serializing_if = "Vec::is_empty"
8967    )]
8968    pub supported_server_versions: Vec<ServerVersionCapability>,
8969    #[doc = "The list of supported managed instance versions."]
8970    #[serde(
8971        rename = "supportedManagedInstanceVersions",
8972        default,
8973        deserialize_with = "azure_core::util::deserialize_null_as_default",
8974        skip_serializing_if = "Vec::is_empty"
8975    )]
8976    pub supported_managed_instance_versions: Vec<ManagedInstanceVersionCapability>,
8977    #[doc = "The list of supported job agent versions."]
8978    #[serde(
8979        rename = "supportedJobAgentVersions",
8980        default,
8981        deserialize_with = "azure_core::util::deserialize_null_as_default",
8982        skip_serializing_if = "Vec::is_empty"
8983    )]
8984    pub supported_job_agent_versions: Vec<JobAgentVersionCapability>,
8985    #[doc = "The status of the capability."]
8986    #[serde(default, skip_serializing_if = "Option::is_none")]
8987    pub status: Option<location_capabilities::Status>,
8988    #[doc = "The reason for the capability not being available."]
8989    #[serde(default, skip_serializing_if = "Option::is_none")]
8990    pub reason: Option<String>,
8991}
8992impl LocationCapabilities {
8993    pub fn new() -> Self {
8994        Self::default()
8995    }
8996}
8997pub mod location_capabilities {
8998    use super::*;
8999    #[doc = "The status of the capability."]
9000    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9001    pub enum Status {
9002        Visible,
9003        Available,
9004        Default,
9005        Disabled,
9006    }
9007}
9008#[doc = "The log size capability."]
9009#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9010pub struct LogSizeCapability {
9011    #[doc = "The log size limit (see 'unit' for the units)."]
9012    #[serde(default, skip_serializing_if = "Option::is_none")]
9013    pub limit: Option<i32>,
9014    #[doc = "The units that the limit is expressed in."]
9015    #[serde(default, skip_serializing_if = "Option::is_none")]
9016    pub unit: Option<log_size_capability::Unit>,
9017}
9018impl LogSizeCapability {
9019    pub fn new() -> Self {
9020        Self::default()
9021    }
9022}
9023pub mod log_size_capability {
9024    use super::*;
9025    #[doc = "The units that the limit is expressed in."]
9026    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9027    #[serde(remote = "Unit")]
9028    pub enum Unit {
9029        Megabytes,
9030        Gigabytes,
9031        Terabytes,
9032        Petabytes,
9033        Percent,
9034        #[serde(skip_deserializing)]
9035        UnknownValue(String),
9036    }
9037    impl FromStr for Unit {
9038        type Err = value::Error;
9039        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9040            Self::deserialize(s.into_deserializer())
9041        }
9042    }
9043    impl<'de> Deserialize<'de> for Unit {
9044        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9045        where
9046            D: Deserializer<'de>,
9047        {
9048            let s = String::deserialize(deserializer)?;
9049            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9050            Ok(deserialized)
9051        }
9052    }
9053    impl Serialize for Unit {
9054        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9055        where
9056            S: Serializer,
9057        {
9058            match self {
9059                Self::Megabytes => serializer.serialize_unit_variant("Unit", 0u32, "Megabytes"),
9060                Self::Gigabytes => serializer.serialize_unit_variant("Unit", 1u32, "Gigabytes"),
9061                Self::Terabytes => serializer.serialize_unit_variant("Unit", 2u32, "Terabytes"),
9062                Self::Petabytes => serializer.serialize_unit_variant("Unit", 3u32, "Petabytes"),
9063                Self::Percent => serializer.serialize_unit_variant("Unit", 4u32, "Percent"),
9064                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9065            }
9066        }
9067    }
9068}
9069#[doc = "A logical database transparent data encryption state."]
9070#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9071pub struct LogicalDatabaseTransparentDataEncryption {
9072    #[serde(flatten)]
9073    pub proxy_resource: ProxyResource,
9074    #[doc = "Properties of a transparent data encryption."]
9075    #[serde(default, skip_serializing_if = "Option::is_none")]
9076    pub properties: Option<TransparentDataEncryptionProperties>,
9077}
9078impl LogicalDatabaseTransparentDataEncryption {
9079    pub fn new() -> Self {
9080        Self::default()
9081    }
9082}
9083#[doc = "A list of transparent data encryptions"]
9084#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9085pub struct LogicalDatabaseTransparentDataEncryptionListResult {
9086    #[doc = "Array of results."]
9087    #[serde(
9088        default,
9089        deserialize_with = "azure_core::util::deserialize_null_as_default",
9090        skip_serializing_if = "Vec::is_empty"
9091    )]
9092    pub value: Vec<LogicalDatabaseTransparentDataEncryption>,
9093    #[doc = "Link to retrieve next page of results."]
9094    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9095    pub next_link: Option<String>,
9096}
9097impl azure_core::Continuable for LogicalDatabaseTransparentDataEncryptionListResult {
9098    type Continuation = String;
9099    fn continuation(&self) -> Option<Self::Continuation> {
9100        self.next_link.clone().filter(|value| !value.is_empty())
9101    }
9102}
9103impl LogicalDatabaseTransparentDataEncryptionListResult {
9104    pub fn new() -> Self {
9105        Self::default()
9106    }
9107}
9108#[doc = "A list of the server's Advanced Threat Protection configurations."]
9109#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9110pub struct LogicalServerAdvancedThreatProtectionListResult {
9111    #[doc = "Array of results."]
9112    #[serde(
9113        default,
9114        deserialize_with = "azure_core::util::deserialize_null_as_default",
9115        skip_serializing_if = "Vec::is_empty"
9116    )]
9117    pub value: Vec<ServerAdvancedThreatProtection>,
9118    #[doc = "Link to retrieve next page of results."]
9119    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9120    pub next_link: Option<String>,
9121}
9122impl azure_core::Continuable for LogicalServerAdvancedThreatProtectionListResult {
9123    type Continuation = String;
9124    fn continuation(&self) -> Option<Self::Continuation> {
9125        self.next_link.clone().filter(|value| !value.is_empty())
9126    }
9127}
9128impl LogicalServerAdvancedThreatProtectionListResult {
9129    pub fn new() -> Self {
9130        Self::default()
9131    }
9132}
9133#[doc = "A list of the server's security alert policies."]
9134#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9135pub struct LogicalServerSecurityAlertPolicyListResult {
9136    #[doc = "Array of results."]
9137    #[serde(
9138        default,
9139        deserialize_with = "azure_core::util::deserialize_null_as_default",
9140        skip_serializing_if = "Vec::is_empty"
9141    )]
9142    pub value: Vec<ServerSecurityAlertPolicy>,
9143    #[doc = "Link to retrieve next page of results."]
9144    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9145    pub next_link: Option<String>,
9146}
9147impl azure_core::Continuable for LogicalServerSecurityAlertPolicyListResult {
9148    type Continuation = String;
9149    fn continuation(&self) -> Option<Self::Continuation> {
9150        self.next_link.clone().filter(|value| !value.is_empty())
9151    }
9152}
9153impl LogicalServerSecurityAlertPolicyListResult {
9154    pub fn new() -> Self {
9155        Self::default()
9156    }
9157}
9158#[doc = "A long term retention backup."]
9159#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9160pub struct LongTermRetentionBackup {
9161    #[serde(flatten)]
9162    pub proxy_resource: ProxyResource,
9163    #[doc = "Properties of a long term retention backup"]
9164    #[serde(default, skip_serializing_if = "Option::is_none")]
9165    pub properties: Option<LongTermRetentionBackupProperties>,
9166}
9167impl LongTermRetentionBackup {
9168    pub fn new() -> Self {
9169        Self::default()
9170    }
9171}
9172#[doc = "A list of long term retention backups."]
9173#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9174pub struct LongTermRetentionBackupListResult {
9175    #[doc = "Array of results."]
9176    #[serde(
9177        default,
9178        deserialize_with = "azure_core::util::deserialize_null_as_default",
9179        skip_serializing_if = "Vec::is_empty"
9180    )]
9181    pub value: Vec<LongTermRetentionBackup>,
9182    #[doc = "Link to retrieve next page of results."]
9183    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9184    pub next_link: Option<String>,
9185}
9186impl azure_core::Continuable for LongTermRetentionBackupListResult {
9187    type Continuation = String;
9188    fn continuation(&self) -> Option<Self::Continuation> {
9189        self.next_link.clone().filter(|value| !value.is_empty())
9190    }
9191}
9192impl LongTermRetentionBackupListResult {
9193    pub fn new() -> Self {
9194        Self::default()
9195    }
9196}
9197#[doc = "A LongTermRetentionBackup operation result resource."]
9198#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9199pub struct LongTermRetentionBackupOperationResult {
9200    #[serde(flatten)]
9201    pub proxy_resource: ProxyResource,
9202    #[doc = "Contains the operation result properties for long term retention backup operation."]
9203    #[serde(default, skip_serializing_if = "Option::is_none")]
9204    pub properties: Option<LongTermRetentionOperationResultProperties>,
9205}
9206impl LongTermRetentionBackupOperationResult {
9207    pub fn new() -> Self {
9208        Self::default()
9209    }
9210}
9211#[doc = "Properties of a long term retention backup"]
9212#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9213pub struct LongTermRetentionBackupProperties {
9214    #[doc = "The server name that the backup database belong to."]
9215    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
9216    pub server_name: Option<String>,
9217    #[doc = "The create time of the server."]
9218    #[serde(rename = "serverCreateTime", default, with = "azure_core::date::rfc3339::option")]
9219    pub server_create_time: Option<::time::OffsetDateTime>,
9220    #[doc = "The name of the database the backup belong to"]
9221    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
9222    pub database_name: Option<String>,
9223    #[doc = "The delete time of the database"]
9224    #[serde(rename = "databaseDeletionTime", default, with = "azure_core::date::rfc3339::option")]
9225    pub database_deletion_time: Option<::time::OffsetDateTime>,
9226    #[doc = "The time the backup was taken"]
9227    #[serde(rename = "backupTime", default, with = "azure_core::date::rfc3339::option")]
9228    pub backup_time: Option<::time::OffsetDateTime>,
9229    #[doc = "The time the long term retention backup will expire."]
9230    #[serde(rename = "backupExpirationTime", default, with = "azure_core::date::rfc3339::option")]
9231    pub backup_expiration_time: Option<::time::OffsetDateTime>,
9232    #[doc = "The storage redundancy type of the backup"]
9233    #[serde(rename = "backupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
9234    pub backup_storage_redundancy: Option<long_term_retention_backup_properties::BackupStorageRedundancy>,
9235    #[doc = "The storage redundancy type of the backup"]
9236    #[serde(rename = "requestedBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
9237    pub requested_backup_storage_redundancy: Option<long_term_retention_backup_properties::RequestedBackupStorageRedundancy>,
9238    #[doc = "The setting whether the LTR backup is immutable"]
9239    #[serde(rename = "isBackupImmutable", default, skip_serializing_if = "Option::is_none")]
9240    pub is_backup_immutable: Option<bool>,
9241    #[doc = "The BackupStorageAccessTier for the LTR backup"]
9242    #[serde(rename = "backupStorageAccessTier", default, skip_serializing_if = "Option::is_none")]
9243    pub backup_storage_access_tier: Option<long_term_retention_backup_properties::BackupStorageAccessTier>,
9244}
9245impl LongTermRetentionBackupProperties {
9246    pub fn new() -> Self {
9247        Self::default()
9248    }
9249}
9250pub mod long_term_retention_backup_properties {
9251    use super::*;
9252    #[doc = "The storage redundancy type of the backup"]
9253    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9254    #[serde(remote = "BackupStorageRedundancy")]
9255    pub enum BackupStorageRedundancy {
9256        Geo,
9257        Local,
9258        Zone,
9259        GeoZone,
9260        #[serde(skip_deserializing)]
9261        UnknownValue(String),
9262    }
9263    impl FromStr for BackupStorageRedundancy {
9264        type Err = value::Error;
9265        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9266            Self::deserialize(s.into_deserializer())
9267        }
9268    }
9269    impl<'de> Deserialize<'de> for BackupStorageRedundancy {
9270        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9271        where
9272            D: Deserializer<'de>,
9273        {
9274            let s = String::deserialize(deserializer)?;
9275            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9276            Ok(deserialized)
9277        }
9278    }
9279    impl Serialize for BackupStorageRedundancy {
9280        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9281        where
9282            S: Serializer,
9283        {
9284            match self {
9285                Self::Geo => serializer.serialize_unit_variant("BackupStorageRedundancy", 0u32, "Geo"),
9286                Self::Local => serializer.serialize_unit_variant("BackupStorageRedundancy", 1u32, "Local"),
9287                Self::Zone => serializer.serialize_unit_variant("BackupStorageRedundancy", 2u32, "Zone"),
9288                Self::GeoZone => serializer.serialize_unit_variant("BackupStorageRedundancy", 3u32, "GeoZone"),
9289                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9290            }
9291        }
9292    }
9293    #[doc = "The storage redundancy type of the backup"]
9294    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9295    #[serde(remote = "RequestedBackupStorageRedundancy")]
9296    pub enum RequestedBackupStorageRedundancy {
9297        Geo,
9298        Local,
9299        Zone,
9300        GeoZone,
9301        #[serde(skip_deserializing)]
9302        UnknownValue(String),
9303    }
9304    impl FromStr for RequestedBackupStorageRedundancy {
9305        type Err = value::Error;
9306        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9307            Self::deserialize(s.into_deserializer())
9308        }
9309    }
9310    impl<'de> Deserialize<'de> for RequestedBackupStorageRedundancy {
9311        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9312        where
9313            D: Deserializer<'de>,
9314        {
9315            let s = String::deserialize(deserializer)?;
9316            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9317            Ok(deserialized)
9318        }
9319    }
9320    impl Serialize for RequestedBackupStorageRedundancy {
9321        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9322        where
9323            S: Serializer,
9324        {
9325            match self {
9326                Self::Geo => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 0u32, "Geo"),
9327                Self::Local => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 1u32, "Local"),
9328                Self::Zone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 2u32, "Zone"),
9329                Self::GeoZone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 3u32, "GeoZone"),
9330                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9331            }
9332        }
9333    }
9334    #[doc = "The BackupStorageAccessTier for the LTR backup"]
9335    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9336    #[serde(remote = "BackupStorageAccessTier")]
9337    pub enum BackupStorageAccessTier {
9338        Hot,
9339        Archive,
9340        #[serde(skip_deserializing)]
9341        UnknownValue(String),
9342    }
9343    impl FromStr for BackupStorageAccessTier {
9344        type Err = value::Error;
9345        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9346            Self::deserialize(s.into_deserializer())
9347        }
9348    }
9349    impl<'de> Deserialize<'de> for BackupStorageAccessTier {
9350        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9351        where
9352            D: Deserializer<'de>,
9353        {
9354            let s = String::deserialize(deserializer)?;
9355            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9356            Ok(deserialized)
9357        }
9358    }
9359    impl Serialize for BackupStorageAccessTier {
9360        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9361        where
9362            S: Serializer,
9363        {
9364            match self {
9365                Self::Hot => serializer.serialize_unit_variant("BackupStorageAccessTier", 0u32, "Hot"),
9366                Self::Archive => serializer.serialize_unit_variant("BackupStorageAccessTier", 1u32, "Archive"),
9367                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9368            }
9369        }
9370    }
9371}
9372#[doc = "Contains the operation result properties for long term retention backup operation."]
9373#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9374pub struct LongTermRetentionOperationResultProperties {
9375    #[doc = "Request Id."]
9376    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
9377    pub request_id: Option<String>,
9378    #[doc = "Operation type."]
9379    #[serde(rename = "operationType", default, skip_serializing_if = "Option::is_none")]
9380    pub operation_type: Option<String>,
9381    #[doc = "Source backup resource id"]
9382    #[serde(rename = "fromBackupResourceId", default, skip_serializing_if = "Option::is_none")]
9383    pub from_backup_resource_id: Option<String>,
9384    #[doc = "Target backup resource id"]
9385    #[serde(rename = "toBackupResourceId", default, skip_serializing_if = "Option::is_none")]
9386    pub to_backup_resource_id: Option<String>,
9387    #[doc = "The storage redundancy type of the copied backup"]
9388    #[serde(rename = "targetBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
9389    pub target_backup_storage_redundancy: Option<long_term_retention_operation_result_properties::TargetBackupStorageRedundancy>,
9390    #[doc = "Operation status"]
9391    #[serde(default, skip_serializing_if = "Option::is_none")]
9392    pub status: Option<String>,
9393    #[doc = "Progress message"]
9394    #[serde(default, skip_serializing_if = "Option::is_none")]
9395    pub message: Option<String>,
9396}
9397impl LongTermRetentionOperationResultProperties {
9398    pub fn new() -> Self {
9399        Self::default()
9400    }
9401}
9402pub mod long_term_retention_operation_result_properties {
9403    use super::*;
9404    #[doc = "The storage redundancy type of the copied backup"]
9405    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9406    #[serde(remote = "TargetBackupStorageRedundancy")]
9407    pub enum TargetBackupStorageRedundancy {
9408        Geo,
9409        Local,
9410        Zone,
9411        GeoZone,
9412        #[serde(skip_deserializing)]
9413        UnknownValue(String),
9414    }
9415    impl FromStr for TargetBackupStorageRedundancy {
9416        type Err = value::Error;
9417        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9418            Self::deserialize(s.into_deserializer())
9419        }
9420    }
9421    impl<'de> Deserialize<'de> for TargetBackupStorageRedundancy {
9422        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9423        where
9424            D: Deserializer<'de>,
9425        {
9426            let s = String::deserialize(deserializer)?;
9427            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9428            Ok(deserialized)
9429        }
9430    }
9431    impl Serialize for TargetBackupStorageRedundancy {
9432        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9433        where
9434            S: Serializer,
9435        {
9436            match self {
9437                Self::Geo => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 0u32, "Geo"),
9438                Self::Local => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 1u32, "Local"),
9439                Self::Zone => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 2u32, "Zone"),
9440                Self::GeoZone => serializer.serialize_unit_variant("TargetBackupStorageRedundancy", 3u32, "GeoZone"),
9441                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9442            }
9443        }
9444    }
9445}
9446#[doc = "A long term retention policy."]
9447#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9448pub struct LongTermRetentionPolicy {
9449    #[serde(flatten)]
9450    pub proxy_resource: ProxyResource,
9451    #[doc = "Properties of a long term retention policy"]
9452    #[serde(default, skip_serializing_if = "Option::is_none")]
9453    pub properties: Option<BaseLongTermRetentionPolicyProperties>,
9454}
9455impl LongTermRetentionPolicy {
9456    pub fn new() -> Self {
9457        Self::default()
9458    }
9459}
9460#[doc = "A list of long term retention policies."]
9461#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9462pub struct LongTermRetentionPolicyListResult {
9463    #[doc = "Array of results."]
9464    #[serde(
9465        default,
9466        deserialize_with = "azure_core::util::deserialize_null_as_default",
9467        skip_serializing_if = "Vec::is_empty"
9468    )]
9469    pub value: Vec<LongTermRetentionPolicy>,
9470    #[doc = "Link to retrieve next page of results."]
9471    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9472    pub next_link: Option<String>,
9473}
9474impl azure_core::Continuable for LongTermRetentionPolicyListResult {
9475    type Continuation = String;
9476    fn continuation(&self) -> Option<Self::Continuation> {
9477        self.next_link.clone().filter(|value| !value.is_empty())
9478    }
9479}
9480impl LongTermRetentionPolicyListResult {
9481    pub fn new() -> Self {
9482        Self::default()
9483    }
9484}
9485#[doc = "The maintenance configuration capability"]
9486#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9487pub struct MaintenanceConfigurationCapability {
9488    #[doc = "Maintenance configuration name"]
9489    #[serde(default, skip_serializing_if = "Option::is_none")]
9490    pub name: Option<String>,
9491    #[doc = "Whether or not zone redundancy is supported for the maintenance configuration."]
9492    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
9493    pub zone_redundant: Option<bool>,
9494    #[doc = "The status of the capability."]
9495    #[serde(default, skip_serializing_if = "Option::is_none")]
9496    pub status: Option<maintenance_configuration_capability::Status>,
9497    #[doc = "The reason for the capability not being available."]
9498    #[serde(default, skip_serializing_if = "Option::is_none")]
9499    pub reason: Option<String>,
9500}
9501impl MaintenanceConfigurationCapability {
9502    pub fn new() -> Self {
9503        Self::default()
9504    }
9505}
9506pub mod maintenance_configuration_capability {
9507    use super::*;
9508    #[doc = "The status of the capability."]
9509    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9510    pub enum Status {
9511        Visible,
9512        Available,
9513        Default,
9514        Disabled,
9515    }
9516}
9517#[doc = "Maintenance window options."]
9518#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9519pub struct MaintenanceWindowOptions {
9520    #[serde(flatten)]
9521    pub proxy_resource: ProxyResource,
9522    #[doc = "Maintenance window options properties."]
9523    #[serde(default, skip_serializing_if = "Option::is_none")]
9524    pub properties: Option<MaintenanceWindowOptionsProperties>,
9525}
9526impl MaintenanceWindowOptions {
9527    pub fn new() -> Self {
9528        Self::default()
9529    }
9530}
9531#[doc = "Maintenance window options properties."]
9532#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9533pub struct MaintenanceWindowOptionsProperties {
9534    #[doc = "Whether maintenance windows are enabled for the database."]
9535    #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
9536    pub is_enabled: Option<bool>,
9537    #[doc = "Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}."]
9538    #[serde(
9539        rename = "maintenanceWindowCycles",
9540        default,
9541        deserialize_with = "azure_core::util::deserialize_null_as_default",
9542        skip_serializing_if = "Vec::is_empty"
9543    )]
9544    pub maintenance_window_cycles: Vec<MaintenanceWindowTimeRange>,
9545    #[doc = "Minimum duration of maintenance window."]
9546    #[serde(rename = "minDurationInMinutes", default, skip_serializing_if = "Option::is_none")]
9547    pub min_duration_in_minutes: Option<i32>,
9548    #[doc = "Default duration for maintenance window."]
9549    #[serde(rename = "defaultDurationInMinutes", default, skip_serializing_if = "Option::is_none")]
9550    pub default_duration_in_minutes: Option<i32>,
9551    #[doc = "Minimum number of maintenance windows cycles to be set on the database."]
9552    #[serde(rename = "minCycles", default, skip_serializing_if = "Option::is_none")]
9553    pub min_cycles: Option<i32>,
9554    #[doc = "Time granularity in minutes for maintenance windows."]
9555    #[serde(rename = "timeGranularityInMinutes", default, skip_serializing_if = "Option::is_none")]
9556    pub time_granularity_in_minutes: Option<i32>,
9557    #[doc = "Whether we allow multiple maintenance windows per cycle."]
9558    #[serde(
9559        rename = "allowMultipleMaintenanceWindowsPerCycle",
9560        default,
9561        skip_serializing_if = "Option::is_none"
9562    )]
9563    pub allow_multiple_maintenance_windows_per_cycle: Option<bool>,
9564}
9565impl MaintenanceWindowOptionsProperties {
9566    pub fn new() -> Self {
9567        Self::default()
9568    }
9569}
9570#[doc = "Maintenance window time range."]
9571#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9572pub struct MaintenanceWindowTimeRange {
9573    #[doc = "Day of maintenance window."]
9574    #[serde(rename = "dayOfWeek", default, skip_serializing_if = "Option::is_none")]
9575    pub day_of_week: Option<maintenance_window_time_range::DayOfWeek>,
9576    #[doc = "Start time minutes offset from 12am."]
9577    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
9578    pub start_time: Option<String>,
9579    #[doc = "Duration of maintenance window in minutes."]
9580    #[serde(default, skip_serializing_if = "Option::is_none")]
9581    pub duration: Option<String>,
9582}
9583impl MaintenanceWindowTimeRange {
9584    pub fn new() -> Self {
9585        Self::default()
9586    }
9587}
9588pub mod maintenance_window_time_range {
9589    use super::*;
9590    #[doc = "Day of maintenance window."]
9591    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9592    #[serde(remote = "DayOfWeek")]
9593    pub enum DayOfWeek {
9594        Sunday,
9595        Monday,
9596        Tuesday,
9597        Wednesday,
9598        Thursday,
9599        Friday,
9600        Saturday,
9601        #[serde(skip_deserializing)]
9602        UnknownValue(String),
9603    }
9604    impl FromStr for DayOfWeek {
9605        type Err = value::Error;
9606        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9607            Self::deserialize(s.into_deserializer())
9608        }
9609    }
9610    impl<'de> Deserialize<'de> for DayOfWeek {
9611        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9612        where
9613            D: Deserializer<'de>,
9614        {
9615            let s = String::deserialize(deserializer)?;
9616            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9617            Ok(deserialized)
9618        }
9619    }
9620    impl Serialize for DayOfWeek {
9621        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9622        where
9623            S: Serializer,
9624        {
9625            match self {
9626                Self::Sunday => serializer.serialize_unit_variant("DayOfWeek", 0u32, "Sunday"),
9627                Self::Monday => serializer.serialize_unit_variant("DayOfWeek", 1u32, "Monday"),
9628                Self::Tuesday => serializer.serialize_unit_variant("DayOfWeek", 2u32, "Tuesday"),
9629                Self::Wednesday => serializer.serialize_unit_variant("DayOfWeek", 3u32, "Wednesday"),
9630                Self::Thursday => serializer.serialize_unit_variant("DayOfWeek", 4u32, "Thursday"),
9631                Self::Friday => serializer.serialize_unit_variant("DayOfWeek", 5u32, "Friday"),
9632                Self::Saturday => serializer.serialize_unit_variant("DayOfWeek", 6u32, "Saturday"),
9633                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9634            }
9635        }
9636    }
9637}
9638#[doc = "Maintenance windows."]
9639#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9640pub struct MaintenanceWindows {
9641    #[serde(flatten)]
9642    pub proxy_resource: ProxyResource,
9643    #[doc = "Maintenance windows resource properties."]
9644    #[serde(default, skip_serializing_if = "Option::is_none")]
9645    pub properties: Option<MaintenanceWindowsProperties>,
9646}
9647impl MaintenanceWindows {
9648    pub fn new() -> Self {
9649        Self::default()
9650    }
9651}
9652#[doc = "Maintenance windows resource properties."]
9653#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9654pub struct MaintenanceWindowsProperties {
9655    #[serde(
9656        rename = "timeRanges",
9657        default,
9658        deserialize_with = "azure_core::util::deserialize_null_as_default",
9659        skip_serializing_if = "Vec::is_empty"
9660    )]
9661    pub time_ranges: Vec<MaintenanceWindowTimeRange>,
9662}
9663impl MaintenanceWindowsProperties {
9664    pub fn new() -> Self {
9665        Self::default()
9666    }
9667}
9668#[doc = "A short term retention policy."]
9669#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9670pub struct ManagedBackupShortTermRetentionPolicy {
9671    #[serde(flatten)]
9672    pub proxy_resource: ProxyResource,
9673    #[doc = "Properties of a short term retention policy"]
9674    #[serde(default, skip_serializing_if = "Option::is_none")]
9675    pub properties: Option<ManagedBackupShortTermRetentionPolicyProperties>,
9676}
9677impl ManagedBackupShortTermRetentionPolicy {
9678    pub fn new() -> Self {
9679        Self::default()
9680    }
9681}
9682#[doc = "A list of short term retention policies."]
9683#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9684pub struct ManagedBackupShortTermRetentionPolicyListResult {
9685    #[doc = "Array of results."]
9686    #[serde(
9687        default,
9688        deserialize_with = "azure_core::util::deserialize_null_as_default",
9689        skip_serializing_if = "Vec::is_empty"
9690    )]
9691    pub value: Vec<ManagedBackupShortTermRetentionPolicy>,
9692    #[doc = "Link to retrieve next page of results."]
9693    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9694    pub next_link: Option<String>,
9695}
9696impl azure_core::Continuable for ManagedBackupShortTermRetentionPolicyListResult {
9697    type Continuation = String;
9698    fn continuation(&self) -> Option<Self::Continuation> {
9699        self.next_link.clone().filter(|value| !value.is_empty())
9700    }
9701}
9702impl ManagedBackupShortTermRetentionPolicyListResult {
9703    pub fn new() -> Self {
9704        Self::default()
9705    }
9706}
9707#[doc = "Properties of a short term retention policy"]
9708#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9709pub struct ManagedBackupShortTermRetentionPolicyProperties {
9710    #[doc = "The backup retention period in days. This is how many days Point-in-Time Restore will be supported."]
9711    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
9712    pub retention_days: Option<i32>,
9713}
9714impl ManagedBackupShortTermRetentionPolicyProperties {
9715    pub fn new() -> Self {
9716        Self::default()
9717    }
9718}
9719#[doc = "A managed database resource."]
9720#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9721pub struct ManagedDatabase {
9722    #[serde(flatten)]
9723    pub tracked_resource: TrackedResource,
9724    #[doc = "The managed database's properties."]
9725    #[serde(default, skip_serializing_if = "Option::is_none")]
9726    pub properties: Option<ManagedDatabaseProperties>,
9727}
9728impl ManagedDatabase {
9729    pub fn new(tracked_resource: TrackedResource) -> Self {
9730        Self {
9731            tracked_resource,
9732            properties: None,
9733        }
9734    }
9735}
9736#[doc = "A managed database Advanced Threat Protection."]
9737#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9738pub struct ManagedDatabaseAdvancedThreatProtection {
9739    #[serde(flatten)]
9740    pub proxy_resource: ProxyResource,
9741    #[doc = "Metadata pertaining to creation and last modification of the resource."]
9742    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
9743    pub system_data: Option<SystemData>,
9744    #[doc = "Properties of an Advanced Threat Protection state."]
9745    #[serde(default, skip_serializing_if = "Option::is_none")]
9746    pub properties: Option<AdvancedThreatProtectionProperties>,
9747}
9748impl ManagedDatabaseAdvancedThreatProtection {
9749    pub fn new() -> Self {
9750        Self::default()
9751    }
9752}
9753#[doc = "A list of the managed database's Advanced Threat Protection settings."]
9754#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9755pub struct ManagedDatabaseAdvancedThreatProtectionListResult {
9756    #[doc = "Array of results."]
9757    #[serde(
9758        default,
9759        deserialize_with = "azure_core::util::deserialize_null_as_default",
9760        skip_serializing_if = "Vec::is_empty"
9761    )]
9762    pub value: Vec<ManagedDatabaseAdvancedThreatProtection>,
9763    #[doc = "Link to retrieve next page of results."]
9764    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9765    pub next_link: Option<String>,
9766}
9767impl azure_core::Continuable for ManagedDatabaseAdvancedThreatProtectionListResult {
9768    type Continuation = String;
9769    fn continuation(&self) -> Option<Self::Continuation> {
9770        self.next_link.clone().filter(|value| !value.is_empty())
9771    }
9772}
9773impl ManagedDatabaseAdvancedThreatProtectionListResult {
9774    pub fn new() -> Self {
9775        Self::default()
9776    }
9777}
9778#[doc = "A list of managed databases."]
9779#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9780pub struct ManagedDatabaseListResult {
9781    #[doc = "Array of results."]
9782    #[serde(
9783        default,
9784        deserialize_with = "azure_core::util::deserialize_null_as_default",
9785        skip_serializing_if = "Vec::is_empty"
9786    )]
9787    pub value: Vec<ManagedDatabase>,
9788    #[doc = "Link to retrieve next page of results."]
9789    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9790    pub next_link: Option<String>,
9791}
9792impl azure_core::Continuable for ManagedDatabaseListResult {
9793    type Continuation = String;
9794    fn continuation(&self) -> Option<Self::Continuation> {
9795        self.next_link.clone().filter(|value| !value.is_empty())
9796    }
9797}
9798impl ManagedDatabaseListResult {
9799    pub fn new() -> Self {
9800        Self::default()
9801    }
9802}
9803#[doc = "Contains the information necessary to perform a managed database move."]
9804#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9805pub struct ManagedDatabaseMoveDefinition {
9806    #[doc = "The destination managed database ID"]
9807    #[serde(rename = "destinationManagedDatabaseId")]
9808    pub destination_managed_database_id: String,
9809}
9810impl ManagedDatabaseMoveDefinition {
9811    pub fn new(destination_managed_database_id: String) -> Self {
9812        Self {
9813            destination_managed_database_id,
9814        }
9815    }
9816}
9817#[doc = "List of managed database move operations."]
9818#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9819pub struct ManagedDatabaseMoveOperationListResult {
9820    #[doc = "Array of results."]
9821    #[serde(
9822        default,
9823        deserialize_with = "azure_core::util::deserialize_null_as_default",
9824        skip_serializing_if = "Vec::is_empty"
9825    )]
9826    pub value: Vec<ManagedDatabaseMoveOperationResult>,
9827    #[doc = "Link to retrieve next page of results."]
9828    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
9829    pub next_link: Option<String>,
9830}
9831impl azure_core::Continuable for ManagedDatabaseMoveOperationListResult {
9832    type Continuation = String;
9833    fn continuation(&self) -> Option<Self::Continuation> {
9834        self.next_link.clone().filter(|value| !value.is_empty())
9835    }
9836}
9837impl ManagedDatabaseMoveOperationListResult {
9838    pub fn new() -> Self {
9839        Self::default()
9840    }
9841}
9842#[doc = "A managed database move operation."]
9843#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9844pub struct ManagedDatabaseMoveOperationResult {
9845    #[serde(flatten)]
9846    pub proxy_resource: ProxyResource,
9847    #[doc = "Contains the operation result properties for managed database move operation."]
9848    #[serde(default, skip_serializing_if = "Option::is_none")]
9849    pub properties: Option<ManagedDatabaseMoveOperationResultProperties>,
9850}
9851impl ManagedDatabaseMoveOperationResult {
9852    pub fn new() -> Self {
9853        Self::default()
9854    }
9855}
9856#[doc = "Contains the operation result properties for managed database move operation."]
9857#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9858pub struct ManagedDatabaseMoveOperationResultProperties {
9859    #[doc = "The name of operation."]
9860    #[serde(default, skip_serializing_if = "Option::is_none")]
9861    pub operation: Option<String>,
9862    #[doc = "The friendly name of operation."]
9863    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
9864    pub operation_friendly_name: Option<String>,
9865    #[doc = "The operation start time."]
9866    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
9867    pub start_time: Option<::time::OffsetDateTime>,
9868    #[doc = "The operation state."]
9869    #[serde(default, skip_serializing_if = "Option::is_none")]
9870    pub state: Option<managed_database_move_operation_result_properties::State>,
9871    #[doc = "Operation mode."]
9872    #[serde(rename = "operationMode", default, skip_serializing_if = "Option::is_none")]
9873    pub operation_mode: Option<managed_database_move_operation_result_properties::OperationMode>,
9874    #[doc = "Source Managed Instance name."]
9875    #[serde(rename = "sourceManagedInstanceName", default, skip_serializing_if = "Option::is_none")]
9876    pub source_managed_instance_name: Option<String>,
9877    #[doc = "Target Managed Instance name."]
9878    #[serde(rename = "targetManagedInstanceName", default, skip_serializing_if = "Option::is_none")]
9879    pub target_managed_instance_name: Option<String>,
9880    #[doc = "Source Managed Instance resource id."]
9881    #[serde(rename = "sourceManagedInstanceId", default, skip_serializing_if = "Option::is_none")]
9882    pub source_managed_instance_id: Option<String>,
9883    #[doc = "Target Managed instance resource id."]
9884    #[serde(rename = "targetManagedInstanceId", default, skip_serializing_if = "Option::is_none")]
9885    pub target_managed_instance_id: Option<String>,
9886    #[doc = "Source database name."]
9887    #[serde(rename = "sourceDatabaseName", default, skip_serializing_if = "Option::is_none")]
9888    pub source_database_name: Option<String>,
9889    #[doc = "Target database name."]
9890    #[serde(rename = "targetDatabaseName", default, skip_serializing_if = "Option::is_none")]
9891    pub target_database_name: Option<String>,
9892    #[doc = "Is move operation cancellable."]
9893    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
9894    pub is_cancellable: Option<bool>,
9895    #[doc = "The operation error code."]
9896    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
9897    pub error_code: Option<i32>,
9898    #[doc = "The operation error description."]
9899    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
9900    pub error_description: Option<String>,
9901    #[doc = "The operation error severity."]
9902    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
9903    pub error_severity: Option<i32>,
9904    #[doc = "Whether or not the error is a user error."]
9905    #[serde(rename = "isUserError", default, skip_serializing_if = "Option::is_none")]
9906    pub is_user_error: Option<bool>,
9907}
9908impl ManagedDatabaseMoveOperationResultProperties {
9909    pub fn new() -> Self {
9910        Self::default()
9911    }
9912}
9913pub mod managed_database_move_operation_result_properties {
9914    use super::*;
9915    #[doc = "The operation state."]
9916    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9917    #[serde(remote = "State")]
9918    pub enum State {
9919        Pending,
9920        InProgress,
9921        Succeeded,
9922        Failed,
9923        CancelInProgress,
9924        Cancelled,
9925        #[serde(skip_deserializing)]
9926        UnknownValue(String),
9927    }
9928    impl FromStr for State {
9929        type Err = value::Error;
9930        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9931            Self::deserialize(s.into_deserializer())
9932        }
9933    }
9934    impl<'de> Deserialize<'de> for State {
9935        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9936        where
9937            D: Deserializer<'de>,
9938        {
9939            let s = String::deserialize(deserializer)?;
9940            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9941            Ok(deserialized)
9942        }
9943    }
9944    impl Serialize for State {
9945        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9946        where
9947            S: Serializer,
9948        {
9949            match self {
9950                Self::Pending => serializer.serialize_unit_variant("State", 0u32, "Pending"),
9951                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
9952                Self::Succeeded => serializer.serialize_unit_variant("State", 2u32, "Succeeded"),
9953                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
9954                Self::CancelInProgress => serializer.serialize_unit_variant("State", 4u32, "CancelInProgress"),
9955                Self::Cancelled => serializer.serialize_unit_variant("State", 5u32, "Cancelled"),
9956                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9957            }
9958        }
9959    }
9960    #[doc = "Operation mode."]
9961    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9962    #[serde(remote = "OperationMode")]
9963    pub enum OperationMode {
9964        Move,
9965        Copy,
9966        #[serde(skip_deserializing)]
9967        UnknownValue(String),
9968    }
9969    impl FromStr for OperationMode {
9970        type Err = value::Error;
9971        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
9972            Self::deserialize(s.into_deserializer())
9973        }
9974    }
9975    impl<'de> Deserialize<'de> for OperationMode {
9976        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9977        where
9978            D: Deserializer<'de>,
9979        {
9980            let s = String::deserialize(deserializer)?;
9981            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
9982            Ok(deserialized)
9983        }
9984    }
9985    impl Serialize for OperationMode {
9986        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9987        where
9988            S: Serializer,
9989        {
9990            match self {
9991                Self::Move => serializer.serialize_unit_variant("OperationMode", 0u32, "Move"),
9992                Self::Copy => serializer.serialize_unit_variant("OperationMode", 1u32, "Copy"),
9993                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
9994            }
9995        }
9996    }
9997}
9998#[doc = "The managed database's properties."]
9999#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10000pub struct ManagedDatabaseProperties {
10001    #[doc = "Collation of the managed database."]
10002    #[serde(default, skip_serializing_if = "Option::is_none")]
10003    pub collation: Option<String>,
10004    #[doc = "Status of the database."]
10005    #[serde(default, skip_serializing_if = "Option::is_none")]
10006    pub status: Option<managed_database_properties::Status>,
10007    #[doc = "Creation date of the database."]
10008    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
10009    pub creation_date: Option<::time::OffsetDateTime>,
10010    #[doc = "Earliest restore point in time for point in time restore."]
10011    #[serde(rename = "earliestRestorePoint", default, with = "azure_core::date::rfc3339::option")]
10012    pub earliest_restore_point: Option<::time::OffsetDateTime>,
10013    #[doc = "Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database."]
10014    #[serde(rename = "restorePointInTime", default, with = "azure_core::date::rfc3339::option")]
10015    pub restore_point_in_time: Option<::time::OffsetDateTime>,
10016    #[doc = "Geo paired region."]
10017    #[serde(rename = "defaultSecondaryLocation", default, skip_serializing_if = "Option::is_none")]
10018    pub default_secondary_location: Option<String>,
10019    #[doc = "Collation of the metadata catalog."]
10020    #[serde(rename = "catalogCollation", default, skip_serializing_if = "Option::is_none")]
10021    pub catalog_collation: Option<managed_database_properties::CatalogCollation>,
10022    #[doc = "Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required)."]
10023    #[serde(rename = "createMode", default, skip_serializing_if = "Option::is_none")]
10024    pub create_mode: Option<managed_database_properties::CreateMode>,
10025    #[doc = "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored."]
10026    #[serde(rename = "storageContainerUri", default, skip_serializing_if = "Option::is_none")]
10027    pub storage_container_uri: Option<String>,
10028    #[doc = "The resource identifier of the source database associated with create operation of this database."]
10029    #[serde(rename = "sourceDatabaseId", default, skip_serializing_if = "Option::is_none")]
10030    pub source_database_id: Option<String>,
10031    #[doc = "The resource identifier of the cross-subscription source database associated with create operation of this database."]
10032    #[serde(rename = "crossSubscriptionSourceDatabaseId", default, skip_serializing_if = "Option::is_none")]
10033    pub cross_subscription_source_database_id: Option<String>,
10034    #[doc = "The restorable dropped database resource id to restore when creating this database."]
10035    #[serde(rename = "restorableDroppedDatabaseId", default, skip_serializing_if = "Option::is_none")]
10036    pub restorable_dropped_database_id: Option<String>,
10037    #[doc = "The restorable cross-subscription dropped database resource id to restore when creating this database."]
10038    #[serde(
10039        rename = "crossSubscriptionRestorableDroppedDatabaseId",
10040        default,
10041        skip_serializing_if = "Option::is_none"
10042    )]
10043    pub cross_subscription_restorable_dropped_database_id: Option<String>,
10044    #[doc = "Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed."]
10045    #[serde(rename = "storageContainerIdentity", default, skip_serializing_if = "Option::is_none")]
10046    pub storage_container_identity: Option<String>,
10047    #[doc = "Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token."]
10048    #[serde(rename = "storageContainerSasToken", default, skip_serializing_if = "Option::is_none")]
10049    pub storage_container_sas_token: Option<String>,
10050    #[doc = "Instance Failover Group resource identifier that this managed database belongs to."]
10051    #[serde(rename = "failoverGroupId", default, skip_serializing_if = "Option::is_none")]
10052    pub failover_group_id: Option<String>,
10053    #[doc = "The resource identifier of the recoverable database associated with create operation of this database."]
10054    #[serde(rename = "recoverableDatabaseId", default, skip_serializing_if = "Option::is_none")]
10055    pub recoverable_database_id: Option<String>,
10056    #[doc = "The name of the Long Term Retention backup to be used for restore of this managed database."]
10057    #[serde(rename = "longTermRetentionBackupResourceId", default, skip_serializing_if = "Option::is_none")]
10058    pub long_term_retention_backup_resource_id: Option<String>,
10059    #[doc = "Whether to auto complete restore of this managed database."]
10060    #[serde(rename = "autoCompleteRestore", default, skip_serializing_if = "Option::is_none")]
10061    pub auto_complete_restore: Option<bool>,
10062    #[doc = "Last backup file name for restore of this managed database."]
10063    #[serde(rename = "lastBackupName", default, skip_serializing_if = "Option::is_none")]
10064    pub last_backup_name: Option<String>,
10065    #[doc = "Target managed instance id used in cross-subscription restore."]
10066    #[serde(
10067        rename = "crossSubscriptionTargetManagedInstanceId",
10068        default,
10069        skip_serializing_if = "Option::is_none"
10070    )]
10071    pub cross_subscription_target_managed_instance_id: Option<String>,
10072    #[doc = "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created."]
10073    #[serde(rename = "isLedgerOn", default, skip_serializing_if = "Option::is_none")]
10074    pub is_ledger_on: Option<bool>,
10075}
10076impl ManagedDatabaseProperties {
10077    pub fn new() -> Self {
10078        Self::default()
10079    }
10080}
10081pub mod managed_database_properties {
10082    use super::*;
10083    #[doc = "Status of the database."]
10084    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10085    #[serde(remote = "Status")]
10086    pub enum Status {
10087        Online,
10088        Offline,
10089        Shutdown,
10090        Creating,
10091        Inaccessible,
10092        Restoring,
10093        Updating,
10094        Stopping,
10095        Stopped,
10096        Starting,
10097        DbMoving,
10098        DbCopying,
10099        #[serde(skip_deserializing)]
10100        UnknownValue(String),
10101    }
10102    impl FromStr for Status {
10103        type Err = value::Error;
10104        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10105            Self::deserialize(s.into_deserializer())
10106        }
10107    }
10108    impl<'de> Deserialize<'de> for Status {
10109        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10110        where
10111            D: Deserializer<'de>,
10112        {
10113            let s = String::deserialize(deserializer)?;
10114            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10115            Ok(deserialized)
10116        }
10117    }
10118    impl Serialize for Status {
10119        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10120        where
10121            S: Serializer,
10122        {
10123            match self {
10124                Self::Online => serializer.serialize_unit_variant("Status", 0u32, "Online"),
10125                Self::Offline => serializer.serialize_unit_variant("Status", 1u32, "Offline"),
10126                Self::Shutdown => serializer.serialize_unit_variant("Status", 2u32, "Shutdown"),
10127                Self::Creating => serializer.serialize_unit_variant("Status", 3u32, "Creating"),
10128                Self::Inaccessible => serializer.serialize_unit_variant("Status", 4u32, "Inaccessible"),
10129                Self::Restoring => serializer.serialize_unit_variant("Status", 5u32, "Restoring"),
10130                Self::Updating => serializer.serialize_unit_variant("Status", 6u32, "Updating"),
10131                Self::Stopping => serializer.serialize_unit_variant("Status", 7u32, "Stopping"),
10132                Self::Stopped => serializer.serialize_unit_variant("Status", 8u32, "Stopped"),
10133                Self::Starting => serializer.serialize_unit_variant("Status", 9u32, "Starting"),
10134                Self::DbMoving => serializer.serialize_unit_variant("Status", 10u32, "DbMoving"),
10135                Self::DbCopying => serializer.serialize_unit_variant("Status", 11u32, "DbCopying"),
10136                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10137            }
10138        }
10139    }
10140    #[doc = "Collation of the metadata catalog."]
10141    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10142    #[serde(remote = "CatalogCollation")]
10143    pub enum CatalogCollation {
10144        #[serde(rename = "DATABASE_DEFAULT")]
10145        DatabaseDefault,
10146        #[serde(rename = "SQL_Latin1_General_CP1_CI_AS")]
10147        SqlLatin1GeneralCp1CiAs,
10148        #[serde(skip_deserializing)]
10149        UnknownValue(String),
10150    }
10151    impl FromStr for CatalogCollation {
10152        type Err = value::Error;
10153        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10154            Self::deserialize(s.into_deserializer())
10155        }
10156    }
10157    impl<'de> Deserialize<'de> for CatalogCollation {
10158        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10159        where
10160            D: Deserializer<'de>,
10161        {
10162            let s = String::deserialize(deserializer)?;
10163            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10164            Ok(deserialized)
10165        }
10166    }
10167    impl Serialize for CatalogCollation {
10168        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10169        where
10170            S: Serializer,
10171        {
10172            match self {
10173                Self::DatabaseDefault => serializer.serialize_unit_variant("CatalogCollation", 0u32, "DATABASE_DEFAULT"),
10174                Self::SqlLatin1GeneralCp1CiAs => {
10175                    serializer.serialize_unit_variant("CatalogCollation", 1u32, "SQL_Latin1_General_CP1_CI_AS")
10176                }
10177                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10178            }
10179        }
10180    }
10181    #[doc = "Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required)."]
10182    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10183    #[serde(remote = "CreateMode")]
10184    pub enum CreateMode {
10185        Default,
10186        RestoreExternalBackup,
10187        PointInTimeRestore,
10188        Recovery,
10189        RestoreLongTermRetentionBackup,
10190        #[serde(skip_deserializing)]
10191        UnknownValue(String),
10192    }
10193    impl FromStr for CreateMode {
10194        type Err = value::Error;
10195        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10196            Self::deserialize(s.into_deserializer())
10197        }
10198    }
10199    impl<'de> Deserialize<'de> for CreateMode {
10200        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10201        where
10202            D: Deserializer<'de>,
10203        {
10204            let s = String::deserialize(deserializer)?;
10205            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10206            Ok(deserialized)
10207        }
10208    }
10209    impl Serialize for CreateMode {
10210        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10211        where
10212            S: Serializer,
10213        {
10214            match self {
10215                Self::Default => serializer.serialize_unit_variant("CreateMode", 0u32, "Default"),
10216                Self::RestoreExternalBackup => serializer.serialize_unit_variant("CreateMode", 1u32, "RestoreExternalBackup"),
10217                Self::PointInTimeRestore => serializer.serialize_unit_variant("CreateMode", 2u32, "PointInTimeRestore"),
10218                Self::Recovery => serializer.serialize_unit_variant("CreateMode", 3u32, "Recovery"),
10219                Self::RestoreLongTermRetentionBackup => {
10220                    serializer.serialize_unit_variant("CreateMode", 4u32, "RestoreLongTermRetentionBackup")
10221                }
10222                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10223            }
10224        }
10225    }
10226}
10227#[doc = "The managed database's restore details backup set properties."]
10228#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10229pub struct ManagedDatabaseRestoreDetailsBackupSetProperties {
10230    #[doc = "Backup set status."]
10231    #[serde(default, skip_serializing_if = "Option::is_none")]
10232    pub status: Option<String>,
10233    #[doc = "First stripe name."]
10234    #[serde(rename = "firstStripeName", default, skip_serializing_if = "Option::is_none")]
10235    pub first_stripe_name: Option<String>,
10236    #[doc = "Number of stripes."]
10237    #[serde(rename = "numberOfStripes", default, skip_serializing_if = "Option::is_none")]
10238    pub number_of_stripes: Option<i32>,
10239    #[doc = "Backup size."]
10240    #[serde(rename = "backupSizeMB", default, skip_serializing_if = "Option::is_none")]
10241    pub backup_size_mb: Option<i32>,
10242    #[doc = "Last restored file time."]
10243    #[serde(rename = "restoreStartedTimestampUtc", default, with = "azure_core::date::rfc3339::option")]
10244    pub restore_started_timestamp_utc: Option<::time::OffsetDateTime>,
10245    #[doc = "Last restored file time."]
10246    #[serde(rename = "restoreFinishedTimestampUtc", default, with = "azure_core::date::rfc3339::option")]
10247    pub restore_finished_timestamp_utc: Option<::time::OffsetDateTime>,
10248}
10249impl ManagedDatabaseRestoreDetailsBackupSetProperties {
10250    pub fn new() -> Self {
10251        Self::default()
10252    }
10253}
10254#[doc = "The managed database's restore details properties."]
10255#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10256pub struct ManagedDatabaseRestoreDetailsProperties {
10257    #[doc = "Restore type."]
10258    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
10259    pub type_: Option<String>,
10260    #[doc = "Restore status."]
10261    #[serde(default, skip_serializing_if = "Option::is_none")]
10262    pub status: Option<String>,
10263    #[doc = "The reason why restore is in Blocked state."]
10264    #[serde(rename = "blockReason", default, skip_serializing_if = "Option::is_none")]
10265    pub block_reason: Option<String>,
10266    #[doc = "Last uploaded file name."]
10267    #[serde(rename = "lastUploadedFileName", default, skip_serializing_if = "Option::is_none")]
10268    pub last_uploaded_file_name: Option<String>,
10269    #[doc = "Last uploaded file time."]
10270    #[serde(rename = "lastUploadedFileTime", default, with = "azure_core::date::rfc3339::option")]
10271    pub last_uploaded_file_time: Option<::time::OffsetDateTime>,
10272    #[doc = "Last restored file name."]
10273    #[serde(rename = "lastRestoredFileName", default, skip_serializing_if = "Option::is_none")]
10274    pub last_restored_file_name: Option<String>,
10275    #[doc = "Last restored file time."]
10276    #[serde(rename = "lastRestoredFileTime", default, with = "azure_core::date::rfc3339::option")]
10277    pub last_restored_file_time: Option<::time::OffsetDateTime>,
10278    #[doc = "Percent completed."]
10279    #[serde(rename = "percentCompleted", default, skip_serializing_if = "Option::is_none")]
10280    pub percent_completed: Option<i32>,
10281    #[doc = "Current restored size MB."]
10282    #[serde(rename = "currentRestoredSizeMB", default, skip_serializing_if = "Option::is_none")]
10283    pub current_restored_size_mb: Option<i32>,
10284    #[doc = "Current restore plan size MB."]
10285    #[serde(rename = "currentRestorePlanSizeMB", default, skip_serializing_if = "Option::is_none")]
10286    pub current_restore_plan_size_mb: Option<i32>,
10287    #[doc = "Current backup type."]
10288    #[serde(rename = "currentBackupType", default, skip_serializing_if = "Option::is_none")]
10289    pub current_backup_type: Option<String>,
10290    #[doc = "Current restoring file name."]
10291    #[serde(rename = "currentRestoringFileName", default, skip_serializing_if = "Option::is_none")]
10292    pub current_restoring_file_name: Option<String>,
10293    #[doc = "Number of files detected."]
10294    #[serde(rename = "numberOfFilesDetected", default, skip_serializing_if = "Option::is_none")]
10295    pub number_of_files_detected: Option<i32>,
10296    #[doc = "Number of files queued."]
10297    #[serde(rename = "numberOfFilesQueued", default, skip_serializing_if = "Option::is_none")]
10298    pub number_of_files_queued: Option<i32>,
10299    #[doc = "Number of files skipped."]
10300    #[serde(rename = "numberOfFilesSkipped", default, skip_serializing_if = "Option::is_none")]
10301    pub number_of_files_skipped: Option<i32>,
10302    #[doc = "Number of files restoring."]
10303    #[serde(rename = "numberOfFilesRestoring", default, skip_serializing_if = "Option::is_none")]
10304    pub number_of_files_restoring: Option<i32>,
10305    #[doc = "Number of files restored."]
10306    #[serde(rename = "numberOfFilesRestored", default, skip_serializing_if = "Option::is_none")]
10307    pub number_of_files_restored: Option<i32>,
10308    #[doc = "Number of files unrestorable."]
10309    #[serde(rename = "numberOfFilesUnrestorable", default, skip_serializing_if = "Option::is_none")]
10310    pub number_of_files_unrestorable: Option<i32>,
10311    #[doc = "Full backup sets."]
10312    #[serde(
10313        rename = "fullBackupSets",
10314        default,
10315        deserialize_with = "azure_core::util::deserialize_null_as_default",
10316        skip_serializing_if = "Vec::is_empty"
10317    )]
10318    pub full_backup_sets: Vec<ManagedDatabaseRestoreDetailsBackupSetProperties>,
10319    #[doc = "Diff backup sets."]
10320    #[serde(
10321        rename = "diffBackupSets",
10322        default,
10323        deserialize_with = "azure_core::util::deserialize_null_as_default",
10324        skip_serializing_if = "Vec::is_empty"
10325    )]
10326    pub diff_backup_sets: Vec<ManagedDatabaseRestoreDetailsBackupSetProperties>,
10327    #[doc = "Log backup sets."]
10328    #[serde(
10329        rename = "logBackupSets",
10330        default,
10331        deserialize_with = "azure_core::util::deserialize_null_as_default",
10332        skip_serializing_if = "Vec::is_empty"
10333    )]
10334    pub log_backup_sets: Vec<ManagedDatabaseRestoreDetailsBackupSetProperties>,
10335    #[doc = "Unrestorable files."]
10336    #[serde(
10337        rename = "unrestorableFiles",
10338        default,
10339        deserialize_with = "azure_core::util::deserialize_null_as_default",
10340        skip_serializing_if = "Vec::is_empty"
10341    )]
10342    pub unrestorable_files: Vec<ManagedDatabaseRestoreDetailsUnrestorableFileProperties>,
10343}
10344impl ManagedDatabaseRestoreDetailsProperties {
10345    pub fn new() -> Self {
10346        Self::default()
10347    }
10348}
10349#[doc = "A managed database restore details."]
10350#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10351pub struct ManagedDatabaseRestoreDetailsResult {
10352    #[serde(flatten)]
10353    pub proxy_resource: ProxyResource,
10354    #[doc = "The managed database's restore details properties."]
10355    #[serde(default, skip_serializing_if = "Option::is_none")]
10356    pub properties: Option<ManagedDatabaseRestoreDetailsProperties>,
10357}
10358impl ManagedDatabaseRestoreDetailsResult {
10359    pub fn new() -> Self {
10360        Self::default()
10361    }
10362}
10363#[doc = "The managed database's restore details unrestorable file properties."]
10364#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10365pub struct ManagedDatabaseRestoreDetailsUnrestorableFileProperties {
10366    #[doc = "File name."]
10367    #[serde(default, skip_serializing_if = "Option::is_none")]
10368    pub name: Option<String>,
10369}
10370impl ManagedDatabaseRestoreDetailsUnrestorableFileProperties {
10371    pub fn new() -> Self {
10372        Self::default()
10373    }
10374}
10375#[doc = "A managed database security alert policy."]
10376#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10377pub struct ManagedDatabaseSecurityAlertPolicy {
10378    #[serde(flatten)]
10379    pub proxy_resource: ProxyResource,
10380    #[doc = "Properties of a security alert policy."]
10381    #[serde(default, skip_serializing_if = "Option::is_none")]
10382    pub properties: Option<SecurityAlertPolicyProperties>,
10383}
10384impl ManagedDatabaseSecurityAlertPolicy {
10385    pub fn new() -> Self {
10386        Self::default()
10387    }
10388}
10389#[doc = "A list of the managed database's security alert policies."]
10390#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10391pub struct ManagedDatabaseSecurityAlertPolicyListResult {
10392    #[doc = "Array of results."]
10393    #[serde(
10394        default,
10395        deserialize_with = "azure_core::util::deserialize_null_as_default",
10396        skip_serializing_if = "Vec::is_empty"
10397    )]
10398    pub value: Vec<ManagedDatabaseSecurityAlertPolicy>,
10399    #[doc = "Link to retrieve next page of results."]
10400    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10401    pub next_link: Option<String>,
10402}
10403impl azure_core::Continuable for ManagedDatabaseSecurityAlertPolicyListResult {
10404    type Continuation = String;
10405    fn continuation(&self) -> Option<Self::Continuation> {
10406        self.next_link.clone().filter(|value| !value.is_empty())
10407    }
10408}
10409impl ManagedDatabaseSecurityAlertPolicyListResult {
10410    pub fn new() -> Self {
10411        Self::default()
10412    }
10413}
10414#[doc = "Contains the information necessary to start a managed database move."]
10415#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10416pub struct ManagedDatabaseStartMoveDefinition {
10417    #[doc = "The destination managed database ID"]
10418    #[serde(rename = "destinationManagedDatabaseId")]
10419    pub destination_managed_database_id: String,
10420    #[doc = "The move operation mode."]
10421    #[serde(rename = "operationMode", default, skip_serializing_if = "Option::is_none")]
10422    pub operation_mode: Option<managed_database_start_move_definition::OperationMode>,
10423}
10424impl ManagedDatabaseStartMoveDefinition {
10425    pub fn new(destination_managed_database_id: String) -> Self {
10426        Self {
10427            destination_managed_database_id,
10428            operation_mode: None,
10429        }
10430    }
10431}
10432pub mod managed_database_start_move_definition {
10433    use super::*;
10434    #[doc = "The move operation mode."]
10435    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10436    #[serde(remote = "OperationMode")]
10437    pub enum OperationMode {
10438        Move,
10439        Copy,
10440        #[serde(skip_deserializing)]
10441        UnknownValue(String),
10442    }
10443    impl FromStr for OperationMode {
10444        type Err = value::Error;
10445        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10446            Self::deserialize(s.into_deserializer())
10447        }
10448    }
10449    impl<'de> Deserialize<'de> for OperationMode {
10450        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10451        where
10452            D: Deserializer<'de>,
10453        {
10454            let s = String::deserialize(deserializer)?;
10455            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10456            Ok(deserialized)
10457        }
10458    }
10459    impl Serialize for OperationMode {
10460        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10461        where
10462            S: Serializer,
10463        {
10464            match self {
10465                Self::Move => serializer.serialize_unit_variant("OperationMode", 0u32, "Move"),
10466                Self::Copy => serializer.serialize_unit_variant("OperationMode", 1u32, "Copy"),
10467                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10468            }
10469        }
10470    }
10471    impl Default for OperationMode {
10472        fn default() -> Self {
10473            Self::Move
10474        }
10475    }
10476}
10477#[doc = "An managed database update."]
10478#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10479pub struct ManagedDatabaseUpdate {
10480    #[doc = "The managed database's properties."]
10481    #[serde(default, skip_serializing_if = "Option::is_none")]
10482    pub properties: Option<ManagedDatabaseProperties>,
10483    #[doc = "Resource tags."]
10484    #[serde(default, skip_serializing_if = "Option::is_none")]
10485    pub tags: Option<serde_json::Value>,
10486}
10487impl ManagedDatabaseUpdate {
10488    pub fn new() -> Self {
10489        Self::default()
10490    }
10491}
10492#[doc = "An Azure SQL managed instance."]
10493#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10494pub struct ManagedInstance {
10495    #[serde(flatten)]
10496    pub tracked_resource: TrackedResource,
10497    #[doc = "Azure Active Directory identity configuration for a resource."]
10498    #[serde(default, skip_serializing_if = "Option::is_none")]
10499    pub identity: Option<ResourceIdentity>,
10500    #[doc = "An ARM Resource SKU."]
10501    #[serde(default, skip_serializing_if = "Option::is_none")]
10502    pub sku: Option<Sku>,
10503    #[doc = "The properties of a managed instance."]
10504    #[serde(default, skip_serializing_if = "Option::is_none")]
10505    pub properties: Option<ManagedInstanceProperties>,
10506}
10507impl ManagedInstance {
10508    pub fn new(tracked_resource: TrackedResource) -> Self {
10509        Self {
10510            tracked_resource,
10511            identity: None,
10512            sku: None,
10513            properties: None,
10514        }
10515    }
10516}
10517#[doc = "An Azure SQL managed instance administrator."]
10518#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10519pub struct ManagedInstanceAdministrator {
10520    #[serde(flatten)]
10521    pub proxy_resource: ProxyResource,
10522    #[doc = "The properties of a managed instance administrator."]
10523    #[serde(default, skip_serializing_if = "Option::is_none")]
10524    pub properties: Option<ManagedInstanceAdministratorProperties>,
10525}
10526impl ManagedInstanceAdministrator {
10527    pub fn new() -> Self {
10528        Self::default()
10529    }
10530}
10531#[doc = "A list of managed instance administrators."]
10532#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10533pub struct ManagedInstanceAdministratorListResult {
10534    #[doc = "Array of results."]
10535    #[serde(
10536        default,
10537        deserialize_with = "azure_core::util::deserialize_null_as_default",
10538        skip_serializing_if = "Vec::is_empty"
10539    )]
10540    pub value: Vec<ManagedInstanceAdministrator>,
10541    #[doc = "Link to retrieve next page of results."]
10542    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10543    pub next_link: Option<String>,
10544}
10545impl azure_core::Continuable for ManagedInstanceAdministratorListResult {
10546    type Continuation = String;
10547    fn continuation(&self) -> Option<Self::Continuation> {
10548        self.next_link.clone().filter(|value| !value.is_empty())
10549    }
10550}
10551impl ManagedInstanceAdministratorListResult {
10552    pub fn new() -> Self {
10553        Self::default()
10554    }
10555}
10556#[doc = "The properties of a managed instance administrator."]
10557#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10558pub struct ManagedInstanceAdministratorProperties {
10559    #[doc = "Type of the managed instance administrator."]
10560    #[serde(rename = "administratorType")]
10561    pub administrator_type: managed_instance_administrator_properties::AdministratorType,
10562    #[doc = "Login name of the managed instance administrator."]
10563    pub login: String,
10564    #[doc = "SID (object ID) of the managed instance administrator."]
10565    pub sid: String,
10566    #[doc = "Tenant ID of the managed instance administrator."]
10567    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
10568    pub tenant_id: Option<String>,
10569}
10570impl ManagedInstanceAdministratorProperties {
10571    pub fn new(administrator_type: managed_instance_administrator_properties::AdministratorType, login: String, sid: String) -> Self {
10572        Self {
10573            administrator_type,
10574            login,
10575            sid,
10576            tenant_id: None,
10577        }
10578    }
10579}
10580pub mod managed_instance_administrator_properties {
10581    use super::*;
10582    #[doc = "Type of the managed instance administrator."]
10583    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10584    #[serde(remote = "AdministratorType")]
10585    pub enum AdministratorType {
10586        ActiveDirectory,
10587        #[serde(skip_deserializing)]
10588        UnknownValue(String),
10589    }
10590    impl FromStr for AdministratorType {
10591        type Err = value::Error;
10592        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10593            Self::deserialize(s.into_deserializer())
10594        }
10595    }
10596    impl<'de> Deserialize<'de> for AdministratorType {
10597        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10598        where
10599            D: Deserializer<'de>,
10600        {
10601            let s = String::deserialize(deserializer)?;
10602            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10603            Ok(deserialized)
10604        }
10605    }
10606    impl Serialize for AdministratorType {
10607        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10608        where
10609            S: Serializer,
10610        {
10611            match self {
10612                Self::ActiveDirectory => serializer.serialize_unit_variant("AdministratorType", 0u32, "ActiveDirectory"),
10613                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10614            }
10615        }
10616    }
10617}
10618#[doc = "A managed instance Advanced Threat Protection."]
10619#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10620pub struct ManagedInstanceAdvancedThreatProtection {
10621    #[serde(flatten)]
10622    pub proxy_resource: ProxyResource,
10623    #[doc = "Metadata pertaining to creation and last modification of the resource."]
10624    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
10625    pub system_data: Option<SystemData>,
10626    #[doc = "Properties of an Advanced Threat Protection state."]
10627    #[serde(default, skip_serializing_if = "Option::is_none")]
10628    pub properties: Option<AdvancedThreatProtectionProperties>,
10629}
10630impl ManagedInstanceAdvancedThreatProtection {
10631    pub fn new() -> Self {
10632        Self::default()
10633    }
10634}
10635#[doc = "A list of the managed instance's Advanced Threat Protection settings."]
10636#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10637pub struct ManagedInstanceAdvancedThreatProtectionListResult {
10638    #[doc = "Array of results."]
10639    #[serde(
10640        default,
10641        deserialize_with = "azure_core::util::deserialize_null_as_default",
10642        skip_serializing_if = "Vec::is_empty"
10643    )]
10644    pub value: Vec<ManagedInstanceAdvancedThreatProtection>,
10645    #[doc = "Link to retrieve next page of results."]
10646    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10647    pub next_link: Option<String>,
10648}
10649impl azure_core::Continuable for ManagedInstanceAdvancedThreatProtectionListResult {
10650    type Continuation = String;
10651    fn continuation(&self) -> Option<Self::Continuation> {
10652        self.next_link.clone().filter(|value| !value.is_empty())
10653    }
10654}
10655impl ManagedInstanceAdvancedThreatProtectionListResult {
10656    pub fn new() -> Self {
10657        Self::default()
10658    }
10659}
10660#[doc = "A list of active directory only authentications."]
10661#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10662pub struct ManagedInstanceAzureAdOnlyAuthListResult {
10663    #[doc = "Array of results."]
10664    #[serde(
10665        default,
10666        deserialize_with = "azure_core::util::deserialize_null_as_default",
10667        skip_serializing_if = "Vec::is_empty"
10668    )]
10669    pub value: Vec<ManagedInstanceAzureAdOnlyAuthentication>,
10670    #[doc = "Link to retrieve next page of results."]
10671    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10672    pub next_link: Option<String>,
10673}
10674impl azure_core::Continuable for ManagedInstanceAzureAdOnlyAuthListResult {
10675    type Continuation = String;
10676    fn continuation(&self) -> Option<Self::Continuation> {
10677        self.next_link.clone().filter(|value| !value.is_empty())
10678    }
10679}
10680impl ManagedInstanceAzureAdOnlyAuthListResult {
10681    pub fn new() -> Self {
10682        Self::default()
10683    }
10684}
10685#[doc = "Properties of a active directory only authentication for Managed Instance."]
10686#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10687pub struct ManagedInstanceAzureAdOnlyAuthProperties {
10688    #[doc = "Azure Active Directory only Authentication enabled."]
10689    #[serde(rename = "azureADOnlyAuthentication")]
10690    pub azure_ad_only_authentication: bool,
10691}
10692impl ManagedInstanceAzureAdOnlyAuthProperties {
10693    pub fn new(azure_ad_only_authentication: bool) -> Self {
10694        Self {
10695            azure_ad_only_authentication,
10696        }
10697    }
10698}
10699#[doc = "Azure Active Directory only authentication."]
10700#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10701pub struct ManagedInstanceAzureAdOnlyAuthentication {
10702    #[serde(flatten)]
10703    pub proxy_resource: ProxyResource,
10704    #[doc = "Properties of a active directory only authentication for Managed Instance."]
10705    #[serde(default, skip_serializing_if = "Option::is_none")]
10706    pub properties: Option<ManagedInstanceAzureAdOnlyAuthProperties>,
10707}
10708impl ManagedInstanceAzureAdOnlyAuthentication {
10709    pub fn new() -> Self {
10710        Self::default()
10711    }
10712}
10713#[doc = "SQL Managed Instance DTC"]
10714#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10715pub struct ManagedInstanceDtc {
10716    #[serde(flatten)]
10717    pub proxy_resource: ProxyResource,
10718    #[doc = "The properties of managed instance DTC."]
10719    #[serde(default, skip_serializing_if = "Option::is_none")]
10720    pub properties: Option<ManagedInstanceDtcProperties>,
10721}
10722impl ManagedInstanceDtc {
10723    pub fn new() -> Self {
10724        Self::default()
10725    }
10726}
10727#[doc = "A list of managed instance's DTCs."]
10728#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10729pub struct ManagedInstanceDtcListResult {
10730    #[doc = "Array of results."]
10731    #[serde(
10732        default,
10733        deserialize_with = "azure_core::util::deserialize_null_as_default",
10734        skip_serializing_if = "Vec::is_empty"
10735    )]
10736    pub value: Vec<ManagedInstanceDtc>,
10737    #[doc = "Link to retrieve next page of results."]
10738    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10739    pub next_link: Option<String>,
10740}
10741impl azure_core::Continuable for ManagedInstanceDtcListResult {
10742    type Continuation = String;
10743    fn continuation(&self) -> Option<Self::Continuation> {
10744        self.next_link.clone().filter(|value| !value.is_empty())
10745    }
10746}
10747impl ManagedInstanceDtcListResult {
10748    pub fn new() -> Self {
10749        Self::default()
10750    }
10751}
10752#[doc = "The properties of managed instance DTC."]
10753#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10754pub struct ManagedInstanceDtcProperties {
10755    #[doc = "Active status of managed instance DTC."]
10756    #[serde(rename = "dtcEnabled", default, skip_serializing_if = "Option::is_none")]
10757    pub dtc_enabled: Option<bool>,
10758    #[doc = "The Security Settings of managed instance DTC."]
10759    #[serde(rename = "securitySettings", default, skip_serializing_if = "Option::is_none")]
10760    pub security_settings: Option<ManagedInstanceDtcSecuritySettings>,
10761    #[doc = "External dns suffix search list of managed instance DTC."]
10762    #[serde(
10763        rename = "externalDnsSuffixSearchList",
10764        default,
10765        deserialize_with = "azure_core::util::deserialize_null_as_default",
10766        skip_serializing_if = "Vec::is_empty"
10767    )]
10768    pub external_dns_suffix_search_list: Vec<String>,
10769    #[doc = "Host name dns suffix of managed instance DTC."]
10770    #[serde(rename = "dtcHostNameDnsSuffix", default, skip_serializing_if = "Option::is_none")]
10771    pub dtc_host_name_dns_suffix: Option<String>,
10772    #[doc = "Provisioning state of managed instance DTC."]
10773    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
10774    pub provisioning_state: Option<managed_instance_dtc_properties::ProvisioningState>,
10775}
10776impl ManagedInstanceDtcProperties {
10777    pub fn new() -> Self {
10778        Self::default()
10779    }
10780}
10781pub mod managed_instance_dtc_properties {
10782    use super::*;
10783    #[doc = "Provisioning state of managed instance DTC."]
10784    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10785    #[serde(remote = "ProvisioningState")]
10786    pub enum ProvisioningState {
10787        Created,
10788        InProgress,
10789        Succeeded,
10790        Failed,
10791        Canceled,
10792        #[serde(skip_deserializing)]
10793        UnknownValue(String),
10794    }
10795    impl FromStr for ProvisioningState {
10796        type Err = value::Error;
10797        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
10798            Self::deserialize(s.into_deserializer())
10799        }
10800    }
10801    impl<'de> Deserialize<'de> for ProvisioningState {
10802        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10803        where
10804            D: Deserializer<'de>,
10805        {
10806            let s = String::deserialize(deserializer)?;
10807            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
10808            Ok(deserialized)
10809        }
10810    }
10811    impl Serialize for ProvisioningState {
10812        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10813        where
10814            S: Serializer,
10815        {
10816            match self {
10817                Self::Created => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Created"),
10818                Self::InProgress => serializer.serialize_unit_variant("ProvisioningState", 1u32, "InProgress"),
10819                Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
10820                Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
10821                Self::Canceled => serializer.serialize_unit_variant("ProvisioningState", 4u32, "Canceled"),
10822                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
10823            }
10824        }
10825    }
10826}
10827#[doc = "The Security Settings of managed instance DTC."]
10828#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10829pub struct ManagedInstanceDtcSecuritySettings {
10830    #[doc = "The Transaction Manager Communication Settings of managed instance DTC."]
10831    #[serde(
10832        rename = "transactionManagerCommunicationSettings",
10833        default,
10834        skip_serializing_if = "Option::is_none"
10835    )]
10836    pub transaction_manager_communication_settings: Option<ManagedInstanceDtcTransactionManagerCommunicationSettings>,
10837    #[doc = "Allow XA Transactions to managed instance DTC."]
10838    #[serde(rename = "xaTransactionsEnabled", default, skip_serializing_if = "Option::is_none")]
10839    pub xa_transactions_enabled: Option<bool>,
10840    #[doc = "Allow SNA LU 6.2 Transactions to managed instance DTC."]
10841    #[serde(rename = "snaLu6point2TransactionsEnabled", default, skip_serializing_if = "Option::is_none")]
10842    pub sna_lu6point2_transactions_enabled: Option<bool>,
10843    #[doc = "Default timeout for XA Transactions (in seconds)."]
10844    #[serde(rename = "xaTransactionsDefaultTimeout", default, skip_serializing_if = "Option::is_none")]
10845    pub xa_transactions_default_timeout: Option<i32>,
10846    #[doc = "Maximum timeout for XA Transactions (in seconds)."]
10847    #[serde(rename = "xaTransactionsMaximumTimeout", default, skip_serializing_if = "Option::is_none")]
10848    pub xa_transactions_maximum_timeout: Option<i32>,
10849}
10850impl ManagedInstanceDtcSecuritySettings {
10851    pub fn new() -> Self {
10852        Self::default()
10853    }
10854}
10855#[doc = "The Transaction Manager Communication Settings of managed instance DTC."]
10856#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10857pub struct ManagedInstanceDtcTransactionManagerCommunicationSettings {
10858    #[doc = "Allow Inbound traffic to managed instance DTC."]
10859    #[serde(rename = "allowInboundEnabled", default, skip_serializing_if = "Option::is_none")]
10860    pub allow_inbound_enabled: Option<bool>,
10861    #[doc = "Allow Outbound traffic of managed instance DTC."]
10862    #[serde(rename = "allowOutboundEnabled", default, skip_serializing_if = "Option::is_none")]
10863    pub allow_outbound_enabled: Option<bool>,
10864    #[doc = "Authentication type of managed instance DTC."]
10865    #[serde(default, skip_serializing_if = "Option::is_none")]
10866    pub authentication: Option<String>,
10867}
10868impl ManagedInstanceDtcTransactionManagerCommunicationSettings {
10869    pub fn new() -> Self {
10870        Self::default()
10871    }
10872}
10873#[doc = "The managed server capability"]
10874#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10875pub struct ManagedInstanceEditionCapability {
10876    #[doc = "The managed server version name."]
10877    #[serde(default, skip_serializing_if = "Option::is_none")]
10878    pub name: Option<String>,
10879    #[doc = "Whether or not this is a GPv2 variant of General Purpose edition."]
10880    #[serde(rename = "isGeneralPurposeV2", default, skip_serializing_if = "Option::is_none")]
10881    pub is_general_purpose_v2: Option<bool>,
10882    #[doc = "The supported families."]
10883    #[serde(
10884        rename = "supportedFamilies",
10885        default,
10886        deserialize_with = "azure_core::util::deserialize_null_as_default",
10887        skip_serializing_if = "Vec::is_empty"
10888    )]
10889    pub supported_families: Vec<ManagedInstanceFamilyCapability>,
10890    #[doc = "The list of supported storage capabilities for this edition"]
10891    #[serde(
10892        rename = "supportedStorageCapabilities",
10893        default,
10894        deserialize_with = "azure_core::util::deserialize_null_as_default",
10895        skip_serializing_if = "Vec::is_empty"
10896    )]
10897    pub supported_storage_capabilities: Vec<StorageCapability>,
10898    #[doc = "The status of the capability."]
10899    #[serde(default, skip_serializing_if = "Option::is_none")]
10900    pub status: Option<managed_instance_edition_capability::Status>,
10901    #[doc = "The reason for the capability not being available."]
10902    #[serde(default, skip_serializing_if = "Option::is_none")]
10903    pub reason: Option<String>,
10904}
10905impl ManagedInstanceEditionCapability {
10906    pub fn new() -> Self {
10907        Self::default()
10908    }
10909}
10910pub mod managed_instance_edition_capability {
10911    use super::*;
10912    #[doc = "The status of the capability."]
10913    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10914    pub enum Status {
10915        Visible,
10916        Available,
10917        Default,
10918        Disabled,
10919    }
10920}
10921#[doc = "The managed instance encryption protector."]
10922#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10923pub struct ManagedInstanceEncryptionProtector {
10924    #[serde(flatten)]
10925    pub proxy_resource: ProxyResource,
10926    #[doc = "Kind of encryption protector. This is metadata used for the Azure portal experience."]
10927    #[serde(default, skip_serializing_if = "Option::is_none")]
10928    pub kind: Option<String>,
10929    #[doc = "Properties for an encryption protector execution."]
10930    #[serde(default, skip_serializing_if = "Option::is_none")]
10931    pub properties: Option<ManagedInstanceEncryptionProtectorProperties>,
10932}
10933impl ManagedInstanceEncryptionProtector {
10934    pub fn new() -> Self {
10935        Self::default()
10936    }
10937}
10938#[doc = "A list of managed instance encryption protectors."]
10939#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10940pub struct ManagedInstanceEncryptionProtectorListResult {
10941    #[doc = "Array of results."]
10942    #[serde(
10943        default,
10944        deserialize_with = "azure_core::util::deserialize_null_as_default",
10945        skip_serializing_if = "Vec::is_empty"
10946    )]
10947    pub value: Vec<ManagedInstanceEncryptionProtector>,
10948    #[doc = "Link to retrieve next page of results."]
10949    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
10950    pub next_link: Option<String>,
10951}
10952impl azure_core::Continuable for ManagedInstanceEncryptionProtectorListResult {
10953    type Continuation = String;
10954    fn continuation(&self) -> Option<Self::Continuation> {
10955        self.next_link.clone().filter(|value| !value.is_empty())
10956    }
10957}
10958impl ManagedInstanceEncryptionProtectorListResult {
10959    pub fn new() -> Self {
10960        Self::default()
10961    }
10962}
10963#[doc = "Properties for an encryption protector execution."]
10964#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10965pub struct ManagedInstanceEncryptionProtectorProperties {
10966    #[doc = "The name of the managed instance key."]
10967    #[serde(rename = "serverKeyName", default, skip_serializing_if = "Option::is_none")]
10968    pub server_key_name: Option<String>,
10969    #[doc = "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'."]
10970    #[serde(rename = "serverKeyType")]
10971    pub server_key_type: managed_instance_encryption_protector_properties::ServerKeyType,
10972    #[doc = "The URI of the server key."]
10973    #[serde(default, skip_serializing_if = "Option::is_none")]
10974    pub uri: Option<String>,
10975    #[doc = "Thumbprint of the server key."]
10976    #[serde(default, skip_serializing_if = "Option::is_none")]
10977    pub thumbprint: Option<String>,
10978    #[doc = "Key auto rotation opt-in flag. Either true or false."]
10979    #[serde(rename = "autoRotationEnabled", default, skip_serializing_if = "Option::is_none")]
10980    pub auto_rotation_enabled: Option<bool>,
10981}
10982impl ManagedInstanceEncryptionProtectorProperties {
10983    pub fn new(server_key_type: managed_instance_encryption_protector_properties::ServerKeyType) -> Self {
10984        Self {
10985            server_key_name: None,
10986            server_key_type,
10987            uri: None,
10988            thumbprint: None,
10989            auto_rotation_enabled: None,
10990        }
10991    }
10992}
10993pub mod managed_instance_encryption_protector_properties {
10994    use super::*;
10995    #[doc = "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'."]
10996    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10997    #[serde(remote = "ServerKeyType")]
10998    pub enum ServerKeyType {
10999        ServiceManaged,
11000        AzureKeyVault,
11001        #[serde(skip_deserializing)]
11002        UnknownValue(String),
11003    }
11004    impl FromStr for ServerKeyType {
11005        type Err = value::Error;
11006        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11007            Self::deserialize(s.into_deserializer())
11008        }
11009    }
11010    impl<'de> Deserialize<'de> for ServerKeyType {
11011        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11012        where
11013            D: Deserializer<'de>,
11014        {
11015            let s = String::deserialize(deserializer)?;
11016            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11017            Ok(deserialized)
11018        }
11019    }
11020    impl Serialize for ServerKeyType {
11021        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11022        where
11023            S: Serializer,
11024        {
11025            match self {
11026                Self::ServiceManaged => serializer.serialize_unit_variant("ServerKeyType", 0u32, "ServiceManaged"),
11027                Self::AzureKeyVault => serializer.serialize_unit_variant("ServerKeyType", 1u32, "AzureKeyVault"),
11028                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11029            }
11030        }
11031    }
11032}
11033#[doc = "Properties of a active directory administrator."]
11034#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11035pub struct ManagedInstanceExternalAdministrator {
11036    #[doc = "Type of the sever administrator."]
11037    #[serde(rename = "administratorType", default, skip_serializing_if = "Option::is_none")]
11038    pub administrator_type: Option<managed_instance_external_administrator::AdministratorType>,
11039    #[doc = "Principal Type of the sever administrator."]
11040    #[serde(rename = "principalType", default, skip_serializing_if = "Option::is_none")]
11041    pub principal_type: Option<managed_instance_external_administrator::PrincipalType>,
11042    #[doc = "Login name of the server administrator."]
11043    #[serde(default, skip_serializing_if = "Option::is_none")]
11044    pub login: Option<String>,
11045    #[doc = "SID (object ID) of the server administrator."]
11046    #[serde(default, skip_serializing_if = "Option::is_none")]
11047    pub sid: Option<String>,
11048    #[doc = "Tenant ID of the administrator."]
11049    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
11050    pub tenant_id: Option<String>,
11051    #[doc = "Azure Active Directory only Authentication enabled."]
11052    #[serde(rename = "azureADOnlyAuthentication", default, skip_serializing_if = "Option::is_none")]
11053    pub azure_ad_only_authentication: Option<bool>,
11054}
11055impl ManagedInstanceExternalAdministrator {
11056    pub fn new() -> Self {
11057        Self::default()
11058    }
11059}
11060pub mod managed_instance_external_administrator {
11061    use super::*;
11062    #[doc = "Type of the sever administrator."]
11063    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11064    #[serde(remote = "AdministratorType")]
11065    pub enum AdministratorType {
11066        ActiveDirectory,
11067        #[serde(skip_deserializing)]
11068        UnknownValue(String),
11069    }
11070    impl FromStr for AdministratorType {
11071        type Err = value::Error;
11072        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11073            Self::deserialize(s.into_deserializer())
11074        }
11075    }
11076    impl<'de> Deserialize<'de> for AdministratorType {
11077        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11078        where
11079            D: Deserializer<'de>,
11080        {
11081            let s = String::deserialize(deserializer)?;
11082            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11083            Ok(deserialized)
11084        }
11085    }
11086    impl Serialize for AdministratorType {
11087        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11088        where
11089            S: Serializer,
11090        {
11091            match self {
11092                Self::ActiveDirectory => serializer.serialize_unit_variant("AdministratorType", 0u32, "ActiveDirectory"),
11093                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11094            }
11095        }
11096    }
11097    #[doc = "Principal Type of the sever administrator."]
11098    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11099    #[serde(remote = "PrincipalType")]
11100    pub enum PrincipalType {
11101        User,
11102        Group,
11103        Application,
11104        #[serde(skip_deserializing)]
11105        UnknownValue(String),
11106    }
11107    impl FromStr for PrincipalType {
11108        type Err = value::Error;
11109        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11110            Self::deserialize(s.into_deserializer())
11111        }
11112    }
11113    impl<'de> Deserialize<'de> for PrincipalType {
11114        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11115        where
11116            D: Deserializer<'de>,
11117        {
11118            let s = String::deserialize(deserializer)?;
11119            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11120            Ok(deserialized)
11121        }
11122    }
11123    impl Serialize for PrincipalType {
11124        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11125        where
11126            S: Serializer,
11127        {
11128            match self {
11129                Self::User => serializer.serialize_unit_variant("PrincipalType", 0u32, "User"),
11130                Self::Group => serializer.serialize_unit_variant("PrincipalType", 1u32, "Group"),
11131                Self::Application => serializer.serialize_unit_variant("PrincipalType", 2u32, "Application"),
11132                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11133            }
11134        }
11135    }
11136}
11137#[doc = "The managed server family capability."]
11138#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11139pub struct ManagedInstanceFamilyCapability {
11140    #[doc = "Family name."]
11141    #[serde(default, skip_serializing_if = "Option::is_none")]
11142    pub name: Option<String>,
11143    #[doc = "SKU name."]
11144    #[serde(default, skip_serializing_if = "Option::is_none")]
11145    pub sku: Option<String>,
11146    #[doc = "Whether or not zone redundancy is supported for the family."]
11147    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
11148    pub zone_redundant: Option<bool>,
11149    #[doc = "List of supported license types."]
11150    #[serde(
11151        rename = "supportedLicenseTypes",
11152        default,
11153        deserialize_with = "azure_core::util::deserialize_null_as_default",
11154        skip_serializing_if = "Vec::is_empty"
11155    )]
11156    pub supported_license_types: Vec<LicenseTypeCapability>,
11157    #[doc = "List of supported virtual cores values."]
11158    #[serde(
11159        rename = "supportedVcoresValues",
11160        default,
11161        deserialize_with = "azure_core::util::deserialize_null_as_default",
11162        skip_serializing_if = "Vec::is_empty"
11163    )]
11164    pub supported_vcores_values: Vec<ManagedInstanceVcoresCapability>,
11165    #[doc = "The status of the capability."]
11166    #[serde(default, skip_serializing_if = "Option::is_none")]
11167    pub status: Option<managed_instance_family_capability::Status>,
11168    #[doc = "The reason for the capability not being available."]
11169    #[serde(default, skip_serializing_if = "Option::is_none")]
11170    pub reason: Option<String>,
11171}
11172impl ManagedInstanceFamilyCapability {
11173    pub fn new() -> Self {
11174        Self::default()
11175    }
11176}
11177pub mod managed_instance_family_capability {
11178    use super::*;
11179    #[doc = "The status of the capability."]
11180    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11181    pub enum Status {
11182        Visible,
11183        Available,
11184        Default,
11185        Disabled,
11186    }
11187}
11188#[doc = "A managed instance key."]
11189#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11190pub struct ManagedInstanceKey {
11191    #[serde(flatten)]
11192    pub proxy_resource: ProxyResource,
11193    #[doc = "Kind of encryption protector. This is metadata used for the Azure portal experience."]
11194    #[serde(default, skip_serializing_if = "Option::is_none")]
11195    pub kind: Option<String>,
11196    #[doc = "Properties for a key execution."]
11197    #[serde(default, skip_serializing_if = "Option::is_none")]
11198    pub properties: Option<ManagedInstanceKeyProperties>,
11199}
11200impl ManagedInstanceKey {
11201    pub fn new() -> Self {
11202        Self::default()
11203    }
11204}
11205#[doc = "A list of managed instance keys."]
11206#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11207pub struct ManagedInstanceKeyListResult {
11208    #[doc = "Array of results."]
11209    #[serde(
11210        default,
11211        deserialize_with = "azure_core::util::deserialize_null_as_default",
11212        skip_serializing_if = "Vec::is_empty"
11213    )]
11214    pub value: Vec<ManagedInstanceKey>,
11215    #[doc = "Link to retrieve next page of results."]
11216    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11217    pub next_link: Option<String>,
11218}
11219impl azure_core::Continuable for ManagedInstanceKeyListResult {
11220    type Continuation = String;
11221    fn continuation(&self) -> Option<Self::Continuation> {
11222        self.next_link.clone().filter(|value| !value.is_empty())
11223    }
11224}
11225impl ManagedInstanceKeyListResult {
11226    pub fn new() -> Self {
11227        Self::default()
11228    }
11229}
11230#[doc = "Properties for a key execution."]
11231#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11232pub struct ManagedInstanceKeyProperties {
11233    #[doc = "The key type like 'ServiceManaged', 'AzureKeyVault'."]
11234    #[serde(rename = "serverKeyType")]
11235    pub server_key_type: managed_instance_key_properties::ServerKeyType,
11236    #[doc = "The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required."]
11237    #[serde(default, skip_serializing_if = "Option::is_none")]
11238    pub uri: Option<String>,
11239    #[doc = "Thumbprint of the key."]
11240    #[serde(default, skip_serializing_if = "Option::is_none")]
11241    pub thumbprint: Option<String>,
11242    #[doc = "The key creation date."]
11243    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
11244    pub creation_date: Option<::time::OffsetDateTime>,
11245    #[doc = "Key auto rotation opt-in flag. Either true or false."]
11246    #[serde(rename = "autoRotationEnabled", default, skip_serializing_if = "Option::is_none")]
11247    pub auto_rotation_enabled: Option<bool>,
11248}
11249impl ManagedInstanceKeyProperties {
11250    pub fn new(server_key_type: managed_instance_key_properties::ServerKeyType) -> Self {
11251        Self {
11252            server_key_type,
11253            uri: None,
11254            thumbprint: None,
11255            creation_date: None,
11256            auto_rotation_enabled: None,
11257        }
11258    }
11259}
11260pub mod managed_instance_key_properties {
11261    use super::*;
11262    #[doc = "The key type like 'ServiceManaged', 'AzureKeyVault'."]
11263    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11264    #[serde(remote = "ServerKeyType")]
11265    pub enum ServerKeyType {
11266        ServiceManaged,
11267        AzureKeyVault,
11268        #[serde(skip_deserializing)]
11269        UnknownValue(String),
11270    }
11271    impl FromStr for ServerKeyType {
11272        type Err = value::Error;
11273        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11274            Self::deserialize(s.into_deserializer())
11275        }
11276    }
11277    impl<'de> Deserialize<'de> for ServerKeyType {
11278        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11279        where
11280            D: Deserializer<'de>,
11281        {
11282            let s = String::deserialize(deserializer)?;
11283            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11284            Ok(deserialized)
11285        }
11286    }
11287    impl Serialize for ServerKeyType {
11288        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11289        where
11290            S: Serializer,
11291        {
11292            match self {
11293                Self::ServiceManaged => serializer.serialize_unit_variant("ServerKeyType", 0u32, "ServiceManaged"),
11294                Self::AzureKeyVault => serializer.serialize_unit_variant("ServerKeyType", 1u32, "AzureKeyVault"),
11295                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11296            }
11297        }
11298    }
11299}
11300#[doc = "A list of managed instances."]
11301#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11302pub struct ManagedInstanceListResult {
11303    #[doc = "Array of results."]
11304    #[serde(
11305        default,
11306        deserialize_with = "azure_core::util::deserialize_null_as_default",
11307        skip_serializing_if = "Vec::is_empty"
11308    )]
11309    pub value: Vec<ManagedInstance>,
11310    #[doc = "Link to retrieve next page of results."]
11311    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11312    pub next_link: Option<String>,
11313}
11314impl azure_core::Continuable for ManagedInstanceListResult {
11315    type Continuation = String;
11316    fn continuation(&self) -> Option<Self::Continuation> {
11317        self.next_link.clone().filter(|value| !value.is_empty())
11318    }
11319}
11320impl ManagedInstanceListResult {
11321    pub fn new() -> Self {
11322        Self::default()
11323    }
11324}
11325#[doc = "A long term retention backup for a managed database."]
11326#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11327pub struct ManagedInstanceLongTermRetentionBackup {
11328    #[serde(flatten)]
11329    pub proxy_resource: ProxyResource,
11330    #[doc = "Properties of a long term retention backup"]
11331    #[serde(default, skip_serializing_if = "Option::is_none")]
11332    pub properties: Option<ManagedInstanceLongTermRetentionBackupProperties>,
11333}
11334impl ManagedInstanceLongTermRetentionBackup {
11335    pub fn new() -> Self {
11336        Self::default()
11337    }
11338}
11339#[doc = "A list of long term retention backups for managed database(s)."]
11340#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11341pub struct ManagedInstanceLongTermRetentionBackupListResult {
11342    #[doc = "Array of results."]
11343    #[serde(
11344        default,
11345        deserialize_with = "azure_core::util::deserialize_null_as_default",
11346        skip_serializing_if = "Vec::is_empty"
11347    )]
11348    pub value: Vec<ManagedInstanceLongTermRetentionBackup>,
11349    #[doc = "Link to retrieve next page of results."]
11350    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11351    pub next_link: Option<String>,
11352}
11353impl azure_core::Continuable for ManagedInstanceLongTermRetentionBackupListResult {
11354    type Continuation = String;
11355    fn continuation(&self) -> Option<Self::Continuation> {
11356        self.next_link.clone().filter(|value| !value.is_empty())
11357    }
11358}
11359impl ManagedInstanceLongTermRetentionBackupListResult {
11360    pub fn new() -> Self {
11361        Self::default()
11362    }
11363}
11364#[doc = "Properties of a long term retention backup"]
11365#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11366pub struct ManagedInstanceLongTermRetentionBackupProperties {
11367    #[doc = "The managed instance that the backup database belongs to."]
11368    #[serde(rename = "managedInstanceName", default, skip_serializing_if = "Option::is_none")]
11369    pub managed_instance_name: Option<String>,
11370    #[doc = "The create time of the instance."]
11371    #[serde(rename = "managedInstanceCreateTime", default, with = "azure_core::date::rfc3339::option")]
11372    pub managed_instance_create_time: Option<::time::OffsetDateTime>,
11373    #[doc = "The name of the database the backup belong to"]
11374    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
11375    pub database_name: Option<String>,
11376    #[doc = "The delete time of the database"]
11377    #[serde(rename = "databaseDeletionTime", default, with = "azure_core::date::rfc3339::option")]
11378    pub database_deletion_time: Option<::time::OffsetDateTime>,
11379    #[doc = "The time the backup was taken"]
11380    #[serde(rename = "backupTime", default, with = "azure_core::date::rfc3339::option")]
11381    pub backup_time: Option<::time::OffsetDateTime>,
11382    #[doc = "The time the long term retention backup will expire."]
11383    #[serde(rename = "backupExpirationTime", default, with = "azure_core::date::rfc3339::option")]
11384    pub backup_expiration_time: Option<::time::OffsetDateTime>,
11385    #[doc = "The storage redundancy type of the backup"]
11386    #[serde(rename = "backupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
11387    pub backup_storage_redundancy: Option<managed_instance_long_term_retention_backup_properties::BackupStorageRedundancy>,
11388    #[doc = "The BackupStorageAccessTier for the LTR backup"]
11389    #[serde(rename = "backupStorageAccessTier", default, skip_serializing_if = "Option::is_none")]
11390    pub backup_storage_access_tier: Option<managed_instance_long_term_retention_backup_properties::BackupStorageAccessTier>,
11391}
11392impl ManagedInstanceLongTermRetentionBackupProperties {
11393    pub fn new() -> Self {
11394        Self::default()
11395    }
11396}
11397pub mod managed_instance_long_term_retention_backup_properties {
11398    use super::*;
11399    #[doc = "The storage redundancy type of the backup"]
11400    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11401    #[serde(remote = "BackupStorageRedundancy")]
11402    pub enum BackupStorageRedundancy {
11403        Geo,
11404        Local,
11405        Zone,
11406        GeoZone,
11407        #[serde(skip_deserializing)]
11408        UnknownValue(String),
11409    }
11410    impl FromStr for BackupStorageRedundancy {
11411        type Err = value::Error;
11412        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11413            Self::deserialize(s.into_deserializer())
11414        }
11415    }
11416    impl<'de> Deserialize<'de> for BackupStorageRedundancy {
11417        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11418        where
11419            D: Deserializer<'de>,
11420        {
11421            let s = String::deserialize(deserializer)?;
11422            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11423            Ok(deserialized)
11424        }
11425    }
11426    impl Serialize for BackupStorageRedundancy {
11427        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11428        where
11429            S: Serializer,
11430        {
11431            match self {
11432                Self::Geo => serializer.serialize_unit_variant("BackupStorageRedundancy", 0u32, "Geo"),
11433                Self::Local => serializer.serialize_unit_variant("BackupStorageRedundancy", 1u32, "Local"),
11434                Self::Zone => serializer.serialize_unit_variant("BackupStorageRedundancy", 2u32, "Zone"),
11435                Self::GeoZone => serializer.serialize_unit_variant("BackupStorageRedundancy", 3u32, "GeoZone"),
11436                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11437            }
11438        }
11439    }
11440    #[doc = "The BackupStorageAccessTier for the LTR backup"]
11441    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11442    #[serde(remote = "BackupStorageAccessTier")]
11443    pub enum BackupStorageAccessTier {
11444        Hot,
11445        Archive,
11446        #[serde(skip_deserializing)]
11447        UnknownValue(String),
11448    }
11449    impl FromStr for BackupStorageAccessTier {
11450        type Err = value::Error;
11451        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11452            Self::deserialize(s.into_deserializer())
11453        }
11454    }
11455    impl<'de> Deserialize<'de> for BackupStorageAccessTier {
11456        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11457        where
11458            D: Deserializer<'de>,
11459        {
11460            let s = String::deserialize(deserializer)?;
11461            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11462            Ok(deserialized)
11463        }
11464    }
11465    impl Serialize for BackupStorageAccessTier {
11466        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11467        where
11468            S: Serializer,
11469        {
11470            match self {
11471                Self::Hot => serializer.serialize_unit_variant("BackupStorageAccessTier", 0u32, "Hot"),
11472                Self::Archive => serializer.serialize_unit_variant("BackupStorageAccessTier", 1u32, "Archive"),
11473                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11474            }
11475        }
11476    }
11477}
11478#[doc = "A long term retention policy."]
11479#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11480pub struct ManagedInstanceLongTermRetentionPolicy {
11481    #[serde(flatten)]
11482    pub proxy_resource: ProxyResource,
11483    #[doc = "Properties of a long term retention policy"]
11484    #[serde(default, skip_serializing_if = "Option::is_none")]
11485    pub properties: Option<ManagedInstanceLongTermRetentionPolicyProperties>,
11486}
11487impl ManagedInstanceLongTermRetentionPolicy {
11488    pub fn new() -> Self {
11489        Self::default()
11490    }
11491}
11492#[doc = "A list of long term retention policies."]
11493#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11494pub struct ManagedInstanceLongTermRetentionPolicyListResult {
11495    #[doc = "Array of results."]
11496    #[serde(
11497        default,
11498        deserialize_with = "azure_core::util::deserialize_null_as_default",
11499        skip_serializing_if = "Vec::is_empty"
11500    )]
11501    pub value: Vec<ManagedInstanceLongTermRetentionPolicy>,
11502    #[doc = "Link to retrieve next page of results."]
11503    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11504    pub next_link: Option<String>,
11505}
11506impl azure_core::Continuable for ManagedInstanceLongTermRetentionPolicyListResult {
11507    type Continuation = String;
11508    fn continuation(&self) -> Option<Self::Continuation> {
11509        self.next_link.clone().filter(|value| !value.is_empty())
11510    }
11511}
11512impl ManagedInstanceLongTermRetentionPolicyListResult {
11513    pub fn new() -> Self {
11514        Self::default()
11515    }
11516}
11517#[doc = "Properties of a long term retention policy"]
11518#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11519pub struct ManagedInstanceLongTermRetentionPolicyProperties {
11520    #[doc = "The BackupStorageAccessTier for the LTR backups"]
11521    #[serde(rename = "backupStorageAccessTier", default, skip_serializing_if = "Option::is_none")]
11522    pub backup_storage_access_tier: Option<managed_instance_long_term_retention_policy_properties::BackupStorageAccessTier>,
11523    #[doc = "The weekly retention policy for an LTR backup in an ISO 8601 format."]
11524    #[serde(rename = "weeklyRetention", default, skip_serializing_if = "Option::is_none")]
11525    pub weekly_retention: Option<String>,
11526    #[doc = "The monthly retention policy for an LTR backup in an ISO 8601 format."]
11527    #[serde(rename = "monthlyRetention", default, skip_serializing_if = "Option::is_none")]
11528    pub monthly_retention: Option<String>,
11529    #[doc = "The yearly retention policy for an LTR backup in an ISO 8601 format."]
11530    #[serde(rename = "yearlyRetention", default, skip_serializing_if = "Option::is_none")]
11531    pub yearly_retention: Option<String>,
11532    #[doc = "The week of year to take the yearly backup in an ISO 8601 format."]
11533    #[serde(rename = "weekOfYear", default, skip_serializing_if = "Option::is_none")]
11534    pub week_of_year: Option<i32>,
11535}
11536impl ManagedInstanceLongTermRetentionPolicyProperties {
11537    pub fn new() -> Self {
11538        Self::default()
11539    }
11540}
11541pub mod managed_instance_long_term_retention_policy_properties {
11542    use super::*;
11543    #[doc = "The BackupStorageAccessTier for the LTR backups"]
11544    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11545    #[serde(remote = "BackupStorageAccessTier")]
11546    pub enum BackupStorageAccessTier {
11547        Hot,
11548        Archive,
11549        #[serde(skip_deserializing)]
11550        UnknownValue(String),
11551    }
11552    impl FromStr for BackupStorageAccessTier {
11553        type Err = value::Error;
11554        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11555            Self::deserialize(s.into_deserializer())
11556        }
11557    }
11558    impl<'de> Deserialize<'de> for BackupStorageAccessTier {
11559        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11560        where
11561            D: Deserializer<'de>,
11562        {
11563            let s = String::deserialize(deserializer)?;
11564            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11565            Ok(deserialized)
11566        }
11567    }
11568    impl Serialize for BackupStorageAccessTier {
11569        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11570        where
11571            S: Serializer,
11572        {
11573            match self {
11574                Self::Hot => serializer.serialize_unit_variant("BackupStorageAccessTier", 0u32, "Hot"),
11575                Self::Archive => serializer.serialize_unit_variant("BackupStorageAccessTier", 1u32, "Archive"),
11576                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11577            }
11578        }
11579    }
11580}
11581#[doc = "The maintenance configuration capability"]
11582#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11583pub struct ManagedInstanceMaintenanceConfigurationCapability {
11584    #[doc = "Maintenance configuration name"]
11585    #[serde(default, skip_serializing_if = "Option::is_none")]
11586    pub name: Option<String>,
11587    #[doc = "The status of the capability."]
11588    #[serde(default, skip_serializing_if = "Option::is_none")]
11589    pub status: Option<managed_instance_maintenance_configuration_capability::Status>,
11590    #[doc = "The reason for the capability not being available."]
11591    #[serde(default, skip_serializing_if = "Option::is_none")]
11592    pub reason: Option<String>,
11593}
11594impl ManagedInstanceMaintenanceConfigurationCapability {
11595    pub fn new() -> Self {
11596        Self::default()
11597    }
11598}
11599pub mod managed_instance_maintenance_configuration_capability {
11600    use super::*;
11601    #[doc = "The status of the capability."]
11602    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11603    pub enum Status {
11604        Visible,
11605        Available,
11606        Default,
11607        Disabled,
11608    }
11609}
11610#[doc = "A managed instance operation."]
11611#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11612pub struct ManagedInstanceOperation {
11613    #[serde(flatten)]
11614    pub proxy_resource: ProxyResource,
11615    #[doc = "The properties of a managed instance operation."]
11616    #[serde(default, skip_serializing_if = "Option::is_none")]
11617    pub properties: Option<ManagedInstanceOperationProperties>,
11618}
11619impl ManagedInstanceOperation {
11620    pub fn new() -> Self {
11621        Self::default()
11622    }
11623}
11624#[doc = "The response to a list managed instance operations request"]
11625#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11626pub struct ManagedInstanceOperationListResult {
11627    #[doc = "Array of results."]
11628    #[serde(
11629        default,
11630        deserialize_with = "azure_core::util::deserialize_null_as_default",
11631        skip_serializing_if = "Vec::is_empty"
11632    )]
11633    pub value: Vec<ManagedInstanceOperation>,
11634    #[doc = "Link to retrieve next page of results."]
11635    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11636    pub next_link: Option<String>,
11637}
11638impl azure_core::Continuable for ManagedInstanceOperationListResult {
11639    type Continuation = String;
11640    fn continuation(&self) -> Option<Self::Continuation> {
11641        self.next_link.clone().filter(|value| !value.is_empty())
11642    }
11643}
11644impl ManagedInstanceOperationListResult {
11645    pub fn new() -> Self {
11646        Self::default()
11647    }
11648}
11649#[doc = "The parameters of a managed instance operation."]
11650#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11651pub struct ManagedInstanceOperationParametersPair {
11652    #[serde(rename = "currentParameters", default, skip_serializing_if = "Option::is_none")]
11653    pub current_parameters: Option<UpsertManagedServerOperationParameters>,
11654    #[serde(rename = "requestedParameters", default, skip_serializing_if = "Option::is_none")]
11655    pub requested_parameters: Option<UpsertManagedServerOperationParameters>,
11656}
11657impl ManagedInstanceOperationParametersPair {
11658    pub fn new() -> Self {
11659        Self::default()
11660    }
11661}
11662#[doc = "The properties of a managed instance operation."]
11663#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11664pub struct ManagedInstanceOperationProperties {
11665    #[doc = "The name of the managed instance the operation is being performed on."]
11666    #[serde(rename = "managedInstanceName", default, skip_serializing_if = "Option::is_none")]
11667    pub managed_instance_name: Option<String>,
11668    #[doc = "The name of operation."]
11669    #[serde(default, skip_serializing_if = "Option::is_none")]
11670    pub operation: Option<String>,
11671    #[doc = "The friendly name of operation."]
11672    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
11673    pub operation_friendly_name: Option<String>,
11674    #[doc = "The percentage of the operation completed."]
11675    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
11676    pub percent_complete: Option<i32>,
11677    #[doc = "The operation start time."]
11678    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
11679    pub start_time: Option<::time::OffsetDateTime>,
11680    #[doc = "The operation state."]
11681    #[serde(default, skip_serializing_if = "Option::is_none")]
11682    pub state: Option<managed_instance_operation_properties::State>,
11683    #[doc = "The operation error code."]
11684    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
11685    pub error_code: Option<i32>,
11686    #[doc = "The operation error description."]
11687    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
11688    pub error_description: Option<String>,
11689    #[doc = "The operation error severity."]
11690    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
11691    pub error_severity: Option<i32>,
11692    #[doc = "Whether or not the error is a user error."]
11693    #[serde(rename = "isUserError", default, skip_serializing_if = "Option::is_none")]
11694    pub is_user_error: Option<bool>,
11695    #[doc = "The estimated completion time of the operation."]
11696    #[serde(rename = "estimatedCompletionTime", default, with = "azure_core::date::rfc3339::option")]
11697    pub estimated_completion_time: Option<::time::OffsetDateTime>,
11698    #[doc = "The operation description."]
11699    #[serde(default, skip_serializing_if = "Option::is_none")]
11700    pub description: Option<String>,
11701    #[doc = "Whether the operation can be cancelled."]
11702    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
11703    pub is_cancellable: Option<bool>,
11704    #[doc = "The parameters of a managed instance operation."]
11705    #[serde(rename = "operationParameters", default, skip_serializing_if = "Option::is_none")]
11706    pub operation_parameters: Option<ManagedInstanceOperationParametersPair>,
11707    #[doc = "The steps of a managed instance operation."]
11708    #[serde(rename = "operationSteps", default, skip_serializing_if = "Option::is_none")]
11709    pub operation_steps: Option<ManagedInstanceOperationSteps>,
11710}
11711impl ManagedInstanceOperationProperties {
11712    pub fn new() -> Self {
11713        Self::default()
11714    }
11715}
11716pub mod managed_instance_operation_properties {
11717    use super::*;
11718    #[doc = "The operation state."]
11719    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11720    #[serde(remote = "State")]
11721    pub enum State {
11722        Pending,
11723        InProgress,
11724        Succeeded,
11725        Failed,
11726        CancelInProgress,
11727        Cancelled,
11728        #[serde(skip_deserializing)]
11729        UnknownValue(String),
11730    }
11731    impl FromStr for State {
11732        type Err = value::Error;
11733        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
11734            Self::deserialize(s.into_deserializer())
11735        }
11736    }
11737    impl<'de> Deserialize<'de> for State {
11738        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11739        where
11740            D: Deserializer<'de>,
11741        {
11742            let s = String::deserialize(deserializer)?;
11743            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
11744            Ok(deserialized)
11745        }
11746    }
11747    impl Serialize for State {
11748        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11749        where
11750            S: Serializer,
11751        {
11752            match self {
11753                Self::Pending => serializer.serialize_unit_variant("State", 0u32, "Pending"),
11754                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
11755                Self::Succeeded => serializer.serialize_unit_variant("State", 2u32, "Succeeded"),
11756                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
11757                Self::CancelInProgress => serializer.serialize_unit_variant("State", 4u32, "CancelInProgress"),
11758                Self::Cancelled => serializer.serialize_unit_variant("State", 5u32, "Cancelled"),
11759                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
11760            }
11761        }
11762    }
11763}
11764#[doc = "The steps of a managed instance operation."]
11765#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11766pub struct ManagedInstanceOperationSteps {
11767    #[doc = "The total number of operation steps."]
11768    #[serde(rename = "totalSteps", default, skip_serializing_if = "Option::is_none")]
11769    pub total_steps: Option<String>,
11770    #[doc = "The number of current operation steps."]
11771    #[serde(rename = "currentStep", default, skip_serializing_if = "Option::is_none")]
11772    pub current_step: Option<i32>,
11773    #[doc = "The operation steps list."]
11774    #[serde(
11775        rename = "stepsList",
11776        default,
11777        deserialize_with = "azure_core::util::deserialize_null_as_default",
11778        skip_serializing_if = "Vec::is_empty"
11779    )]
11780    pub steps_list: Vec<UpsertManagedServerOperationStepWithEstimatesAndDuration>,
11781}
11782impl ManagedInstanceOperationSteps {
11783    pub fn new() -> Self {
11784        Self::default()
11785    }
11786}
11787#[doc = "Pairs of Managed Instances in the failover group."]
11788#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11789pub struct ManagedInstancePairInfo {
11790    #[doc = "Id of Primary Managed Instance in pair."]
11791    #[serde(rename = "primaryManagedInstanceId", default, skip_serializing_if = "Option::is_none")]
11792    pub primary_managed_instance_id: Option<String>,
11793    #[doc = "Id of Partner Managed Instance in pair."]
11794    #[serde(rename = "partnerManagedInstanceId", default, skip_serializing_if = "Option::is_none")]
11795    pub partner_managed_instance_id: Option<String>,
11796}
11797impl ManagedInstancePairInfo {
11798    pub fn new() -> Self {
11799        Self::default()
11800    }
11801}
11802#[doc = "A private endpoint connection under a managed instance"]
11803#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11804pub struct ManagedInstancePecProperty {
11805    #[doc = "Resource ID."]
11806    #[serde(default, skip_serializing_if = "Option::is_none")]
11807    pub id: Option<String>,
11808    #[doc = "Properties of a private endpoint connection."]
11809    #[serde(default, skip_serializing_if = "Option::is_none")]
11810    pub properties: Option<ManagedInstancePrivateEndpointConnectionProperties>,
11811}
11812impl ManagedInstancePecProperty {
11813    pub fn new() -> Self {
11814        Self::default()
11815    }
11816}
11817#[doc = "A private endpoint connection"]
11818#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11819pub struct ManagedInstancePrivateEndpointConnection {
11820    #[serde(flatten)]
11821    pub proxy_resource: ProxyResource,
11822    #[doc = "Properties of a private endpoint connection."]
11823    #[serde(default, skip_serializing_if = "Option::is_none")]
11824    pub properties: Option<ManagedInstancePrivateEndpointConnectionProperties>,
11825}
11826impl ManagedInstancePrivateEndpointConnection {
11827    pub fn new() -> Self {
11828        Self::default()
11829    }
11830}
11831#[doc = "A list of private endpoint connections."]
11832#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11833pub struct ManagedInstancePrivateEndpointConnectionListResult {
11834    #[doc = "Array of results."]
11835    #[serde(
11836        default,
11837        deserialize_with = "azure_core::util::deserialize_null_as_default",
11838        skip_serializing_if = "Vec::is_empty"
11839    )]
11840    pub value: Vec<ManagedInstancePrivateEndpointConnection>,
11841    #[doc = "Link to retrieve next page of results."]
11842    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11843    pub next_link: Option<String>,
11844}
11845impl azure_core::Continuable for ManagedInstancePrivateEndpointConnectionListResult {
11846    type Continuation = String;
11847    fn continuation(&self) -> Option<Self::Continuation> {
11848        self.next_link.clone().filter(|value| !value.is_empty())
11849    }
11850}
11851impl ManagedInstancePrivateEndpointConnectionListResult {
11852    pub fn new() -> Self {
11853        Self::default()
11854    }
11855}
11856#[doc = "Properties of a private endpoint connection."]
11857#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11858pub struct ManagedInstancePrivateEndpointConnectionProperties {
11859    #[serde(rename = "privateEndpoint", default, skip_serializing_if = "Option::is_none")]
11860    pub private_endpoint: Option<ManagedInstancePrivateEndpointProperty>,
11861    #[serde(rename = "privateLinkServiceConnectionState", default, skip_serializing_if = "Option::is_none")]
11862    pub private_link_service_connection_state: Option<ManagedInstancePrivateLinkServiceConnectionStateProperty>,
11863    #[doc = "State of the Private Endpoint Connection."]
11864    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
11865    pub provisioning_state: Option<String>,
11866}
11867impl ManagedInstancePrivateEndpointConnectionProperties {
11868    pub fn new() -> Self {
11869        Self::default()
11870    }
11871}
11872#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11873pub struct ManagedInstancePrivateEndpointProperty {
11874    #[doc = "Resource id of the private endpoint."]
11875    #[serde(default, skip_serializing_if = "Option::is_none")]
11876    pub id: Option<String>,
11877}
11878impl ManagedInstancePrivateEndpointProperty {
11879    pub fn new() -> Self {
11880        Self::default()
11881    }
11882}
11883#[doc = "A private link resource"]
11884#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11885pub struct ManagedInstancePrivateLink {
11886    #[serde(flatten)]
11887    pub proxy_resource: ProxyResource,
11888    #[doc = "Properties of a private link resource."]
11889    #[serde(default, skip_serializing_if = "Option::is_none")]
11890    pub properties: Option<ManagedInstancePrivateLinkProperties>,
11891}
11892impl ManagedInstancePrivateLink {
11893    pub fn new() -> Self {
11894        Self::default()
11895    }
11896}
11897#[doc = "A list of private link resources"]
11898#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11899pub struct ManagedInstancePrivateLinkListResult {
11900    #[doc = "Array of results."]
11901    #[serde(
11902        default,
11903        deserialize_with = "azure_core::util::deserialize_null_as_default",
11904        skip_serializing_if = "Vec::is_empty"
11905    )]
11906    pub value: Vec<ManagedInstancePrivateLink>,
11907    #[doc = "Link to retrieve next page of results."]
11908    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
11909    pub next_link: Option<String>,
11910}
11911impl azure_core::Continuable for ManagedInstancePrivateLinkListResult {
11912    type Continuation = String;
11913    fn continuation(&self) -> Option<Self::Continuation> {
11914        self.next_link.clone().filter(|value| !value.is_empty())
11915    }
11916}
11917impl ManagedInstancePrivateLinkListResult {
11918    pub fn new() -> Self {
11919        Self::default()
11920    }
11921}
11922#[doc = "Properties of a private link resource."]
11923#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11924pub struct ManagedInstancePrivateLinkProperties {
11925    #[doc = "The private link resource group id."]
11926    #[serde(rename = "groupId", default, skip_serializing_if = "Option::is_none")]
11927    pub group_id: Option<String>,
11928    #[doc = "The private link resource required member names."]
11929    #[serde(
11930        rename = "requiredMembers",
11931        default,
11932        deserialize_with = "azure_core::util::deserialize_null_as_default",
11933        skip_serializing_if = "Vec::is_empty"
11934    )]
11935    pub required_members: Vec<String>,
11936    #[doc = "The private link resource required zone names."]
11937    #[serde(
11938        rename = "requiredZoneNames",
11939        default,
11940        deserialize_with = "azure_core::util::deserialize_null_as_default",
11941        skip_serializing_if = "Vec::is_empty"
11942    )]
11943    pub required_zone_names: Vec<String>,
11944}
11945impl ManagedInstancePrivateLinkProperties {
11946    pub fn new() -> Self {
11947        Self::default()
11948    }
11949}
11950#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
11951pub struct ManagedInstancePrivateLinkServiceConnectionStateProperty {
11952    #[doc = "The private link service connection status."]
11953    pub status: String,
11954    #[doc = "The private link service connection description."]
11955    pub description: String,
11956    #[doc = "The private link service connection description."]
11957    #[serde(rename = "actionsRequired", default, skip_serializing_if = "Option::is_none")]
11958    pub actions_required: Option<String>,
11959}
11960impl ManagedInstancePrivateLinkServiceConnectionStateProperty {
11961    pub fn new(status: String, description: String) -> Self {
11962        Self {
11963            status,
11964            description,
11965            actions_required: None,
11966        }
11967    }
11968}
11969#[doc = "The properties of a managed instance."]
11970#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
11971pub struct ManagedInstanceProperties {
11972    #[doc = "Provisioning state of managed instance."]
11973    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
11974    pub provisioning_state: Option<managed_instance_properties::ProvisioningState>,
11975    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: Regular instance creation.\r\n\r\nRestore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified."]
11976    #[serde(rename = "managedInstanceCreateMode", default, skip_serializing_if = "Option::is_none")]
11977    pub managed_instance_create_mode: Option<managed_instance_properties::ManagedInstanceCreateMode>,
11978    #[doc = "The fully qualified domain name of the managed instance."]
11979    #[serde(rename = "fullyQualifiedDomainName", default, skip_serializing_if = "Option::is_none")]
11980    pub fully_qualified_domain_name: Option<String>,
11981    #[doc = "Whether or not this is a GPv2 variant of General Purpose edition."]
11982    #[serde(rename = "isGeneralPurposeV2", default, skip_serializing_if = "Option::is_none")]
11983    pub is_general_purpose_v2: Option<bool>,
11984    #[doc = "Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation)."]
11985    #[serde(rename = "administratorLogin", default, skip_serializing_if = "Option::is_none")]
11986    pub administrator_login: Option<String>,
11987    #[doc = "The administrator login password (required for managed instance creation)."]
11988    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
11989    pub administrator_login_password: Option<String>,
11990    #[doc = "Subnet resource ID for the managed instance."]
11991    #[serde(rename = "subnetId", default, skip_serializing_if = "Option::is_none")]
11992    pub subnet_id: Option<String>,
11993    #[doc = "The state of the managed instance."]
11994    #[serde(default, skip_serializing_if = "Option::is_none")]
11995    pub state: Option<String>,
11996    #[doc = "The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses)."]
11997    #[serde(rename = "licenseType", default, skip_serializing_if = "Option::is_none")]
11998    pub license_type: Option<managed_instance_properties::LicenseType>,
11999    #[doc = "Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR)."]
12000    #[serde(rename = "hybridSecondaryUsage", default, skip_serializing_if = "Option::is_none")]
12001    pub hybrid_secondary_usage: Option<managed_instance_properties::HybridSecondaryUsage>,
12002    #[doc = "Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR)."]
12003    #[serde(rename = "hybridSecondaryUsageDetected", default, skip_serializing_if = "Option::is_none")]
12004    pub hybrid_secondary_usage_detected: Option<managed_instance_properties::HybridSecondaryUsageDetected>,
12005    #[doc = "The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80."]
12006    #[serde(rename = "vCores", default, skip_serializing_if = "Option::is_none")]
12007    pub v_cores: Option<i32>,
12008    #[doc = "Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores."]
12009    #[serde(rename = "storageSizeInGB", default, skip_serializing_if = "Option::is_none")]
12010    pub storage_size_in_gb: Option<i32>,
12011    #[doc = "Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores."]
12012    #[serde(rename = "storageIOps", default, skip_serializing_if = "Option::is_none")]
12013    pub storage_i_ops: Option<i32>,
12014    #[doc = "Storage throughput MBps parameter is not supported in the instance create/update operation."]
12015    #[serde(rename = "storageThroughputMBps", default, skip_serializing_if = "Option::is_none")]
12016    pub storage_throughput_m_bps: Option<i32>,
12017    #[doc = "Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores."]
12018    #[serde(rename = "totalMemoryMB", default, skip_serializing_if = "Option::is_none")]
12019    pub total_memory_mb: Option<i32>,
12020    #[doc = "Collation of the managed instance."]
12021    #[serde(default, skip_serializing_if = "Option::is_none")]
12022    pub collation: Option<String>,
12023    #[doc = "The Dns Zone that the managed instance is in."]
12024    #[serde(rename = "dnsZone", default, skip_serializing_if = "Option::is_none")]
12025    pub dns_zone: Option<String>,
12026    #[doc = "The resource id of another managed instance whose DNS zone this managed instance will share after creation."]
12027    #[serde(rename = "dnsZonePartner", default, skip_serializing_if = "Option::is_none")]
12028    pub dns_zone_partner: Option<String>,
12029    #[doc = "Whether or not the public data endpoint is enabled."]
12030    #[serde(rename = "publicDataEndpointEnabled", default, skip_serializing_if = "Option::is_none")]
12031    pub public_data_endpoint_enabled: Option<bool>,
12032    #[doc = "The resource identifier of the source managed instance associated with create operation of this instance."]
12033    #[serde(rename = "sourceManagedInstanceId", default, skip_serializing_if = "Option::is_none")]
12034    pub source_managed_instance_id: Option<String>,
12035    #[doc = "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database."]
12036    #[serde(rename = "restorePointInTime", default, with = "azure_core::date::rfc3339::option")]
12037    pub restore_point_in_time: Option<::time::OffsetDateTime>,
12038    #[doc = "Connection type used for connecting to the instance."]
12039    #[serde(rename = "proxyOverride", default, skip_serializing_if = "Option::is_none")]
12040    pub proxy_override: Option<managed_instance_properties::ProxyOverride>,
12041    #[doc = "Id of the timezone. Allowed values are timezones supported by Windows.\r\nWindows keeps details on supported timezones, including the id, in registry under\r\nKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones.\r\nYou can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.\r\nList of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.\r\nAn example of valid timezone id is \"Pacific Standard Time\" or \"W. Europe Standard Time\"."]
12042    #[serde(rename = "timezoneId", default, skip_serializing_if = "Option::is_none")]
12043    pub timezone_id: Option<String>,
12044    #[doc = "The Id of the instance pool this managed server belongs to."]
12045    #[serde(rename = "instancePoolId", default, skip_serializing_if = "Option::is_none")]
12046    pub instance_pool_id: Option<String>,
12047    #[doc = "Specifies maintenance configuration id to apply to this managed instance."]
12048    #[serde(rename = "maintenanceConfigurationId", default, skip_serializing_if = "Option::is_none")]
12049    pub maintenance_configuration_id: Option<String>,
12050    #[doc = "List of private endpoint connections on a managed instance."]
12051    #[serde(
12052        rename = "privateEndpointConnections",
12053        default,
12054        deserialize_with = "azure_core::util::deserialize_null_as_default",
12055        skip_serializing_if = "Vec::is_empty"
12056    )]
12057    pub private_endpoint_connections: Vec<ManagedInstancePecProperty>,
12058    #[doc = "Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'"]
12059    #[serde(rename = "minimalTlsVersion", default, skip_serializing_if = "Option::is_none")]
12060    pub minimal_tls_version: Option<String>,
12061    #[doc = "The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)"]
12062    #[serde(rename = "currentBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
12063    pub current_backup_storage_redundancy: Option<managed_instance_properties::CurrentBackupStorageRedundancy>,
12064    #[doc = "The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)"]
12065    #[serde(rename = "requestedBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
12066    pub requested_backup_storage_redundancy: Option<managed_instance_properties::RequestedBackupStorageRedundancy>,
12067    #[doc = "Whether or not the multi-az is enabled."]
12068    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
12069    pub zone_redundant: Option<bool>,
12070    #[doc = "The resource id of a user assigned identity to be used by default."]
12071    #[serde(rename = "primaryUserAssignedIdentityId", default, skip_serializing_if = "Option::is_none")]
12072    pub primary_user_assigned_identity_id: Option<String>,
12073    #[doc = "A CMK URI of the key to use for encryption."]
12074    #[serde(rename = "keyId", default, skip_serializing_if = "Option::is_none")]
12075    pub key_id: Option<String>,
12076    #[doc = "Properties of a active directory administrator."]
12077    #[serde(default, skip_serializing_if = "Option::is_none")]
12078    pub administrators: Option<ManagedInstanceExternalAdministrator>,
12079    #[doc = "The managed instance's service principal configuration for a resource."]
12080    #[serde(rename = "servicePrincipal", default, skip_serializing_if = "Option::is_none")]
12081    pub service_principal: Option<ServicePrincipal>,
12082    #[doc = "Virtual cluster resource id for the Managed Instance."]
12083    #[serde(rename = "virtualClusterId", default, skip_serializing_if = "Option::is_none")]
12084    pub virtual_cluster_id: Option<String>,
12085    #[doc = "Status of external governance."]
12086    #[serde(rename = "externalGovernanceStatus", default, skip_serializing_if = "Option::is_none")]
12087    pub external_governance_status: Option<managed_instance_properties::ExternalGovernanceStatus>,
12088    #[doc = "Pricing model of Managed Instance."]
12089    #[serde(rename = "pricingModel", default, skip_serializing_if = "Option::is_none")]
12090    pub pricing_model: Option<managed_instance_properties::PricingModel>,
12091    #[doc = "Specifies the point in time (ISO8601 format) of the Managed Instance creation."]
12092    #[serde(rename = "createTime", default, with = "azure_core::date::rfc3339::option")]
12093    pub create_time: Option<::time::OffsetDateTime>,
12094    #[doc = "The managed instance's authentication metadata lookup mode."]
12095    #[serde(rename = "authenticationMetadata", default, skip_serializing_if = "Option::is_none")]
12096    pub authentication_metadata: Option<managed_instance_properties::AuthenticationMetadata>,
12097    #[doc = "Specifies the internal format of instance databases specific to the SQL engine version."]
12098    #[serde(rename = "databaseFormat", default, skip_serializing_if = "Option::is_none")]
12099    pub database_format: Option<managed_instance_properties::DatabaseFormat>,
12100}
12101impl ManagedInstanceProperties {
12102    pub fn new() -> Self {
12103        Self::default()
12104    }
12105}
12106pub mod managed_instance_properties {
12107    use super::*;
12108    #[doc = "Provisioning state of managed instance."]
12109    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12110    #[serde(remote = "ProvisioningState")]
12111    pub enum ProvisioningState {
12112        Created,
12113        InProgress,
12114        Succeeded,
12115        Failed,
12116        Canceled,
12117        #[serde(skip_deserializing)]
12118        UnknownValue(String),
12119    }
12120    impl FromStr for ProvisioningState {
12121        type Err = value::Error;
12122        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12123            Self::deserialize(s.into_deserializer())
12124        }
12125    }
12126    impl<'de> Deserialize<'de> for ProvisioningState {
12127        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12128        where
12129            D: Deserializer<'de>,
12130        {
12131            let s = String::deserialize(deserializer)?;
12132            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12133            Ok(deserialized)
12134        }
12135    }
12136    impl Serialize for ProvisioningState {
12137        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12138        where
12139            S: Serializer,
12140        {
12141            match self {
12142                Self::Created => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Created"),
12143                Self::InProgress => serializer.serialize_unit_variant("ProvisioningState", 1u32, "InProgress"),
12144                Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
12145                Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
12146                Self::Canceled => serializer.serialize_unit_variant("ProvisioningState", 4u32, "Canceled"),
12147                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12148            }
12149        }
12150    }
12151    #[doc = "Specifies the mode of database creation.\r\n\r\nDefault: Regular instance creation.\r\n\r\nRestore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified."]
12152    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12153    #[serde(remote = "ManagedInstanceCreateMode")]
12154    pub enum ManagedInstanceCreateMode {
12155        Default,
12156        PointInTimeRestore,
12157        #[serde(skip_deserializing)]
12158        UnknownValue(String),
12159    }
12160    impl FromStr for ManagedInstanceCreateMode {
12161        type Err = value::Error;
12162        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12163            Self::deserialize(s.into_deserializer())
12164        }
12165    }
12166    impl<'de> Deserialize<'de> for ManagedInstanceCreateMode {
12167        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12168        where
12169            D: Deserializer<'de>,
12170        {
12171            let s = String::deserialize(deserializer)?;
12172            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12173            Ok(deserialized)
12174        }
12175    }
12176    impl Serialize for ManagedInstanceCreateMode {
12177        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12178        where
12179            S: Serializer,
12180        {
12181            match self {
12182                Self::Default => serializer.serialize_unit_variant("ManagedInstanceCreateMode", 0u32, "Default"),
12183                Self::PointInTimeRestore => serializer.serialize_unit_variant("ManagedInstanceCreateMode", 1u32, "PointInTimeRestore"),
12184                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12185            }
12186        }
12187    }
12188    #[doc = "The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses)."]
12189    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12190    #[serde(remote = "LicenseType")]
12191    pub enum LicenseType {
12192        LicenseIncluded,
12193        BasePrice,
12194        #[serde(skip_deserializing)]
12195        UnknownValue(String),
12196    }
12197    impl FromStr for LicenseType {
12198        type Err = value::Error;
12199        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12200            Self::deserialize(s.into_deserializer())
12201        }
12202    }
12203    impl<'de> Deserialize<'de> for LicenseType {
12204        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12205        where
12206            D: Deserializer<'de>,
12207        {
12208            let s = String::deserialize(deserializer)?;
12209            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12210            Ok(deserialized)
12211        }
12212    }
12213    impl Serialize for LicenseType {
12214        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12215        where
12216            S: Serializer,
12217        {
12218            match self {
12219                Self::LicenseIncluded => serializer.serialize_unit_variant("LicenseType", 0u32, "LicenseIncluded"),
12220                Self::BasePrice => serializer.serialize_unit_variant("LicenseType", 1u32, "BasePrice"),
12221                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12222            }
12223        }
12224    }
12225    #[doc = "Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR)."]
12226    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12227    #[serde(remote = "HybridSecondaryUsage")]
12228    pub enum HybridSecondaryUsage {
12229        Active,
12230        Passive,
12231        #[serde(skip_deserializing)]
12232        UnknownValue(String),
12233    }
12234    impl FromStr for HybridSecondaryUsage {
12235        type Err = value::Error;
12236        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12237            Self::deserialize(s.into_deserializer())
12238        }
12239    }
12240    impl<'de> Deserialize<'de> for HybridSecondaryUsage {
12241        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12242        where
12243            D: Deserializer<'de>,
12244        {
12245            let s = String::deserialize(deserializer)?;
12246            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12247            Ok(deserialized)
12248        }
12249    }
12250    impl Serialize for HybridSecondaryUsage {
12251        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12252        where
12253            S: Serializer,
12254        {
12255            match self {
12256                Self::Active => serializer.serialize_unit_variant("HybridSecondaryUsage", 0u32, "Active"),
12257                Self::Passive => serializer.serialize_unit_variant("HybridSecondaryUsage", 1u32, "Passive"),
12258                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12259            }
12260        }
12261    }
12262    #[doc = "Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR)."]
12263    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12264    #[serde(remote = "HybridSecondaryUsageDetected")]
12265    pub enum HybridSecondaryUsageDetected {
12266        Active,
12267        Passive,
12268        #[serde(skip_deserializing)]
12269        UnknownValue(String),
12270    }
12271    impl FromStr for HybridSecondaryUsageDetected {
12272        type Err = value::Error;
12273        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12274            Self::deserialize(s.into_deserializer())
12275        }
12276    }
12277    impl<'de> Deserialize<'de> for HybridSecondaryUsageDetected {
12278        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12279        where
12280            D: Deserializer<'de>,
12281        {
12282            let s = String::deserialize(deserializer)?;
12283            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12284            Ok(deserialized)
12285        }
12286    }
12287    impl Serialize for HybridSecondaryUsageDetected {
12288        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12289        where
12290            S: Serializer,
12291        {
12292            match self {
12293                Self::Active => serializer.serialize_unit_variant("HybridSecondaryUsageDetected", 0u32, "Active"),
12294                Self::Passive => serializer.serialize_unit_variant("HybridSecondaryUsageDetected", 1u32, "Passive"),
12295                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12296            }
12297        }
12298    }
12299    #[doc = "Connection type used for connecting to the instance."]
12300    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12301    #[serde(remote = "ProxyOverride")]
12302    pub enum ProxyOverride {
12303        Proxy,
12304        Redirect,
12305        Default,
12306        #[serde(skip_deserializing)]
12307        UnknownValue(String),
12308    }
12309    impl FromStr for ProxyOverride {
12310        type Err = value::Error;
12311        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12312            Self::deserialize(s.into_deserializer())
12313        }
12314    }
12315    impl<'de> Deserialize<'de> for ProxyOverride {
12316        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12317        where
12318            D: Deserializer<'de>,
12319        {
12320            let s = String::deserialize(deserializer)?;
12321            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12322            Ok(deserialized)
12323        }
12324    }
12325    impl Serialize for ProxyOverride {
12326        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12327        where
12328            S: Serializer,
12329        {
12330            match self {
12331                Self::Proxy => serializer.serialize_unit_variant("ProxyOverride", 0u32, "Proxy"),
12332                Self::Redirect => serializer.serialize_unit_variant("ProxyOverride", 1u32, "Redirect"),
12333                Self::Default => serializer.serialize_unit_variant("ProxyOverride", 2u32, "Default"),
12334                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12335            }
12336        }
12337    }
12338    #[doc = "The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)"]
12339    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12340    #[serde(remote = "CurrentBackupStorageRedundancy")]
12341    pub enum CurrentBackupStorageRedundancy {
12342        Geo,
12343        Local,
12344        Zone,
12345        GeoZone,
12346        #[serde(skip_deserializing)]
12347        UnknownValue(String),
12348    }
12349    impl FromStr for CurrentBackupStorageRedundancy {
12350        type Err = value::Error;
12351        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12352            Self::deserialize(s.into_deserializer())
12353        }
12354    }
12355    impl<'de> Deserialize<'de> for CurrentBackupStorageRedundancy {
12356        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12357        where
12358            D: Deserializer<'de>,
12359        {
12360            let s = String::deserialize(deserializer)?;
12361            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12362            Ok(deserialized)
12363        }
12364    }
12365    impl Serialize for CurrentBackupStorageRedundancy {
12366        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12367        where
12368            S: Serializer,
12369        {
12370            match self {
12371                Self::Geo => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 0u32, "Geo"),
12372                Self::Local => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 1u32, "Local"),
12373                Self::Zone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 2u32, "Zone"),
12374                Self::GeoZone => serializer.serialize_unit_variant("CurrentBackupStorageRedundancy", 3u32, "GeoZone"),
12375                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12376            }
12377        }
12378    }
12379    #[doc = "The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)"]
12380    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12381    #[serde(remote = "RequestedBackupStorageRedundancy")]
12382    pub enum RequestedBackupStorageRedundancy {
12383        Geo,
12384        Local,
12385        Zone,
12386        GeoZone,
12387        #[serde(skip_deserializing)]
12388        UnknownValue(String),
12389    }
12390    impl FromStr for RequestedBackupStorageRedundancy {
12391        type Err = value::Error;
12392        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12393            Self::deserialize(s.into_deserializer())
12394        }
12395    }
12396    impl<'de> Deserialize<'de> for RequestedBackupStorageRedundancy {
12397        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12398        where
12399            D: Deserializer<'de>,
12400        {
12401            let s = String::deserialize(deserializer)?;
12402            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12403            Ok(deserialized)
12404        }
12405    }
12406    impl Serialize for RequestedBackupStorageRedundancy {
12407        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12408        where
12409            S: Serializer,
12410        {
12411            match self {
12412                Self::Geo => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 0u32, "Geo"),
12413                Self::Local => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 1u32, "Local"),
12414                Self::Zone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 2u32, "Zone"),
12415                Self::GeoZone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 3u32, "GeoZone"),
12416                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12417            }
12418        }
12419    }
12420    #[doc = "Status of external governance."]
12421    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12422    #[serde(remote = "ExternalGovernanceStatus")]
12423    pub enum ExternalGovernanceStatus {
12424        Enabled,
12425        Disabled,
12426        #[serde(skip_deserializing)]
12427        UnknownValue(String),
12428    }
12429    impl FromStr for ExternalGovernanceStatus {
12430        type Err = value::Error;
12431        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12432            Self::deserialize(s.into_deserializer())
12433        }
12434    }
12435    impl<'de> Deserialize<'de> for ExternalGovernanceStatus {
12436        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12437        where
12438            D: Deserializer<'de>,
12439        {
12440            let s = String::deserialize(deserializer)?;
12441            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12442            Ok(deserialized)
12443        }
12444    }
12445    impl Serialize for ExternalGovernanceStatus {
12446        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12447        where
12448            S: Serializer,
12449        {
12450            match self {
12451                Self::Enabled => serializer.serialize_unit_variant("ExternalGovernanceStatus", 0u32, "Enabled"),
12452                Self::Disabled => serializer.serialize_unit_variant("ExternalGovernanceStatus", 1u32, "Disabled"),
12453                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12454            }
12455        }
12456    }
12457    #[doc = "Pricing model of Managed Instance."]
12458    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12459    #[serde(remote = "PricingModel")]
12460    pub enum PricingModel {
12461        Regular,
12462        Freemium,
12463        #[serde(skip_deserializing)]
12464        UnknownValue(String),
12465    }
12466    impl FromStr for PricingModel {
12467        type Err = value::Error;
12468        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12469            Self::deserialize(s.into_deserializer())
12470        }
12471    }
12472    impl<'de> Deserialize<'de> for PricingModel {
12473        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12474        where
12475            D: Deserializer<'de>,
12476        {
12477            let s = String::deserialize(deserializer)?;
12478            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12479            Ok(deserialized)
12480        }
12481    }
12482    impl Serialize for PricingModel {
12483        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12484        where
12485            S: Serializer,
12486        {
12487            match self {
12488                Self::Regular => serializer.serialize_unit_variant("PricingModel", 0u32, "Regular"),
12489                Self::Freemium => serializer.serialize_unit_variant("PricingModel", 1u32, "Freemium"),
12490                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12491            }
12492        }
12493    }
12494    #[doc = "The managed instance's authentication metadata lookup mode."]
12495    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12496    #[serde(remote = "AuthenticationMetadata")]
12497    pub enum AuthenticationMetadata {
12498        #[serde(rename = "AzureAD")]
12499        AzureAd,
12500        Paired,
12501        Windows,
12502        #[serde(skip_deserializing)]
12503        UnknownValue(String),
12504    }
12505    impl FromStr for AuthenticationMetadata {
12506        type Err = value::Error;
12507        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12508            Self::deserialize(s.into_deserializer())
12509        }
12510    }
12511    impl<'de> Deserialize<'de> for AuthenticationMetadata {
12512        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12513        where
12514            D: Deserializer<'de>,
12515        {
12516            let s = String::deserialize(deserializer)?;
12517            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12518            Ok(deserialized)
12519        }
12520    }
12521    impl Serialize for AuthenticationMetadata {
12522        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12523        where
12524            S: Serializer,
12525        {
12526            match self {
12527                Self::AzureAd => serializer.serialize_unit_variant("AuthenticationMetadata", 0u32, "AzureAD"),
12528                Self::Paired => serializer.serialize_unit_variant("AuthenticationMetadata", 1u32, "Paired"),
12529                Self::Windows => serializer.serialize_unit_variant("AuthenticationMetadata", 2u32, "Windows"),
12530                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12531            }
12532        }
12533    }
12534    #[doc = "Specifies the internal format of instance databases specific to the SQL engine version."]
12535    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12536    #[serde(remote = "DatabaseFormat")]
12537    pub enum DatabaseFormat {
12538        AlwaysUpToDate,
12539        #[serde(rename = "SQLServer2022")]
12540        SqlServer2022,
12541        #[serde(skip_deserializing)]
12542        UnknownValue(String),
12543    }
12544    impl FromStr for DatabaseFormat {
12545        type Err = value::Error;
12546        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12547            Self::deserialize(s.into_deserializer())
12548        }
12549    }
12550    impl<'de> Deserialize<'de> for DatabaseFormat {
12551        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12552        where
12553            D: Deserializer<'de>,
12554        {
12555            let s = String::deserialize(deserializer)?;
12556            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12557            Ok(deserialized)
12558        }
12559    }
12560    impl Serialize for DatabaseFormat {
12561        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12562        where
12563            S: Serializer,
12564        {
12565            match self {
12566                Self::AlwaysUpToDate => serializer.serialize_unit_variant("DatabaseFormat", 0u32, "AlwaysUpToDate"),
12567                Self::SqlServer2022 => serializer.serialize_unit_variant("DatabaseFormat", 1u32, "SQLServer2022"),
12568                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12569            }
12570        }
12571    }
12572}
12573#[doc = "Database query."]
12574#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12575pub struct ManagedInstanceQuery {
12576    #[serde(flatten)]
12577    pub proxy_resource: ProxyResource,
12578    #[doc = "Properties of a database query."]
12579    #[serde(default, skip_serializing_if = "Option::is_none")]
12580    pub properties: Option<QueryProperties>,
12581}
12582impl ManagedInstanceQuery {
12583    pub fn new() -> Self {
12584        Self::default()
12585    }
12586}
12587#[doc = "Execution statistics for one particular query"]
12588#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12589pub struct ManagedInstanceQueryStatistics {
12590    #[doc = "Array of results."]
12591    #[serde(
12592        default,
12593        deserialize_with = "azure_core::util::deserialize_null_as_default",
12594        skip_serializing_if = "Vec::is_empty"
12595    )]
12596    pub value: Vec<QueryStatistics>,
12597    #[doc = "Link to retrieve next page of results."]
12598    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
12599    pub next_link: Option<String>,
12600}
12601impl azure_core::Continuable for ManagedInstanceQueryStatistics {
12602    type Continuation = String;
12603    fn continuation(&self) -> Option<Self::Continuation> {
12604        self.next_link.clone().filter(|value| !value.is_empty())
12605    }
12606}
12607impl ManagedInstanceQueryStatistics {
12608    pub fn new() -> Self {
12609        Self::default()
12610    }
12611}
12612#[doc = "An update request for an Azure SQL Database managed instance."]
12613#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12614pub struct ManagedInstanceUpdate {
12615    #[doc = "An ARM Resource SKU."]
12616    #[serde(default, skip_serializing_if = "Option::is_none")]
12617    pub sku: Option<Sku>,
12618    #[doc = "Azure Active Directory identity configuration for a resource."]
12619    #[serde(default, skip_serializing_if = "Option::is_none")]
12620    pub identity: Option<ResourceIdentity>,
12621    #[doc = "The properties of a managed instance."]
12622    #[serde(default, skip_serializing_if = "Option::is_none")]
12623    pub properties: Option<ManagedInstanceProperties>,
12624    #[doc = "Resource tags."]
12625    #[serde(default, skip_serializing_if = "Option::is_none")]
12626    pub tags: Option<serde_json::Value>,
12627}
12628impl ManagedInstanceUpdate {
12629    pub fn new() -> Self {
12630        Self::default()
12631    }
12632}
12633#[doc = "The managed instance virtual cores capability."]
12634#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12635pub struct ManagedInstanceVcoresCapability {
12636    #[doc = "The virtual cores identifier."]
12637    #[serde(default, skip_serializing_if = "Option::is_none")]
12638    pub name: Option<String>,
12639    #[doc = "The virtual cores value."]
12640    #[serde(default, skip_serializing_if = "Option::is_none")]
12641    pub value: Option<i32>,
12642    #[doc = "The maximum limit range capability."]
12643    #[serde(rename = "supportedMemoryLimitsMB", default, skip_serializing_if = "Option::is_none")]
12644    pub supported_memory_limits_mb: Option<MaxLimitRangeCapability>,
12645    #[doc = "The maximum size capability."]
12646    #[serde(rename = "includedMaxSize", default, skip_serializing_if = "Option::is_none")]
12647    pub included_max_size: Option<MaxSizeCapability>,
12648    #[doc = "Storage size ranges."]
12649    #[serde(
12650        rename = "supportedStorageSizes",
12651        default,
12652        deserialize_with = "azure_core::util::deserialize_null_as_default",
12653        skip_serializing_if = "Vec::is_empty"
12654    )]
12655    pub supported_storage_sizes: Vec<MaxSizeRangeCapability>,
12656    #[doc = "Included storage IOps."]
12657    #[serde(rename = "includedStorageIOps", default, skip_serializing_if = "Option::is_none")]
12658    pub included_storage_i_ops: Option<i64>,
12659    #[doc = "The maximum limit range capability."]
12660    #[serde(rename = "supportedStorageIOps", default, skip_serializing_if = "Option::is_none")]
12661    pub supported_storage_i_ops: Option<MaxLimitRangeCapability>,
12662    #[doc = "Min IOps override factor per selected storage GB."]
12663    #[serde(
12664        rename = "iopsMinValueOverrideFactorPerSelectedStorageGB",
12665        default,
12666        skip_serializing_if = "Option::is_none"
12667    )]
12668    pub iops_min_value_override_factor_per_selected_storage_gb: Option<f64>,
12669    #[doc = "Included IOps override factor per selected storage GB."]
12670    #[serde(
12671        rename = "iopsIncludedValueOverrideFactorPerSelectedStorageGB",
12672        default,
12673        skip_serializing_if = "Option::is_none"
12674    )]
12675    pub iops_included_value_override_factor_per_selected_storage_gb: Option<f64>,
12676    #[doc = "Included storage throughput MBps."]
12677    #[serde(rename = "includedStorageThroughputMBps", default, skip_serializing_if = "Option::is_none")]
12678    pub included_storage_throughput_m_bps: Option<i64>,
12679    #[doc = "The maximum limit range capability."]
12680    #[serde(rename = "supportedStorageThroughputMBps", default, skip_serializing_if = "Option::is_none")]
12681    pub supported_storage_throughput_m_bps: Option<MaxLimitRangeCapability>,
12682    #[doc = "Min throughput MBps override factor per selected storage GB."]
12683    #[serde(
12684        rename = "throughputMBpsMinValueOverrideFactorPerSelectedStorageGB",
12685        default,
12686        skip_serializing_if = "Option::is_none"
12687    )]
12688    pub throughput_m_bps_min_value_override_factor_per_selected_storage_gb: Option<f64>,
12689    #[doc = "Included throughput MBps override factor per selected storage GB."]
12690    #[serde(
12691        rename = "throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB",
12692        default,
12693        skip_serializing_if = "Option::is_none"
12694    )]
12695    pub throughput_m_bps_included_value_override_factor_per_selected_storage_gb: Option<f64>,
12696    #[doc = "True if this service objective is supported for managed instances in an instance pool."]
12697    #[serde(rename = "instancePoolSupported", default, skip_serializing_if = "Option::is_none")]
12698    pub instance_pool_supported: Option<bool>,
12699    #[doc = "True if this service objective is supported for standalone managed instances."]
12700    #[serde(rename = "standaloneSupported", default, skip_serializing_if = "Option::is_none")]
12701    pub standalone_supported: Option<bool>,
12702    #[doc = "List of supported maintenance configurations"]
12703    #[serde(
12704        rename = "supportedMaintenanceConfigurations",
12705        default,
12706        deserialize_with = "azure_core::util::deserialize_null_as_default",
12707        skip_serializing_if = "Vec::is_empty"
12708    )]
12709    pub supported_maintenance_configurations: Vec<ManagedInstanceMaintenanceConfigurationCapability>,
12710    #[doc = "The status of the capability."]
12711    #[serde(default, skip_serializing_if = "Option::is_none")]
12712    pub status: Option<managed_instance_vcores_capability::Status>,
12713    #[doc = "The reason for the capability not being available."]
12714    #[serde(default, skip_serializing_if = "Option::is_none")]
12715    pub reason: Option<String>,
12716}
12717impl ManagedInstanceVcoresCapability {
12718    pub fn new() -> Self {
12719        Self::default()
12720    }
12721}
12722pub mod managed_instance_vcores_capability {
12723    use super::*;
12724    #[doc = "The status of the capability."]
12725    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12726    pub enum Status {
12727        Visible,
12728        Available,
12729        Default,
12730        Disabled,
12731    }
12732}
12733#[doc = "The managed instance capability"]
12734#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12735pub struct ManagedInstanceVersionCapability {
12736    #[doc = "The server version name."]
12737    #[serde(default, skip_serializing_if = "Option::is_none")]
12738    pub name: Option<String>,
12739    #[doc = "The list of supported managed instance editions."]
12740    #[serde(
12741        rename = "supportedEditions",
12742        default,
12743        deserialize_with = "azure_core::util::deserialize_null_as_default",
12744        skip_serializing_if = "Vec::is_empty"
12745    )]
12746    pub supported_editions: Vec<ManagedInstanceEditionCapability>,
12747    #[doc = "The list of supported instance pool editions."]
12748    #[serde(
12749        rename = "supportedInstancePoolEditions",
12750        default,
12751        deserialize_with = "azure_core::util::deserialize_null_as_default",
12752        skip_serializing_if = "Vec::is_empty"
12753    )]
12754    pub supported_instance_pool_editions: Vec<InstancePoolEditionCapability>,
12755    #[doc = "The status of the capability."]
12756    #[serde(default, skip_serializing_if = "Option::is_none")]
12757    pub status: Option<managed_instance_version_capability::Status>,
12758    #[doc = "The reason for the capability not being available."]
12759    #[serde(default, skip_serializing_if = "Option::is_none")]
12760    pub reason: Option<String>,
12761}
12762impl ManagedInstanceVersionCapability {
12763    pub fn new() -> Self {
12764        Self::default()
12765    }
12766}
12767pub mod managed_instance_version_capability {
12768    use super::*;
12769    #[doc = "The status of the capability."]
12770    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12771    pub enum Status {
12772        Visible,
12773        Available,
12774        Default,
12775        Disabled,
12776    }
12777}
12778#[doc = "A managed instance vulnerability assessment."]
12779#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12780pub struct ManagedInstanceVulnerabilityAssessment {
12781    #[serde(flatten)]
12782    pub proxy_resource: ProxyResource,
12783    #[doc = "Properties of a managed instance vulnerability assessment."]
12784    #[serde(default, skip_serializing_if = "Option::is_none")]
12785    pub properties: Option<ManagedInstanceVulnerabilityAssessmentProperties>,
12786}
12787impl ManagedInstanceVulnerabilityAssessment {
12788    pub fn new() -> Self {
12789        Self::default()
12790    }
12791}
12792#[doc = "A list of the ManagedInstance's vulnerability assessments."]
12793#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12794pub struct ManagedInstanceVulnerabilityAssessmentListResult {
12795    #[doc = "Array of results."]
12796    #[serde(
12797        default,
12798        deserialize_with = "azure_core::util::deserialize_null_as_default",
12799        skip_serializing_if = "Vec::is_empty"
12800    )]
12801    pub value: Vec<ManagedInstanceVulnerabilityAssessment>,
12802    #[doc = "Link to retrieve next page of results."]
12803    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
12804    pub next_link: Option<String>,
12805}
12806impl azure_core::Continuable for ManagedInstanceVulnerabilityAssessmentListResult {
12807    type Continuation = String;
12808    fn continuation(&self) -> Option<Self::Continuation> {
12809        self.next_link.clone().filter(|value| !value.is_empty())
12810    }
12811}
12812impl ManagedInstanceVulnerabilityAssessmentListResult {
12813    pub fn new() -> Self {
12814        Self::default()
12815    }
12816}
12817#[doc = "Properties of a managed instance vulnerability assessment."]
12818#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12819pub struct ManagedInstanceVulnerabilityAssessmentProperties {
12820    #[doc = "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/)."]
12821    #[serde(rename = "storageContainerPath")]
12822    pub storage_container_path: String,
12823    #[doc = "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
12824    #[serde(rename = "storageContainerSasKey", default, skip_serializing_if = "Option::is_none")]
12825    pub storage_container_sas_key: Option<String>,
12826    #[doc = "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
12827    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
12828    pub storage_account_access_key: Option<String>,
12829    #[doc = "Properties of a Vulnerability Assessment recurring scans."]
12830    #[serde(rename = "recurringScans", default, skip_serializing_if = "Option::is_none")]
12831    pub recurring_scans: Option<VulnerabilityAssessmentRecurringScansProperties>,
12832}
12833impl ManagedInstanceVulnerabilityAssessmentProperties {
12834    pub fn new(storage_container_path: String) -> Self {
12835        Self {
12836            storage_container_path,
12837            storage_container_sas_key: None,
12838            storage_account_access_key: None,
12839            recurring_scans: None,
12840        }
12841    }
12842}
12843#[doc = "Azure SQL Database ledger digest upload settings."]
12844#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12845pub struct ManagedLedgerDigestUploads {
12846    #[serde(flatten)]
12847    pub proxy_resource: ProxyResource,
12848    #[doc = "The properties of a database ledger digest upload settings."]
12849    #[serde(default, skip_serializing_if = "Option::is_none")]
12850    pub properties: Option<ManagedLedgerDigestUploadsProperties>,
12851}
12852impl ManagedLedgerDigestUploads {
12853    pub fn new() -> Self {
12854        Self::default()
12855    }
12856}
12857#[doc = "A list of ledger digest upload settings."]
12858#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12859pub struct ManagedLedgerDigestUploadsListResult {
12860    #[doc = "Array of results."]
12861    #[serde(
12862        default,
12863        deserialize_with = "azure_core::util::deserialize_null_as_default",
12864        skip_serializing_if = "Vec::is_empty"
12865    )]
12866    pub value: Vec<ManagedLedgerDigestUploads>,
12867    #[doc = "Link to retrieve next page of results."]
12868    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
12869    pub next_link: Option<String>,
12870}
12871impl azure_core::Continuable for ManagedLedgerDigestUploadsListResult {
12872    type Continuation = String;
12873    fn continuation(&self) -> Option<Self::Continuation> {
12874        self.next_link.clone().filter(|value| !value.is_empty())
12875    }
12876}
12877impl ManagedLedgerDigestUploadsListResult {
12878    pub fn new() -> Self {
12879        Self::default()
12880    }
12881}
12882#[doc = "The properties of a database ledger digest upload settings."]
12883#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12884pub struct ManagedLedgerDigestUploadsProperties {
12885    #[doc = "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger."]
12886    #[serde(rename = "digestStorageEndpoint", default, skip_serializing_if = "Option::is_none")]
12887    pub digest_storage_endpoint: Option<String>,
12888    #[doc = "Specifies the state of ledger digest upload."]
12889    #[serde(default, skip_serializing_if = "Option::is_none")]
12890    pub state: Option<managed_ledger_digest_uploads_properties::State>,
12891}
12892impl ManagedLedgerDigestUploadsProperties {
12893    pub fn new() -> Self {
12894        Self::default()
12895    }
12896}
12897pub mod managed_ledger_digest_uploads_properties {
12898    use super::*;
12899    #[doc = "Specifies the state of ledger digest upload."]
12900    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12901    #[serde(remote = "State")]
12902    pub enum State {
12903        Enabled,
12904        Disabled,
12905        #[serde(skip_deserializing)]
12906        UnknownValue(String),
12907    }
12908    impl FromStr for State {
12909        type Err = value::Error;
12910        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
12911            Self::deserialize(s.into_deserializer())
12912        }
12913    }
12914    impl<'de> Deserialize<'de> for State {
12915        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12916        where
12917            D: Deserializer<'de>,
12918        {
12919            let s = String::deserialize(deserializer)?;
12920            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
12921            Ok(deserialized)
12922        }
12923    }
12924    impl Serialize for State {
12925        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12926        where
12927            S: Serializer,
12928        {
12929            match self {
12930                Self::Enabled => serializer.serialize_unit_variant("State", 0u32, "Enabled"),
12931                Self::Disabled => serializer.serialize_unit_variant("State", 1u32, "Disabled"),
12932                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
12933            }
12934        }
12935    }
12936}
12937#[doc = "A managed server DNS alias."]
12938#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12939pub struct ManagedServerDnsAlias {
12940    #[serde(flatten)]
12941    pub proxy_resource: ProxyResource,
12942    #[doc = "Properties of a managed server DNS alias."]
12943    #[serde(default, skip_serializing_if = "Option::is_none")]
12944    pub properties: Option<ManagedServerDnsAliasProperties>,
12945}
12946impl ManagedServerDnsAlias {
12947    pub fn new() -> Self {
12948        Self::default()
12949    }
12950}
12951#[doc = "A managed server DNS alias acquisition request."]
12952#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12953pub struct ManagedServerDnsAliasAcquisition {
12954    #[doc = "The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead."]
12955    #[serde(rename = "oldManagedServerDnsAliasResourceId")]
12956    pub old_managed_server_dns_alias_resource_id: String,
12957}
12958impl ManagedServerDnsAliasAcquisition {
12959    pub fn new(old_managed_server_dns_alias_resource_id: String) -> Self {
12960        Self {
12961            old_managed_server_dns_alias_resource_id,
12962        }
12963    }
12964}
12965#[doc = "A managed server dns alias creation request."]
12966#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12967pub struct ManagedServerDnsAliasCreation {
12968    #[doc = "Whether or not DNS record should be created for this alias."]
12969    #[serde(rename = "createDnsRecord", default, skip_serializing_if = "Option::is_none")]
12970    pub create_dns_record: Option<bool>,
12971}
12972impl ManagedServerDnsAliasCreation {
12973    pub fn new() -> Self {
12974        Self::default()
12975    }
12976}
12977#[doc = "A list of managed server DNS aliases."]
12978#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
12979pub struct ManagedServerDnsAliasListResult {
12980    #[doc = "Array of results."]
12981    #[serde(
12982        default,
12983        deserialize_with = "azure_core::util::deserialize_null_as_default",
12984        skip_serializing_if = "Vec::is_empty"
12985    )]
12986    pub value: Vec<ManagedServerDnsAlias>,
12987    #[doc = "Link to retrieve next page of results."]
12988    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
12989    pub next_link: Option<String>,
12990}
12991impl azure_core::Continuable for ManagedServerDnsAliasListResult {
12992    type Continuation = String;
12993    fn continuation(&self) -> Option<Self::Continuation> {
12994        self.next_link.clone().filter(|value| !value.is_empty())
12995    }
12996}
12997impl ManagedServerDnsAliasListResult {
12998    pub fn new() -> Self {
12999        Self::default()
13000    }
13001}
13002#[doc = "Properties of a managed server DNS alias."]
13003#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13004pub struct ManagedServerDnsAliasProperties {
13005    #[doc = "The fully qualified DNS record for managed server alias"]
13006    #[serde(rename = "azureDnsRecord", default, skip_serializing_if = "Option::is_none")]
13007    pub azure_dns_record: Option<String>,
13008    #[doc = "The fully qualified public DNS record for managed server alias"]
13009    #[serde(rename = "publicAzureDnsRecord", default, skip_serializing_if = "Option::is_none")]
13010    pub public_azure_dns_record: Option<String>,
13011}
13012impl ManagedServerDnsAliasProperties {
13013    pub fn new() -> Self {
13014        Self::default()
13015    }
13016}
13017#[doc = "A managed server security alert policy."]
13018#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13019pub struct ManagedServerSecurityAlertPolicy {
13020    #[serde(flatten)]
13021    pub proxy_resource: ProxyResource,
13022    #[doc = "Metadata pertaining to creation and last modification of the resource."]
13023    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
13024    pub system_data: Option<SystemData>,
13025    #[doc = "Properties of a security alert policy."]
13026    #[serde(default, skip_serializing_if = "Option::is_none")]
13027    pub properties: Option<SecurityAlertsPolicyProperties>,
13028}
13029impl ManagedServerSecurityAlertPolicy {
13030    pub fn new() -> Self {
13031        Self::default()
13032    }
13033}
13034#[doc = "A list of the managed Server's security alert policies."]
13035#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13036pub struct ManagedServerSecurityAlertPolicyListResult {
13037    #[doc = "Array of results."]
13038    #[serde(
13039        default,
13040        deserialize_with = "azure_core::util::deserialize_null_as_default",
13041        skip_serializing_if = "Vec::is_empty"
13042    )]
13043    pub value: Vec<ManagedServerSecurityAlertPolicy>,
13044    #[doc = "Link to retrieve next page of results."]
13045    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13046    pub next_link: Option<String>,
13047}
13048impl azure_core::Continuable for ManagedServerSecurityAlertPolicyListResult {
13049    type Continuation = String;
13050    fn continuation(&self) -> Option<Self::Continuation> {
13051        self.next_link.clone().filter(|value| !value.is_empty())
13052    }
13053}
13054impl ManagedServerSecurityAlertPolicyListResult {
13055    pub fn new() -> Self {
13056        Self::default()
13057    }
13058}
13059#[doc = "A managed database transparent data encryption state."]
13060#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13061pub struct ManagedTransparentDataEncryption {
13062    #[serde(flatten)]
13063    pub proxy_resource: ProxyResource,
13064    #[doc = "Properties of a transparent data encryption."]
13065    #[serde(default, skip_serializing_if = "Option::is_none")]
13066    pub properties: Option<ManagedTransparentDataEncryptionProperties>,
13067}
13068impl ManagedTransparentDataEncryption {
13069    pub fn new() -> Self {
13070        Self::default()
13071    }
13072}
13073#[doc = "A list of managed transparent data encryptions"]
13074#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13075pub struct ManagedTransparentDataEncryptionListResult {
13076    #[doc = "Array of results."]
13077    #[serde(
13078        default,
13079        deserialize_with = "azure_core::util::deserialize_null_as_default",
13080        skip_serializing_if = "Vec::is_empty"
13081    )]
13082    pub value: Vec<ManagedTransparentDataEncryption>,
13083    #[doc = "Link to retrieve next page of results."]
13084    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13085    pub next_link: Option<String>,
13086}
13087impl azure_core::Continuable for ManagedTransparentDataEncryptionListResult {
13088    type Continuation = String;
13089    fn continuation(&self) -> Option<Self::Continuation> {
13090        self.next_link.clone().filter(|value| !value.is_empty())
13091    }
13092}
13093impl ManagedTransparentDataEncryptionListResult {
13094    pub fn new() -> Self {
13095        Self::default()
13096    }
13097}
13098#[doc = "Properties of a transparent data encryption."]
13099#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13100pub struct ManagedTransparentDataEncryptionProperties {
13101    #[doc = "Specifies the state of the transparent data encryption."]
13102    pub state: managed_transparent_data_encryption_properties::State,
13103}
13104impl ManagedTransparentDataEncryptionProperties {
13105    pub fn new(state: managed_transparent_data_encryption_properties::State) -> Self {
13106        Self { state }
13107    }
13108}
13109pub mod managed_transparent_data_encryption_properties {
13110    use super::*;
13111    #[doc = "Specifies the state of the transparent data encryption."]
13112    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13113    pub enum State {
13114        Enabled,
13115        Disabled,
13116    }
13117}
13118#[doc = "The maximum limit range capability."]
13119#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13120pub struct MaxLimitRangeCapability {
13121    #[doc = "Minimum value."]
13122    #[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
13123    pub min_value: Option<i64>,
13124    #[doc = "Maximum value."]
13125    #[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
13126    pub max_value: Option<i64>,
13127    #[doc = "Scale/step size for discrete values between the minimum value and the maximum value."]
13128    #[serde(rename = "scaleSize", default, skip_serializing_if = "Option::is_none")]
13129    pub scale_size: Option<i64>,
13130    #[doc = "The status of the capability."]
13131    #[serde(default, skip_serializing_if = "Option::is_none")]
13132    pub status: Option<max_limit_range_capability::Status>,
13133    #[doc = "The reason for the capability not being available."]
13134    #[serde(default, skip_serializing_if = "Option::is_none")]
13135    pub reason: Option<String>,
13136}
13137impl MaxLimitRangeCapability {
13138    pub fn new() -> Self {
13139        Self::default()
13140    }
13141}
13142pub mod max_limit_range_capability {
13143    use super::*;
13144    #[doc = "The status of the capability."]
13145    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13146    pub enum Status {
13147        Visible,
13148        Available,
13149        Default,
13150        Disabled,
13151    }
13152}
13153#[doc = "The maximum size capability."]
13154#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13155pub struct MaxSizeCapability {
13156    #[doc = "The maximum size limit (see 'unit' for the units)."]
13157    #[serde(default, skip_serializing_if = "Option::is_none")]
13158    pub limit: Option<i32>,
13159    #[doc = "The units that the limit is expressed in."]
13160    #[serde(default, skip_serializing_if = "Option::is_none")]
13161    pub unit: Option<max_size_capability::Unit>,
13162}
13163impl MaxSizeCapability {
13164    pub fn new() -> Self {
13165        Self::default()
13166    }
13167}
13168pub mod max_size_capability {
13169    use super::*;
13170    #[doc = "The units that the limit is expressed in."]
13171    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13172    #[serde(remote = "Unit")]
13173    pub enum Unit {
13174        Megabytes,
13175        Gigabytes,
13176        Terabytes,
13177        Petabytes,
13178        #[serde(skip_deserializing)]
13179        UnknownValue(String),
13180    }
13181    impl FromStr for Unit {
13182        type Err = value::Error;
13183        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13184            Self::deserialize(s.into_deserializer())
13185        }
13186    }
13187    impl<'de> Deserialize<'de> for Unit {
13188        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13189        where
13190            D: Deserializer<'de>,
13191        {
13192            let s = String::deserialize(deserializer)?;
13193            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13194            Ok(deserialized)
13195        }
13196    }
13197    impl Serialize for Unit {
13198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13199        where
13200            S: Serializer,
13201        {
13202            match self {
13203                Self::Megabytes => serializer.serialize_unit_variant("Unit", 0u32, "Megabytes"),
13204                Self::Gigabytes => serializer.serialize_unit_variant("Unit", 1u32, "Gigabytes"),
13205                Self::Terabytes => serializer.serialize_unit_variant("Unit", 2u32, "Terabytes"),
13206                Self::Petabytes => serializer.serialize_unit_variant("Unit", 3u32, "Petabytes"),
13207                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13208            }
13209        }
13210    }
13211}
13212#[doc = "The maximum size range capability."]
13213#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13214pub struct MaxSizeRangeCapability {
13215    #[doc = "The maximum size capability."]
13216    #[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
13217    pub min_value: Option<MaxSizeCapability>,
13218    #[doc = "The maximum size capability."]
13219    #[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
13220    pub max_value: Option<MaxSizeCapability>,
13221    #[doc = "The maximum size capability."]
13222    #[serde(rename = "scaleSize", default, skip_serializing_if = "Option::is_none")]
13223    pub scale_size: Option<MaxSizeCapability>,
13224    #[doc = "The log size capability."]
13225    #[serde(rename = "logSize", default, skip_serializing_if = "Option::is_none")]
13226    pub log_size: Option<LogSizeCapability>,
13227    #[doc = "The status of the capability."]
13228    #[serde(default, skip_serializing_if = "Option::is_none")]
13229    pub status: Option<max_size_range_capability::Status>,
13230    #[doc = "The reason for the capability not being available."]
13231    #[serde(default, skip_serializing_if = "Option::is_none")]
13232    pub reason: Option<String>,
13233}
13234impl MaxSizeRangeCapability {
13235    pub fn new() -> Self {
13236        Self::default()
13237    }
13238}
13239pub mod max_size_range_capability {
13240    use super::*;
13241    #[doc = "The status of the capability."]
13242    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13243    pub enum Status {
13244        Visible,
13245        Available,
13246        Default,
13247        Disabled,
13248    }
13249}
13250#[doc = "The min capacity capability"]
13251#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13252pub struct MinCapacityCapability {
13253    #[doc = "Min capacity value"]
13254    #[serde(default, skip_serializing_if = "Option::is_none")]
13255    pub value: Option<f64>,
13256    #[doc = "The status of the capability."]
13257    #[serde(default, skip_serializing_if = "Option::is_none")]
13258    pub status: Option<min_capacity_capability::Status>,
13259    #[doc = "The reason for the capability not being available."]
13260    #[serde(default, skip_serializing_if = "Option::is_none")]
13261    pub reason: Option<String>,
13262}
13263impl MinCapacityCapability {
13264    pub fn new() -> Self {
13265        Self::default()
13266    }
13267}
13268pub mod min_capacity_capability {
13269    use super::*;
13270    #[doc = "The status of the capability."]
13271    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13272    pub enum Status {
13273        Visible,
13274        Available,
13275        Default,
13276        Disabled,
13277    }
13278}
13279#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13280pub struct NspConfigAccessRule {
13281    #[serde(default, skip_serializing_if = "Option::is_none")]
13282    pub name: Option<String>,
13283    #[serde(default, skip_serializing_if = "Option::is_none")]
13284    pub properties: Option<NspConfigAccessRuleProperties>,
13285}
13286impl NspConfigAccessRule {
13287    pub fn new() -> Self {
13288        Self::default()
13289    }
13290}
13291#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13292pub struct NspConfigAccessRuleProperties {
13293    #[serde(default, skip_serializing_if = "Option::is_none")]
13294    pub direction: Option<String>,
13295    #[serde(
13296        rename = "addressPrefixes",
13297        default,
13298        deserialize_with = "azure_core::util::deserialize_null_as_default",
13299        skip_serializing_if = "Vec::is_empty"
13300    )]
13301    pub address_prefixes: Vec<String>,
13302    #[serde(
13303        rename = "fullyQualifiedDomainNames",
13304        default,
13305        deserialize_with = "azure_core::util::deserialize_null_as_default",
13306        skip_serializing_if = "Vec::is_empty"
13307    )]
13308    pub fully_qualified_domain_names: Vec<String>,
13309    #[serde(
13310        default,
13311        deserialize_with = "azure_core::util::deserialize_null_as_default",
13312        skip_serializing_if = "Vec::is_empty"
13313    )]
13314    pub subscriptions: Vec<String>,
13315    #[serde(
13316        rename = "networkSecurityPerimeters",
13317        default,
13318        deserialize_with = "azure_core::util::deserialize_null_as_default",
13319        skip_serializing_if = "Vec::is_empty"
13320    )]
13321    pub network_security_perimeters: Vec<NspConfigNetworkSecurityPerimeterRule>,
13322    #[serde(
13323        rename = "serviceTags",
13324        default,
13325        deserialize_with = "azure_core::util::deserialize_null_as_default",
13326        skip_serializing_if = "Vec::is_empty"
13327    )]
13328    pub service_tags: Vec<String>,
13329}
13330impl NspConfigAccessRuleProperties {
13331    pub fn new() -> Self {
13332        Self::default()
13333    }
13334}
13335#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13336pub struct NspConfigAssociation {
13337    #[serde(default, skip_serializing_if = "Option::is_none")]
13338    pub name: Option<String>,
13339    #[serde(rename = "accessMode", default, skip_serializing_if = "Option::is_none")]
13340    pub access_mode: Option<String>,
13341}
13342impl NspConfigAssociation {
13343    pub fn new() -> Self {
13344        Self::default()
13345    }
13346}
13347#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13348pub struct NspConfigNetworkSecurityPerimeterRule {
13349    #[serde(default, skip_serializing_if = "Option::is_none")]
13350    pub id: Option<String>,
13351    #[serde(rename = "perimeterGuid", default, skip_serializing_if = "Option::is_none")]
13352    pub perimeter_guid: Option<String>,
13353    #[serde(default, skip_serializing_if = "Option::is_none")]
13354    pub location: Option<String>,
13355}
13356impl NspConfigNetworkSecurityPerimeterRule {
13357    pub fn new() -> Self {
13358        Self::default()
13359    }
13360}
13361#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13362pub struct NspConfigPerimeter {
13363    #[serde(default, skip_serializing_if = "Option::is_none")]
13364    pub id: Option<String>,
13365    #[serde(rename = "perimeterGuid", default, skip_serializing_if = "Option::is_none")]
13366    pub perimeter_guid: Option<String>,
13367    #[serde(default, skip_serializing_if = "Option::is_none")]
13368    pub location: Option<String>,
13369}
13370impl NspConfigPerimeter {
13371    pub fn new() -> Self {
13372        Self::default()
13373    }
13374}
13375#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13376pub struct NspConfigProfile {
13377    #[serde(default, skip_serializing_if = "Option::is_none")]
13378    pub name: Option<String>,
13379    #[serde(rename = "accessRulesVersion", default, skip_serializing_if = "Option::is_none")]
13380    pub access_rules_version: Option<String>,
13381    #[serde(
13382        rename = "accessRules",
13383        default,
13384        deserialize_with = "azure_core::util::deserialize_null_as_default",
13385        skip_serializing_if = "Vec::is_empty"
13386    )]
13387    pub access_rules: Vec<NspConfigAccessRule>,
13388}
13389impl NspConfigProfile {
13390    pub fn new() -> Self {
13391        Self::default()
13392    }
13393}
13394#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13395pub struct NspProvisioningIssue {
13396    #[serde(default, skip_serializing_if = "Option::is_none")]
13397    pub name: Option<String>,
13398    #[serde(default, skip_serializing_if = "Option::is_none")]
13399    pub properties: Option<NspProvisioningIssueProperties>,
13400}
13401impl NspProvisioningIssue {
13402    pub fn new() -> Self {
13403        Self::default()
13404    }
13405}
13406#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13407pub struct NspProvisioningIssueProperties {
13408    #[serde(rename = "issueType", default, skip_serializing_if = "Option::is_none")]
13409    pub issue_type: Option<String>,
13410    #[serde(default, skip_serializing_if = "Option::is_none")]
13411    pub severity: Option<String>,
13412    #[serde(default, skip_serializing_if = "Option::is_none")]
13413    pub description: Option<String>,
13414    #[serde(
13415        rename = "suggestedResourceIds",
13416        default,
13417        deserialize_with = "azure_core::util::deserialize_null_as_default",
13418        skip_serializing_if = "Vec::is_empty"
13419    )]
13420    pub suggested_resource_ids: Vec<String>,
13421    #[serde(
13422        rename = "suggestedAccessRules",
13423        default,
13424        deserialize_with = "azure_core::util::deserialize_null_as_default",
13425        skip_serializing_if = "Vec::is_empty"
13426    )]
13427    pub suggested_access_rules: Vec<String>,
13428}
13429impl NspProvisioningIssueProperties {
13430    pub fn new() -> Self {
13431        Self::default()
13432    }
13433}
13434#[doc = "ARM Usage Name"]
13435#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13436pub struct Name {
13437    #[doc = "Usage name value"]
13438    #[serde(default, skip_serializing_if = "Option::is_none")]
13439    pub value: Option<String>,
13440    #[doc = "Usage name localized value."]
13441    #[serde(rename = "localizedValue", default, skip_serializing_if = "Option::is_none")]
13442    pub localized_value: Option<String>,
13443}
13444impl Name {
13445    pub fn new() -> Self {
13446        Self::default()
13447    }
13448}
13449#[doc = "Contains the ARM resources for which to create private endpoint connection."]
13450#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13451pub struct NetworkIsolationSettings {
13452    #[doc = "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter."]
13453    #[serde(rename = "storageAccountResourceId", default, skip_serializing_if = "Option::is_none")]
13454    pub storage_account_resource_id: Option<String>,
13455    #[doc = "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation."]
13456    #[serde(rename = "sqlServerResourceId", default, skip_serializing_if = "Option::is_none")]
13457    pub sql_server_resource_id: Option<String>,
13458}
13459impl NetworkIsolationSettings {
13460    pub fn new() -> Self {
13461        Self::default()
13462    }
13463}
13464#[doc = "NSP Configuration for a server."]
13465#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13466pub struct NetworkSecurityPerimeterConfiguration {
13467    #[serde(flatten)]
13468    pub proxy_resource: ProxyResource,
13469    #[doc = "The properties of an NSP config."]
13470    #[serde(default, skip_serializing_if = "Option::is_none")]
13471    pub properties: Option<NetworkSecurityPerimeterConfigurationProperties>,
13472}
13473impl NetworkSecurityPerimeterConfiguration {
13474    pub fn new() -> Self {
13475        Self::default()
13476    }
13477}
13478#[doc = "A list of NSP configurations for a server."]
13479#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13480pub struct NetworkSecurityPerimeterConfigurationListResult {
13481    #[doc = "Array of results."]
13482    #[serde(
13483        default,
13484        deserialize_with = "azure_core::util::deserialize_null_as_default",
13485        skip_serializing_if = "Vec::is_empty"
13486    )]
13487    pub value: Vec<NetworkSecurityPerimeterConfiguration>,
13488    #[doc = "Link to retrieve next page of results."]
13489    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13490    pub next_link: Option<String>,
13491}
13492impl azure_core::Continuable for NetworkSecurityPerimeterConfigurationListResult {
13493    type Continuation = String;
13494    fn continuation(&self) -> Option<Self::Continuation> {
13495        self.next_link.clone().filter(|value| !value.is_empty())
13496    }
13497}
13498impl NetworkSecurityPerimeterConfigurationListResult {
13499    pub fn new() -> Self {
13500        Self::default()
13501    }
13502}
13503#[doc = "The properties of an NSP config."]
13504#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13505pub struct NetworkSecurityPerimeterConfigurationProperties {
13506    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
13507    pub provisioning_state: Option<String>,
13508    #[serde(rename = "networkSecurityPerimeter", default, skip_serializing_if = "Option::is_none")]
13509    pub network_security_perimeter: Option<NspConfigPerimeter>,
13510    #[serde(rename = "resourceAssociation", default, skip_serializing_if = "Option::is_none")]
13511    pub resource_association: Option<NspConfigAssociation>,
13512    #[serde(default, skip_serializing_if = "Option::is_none")]
13513    pub profile: Option<NspConfigProfile>,
13514    #[serde(
13515        rename = "provisioningIssues",
13516        default,
13517        deserialize_with = "azure_core::util::deserialize_null_as_default",
13518        skip_serializing_if = "Vec::is_empty"
13519    )]
13520    pub provisioning_issues: Vec<NspProvisioningIssue>,
13521}
13522impl NetworkSecurityPerimeterConfigurationProperties {
13523    pub fn new() -> Self {
13524        Self::default()
13525    }
13526}
13527#[doc = "SQL REST API operation definition."]
13528#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13529pub struct Operation {
13530    #[doc = "The name of the operation being performed on this particular object."]
13531    #[serde(default, skip_serializing_if = "Option::is_none")]
13532    pub name: Option<String>,
13533    #[doc = "Display metadata associated with the operation."]
13534    #[serde(default, skip_serializing_if = "Option::is_none")]
13535    pub display: Option<OperationDisplay>,
13536    #[doc = "The intended executor of the operation."]
13537    #[serde(default, skip_serializing_if = "Option::is_none")]
13538    pub origin: Option<operation::Origin>,
13539    #[doc = "Additional descriptions for the operation."]
13540    #[serde(default, skip_serializing_if = "Option::is_none")]
13541    pub properties: Option<serde_json::Value>,
13542}
13543impl Operation {
13544    pub fn new() -> Self {
13545        Self::default()
13546    }
13547}
13548pub mod operation {
13549    use super::*;
13550    #[doc = "The intended executor of the operation."]
13551    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13552    #[serde(remote = "Origin")]
13553    pub enum Origin {
13554        #[serde(rename = "user")]
13555        User,
13556        #[serde(rename = "system")]
13557        System,
13558        #[serde(skip_deserializing)]
13559        UnknownValue(String),
13560    }
13561    impl FromStr for Origin {
13562        type Err = value::Error;
13563        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13564            Self::deserialize(s.into_deserializer())
13565        }
13566    }
13567    impl<'de> Deserialize<'de> for Origin {
13568        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13569        where
13570            D: Deserializer<'de>,
13571        {
13572            let s = String::deserialize(deserializer)?;
13573            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13574            Ok(deserialized)
13575        }
13576    }
13577    impl Serialize for Origin {
13578        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13579        where
13580            S: Serializer,
13581        {
13582            match self {
13583                Self::User => serializer.serialize_unit_variant("Origin", 0u32, "user"),
13584                Self::System => serializer.serialize_unit_variant("Origin", 1u32, "system"),
13585                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13586            }
13587        }
13588    }
13589}
13590#[doc = "Display metadata associated with the operation."]
13591#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13592pub struct OperationDisplay {
13593    #[doc = "The localized friendly form of the resource provider name."]
13594    #[serde(default, skip_serializing_if = "Option::is_none")]
13595    pub provider: Option<String>,
13596    #[doc = "The localized friendly form of the resource type related to this action/operation."]
13597    #[serde(default, skip_serializing_if = "Option::is_none")]
13598    pub resource: Option<String>,
13599    #[doc = "The localized friendly name for the operation."]
13600    #[serde(default, skip_serializing_if = "Option::is_none")]
13601    pub operation: Option<String>,
13602    #[doc = "The localized friendly description for the operation."]
13603    #[serde(default, skip_serializing_if = "Option::is_none")]
13604    pub description: Option<String>,
13605}
13606impl OperationDisplay {
13607    pub fn new() -> Self {
13608        Self::default()
13609    }
13610}
13611#[doc = "Result of the request to list SQL operations."]
13612#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13613pub struct OperationListResult {
13614    #[doc = "Array of results."]
13615    #[serde(
13616        default,
13617        deserialize_with = "azure_core::util::deserialize_null_as_default",
13618        skip_serializing_if = "Vec::is_empty"
13619    )]
13620    pub value: Vec<Operation>,
13621    #[doc = "Link to retrieve next page of results."]
13622    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13623    pub next_link: Option<String>,
13624}
13625impl azure_core::Continuable for OperationListResult {
13626    type Continuation = String;
13627    fn continuation(&self) -> Option<Self::Continuation> {
13628        self.next_link.clone().filter(|value| !value.is_empty())
13629    }
13630}
13631impl OperationListResult {
13632    pub fn new() -> Self {
13633        Self::default()
13634    }
13635}
13636#[doc = "An endpoint that the managed instance service requires outbound network access to."]
13637#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13638pub struct OutboundEnvironmentEndpoint {
13639    #[doc = "The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc."]
13640    #[serde(default, skip_serializing_if = "Option::is_none")]
13641    pub category: Option<String>,
13642    #[doc = "The endpoints that the managed instance service communicates with in order to function correctly."]
13643    #[serde(
13644        default,
13645        deserialize_with = "azure_core::util::deserialize_null_as_default",
13646        skip_serializing_if = "Vec::is_empty"
13647    )]
13648    pub endpoints: Vec<EndpointDependency>,
13649}
13650impl OutboundEnvironmentEndpoint {
13651    pub fn new() -> Self {
13652        Self::default()
13653    }
13654}
13655#[doc = "A collection of endpoints that the managed instance service requires outbound network access to."]
13656#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13657pub struct OutboundEnvironmentEndpointCollection {
13658    #[doc = "Array of results."]
13659    #[serde(
13660        default,
13661        deserialize_with = "azure_core::util::deserialize_null_as_default",
13662        skip_serializing_if = "Vec::is_empty"
13663    )]
13664    pub value: Vec<OutboundEnvironmentEndpoint>,
13665    #[doc = "Link to retrieve next page of results."]
13666    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13667    pub next_link: Option<String>,
13668}
13669impl azure_core::Continuable for OutboundEnvironmentEndpointCollection {
13670    type Continuation = String;
13671    fn continuation(&self) -> Option<Self::Continuation> {
13672        self.next_link.clone().filter(|value| !value.is_empty())
13673    }
13674}
13675impl OutboundEnvironmentEndpointCollection {
13676    pub fn new() -> Self {
13677        Self::default()
13678    }
13679}
13680#[doc = "An Azure SQL DB Server Outbound Firewall Rule."]
13681#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13682pub struct OutboundFirewallRule {
13683    #[serde(flatten)]
13684    pub proxy_resource: ProxyResource,
13685    #[doc = "The properties of an outbound firewall rule."]
13686    #[serde(default, skip_serializing_if = "Option::is_none")]
13687    pub properties: Option<OutboundFirewallRuleProperties>,
13688}
13689impl OutboundFirewallRule {
13690    pub fn new() -> Self {
13691        Self::default()
13692    }
13693}
13694#[doc = "A list of outbound rules."]
13695#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13696pub struct OutboundFirewallRuleListResult {
13697    #[doc = "Array of results."]
13698    #[serde(
13699        default,
13700        deserialize_with = "azure_core::util::deserialize_null_as_default",
13701        skip_serializing_if = "Vec::is_empty"
13702    )]
13703    pub value: Vec<OutboundFirewallRule>,
13704    #[doc = "Link to retrieve next page of results."]
13705    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
13706    pub next_link: Option<String>,
13707}
13708impl azure_core::Continuable for OutboundFirewallRuleListResult {
13709    type Continuation = String;
13710    fn continuation(&self) -> Option<Self::Continuation> {
13711        self.next_link.clone().filter(|value| !value.is_empty())
13712    }
13713}
13714impl OutboundFirewallRuleListResult {
13715    pub fn new() -> Self {
13716        Self::default()
13717    }
13718}
13719#[doc = "The properties of an outbound firewall rule."]
13720#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13721pub struct OutboundFirewallRuleProperties {
13722    #[doc = "The state of the outbound rule."]
13723    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
13724    pub provisioning_state: Option<String>,
13725}
13726impl OutboundFirewallRuleProperties {
13727    pub fn new() -> Self {
13728        Self::default()
13729    }
13730}
13731#[doc = "Partner server information for the failover group."]
13732#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13733pub struct PartnerInfo {
13734    #[doc = "Resource identifier of the partner server."]
13735    pub id: String,
13736    #[doc = "Geo location of the partner server."]
13737    #[serde(default, skip_serializing_if = "Option::is_none")]
13738    pub location: Option<String>,
13739    #[doc = "Replication role of the partner server."]
13740    #[serde(rename = "replicationRole", default, skip_serializing_if = "Option::is_none")]
13741    pub replication_role: Option<partner_info::ReplicationRole>,
13742}
13743impl PartnerInfo {
13744    pub fn new(id: String) -> Self {
13745        Self {
13746            id,
13747            location: None,
13748            replication_role: None,
13749        }
13750    }
13751}
13752pub mod partner_info {
13753    use super::*;
13754    #[doc = "Replication role of the partner server."]
13755    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13756    #[serde(remote = "ReplicationRole")]
13757    pub enum ReplicationRole {
13758        Primary,
13759        Secondary,
13760        #[serde(skip_deserializing)]
13761        UnknownValue(String),
13762    }
13763    impl FromStr for ReplicationRole {
13764        type Err = value::Error;
13765        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13766            Self::deserialize(s.into_deserializer())
13767        }
13768    }
13769    impl<'de> Deserialize<'de> for ReplicationRole {
13770        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13771        where
13772            D: Deserializer<'de>,
13773        {
13774            let s = String::deserialize(deserializer)?;
13775            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13776            Ok(deserialized)
13777        }
13778    }
13779    impl Serialize for ReplicationRole {
13780        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13781        where
13782            S: Serializer,
13783        {
13784            match self {
13785                Self::Primary => serializer.serialize_unit_variant("ReplicationRole", 0u32, "Primary"),
13786                Self::Secondary => serializer.serialize_unit_variant("ReplicationRole", 1u32, "Secondary"),
13787                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13788            }
13789        }
13790    }
13791}
13792#[doc = "Partner region information for the failover group."]
13793#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13794pub struct PartnerRegionInfo {
13795    #[doc = "Geo location of the partner managed instances."]
13796    #[serde(default, skip_serializing_if = "Option::is_none")]
13797    pub location: Option<String>,
13798    #[doc = "Replication role of the partner managed instances."]
13799    #[serde(rename = "replicationRole", default, skip_serializing_if = "Option::is_none")]
13800    pub replication_role: Option<partner_region_info::ReplicationRole>,
13801}
13802impl PartnerRegionInfo {
13803    pub fn new() -> Self {
13804        Self::default()
13805    }
13806}
13807pub mod partner_region_info {
13808    use super::*;
13809    #[doc = "Replication role of the partner managed instances."]
13810    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13811    #[serde(remote = "ReplicationRole")]
13812    pub enum ReplicationRole {
13813        Primary,
13814        Secondary,
13815        #[serde(skip_deserializing)]
13816        UnknownValue(String),
13817    }
13818    impl FromStr for ReplicationRole {
13819        type Err = value::Error;
13820        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13821            Self::deserialize(s.into_deserializer())
13822        }
13823    }
13824    impl<'de> Deserialize<'de> for ReplicationRole {
13825        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13826        where
13827            D: Deserializer<'de>,
13828        {
13829            let s = String::deserialize(deserializer)?;
13830            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13831            Ok(deserialized)
13832        }
13833    }
13834    impl Serialize for ReplicationRole {
13835        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13836        where
13837            S: Serializer,
13838        {
13839            match self {
13840                Self::Primary => serializer.serialize_unit_variant("ReplicationRole", 0u32, "Primary"),
13841                Self::Secondary => serializer.serialize_unit_variant("ReplicationRole", 1u32, "Secondary"),
13842                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13843            }
13844        }
13845    }
13846}
13847#[doc = "Supported auto pause delay time range"]
13848#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13849pub struct PerDatabaseAutoPauseDelayTimeRange {
13850    #[doc = "Minimum value"]
13851    #[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
13852    pub min_value: Option<i32>,
13853    #[doc = "Maximum value"]
13854    #[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
13855    pub max_value: Option<i32>,
13856    #[doc = "Step value for discrete values between the minimum value and the maximum value."]
13857    #[serde(rename = "stepSize", default, skip_serializing_if = "Option::is_none")]
13858    pub step_size: Option<i32>,
13859    #[doc = "Default value if no value is provided"]
13860    #[serde(default, skip_serializing_if = "Option::is_none")]
13861    pub default: Option<i32>,
13862    #[doc = "Unit of time that delay is expressed in"]
13863    #[serde(default, skip_serializing_if = "Option::is_none")]
13864    pub unit: Option<per_database_auto_pause_delay_time_range::Unit>,
13865    #[doc = "Value that is used to not pause (infinite delay before pause)"]
13866    #[serde(rename = "doNotPauseValue", default, skip_serializing_if = "Option::is_none")]
13867    pub do_not_pause_value: Option<i32>,
13868}
13869impl PerDatabaseAutoPauseDelayTimeRange {
13870    pub fn new() -> Self {
13871        Self::default()
13872    }
13873}
13874pub mod per_database_auto_pause_delay_time_range {
13875    use super::*;
13876    #[doc = "Unit of time that delay is expressed in"]
13877    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13878    #[serde(remote = "Unit")]
13879    pub enum Unit {
13880        Minutes,
13881        #[serde(skip_deserializing)]
13882        UnknownValue(String),
13883    }
13884    impl FromStr for Unit {
13885        type Err = value::Error;
13886        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13887            Self::deserialize(s.into_deserializer())
13888        }
13889    }
13890    impl<'de> Deserialize<'de> for Unit {
13891        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13892        where
13893            D: Deserializer<'de>,
13894        {
13895            let s = String::deserialize(deserializer)?;
13896            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13897            Ok(deserialized)
13898        }
13899    }
13900    impl Serialize for Unit {
13901        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13902        where
13903            S: Serializer,
13904        {
13905            match self {
13906                Self::Minutes => serializer.serialize_unit_variant("Unit", 0u32, "Minutes"),
13907                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13908            }
13909        }
13910    }
13911}
13912#[doc = "The performance level capability."]
13913#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13914pub struct PerformanceLevelCapability {
13915    #[doc = "Performance level value."]
13916    #[serde(default, skip_serializing_if = "Option::is_none")]
13917    pub value: Option<f64>,
13918    #[doc = "Unit type used to measure performance level."]
13919    #[serde(default, skip_serializing_if = "Option::is_none")]
13920    pub unit: Option<performance_level_capability::Unit>,
13921}
13922impl PerformanceLevelCapability {
13923    pub fn new() -> Self {
13924        Self::default()
13925    }
13926}
13927pub mod performance_level_capability {
13928    use super::*;
13929    #[doc = "Unit type used to measure performance level."]
13930    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13931    #[serde(remote = "Unit")]
13932    pub enum Unit {
13933        #[serde(rename = "DTU")]
13934        Dtu,
13935        VCores,
13936        #[serde(skip_deserializing)]
13937        UnknownValue(String),
13938    }
13939    impl FromStr for Unit {
13940        type Err = value::Error;
13941        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13942            Self::deserialize(s.into_deserializer())
13943        }
13944    }
13945    impl<'de> Deserialize<'de> for Unit {
13946        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13947        where
13948            D: Deserializer<'de>,
13949        {
13950            let s = String::deserialize(deserializer)?;
13951            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
13952            Ok(deserialized)
13953        }
13954    }
13955    impl Serialize for Unit {
13956        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13957        where
13958            S: Serializer,
13959        {
13960            match self {
13961                Self::Dtu => serializer.serialize_unit_variant("Unit", 0u32, "DTU"),
13962                Self::VCores => serializer.serialize_unit_variant("Unit", 1u32, "VCores"),
13963                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
13964            }
13965        }
13966    }
13967}
13968#[doc = "The phase details properties of a database operation."]
13969#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
13970pub struct PhaseDetails {
13971    #[doc = "The operation phase."]
13972    #[serde(default, skip_serializing_if = "Option::is_none")]
13973    pub phase: Option<phase_details::Phase>,
13974    #[doc = "The operation phase information."]
13975    #[serde(rename = "phaseInformation", default, skip_serializing_if = "Option::is_none")]
13976    pub phase_information: Option<serde_json::Value>,
13977}
13978impl PhaseDetails {
13979    pub fn new() -> Self {
13980        Self::default()
13981    }
13982}
13983pub mod phase_details {
13984    use super::*;
13985    #[doc = "The operation phase."]
13986    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
13987    #[serde(remote = "Phase")]
13988    pub enum Phase {
13989        Copying,
13990        Catchup,
13991        WaitingForCutover,
13992        CutoverInProgress,
13993        #[serde(skip_deserializing)]
13994        UnknownValue(String),
13995    }
13996    impl FromStr for Phase {
13997        type Err = value::Error;
13998        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
13999            Self::deserialize(s.into_deserializer())
14000        }
14001    }
14002    impl<'de> Deserialize<'de> for Phase {
14003        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14004        where
14005            D: Deserializer<'de>,
14006        {
14007            let s = String::deserialize(deserializer)?;
14008            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14009            Ok(deserialized)
14010        }
14011    }
14012    impl Serialize for Phase {
14013        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14014        where
14015            S: Serializer,
14016        {
14017            match self {
14018                Self::Copying => serializer.serialize_unit_variant("Phase", 0u32, "Copying"),
14019                Self::Catchup => serializer.serialize_unit_variant("Phase", 1u32, "Catchup"),
14020                Self::WaitingForCutover => serializer.serialize_unit_variant("Phase", 2u32, "WaitingForCutover"),
14021                Self::CutoverInProgress => serializer.serialize_unit_variant("Phase", 3u32, "CutoverInProgress"),
14022                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14023            }
14024        }
14025    }
14026}
14027#[doc = "A private endpoint connection"]
14028#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14029pub struct PrivateEndpointConnection {
14030    #[serde(flatten)]
14031    pub proxy_resource: ProxyResource,
14032    #[doc = "Properties of a private endpoint connection."]
14033    #[serde(default, skip_serializing_if = "Option::is_none")]
14034    pub properties: Option<PrivateEndpointConnectionProperties>,
14035}
14036impl PrivateEndpointConnection {
14037    pub fn new() -> Self {
14038        Self::default()
14039    }
14040}
14041#[doc = "A list of private endpoint connections."]
14042#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14043pub struct PrivateEndpointConnectionListResult {
14044    #[doc = "Array of results."]
14045    #[serde(
14046        default,
14047        deserialize_with = "azure_core::util::deserialize_null_as_default",
14048        skip_serializing_if = "Vec::is_empty"
14049    )]
14050    pub value: Vec<PrivateEndpointConnection>,
14051    #[doc = "Link to retrieve next page of results."]
14052    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
14053    pub next_link: Option<String>,
14054}
14055impl azure_core::Continuable for PrivateEndpointConnectionListResult {
14056    type Continuation = String;
14057    fn continuation(&self) -> Option<Self::Continuation> {
14058        self.next_link.clone().filter(|value| !value.is_empty())
14059    }
14060}
14061impl PrivateEndpointConnectionListResult {
14062    pub fn new() -> Self {
14063        Self::default()
14064    }
14065}
14066#[doc = "Properties of a private endpoint connection."]
14067#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14068pub struct PrivateEndpointConnectionProperties {
14069    #[serde(rename = "privateEndpoint", default, skip_serializing_if = "Option::is_none")]
14070    pub private_endpoint: Option<PrivateEndpointProperty>,
14071    #[doc = "Group IDs."]
14072    #[serde(
14073        rename = "groupIds",
14074        default,
14075        deserialize_with = "azure_core::util::deserialize_null_as_default",
14076        skip_serializing_if = "Vec::is_empty"
14077    )]
14078    pub group_ids: Vec<String>,
14079    #[serde(rename = "privateLinkServiceConnectionState", default, skip_serializing_if = "Option::is_none")]
14080    pub private_link_service_connection_state: Option<PrivateLinkServiceConnectionStateProperty>,
14081    #[doc = "State of the private endpoint connection."]
14082    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
14083    pub provisioning_state: Option<private_endpoint_connection_properties::ProvisioningState>,
14084}
14085impl PrivateEndpointConnectionProperties {
14086    pub fn new() -> Self {
14087        Self::default()
14088    }
14089}
14090pub mod private_endpoint_connection_properties {
14091    use super::*;
14092    #[doc = "State of the private endpoint connection."]
14093    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14094    #[serde(remote = "ProvisioningState")]
14095    pub enum ProvisioningState {
14096        Approving,
14097        Ready,
14098        Dropping,
14099        Failed,
14100        Rejecting,
14101        #[serde(skip_deserializing)]
14102        UnknownValue(String),
14103    }
14104    impl FromStr for ProvisioningState {
14105        type Err = value::Error;
14106        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14107            Self::deserialize(s.into_deserializer())
14108        }
14109    }
14110    impl<'de> Deserialize<'de> for ProvisioningState {
14111        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14112        where
14113            D: Deserializer<'de>,
14114        {
14115            let s = String::deserialize(deserializer)?;
14116            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14117            Ok(deserialized)
14118        }
14119    }
14120    impl Serialize for ProvisioningState {
14121        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14122        where
14123            S: Serializer,
14124        {
14125            match self {
14126                Self::Approving => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Approving"),
14127                Self::Ready => serializer.serialize_unit_variant("ProvisioningState", 1u32, "Ready"),
14128                Self::Dropping => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Dropping"),
14129                Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
14130                Self::Rejecting => serializer.serialize_unit_variant("ProvisioningState", 4u32, "Rejecting"),
14131                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14132            }
14133        }
14134    }
14135}
14136#[doc = "Contains the private endpoint connection requests status."]
14137#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14138pub struct PrivateEndpointConnectionRequestStatus {
14139    #[doc = "Resource id for which the private endpoint is created."]
14140    #[serde(rename = "privateLinkServiceId", default, skip_serializing_if = "Option::is_none")]
14141    pub private_link_service_id: Option<String>,
14142    #[doc = "The connection name for the private endpoint."]
14143    #[serde(rename = "privateEndpointConnectionName", default, skip_serializing_if = "Option::is_none")]
14144    pub private_endpoint_connection_name: Option<String>,
14145    #[doc = "Status of this private endpoint connection."]
14146    #[serde(default, skip_serializing_if = "Option::is_none")]
14147    pub status: Option<String>,
14148}
14149impl PrivateEndpointConnectionRequestStatus {
14150    pub fn new() -> Self {
14151        Self::default()
14152    }
14153}
14154#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14155pub struct PrivateEndpointProperty {
14156    #[doc = "Resource id of the private endpoint."]
14157    #[serde(default, skip_serializing_if = "Option::is_none")]
14158    pub id: Option<String>,
14159}
14160impl PrivateEndpointProperty {
14161    pub fn new() -> Self {
14162        Self::default()
14163    }
14164}
14165#[doc = "A private link resource"]
14166#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14167pub struct PrivateLinkResource {
14168    #[serde(flatten)]
14169    pub proxy_resource: ProxyResource,
14170    #[doc = "Properties of a private link resource."]
14171    #[serde(default, skip_serializing_if = "Option::is_none")]
14172    pub properties: Option<PrivateLinkResourceProperties>,
14173}
14174impl PrivateLinkResource {
14175    pub fn new() -> Self {
14176        Self::default()
14177    }
14178}
14179#[doc = "A list of private link resources"]
14180#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14181pub struct PrivateLinkResourceListResult {
14182    #[doc = "Array of results."]
14183    #[serde(
14184        default,
14185        deserialize_with = "azure_core::util::deserialize_null_as_default",
14186        skip_serializing_if = "Vec::is_empty"
14187    )]
14188    pub value: Vec<PrivateLinkResource>,
14189    #[doc = "Link to retrieve next page of results."]
14190    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
14191    pub next_link: Option<String>,
14192}
14193impl azure_core::Continuable for PrivateLinkResourceListResult {
14194    type Continuation = String;
14195    fn continuation(&self) -> Option<Self::Continuation> {
14196        self.next_link.clone().filter(|value| !value.is_empty())
14197    }
14198}
14199impl PrivateLinkResourceListResult {
14200    pub fn new() -> Self {
14201        Self::default()
14202    }
14203}
14204#[doc = "Properties of a private link resource."]
14205#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14206pub struct PrivateLinkResourceProperties {
14207    #[doc = "The private link resource group id."]
14208    #[serde(rename = "groupId", default, skip_serializing_if = "Option::is_none")]
14209    pub group_id: Option<String>,
14210    #[doc = "The private link resource required member names."]
14211    #[serde(
14212        rename = "requiredMembers",
14213        default,
14214        deserialize_with = "azure_core::util::deserialize_null_as_default",
14215        skip_serializing_if = "Vec::is_empty"
14216    )]
14217    pub required_members: Vec<String>,
14218    #[doc = "The private link resource required zone names."]
14219    #[serde(
14220        rename = "requiredZoneNames",
14221        default,
14222        deserialize_with = "azure_core::util::deserialize_null_as_default",
14223        skip_serializing_if = "Vec::is_empty"
14224    )]
14225    pub required_zone_names: Vec<String>,
14226}
14227impl PrivateLinkResourceProperties {
14228    pub fn new() -> Self {
14229        Self::default()
14230    }
14231}
14232#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14233pub struct PrivateLinkServiceConnectionStateProperty {
14234    #[doc = "The private link service connection status."]
14235    pub status: private_link_service_connection_state_property::Status,
14236    #[doc = "The private link service connection description."]
14237    pub description: String,
14238    #[doc = "The actions required for private link service connection."]
14239    #[serde(rename = "actionsRequired", default, skip_serializing_if = "Option::is_none")]
14240    pub actions_required: Option<private_link_service_connection_state_property::ActionsRequired>,
14241}
14242impl PrivateLinkServiceConnectionStateProperty {
14243    pub fn new(status: private_link_service_connection_state_property::Status, description: String) -> Self {
14244        Self {
14245            status,
14246            description,
14247            actions_required: None,
14248        }
14249    }
14250}
14251pub mod private_link_service_connection_state_property {
14252    use super::*;
14253    #[doc = "The private link service connection status."]
14254    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14255    #[serde(remote = "Status")]
14256    pub enum Status {
14257        Approved,
14258        Pending,
14259        Rejected,
14260        Disconnected,
14261        #[serde(skip_deserializing)]
14262        UnknownValue(String),
14263    }
14264    impl FromStr for Status {
14265        type Err = value::Error;
14266        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14267            Self::deserialize(s.into_deserializer())
14268        }
14269    }
14270    impl<'de> Deserialize<'de> for Status {
14271        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14272        where
14273            D: Deserializer<'de>,
14274        {
14275            let s = String::deserialize(deserializer)?;
14276            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14277            Ok(deserialized)
14278        }
14279    }
14280    impl Serialize for Status {
14281        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14282        where
14283            S: Serializer,
14284        {
14285            match self {
14286                Self::Approved => serializer.serialize_unit_variant("Status", 0u32, "Approved"),
14287                Self::Pending => serializer.serialize_unit_variant("Status", 1u32, "Pending"),
14288                Self::Rejected => serializer.serialize_unit_variant("Status", 2u32, "Rejected"),
14289                Self::Disconnected => serializer.serialize_unit_variant("Status", 3u32, "Disconnected"),
14290                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14291            }
14292        }
14293    }
14294    #[doc = "The actions required for private link service connection."]
14295    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14296    #[serde(remote = "ActionsRequired")]
14297    pub enum ActionsRequired {
14298        None,
14299        #[serde(skip_deserializing)]
14300        UnknownValue(String),
14301    }
14302    impl FromStr for ActionsRequired {
14303        type Err = value::Error;
14304        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14305            Self::deserialize(s.into_deserializer())
14306        }
14307    }
14308    impl<'de> Deserialize<'de> for ActionsRequired {
14309        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14310        where
14311            D: Deserializer<'de>,
14312        {
14313            let s = String::deserialize(deserializer)?;
14314            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14315            Ok(deserialized)
14316        }
14317    }
14318    impl Serialize for ActionsRequired {
14319        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14320        where
14321            S: Serializer,
14322        {
14323            match self {
14324                Self::None => serializer.serialize_unit_variant("ActionsRequired", 0u32, "None"),
14325                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14326            }
14327        }
14328    }
14329}
14330#[doc = "ARM proxy resource."]
14331#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14332pub struct ProxyResource {
14333    #[serde(flatten)]
14334    pub resource: Resource,
14335}
14336impl ProxyResource {
14337    pub fn new() -> Self {
14338        Self::default()
14339    }
14340}
14341#[doc = "ARM proxy resource."]
14342#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14343pub struct ProxyResourceWithWritableName {
14344    #[serde(flatten)]
14345    pub resource_with_writable_name: ResourceWithWritableName,
14346}
14347impl ProxyResourceWithWritableName {
14348    pub fn new() -> Self {
14349        Self::default()
14350    }
14351}
14352#[doc = "SQL Vulnerability Assessment query check object."]
14353#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14354pub struct QueryCheck {
14355    #[doc = "SQL Vulnerability Assessment rule query."]
14356    #[serde(default, skip_serializing_if = "Option::is_none")]
14357    pub query: Option<String>,
14358    #[doc = "SQL Vulnerability Assessment query expected result."]
14359    #[serde(
14360        rename = "expectedResult",
14361        default,
14362        deserialize_with = "azure_core::util::deserialize_null_as_default",
14363        skip_serializing_if = "Vec::is_empty"
14364    )]
14365    pub expected_result: Vec<Vec<String>>,
14366    #[doc = "SQL Vulnerability Assessment column names of query expected result."]
14367    #[serde(
14368        rename = "columnNames",
14369        default,
14370        deserialize_with = "azure_core::util::deserialize_null_as_default",
14371        skip_serializing_if = "Vec::is_empty"
14372    )]
14373    pub column_names: Vec<String>,
14374}
14375impl QueryCheck {
14376    pub fn new() -> Self {
14377        Self::default()
14378    }
14379}
14380#[doc = "Properties of a query metrics interval."]
14381#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14382pub struct QueryMetricInterval {
14383    #[doc = "The start time for the metric interval (ISO-8601 format)."]
14384    #[serde(rename = "intervalStartTime", default, skip_serializing_if = "Option::is_none")]
14385    pub interval_start_time: Option<String>,
14386    #[doc = "Interval type (length)."]
14387    #[serde(rename = "intervalType", default, skip_serializing_if = "Option::is_none")]
14388    pub interval_type: Option<query_metric_interval::IntervalType>,
14389    #[doc = "Execution count of a query in this interval."]
14390    #[serde(rename = "executionCount", default, skip_serializing_if = "Option::is_none")]
14391    pub execution_count: Option<i64>,
14392    #[doc = "List of metric objects for this interval"]
14393    #[serde(
14394        default,
14395        deserialize_with = "azure_core::util::deserialize_null_as_default",
14396        skip_serializing_if = "Vec::is_empty"
14397    )]
14398    pub metrics: Vec<QueryMetricProperties>,
14399}
14400impl QueryMetricInterval {
14401    pub fn new() -> Self {
14402        Self::default()
14403    }
14404}
14405pub mod query_metric_interval {
14406    use super::*;
14407    #[doc = "Interval type (length)."]
14408    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14409    #[serde(remote = "IntervalType")]
14410    pub enum IntervalType {
14411        #[serde(rename = "PT1H")]
14412        Pt1h,
14413        #[serde(rename = "P1D")]
14414        P1d,
14415        #[serde(skip_deserializing)]
14416        UnknownValue(String),
14417    }
14418    impl FromStr for IntervalType {
14419        type Err = value::Error;
14420        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14421            Self::deserialize(s.into_deserializer())
14422        }
14423    }
14424    impl<'de> Deserialize<'de> for IntervalType {
14425        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14426        where
14427            D: Deserializer<'de>,
14428        {
14429            let s = String::deserialize(deserializer)?;
14430            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14431            Ok(deserialized)
14432        }
14433    }
14434    impl Serialize for IntervalType {
14435        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14436        where
14437            S: Serializer,
14438        {
14439            match self {
14440                Self::Pt1h => serializer.serialize_unit_variant("IntervalType", 0u32, "PT1H"),
14441                Self::P1d => serializer.serialize_unit_variant("IntervalType", 1u32, "P1D"),
14442                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14443            }
14444        }
14445    }
14446}
14447#[doc = "Properties of a topquery metric in one interval."]
14448#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14449pub struct QueryMetricProperties {
14450    #[doc = "The name information for the metric."]
14451    #[serde(default, skip_serializing_if = "Option::is_none")]
14452    pub name: Option<String>,
14453    #[doc = "The UI appropriate name for the metric."]
14454    #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
14455    pub display_name: Option<String>,
14456    #[doc = "The unit of the metric."]
14457    #[serde(default, skip_serializing_if = "Option::is_none")]
14458    pub unit: Option<query_metric_properties::Unit>,
14459    #[doc = "The value of the metric."]
14460    #[serde(default, skip_serializing_if = "Option::is_none")]
14461    pub value: Option<f64>,
14462    #[doc = "Metric value when min() aggregate function is used over the interval."]
14463    #[serde(default, skip_serializing_if = "Option::is_none")]
14464    pub min: Option<f64>,
14465    #[doc = "Metric value when max() aggregate function is used over the interval."]
14466    #[serde(default, skip_serializing_if = "Option::is_none")]
14467    pub max: Option<f64>,
14468    #[doc = "Metric value when avg() aggregate function is used over the interval."]
14469    #[serde(default, skip_serializing_if = "Option::is_none")]
14470    pub avg: Option<f64>,
14471    #[doc = "Metric value when sum() aggregate function is used over the interval."]
14472    #[serde(default, skip_serializing_if = "Option::is_none")]
14473    pub sum: Option<f64>,
14474    #[doc = "Metric value when stdev aggregate function is used over the interval."]
14475    #[serde(default, skip_serializing_if = "Option::is_none")]
14476    pub stdev: Option<f64>,
14477}
14478impl QueryMetricProperties {
14479    pub fn new() -> Self {
14480        Self::default()
14481    }
14482}
14483pub mod query_metric_properties {
14484    use super::*;
14485    #[doc = "The unit of the metric."]
14486    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14487    #[serde(remote = "Unit")]
14488    pub enum Unit {
14489        #[serde(rename = "percentage")]
14490        Percentage,
14491        #[serde(rename = "KB")]
14492        Kb,
14493        #[serde(rename = "microseconds")]
14494        Microseconds,
14495        #[serde(rename = "count")]
14496        Count,
14497        #[serde(skip_deserializing)]
14498        UnknownValue(String),
14499    }
14500    impl FromStr for Unit {
14501        type Err = value::Error;
14502        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14503            Self::deserialize(s.into_deserializer())
14504        }
14505    }
14506    impl<'de> Deserialize<'de> for Unit {
14507        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14508        where
14509            D: Deserializer<'de>,
14510        {
14511            let s = String::deserialize(deserializer)?;
14512            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14513            Ok(deserialized)
14514        }
14515    }
14516    impl Serialize for Unit {
14517        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14518        where
14519            S: Serializer,
14520        {
14521            match self {
14522                Self::Percentage => serializer.serialize_unit_variant("Unit", 0u32, "percentage"),
14523                Self::Kb => serializer.serialize_unit_variant("Unit", 1u32, "KB"),
14524                Self::Microseconds => serializer.serialize_unit_variant("Unit", 2u32, "microseconds"),
14525                Self::Count => serializer.serialize_unit_variant("Unit", 3u32, "count"),
14526                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14527            }
14528        }
14529    }
14530}
14531#[doc = "Properties of a database query."]
14532#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14533pub struct QueryProperties {
14534    #[doc = "Query text."]
14535    #[serde(rename = "queryText", default, skip_serializing_if = "Option::is_none")]
14536    pub query_text: Option<String>,
14537}
14538impl QueryProperties {
14539    pub fn new() -> Self {
14540        Self::default()
14541    }
14542}
14543#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14544pub struct QueryStatistics {
14545    #[serde(flatten)]
14546    pub proxy_resource: ProxyResource,
14547    #[doc = "Properties of a query execution statistics."]
14548    #[serde(default, skip_serializing_if = "Option::is_none")]
14549    pub properties: Option<QueryStatisticsProperties>,
14550}
14551impl QueryStatistics {
14552    pub fn new() -> Self {
14553        Self::default()
14554    }
14555}
14556#[doc = "Properties of a query execution statistics."]
14557#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14558pub struct QueryStatisticsProperties {
14559    #[doc = "Database name of the database in which this query was executed."]
14560    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
14561    pub database_name: Option<String>,
14562    #[doc = "Unique query id (unique within one database)."]
14563    #[serde(rename = "queryId", default, skip_serializing_if = "Option::is_none")]
14564    pub query_id: Option<String>,
14565    #[doc = "The start time for the metric (ISO-8601 format)."]
14566    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
14567    pub start_time: Option<String>,
14568    #[doc = "The end time for the metric (ISO-8601 format)."]
14569    #[serde(rename = "endTime", default, skip_serializing_if = "Option::is_none")]
14570    pub end_time: Option<String>,
14571    #[doc = "List of intervals with appropriate metric data"]
14572    #[serde(
14573        default,
14574        deserialize_with = "azure_core::util::deserialize_null_as_default",
14575        skip_serializing_if = "Vec::is_empty"
14576    )]
14577    pub intervals: Vec<QueryMetricInterval>,
14578}
14579impl QueryStatisticsProperties {
14580    pub fn new() -> Self {
14581        Self::default()
14582    }
14583}
14584#[doc = "The read scale capability."]
14585#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14586pub struct ReadScaleCapability {
14587    #[doc = "The maximum number of read scale replicas."]
14588    #[serde(rename = "maxNumberOfReplicas", default, skip_serializing_if = "Option::is_none")]
14589    pub max_number_of_replicas: Option<i32>,
14590    #[doc = "The status of the capability."]
14591    #[serde(default, skip_serializing_if = "Option::is_none")]
14592    pub status: Option<read_scale_capability::Status>,
14593    #[doc = "The reason for the capability not being available."]
14594    #[serde(default, skip_serializing_if = "Option::is_none")]
14595    pub reason: Option<String>,
14596}
14597impl ReadScaleCapability {
14598    pub fn new() -> Self {
14599        Self::default()
14600    }
14601}
14602pub mod read_scale_capability {
14603    use super::*;
14604    #[doc = "The status of the capability."]
14605    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14606    pub enum Status {
14607        Visible,
14608        Available,
14609        Default,
14610        Disabled,
14611    }
14612}
14613#[doc = "Database, Server or Elastic Pool Recommended Action."]
14614#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14615pub struct RecommendedAction {
14616    #[serde(flatten)]
14617    pub proxy_resource: ProxyResource,
14618    #[doc = "Resource kind."]
14619    #[serde(default, skip_serializing_if = "Option::is_none")]
14620    pub kind: Option<String>,
14621    #[doc = "Resource location."]
14622    #[serde(default, skip_serializing_if = "Option::is_none")]
14623    pub location: Option<String>,
14624    #[doc = "Properties for a Database, Server or Elastic Pool Recommended Action."]
14625    #[serde(default, skip_serializing_if = "Option::is_none")]
14626    pub properties: Option<RecommendedActionProperties>,
14627}
14628impl RecommendedAction {
14629    pub fn new() -> Self {
14630        Self::default()
14631    }
14632}
14633#[doc = "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14634#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14635pub struct RecommendedActionErrorInfo {
14636    #[doc = "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists"]
14637    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
14638    pub error_code: Option<String>,
14639    #[doc = "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No"]
14640    #[serde(rename = "isRetryable", default, skip_serializing_if = "Option::is_none")]
14641    pub is_retryable: Option<recommended_action_error_info::IsRetryable>,
14642}
14643impl RecommendedActionErrorInfo {
14644    pub fn new() -> Self {
14645        Self::default()
14646    }
14647}
14648pub mod recommended_action_error_info {
14649    use super::*;
14650    #[doc = "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No"]
14651    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14652    pub enum IsRetryable {
14653        Yes,
14654        No,
14655    }
14656}
14657#[doc = "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14658#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14659pub struct RecommendedActionImpactRecord {
14660    #[doc = "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected."]
14661    #[serde(rename = "dimensionName", default, skip_serializing_if = "Option::is_none")]
14662    pub dimension_name: Option<String>,
14663    #[doc = "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected."]
14664    #[serde(default, skip_serializing_if = "Option::is_none")]
14665    pub unit: Option<String>,
14666    #[doc = "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected"]
14667    #[serde(rename = "absoluteValue", default, skip_serializing_if = "Option::is_none")]
14668    pub absolute_value: Option<f64>,
14669    #[doc = "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes"]
14670    #[serde(rename = "changeValueAbsolute", default, skip_serializing_if = "Option::is_none")]
14671    pub change_value_absolute: Option<f64>,
14672    #[doc = "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage"]
14673    #[serde(rename = "changeValueRelative", default, skip_serializing_if = "Option::is_none")]
14674    pub change_value_relative: Option<f64>,
14675}
14676impl RecommendedActionImpactRecord {
14677    pub fn new() -> Self {
14678        Self::default()
14679    }
14680}
14681#[doc = "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14682#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14683pub struct RecommendedActionImplementationInfo {
14684    #[doc = "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell."]
14685    #[serde(default, skip_serializing_if = "Option::is_none")]
14686    pub method: Option<recommended_action_implementation_info::Method>,
14687    #[doc = "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database."]
14688    #[serde(default, skip_serializing_if = "Option::is_none")]
14689    pub script: Option<String>,
14690}
14691impl RecommendedActionImplementationInfo {
14692    pub fn new() -> Self {
14693        Self::default()
14694    }
14695}
14696pub mod recommended_action_implementation_info {
14697    use super::*;
14698    #[doc = "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell."]
14699    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14700    pub enum Method {
14701        TSql,
14702        AzurePowerShell,
14703    }
14704}
14705#[doc = "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14706#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14707pub struct RecommendedActionMetricInfo {
14708    #[doc = "Gets the name of the metric. e.g., CPU, Number of Queries."]
14709    #[serde(rename = "metricName", default, skip_serializing_if = "Option::is_none")]
14710    pub metric_name: Option<String>,
14711    #[doc = "Gets the unit in which metric is measured. e.g., DTU, Frequency"]
14712    #[serde(default, skip_serializing_if = "Option::is_none")]
14713    pub unit: Option<String>,
14714    #[doc = "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)"]
14715    #[serde(rename = "timeGrain", default, skip_serializing_if = "Option::is_none")]
14716    pub time_grain: Option<String>,
14717    #[doc = "Gets the start time of time interval given by this MetricInfo."]
14718    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
14719    pub start_time: Option<::time::OffsetDateTime>,
14720    #[doc = "Gets the value of the metric in the time interval given by this MetricInfo."]
14721    #[serde(default, skip_serializing_if = "Option::is_none")]
14722    pub value: Option<f64>,
14723}
14724impl RecommendedActionMetricInfo {
14725    pub fn new() -> Self {
14726        Self::default()
14727    }
14728}
14729#[doc = "Properties for a Database, Server or Elastic Pool Recommended Action."]
14730#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14731pub struct RecommendedActionProperties {
14732    #[doc = "Gets the reason for recommending this action. e.g., DuplicateIndex"]
14733    #[serde(rename = "recommendationReason", default, skip_serializing_if = "Option::is_none")]
14734    pub recommendation_reason: Option<String>,
14735    #[doc = "Gets the time since when this recommended action is valid."]
14736    #[serde(rename = "validSince", default, with = "azure_core::date::rfc3339::option")]
14737    pub valid_since: Option<::time::OffsetDateTime>,
14738    #[doc = "Gets time when this recommended action was last refreshed."]
14739    #[serde(rename = "lastRefresh", default, with = "azure_core::date::rfc3339::option")]
14740    pub last_refresh: Option<::time::OffsetDateTime>,
14741    #[doc = "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14742    pub state: RecommendedActionStateInfo,
14743    #[doc = "Gets if this recommended action is actionable by user"]
14744    #[serde(rename = "isExecutableAction", default, skip_serializing_if = "Option::is_none")]
14745    pub is_executable_action: Option<bool>,
14746    #[doc = "Gets if changes applied by this recommended action can be reverted by user"]
14747    #[serde(rename = "isRevertableAction", default, skip_serializing_if = "Option::is_none")]
14748    pub is_revertable_action: Option<bool>,
14749    #[doc = "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again."]
14750    #[serde(rename = "isArchivedAction", default, skip_serializing_if = "Option::is_none")]
14751    pub is_archived_action: Option<bool>,
14752    #[doc = "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time"]
14753    #[serde(rename = "executeActionStartTime", default, with = "azure_core::date::rfc3339::option")]
14754    pub execute_action_start_time: Option<::time::OffsetDateTime>,
14755    #[doc = "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation"]
14756    #[serde(rename = "executeActionDuration", default, skip_serializing_if = "Option::is_none")]
14757    pub execute_action_duration: Option<String>,
14758    #[doc = "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed."]
14759    #[serde(rename = "revertActionStartTime", default, with = "azure_core::date::rfc3339::option")]
14760    pub revert_action_start_time: Option<::time::OffsetDateTime>,
14761    #[doc = "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index."]
14762    #[serde(rename = "revertActionDuration", default, skip_serializing_if = "Option::is_none")]
14763    pub revert_action_duration: Option<String>,
14764    #[doc = "Gets if approval for applying this recommended action was given by user/system."]
14765    #[serde(rename = "executeActionInitiatedBy", default, skip_serializing_if = "Option::is_none")]
14766    pub execute_action_initiated_by: Option<recommended_action_properties::ExecuteActionInitiatedBy>,
14767    #[doc = "Gets the time when this recommended action was approved for execution."]
14768    #[serde(rename = "executeActionInitiatedTime", default, with = "azure_core::date::rfc3339::option")]
14769    pub execute_action_initiated_time: Option<::time::OffsetDateTime>,
14770    #[doc = "Gets if approval for reverting this recommended action was given by user/system."]
14771    #[serde(rename = "revertActionInitiatedBy", default, skip_serializing_if = "Option::is_none")]
14772    pub revert_action_initiated_by: Option<recommended_action_properties::RevertActionInitiatedBy>,
14773    #[doc = "Gets the time when this recommended action was approved for revert."]
14774    #[serde(rename = "revertActionInitiatedTime", default, with = "azure_core::date::rfc3339::option")]
14775    pub revert_action_initiated_time: Option<::time::OffsetDateTime>,
14776    #[doc = "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact"]
14777    #[serde(default, skip_serializing_if = "Option::is_none")]
14778    pub score: Option<i32>,
14779    #[doc = "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14780    #[serde(rename = "implementationDetails", default, skip_serializing_if = "Option::is_none")]
14781    pub implementation_details: Option<RecommendedActionImplementationInfo>,
14782    #[doc = "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14783    #[serde(rename = "errorDetails", default, skip_serializing_if = "Option::is_none")]
14784    pub error_details: Option<RecommendedActionErrorInfo>,
14785    #[doc = "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change"]
14786    #[serde(
14787        rename = "estimatedImpact",
14788        default,
14789        deserialize_with = "azure_core::util::deserialize_null_as_default",
14790        skip_serializing_if = "Vec::is_empty"
14791    )]
14792    pub estimated_impact: Vec<RecommendedActionImpactRecord>,
14793    #[doc = "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change"]
14794    #[serde(
14795        rename = "observedImpact",
14796        default,
14797        deserialize_with = "azure_core::util::deserialize_null_as_default",
14798        skip_serializing_if = "Vec::is_empty"
14799    )]
14800    pub observed_impact: Vec<RecommendedActionImpactRecord>,
14801    #[doc = "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series"]
14802    #[serde(
14803        rename = "timeSeries",
14804        default,
14805        deserialize_with = "azure_core::util::deserialize_null_as_default",
14806        skip_serializing_if = "Vec::is_empty"
14807    )]
14808    pub time_series: Vec<RecommendedActionMetricInfo>,
14809    #[doc = "Gets the linked objects, if any."]
14810    #[serde(
14811        rename = "linkedObjects",
14812        default,
14813        deserialize_with = "azure_core::util::deserialize_null_as_default",
14814        skip_serializing_if = "Vec::is_empty"
14815    )]
14816    pub linked_objects: Vec<String>,
14817    #[doc = "Gets additional details specific to this recommended action."]
14818    #[serde(default, skip_serializing_if = "Option::is_none")]
14819    pub details: Option<serde_json::Value>,
14820}
14821impl RecommendedActionProperties {
14822    pub fn new(state: RecommendedActionStateInfo) -> Self {
14823        Self {
14824            recommendation_reason: None,
14825            valid_since: None,
14826            last_refresh: None,
14827            state,
14828            is_executable_action: None,
14829            is_revertable_action: None,
14830            is_archived_action: None,
14831            execute_action_start_time: None,
14832            execute_action_duration: None,
14833            revert_action_start_time: None,
14834            revert_action_duration: None,
14835            execute_action_initiated_by: None,
14836            execute_action_initiated_time: None,
14837            revert_action_initiated_by: None,
14838            revert_action_initiated_time: None,
14839            score: None,
14840            implementation_details: None,
14841            error_details: None,
14842            estimated_impact: Vec::new(),
14843            observed_impact: Vec::new(),
14844            time_series: Vec::new(),
14845            linked_objects: Vec::new(),
14846            details: None,
14847        }
14848    }
14849}
14850pub mod recommended_action_properties {
14851    use super::*;
14852    #[doc = "Gets if approval for applying this recommended action was given by user/system."]
14853    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14854    pub enum ExecuteActionInitiatedBy {
14855        User,
14856        System,
14857    }
14858    #[doc = "Gets if approval for reverting this recommended action was given by user/system."]
14859    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14860    pub enum RevertActionInitiatedBy {
14861        User,
14862        System,
14863    }
14864}
14865#[doc = "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action."]
14866#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14867pub struct RecommendedActionStateInfo {
14868    #[doc = "Current state the recommended action is in. Some commonly used states are: Active      -> recommended action is active and no action has been taken yet. Pending     -> recommended action is approved for and is awaiting execution. Executing   -> recommended action is being applied on the user database. Verifying   -> recommended action was applied and is being verified of its usefulness by the system. Success     -> recommended action was applied and improvement found during verification. Pending Revert  -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting   -> changes made while applying recommended action are being reverted on the user database. Reverted    -> successfully reverted the changes made by recommended action on user database. Ignored     -> user explicitly ignored/discarded the recommended action. "]
14869    #[serde(rename = "currentValue")]
14870    pub current_value: recommended_action_state_info::CurrentValue,
14871    #[doc = "Gets who initiated the execution of this recommended action. Possible Value are: User    -> When user explicity notified system to apply the recommended action. System  -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it."]
14872    #[serde(rename = "actionInitiatedBy", default, skip_serializing_if = "Option::is_none")]
14873    pub action_initiated_by: Option<recommended_action_state_info::ActionInitiatedBy>,
14874    #[doc = "Gets the time when the state was last modified"]
14875    #[serde(rename = "lastModified", default, with = "azure_core::date::rfc3339::option")]
14876    pub last_modified: Option<::time::OffsetDateTime>,
14877}
14878impl RecommendedActionStateInfo {
14879    pub fn new(current_value: recommended_action_state_info::CurrentValue) -> Self {
14880        Self {
14881            current_value,
14882            action_initiated_by: None,
14883            last_modified: None,
14884        }
14885    }
14886}
14887pub mod recommended_action_state_info {
14888    use super::*;
14889    #[doc = "Current state the recommended action is in. Some commonly used states are: Active      -> recommended action is active and no action has been taken yet. Pending     -> recommended action is approved for and is awaiting execution. Executing   -> recommended action is being applied on the user database. Verifying   -> recommended action was applied and is being verified of its usefulness by the system. Success     -> recommended action was applied and improvement found during verification. Pending Revert  -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting   -> changes made while applying recommended action are being reverted on the user database. Reverted    -> successfully reverted the changes made by recommended action on user database. Ignored     -> user explicitly ignored/discarded the recommended action. "]
14890    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14891    #[serde(remote = "CurrentValue")]
14892    pub enum CurrentValue {
14893        Active,
14894        Pending,
14895        Executing,
14896        Verifying,
14897        PendingRevert,
14898        RevertCancelled,
14899        Reverting,
14900        Reverted,
14901        Ignored,
14902        Expired,
14903        Monitoring,
14904        Resolved,
14905        Success,
14906        Error,
14907        #[serde(skip_deserializing)]
14908        UnknownValue(String),
14909    }
14910    impl FromStr for CurrentValue {
14911        type Err = value::Error;
14912        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
14913            Self::deserialize(s.into_deserializer())
14914        }
14915    }
14916    impl<'de> Deserialize<'de> for CurrentValue {
14917        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14918        where
14919            D: Deserializer<'de>,
14920        {
14921            let s = String::deserialize(deserializer)?;
14922            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
14923            Ok(deserialized)
14924        }
14925    }
14926    impl Serialize for CurrentValue {
14927        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14928        where
14929            S: Serializer,
14930        {
14931            match self {
14932                Self::Active => serializer.serialize_unit_variant("CurrentValue", 0u32, "Active"),
14933                Self::Pending => serializer.serialize_unit_variant("CurrentValue", 1u32, "Pending"),
14934                Self::Executing => serializer.serialize_unit_variant("CurrentValue", 2u32, "Executing"),
14935                Self::Verifying => serializer.serialize_unit_variant("CurrentValue", 3u32, "Verifying"),
14936                Self::PendingRevert => serializer.serialize_unit_variant("CurrentValue", 4u32, "PendingRevert"),
14937                Self::RevertCancelled => serializer.serialize_unit_variant("CurrentValue", 5u32, "RevertCancelled"),
14938                Self::Reverting => serializer.serialize_unit_variant("CurrentValue", 6u32, "Reverting"),
14939                Self::Reverted => serializer.serialize_unit_variant("CurrentValue", 7u32, "Reverted"),
14940                Self::Ignored => serializer.serialize_unit_variant("CurrentValue", 8u32, "Ignored"),
14941                Self::Expired => serializer.serialize_unit_variant("CurrentValue", 9u32, "Expired"),
14942                Self::Monitoring => serializer.serialize_unit_variant("CurrentValue", 10u32, "Monitoring"),
14943                Self::Resolved => serializer.serialize_unit_variant("CurrentValue", 11u32, "Resolved"),
14944                Self::Success => serializer.serialize_unit_variant("CurrentValue", 12u32, "Success"),
14945                Self::Error => serializer.serialize_unit_variant("CurrentValue", 13u32, "Error"),
14946                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
14947            }
14948        }
14949    }
14950    #[doc = "Gets who initiated the execution of this recommended action. Possible Value are: User    -> When user explicity notified system to apply the recommended action. System  -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it."]
14951    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14952    pub enum ActionInitiatedBy {
14953        User,
14954        System,
14955    }
14956}
14957#[doc = "A recommended sensitivity label update operation."]
14958#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14959pub struct RecommendedSensitivityLabelUpdate {
14960    #[serde(flatten)]
14961    pub proxy_resource: ProxyResource,
14962    #[doc = "Properties of an operation executed on a recommended sensitivity label."]
14963    #[serde(default, skip_serializing_if = "Option::is_none")]
14964    pub properties: Option<RecommendedSensitivityLabelUpdateProperties>,
14965}
14966impl RecommendedSensitivityLabelUpdate {
14967    pub fn new() -> Self {
14968        Self::default()
14969    }
14970}
14971#[doc = "A list of recommended sensitivity label update operations."]
14972#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
14973pub struct RecommendedSensitivityLabelUpdateList {
14974    #[serde(
14975        default,
14976        deserialize_with = "azure_core::util::deserialize_null_as_default",
14977        skip_serializing_if = "Vec::is_empty"
14978    )]
14979    pub operations: Vec<RecommendedSensitivityLabelUpdate>,
14980}
14981impl RecommendedSensitivityLabelUpdateList {
14982    pub fn new() -> Self {
14983        Self::default()
14984    }
14985}
14986#[doc = "Properties of an operation executed on a recommended sensitivity label."]
14987#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14988pub struct RecommendedSensitivityLabelUpdateProperties {
14989    pub op: recommended_sensitivity_label_update_properties::Op,
14990    #[doc = "Schema name of the column to update."]
14991    pub schema: String,
14992    #[doc = "Table name of the column to update."]
14993    pub table: String,
14994    #[doc = "Column name to update."]
14995    pub column: String,
14996}
14997impl RecommendedSensitivityLabelUpdateProperties {
14998    pub fn new(op: recommended_sensitivity_label_update_properties::Op, schema: String, table: String, column: String) -> Self {
14999        Self { op, schema, table, column }
15000    }
15001}
15002pub mod recommended_sensitivity_label_update_properties {
15003    use super::*;
15004    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15005    pub enum Op {
15006        #[serde(rename = "enable")]
15007        Enable,
15008        #[serde(rename = "disable")]
15009        Disable,
15010    }
15011}
15012#[doc = "A recoverable database resource."]
15013#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15014pub struct RecoverableDatabase {
15015    #[serde(flatten)]
15016    pub proxy_resource: ProxyResource,
15017    #[doc = "The recoverable database's properties."]
15018    #[serde(default, skip_serializing_if = "Option::is_none")]
15019    pub properties: Option<RecoverableDatabaseProperties>,
15020}
15021impl RecoverableDatabase {
15022    pub fn new() -> Self {
15023        Self::default()
15024    }
15025}
15026#[doc = "A list of recoverable databases."]
15027#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15028pub struct RecoverableDatabaseListResult {
15029    #[doc = "Array of results."]
15030    #[serde(
15031        default,
15032        deserialize_with = "azure_core::util::deserialize_null_as_default",
15033        skip_serializing_if = "Vec::is_empty"
15034    )]
15035    pub value: Vec<RecoverableDatabase>,
15036    #[doc = "Link to retrieve next page of results."]
15037    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15038    pub next_link: Option<String>,
15039}
15040impl azure_core::Continuable for RecoverableDatabaseListResult {
15041    type Continuation = String;
15042    fn continuation(&self) -> Option<Self::Continuation> {
15043        self.next_link.clone().filter(|value| !value.is_empty())
15044    }
15045}
15046impl RecoverableDatabaseListResult {
15047    pub fn new() -> Self {
15048        Self::default()
15049    }
15050}
15051#[doc = "The recoverable database's properties."]
15052#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15053pub struct RecoverableDatabaseProperties {
15054    #[doc = "The edition of the database."]
15055    #[serde(default, skip_serializing_if = "Option::is_none")]
15056    pub edition: Option<String>,
15057    #[doc = "The service level objective name of the database."]
15058    #[serde(rename = "serviceLevelObjective", default, skip_serializing_if = "Option::is_none")]
15059    pub service_level_objective: Option<String>,
15060    #[doc = "The elastic pool name of the database"]
15061    #[serde(rename = "elasticPoolName", default, skip_serializing_if = "Option::is_none")]
15062    pub elastic_pool_name: Option<String>,
15063    #[doc = "The last available backup date."]
15064    #[serde(rename = "lastAvailableBackupDate", default, with = "azure_core::date::rfc3339::option")]
15065    pub last_available_backup_date: Option<::time::OffsetDateTime>,
15066    #[doc = "The resource ids of the user assigned identities to use"]
15067    #[serde(default, skip_serializing_if = "Option::is_none")]
15068    pub keys: Option<serde_json::Value>,
15069}
15070impl RecoverableDatabaseProperties {
15071    pub fn new() -> Self {
15072        Self::default()
15073    }
15074}
15075#[doc = "A recoverable managed database resource."]
15076#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15077pub struct RecoverableManagedDatabase {
15078    #[serde(flatten)]
15079    pub proxy_resource: ProxyResource,
15080    #[doc = "The recoverable managed database's properties."]
15081    #[serde(default, skip_serializing_if = "Option::is_none")]
15082    pub properties: Option<RecoverableManagedDatabaseProperties>,
15083}
15084impl RecoverableManagedDatabase {
15085    pub fn new() -> Self {
15086        Self::default()
15087    }
15088}
15089#[doc = "A list of recoverable managed databases."]
15090#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15091pub struct RecoverableManagedDatabaseListResult {
15092    #[doc = "Array of results."]
15093    #[serde(
15094        default,
15095        deserialize_with = "azure_core::util::deserialize_null_as_default",
15096        skip_serializing_if = "Vec::is_empty"
15097    )]
15098    pub value: Vec<RecoverableManagedDatabase>,
15099    #[doc = "Link to retrieve next page of results."]
15100    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15101    pub next_link: Option<String>,
15102}
15103impl azure_core::Continuable for RecoverableManagedDatabaseListResult {
15104    type Continuation = String;
15105    fn continuation(&self) -> Option<Self::Continuation> {
15106        self.next_link.clone().filter(|value| !value.is_empty())
15107    }
15108}
15109impl RecoverableManagedDatabaseListResult {
15110    pub fn new() -> Self {
15111        Self::default()
15112    }
15113}
15114#[doc = "The recoverable managed database's properties."]
15115#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15116pub struct RecoverableManagedDatabaseProperties {
15117    #[doc = "The last available backup date."]
15118    #[serde(rename = "lastAvailableBackupDate", default, skip_serializing_if = "Option::is_none")]
15119    pub last_available_backup_date: Option<String>,
15120}
15121impl RecoverableManagedDatabaseProperties {
15122    pub fn new() -> Self {
15123        Self::default()
15124    }
15125}
15126#[doc = "An RefreshExternalGovernanceStatus operation result resource."]
15127#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15128pub struct RefreshExternalGovernanceStatusOperationResult {
15129    #[serde(flatten)]
15130    pub proxy_resource: ProxyResource,
15131    #[doc = "Contains the operation result properties for refresh external governance status operation."]
15132    #[serde(default, skip_serializing_if = "Option::is_none")]
15133    pub properties: Option<RefreshExternalGovernanceStatusOperationResultProperties>,
15134}
15135impl RefreshExternalGovernanceStatusOperationResult {
15136    pub fn new() -> Self {
15137        Self::default()
15138    }
15139}
15140#[doc = "An RefreshExternalGovernanceStatus operation result resource."]
15141#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15142pub struct RefreshExternalGovernanceStatusOperationResultMi {
15143    #[serde(flatten)]
15144    pub proxy_resource: ProxyResource,
15145    #[doc = "Contains the operation result properties for refresh external governance status operation."]
15146    #[serde(default, skip_serializing_if = "Option::is_none")]
15147    pub properties: Option<RefreshExternalGovernanceStatusOperationResultPropertiesMi>,
15148}
15149impl RefreshExternalGovernanceStatusOperationResultMi {
15150    pub fn new() -> Self {
15151        Self::default()
15152    }
15153}
15154#[doc = "Contains the operation result properties for refresh external governance status operation."]
15155#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15156pub struct RefreshExternalGovernanceStatusOperationResultProperties {
15157    #[doc = "Request Id."]
15158    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
15159    pub request_id: Option<String>,
15160    #[doc = "Request type."]
15161    #[serde(rename = "requestType", default, skip_serializing_if = "Option::is_none")]
15162    pub request_type: Option<String>,
15163    #[doc = "Queued time."]
15164    #[serde(rename = "queuedTime", default, skip_serializing_if = "Option::is_none")]
15165    pub queued_time: Option<String>,
15166    #[doc = "Server name."]
15167    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
15168    pub server_name: Option<String>,
15169    #[doc = "Operation status."]
15170    #[serde(default, skip_serializing_if = "Option::is_none")]
15171    pub status: Option<String>,
15172    #[doc = "Error message."]
15173    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
15174    pub error_message: Option<String>,
15175}
15176impl RefreshExternalGovernanceStatusOperationResultProperties {
15177    pub fn new() -> Self {
15178        Self::default()
15179    }
15180}
15181#[doc = "Contains the operation result properties for refresh external governance status operation."]
15182#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15183pub struct RefreshExternalGovernanceStatusOperationResultPropertiesMi {
15184    #[doc = "Request Id."]
15185    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
15186    pub request_id: Option<String>,
15187    #[doc = "Request type."]
15188    #[serde(rename = "requestType", default, skip_serializing_if = "Option::is_none")]
15189    pub request_type: Option<String>,
15190    #[doc = "Queued time."]
15191    #[serde(rename = "queuedTime", default, skip_serializing_if = "Option::is_none")]
15192    pub queued_time: Option<String>,
15193    #[doc = "Managed instance name."]
15194    #[serde(rename = "managedInstanceName", default, skip_serializing_if = "Option::is_none")]
15195    pub managed_instance_name: Option<String>,
15196    #[doc = "Operation status."]
15197    #[serde(default, skip_serializing_if = "Option::is_none")]
15198    pub status: Option<String>,
15199    #[doc = "Error message."]
15200    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
15201    pub error_message: Option<String>,
15202}
15203impl RefreshExternalGovernanceStatusOperationResultPropertiesMi {
15204    pub fn new() -> Self {
15205        Self::default()
15206    }
15207}
15208#[doc = "SQL Vulnerability Assessment remediation Details."]
15209#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15210pub struct Remediation {
15211    #[doc = "SQL Vulnerability Assessment remediation description."]
15212    #[serde(default, skip_serializing_if = "Option::is_none")]
15213    pub description: Option<String>,
15214    #[doc = "SQL Vulnerability Assessment remediation script."]
15215    #[serde(
15216        default,
15217        deserialize_with = "azure_core::util::deserialize_null_as_default",
15218        skip_serializing_if = "Vec::is_empty"
15219    )]
15220    pub scripts: Vec<String>,
15221    #[doc = "SQL Vulnerability Assessment is remediation automated."]
15222    #[serde(default, skip_serializing_if = "Option::is_none")]
15223    pub automated: Option<bool>,
15224    #[doc = "SQL Vulnerability Assessment optional link to remediate in Azure Portal."]
15225    #[serde(rename = "portalLink", default, skip_serializing_if = "Option::is_none")]
15226    pub portal_link: Option<String>,
15227}
15228impl Remediation {
15229    pub fn new() -> Self {
15230        Self::default()
15231    }
15232}
15233#[doc = "A replication link."]
15234#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15235pub struct ReplicationLink {
15236    #[serde(flatten)]
15237    pub proxy_resource: ProxyResource,
15238    #[doc = "Properties of a replication link."]
15239    #[serde(default, skip_serializing_if = "Option::is_none")]
15240    pub properties: Option<ReplicationLinkProperties>,
15241}
15242impl ReplicationLink {
15243    pub fn new() -> Self {
15244        Self::default()
15245    }
15246}
15247#[doc = "A list of replication links."]
15248#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15249pub struct ReplicationLinkListResult {
15250    #[doc = "Array of results."]
15251    #[serde(
15252        default,
15253        deserialize_with = "azure_core::util::deserialize_null_as_default",
15254        skip_serializing_if = "Vec::is_empty"
15255    )]
15256    pub value: Vec<ReplicationLink>,
15257    #[doc = "Link to retrieve next page of results."]
15258    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15259    pub next_link: Option<String>,
15260}
15261impl azure_core::Continuable for ReplicationLinkListResult {
15262    type Continuation = String;
15263    fn continuation(&self) -> Option<Self::Continuation> {
15264        self.next_link.clone().filter(|value| !value.is_empty())
15265    }
15266}
15267impl ReplicationLinkListResult {
15268    pub fn new() -> Self {
15269        Self::default()
15270    }
15271}
15272#[doc = "Properties of a replication link."]
15273#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15274pub struct ReplicationLinkProperties {
15275    #[doc = "Resource partner server."]
15276    #[serde(rename = "partnerServer", default, skip_serializing_if = "Option::is_none")]
15277    pub partner_server: Option<String>,
15278    #[doc = "Resource partner database."]
15279    #[serde(rename = "partnerDatabase", default, skip_serializing_if = "Option::is_none")]
15280    pub partner_database: Option<String>,
15281    #[doc = "Resource partner database Id."]
15282    #[serde(rename = "partnerDatabaseId", default, skip_serializing_if = "Option::is_none")]
15283    pub partner_database_id: Option<String>,
15284    #[doc = "Resource partner location."]
15285    #[serde(rename = "partnerLocation", default, skip_serializing_if = "Option::is_none")]
15286    pub partner_location: Option<String>,
15287    #[doc = "Local replication role."]
15288    #[serde(default, skip_serializing_if = "Option::is_none")]
15289    pub role: Option<replication_link_properties::Role>,
15290    #[doc = "Partner replication role."]
15291    #[serde(rename = "partnerRole", default, skip_serializing_if = "Option::is_none")]
15292    pub partner_role: Option<replication_link_properties::PartnerRole>,
15293    #[doc = "Replication mode."]
15294    #[serde(rename = "replicationMode", default, skip_serializing_if = "Option::is_none")]
15295    pub replication_mode: Option<String>,
15296    #[doc = "Time at which the link was created."]
15297    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
15298    pub start_time: Option<::time::OffsetDateTime>,
15299    #[doc = "Seeding completion percentage for the link."]
15300    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
15301    pub percent_complete: Option<i32>,
15302    #[doc = "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED)."]
15303    #[serde(rename = "replicationState", default, skip_serializing_if = "Option::is_none")]
15304    pub replication_state: Option<replication_link_properties::ReplicationState>,
15305    #[doc = "Whether the user is currently allowed to terminate the link."]
15306    #[serde(rename = "isTerminationAllowed", default, skip_serializing_if = "Option::is_none")]
15307    pub is_termination_allowed: Option<bool>,
15308    #[doc = "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED."]
15309    #[serde(rename = "linkType", default, skip_serializing_if = "Option::is_none")]
15310    pub link_type: Option<replication_link_properties::LinkType>,
15311}
15312impl ReplicationLinkProperties {
15313    pub fn new() -> Self {
15314        Self::default()
15315    }
15316}
15317pub mod replication_link_properties {
15318    use super::*;
15319    #[doc = "Local replication role."]
15320    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15321    pub enum Role {
15322        Primary,
15323        Secondary,
15324        NonReadableSecondary,
15325        Source,
15326        Copy,
15327    }
15328    #[doc = "Partner replication role."]
15329    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15330    pub enum PartnerRole {
15331        Primary,
15332        Secondary,
15333        NonReadableSecondary,
15334        Source,
15335        Copy,
15336    }
15337    #[doc = "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED)."]
15338    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15339    #[serde(remote = "ReplicationState")]
15340    pub enum ReplicationState {
15341        #[serde(rename = "PENDING")]
15342        Pending,
15343        #[serde(rename = "SEEDING")]
15344        Seeding,
15345        #[serde(rename = "CATCH_UP")]
15346        CatchUp,
15347        #[serde(rename = "SUSPENDED")]
15348        Suspended,
15349        #[serde(skip_deserializing)]
15350        UnknownValue(String),
15351    }
15352    impl FromStr for ReplicationState {
15353        type Err = value::Error;
15354        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15355            Self::deserialize(s.into_deserializer())
15356        }
15357    }
15358    impl<'de> Deserialize<'de> for ReplicationState {
15359        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15360        where
15361            D: Deserializer<'de>,
15362        {
15363            let s = String::deserialize(deserializer)?;
15364            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15365            Ok(deserialized)
15366        }
15367    }
15368    impl Serialize for ReplicationState {
15369        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15370        where
15371            S: Serializer,
15372        {
15373            match self {
15374                Self::Pending => serializer.serialize_unit_variant("ReplicationState", 0u32, "PENDING"),
15375                Self::Seeding => serializer.serialize_unit_variant("ReplicationState", 1u32, "SEEDING"),
15376                Self::CatchUp => serializer.serialize_unit_variant("ReplicationState", 2u32, "CATCH_UP"),
15377                Self::Suspended => serializer.serialize_unit_variant("ReplicationState", 3u32, "SUSPENDED"),
15378                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15379            }
15380        }
15381    }
15382    #[doc = "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED."]
15383    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15384    #[serde(remote = "LinkType")]
15385    pub enum LinkType {
15386        #[serde(rename = "GEO")]
15387        Geo,
15388        #[serde(rename = "NAMED")]
15389        Named,
15390        #[serde(rename = "STANDBY")]
15391        Standby,
15392        #[serde(skip_deserializing)]
15393        UnknownValue(String),
15394    }
15395    impl FromStr for LinkType {
15396        type Err = value::Error;
15397        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15398            Self::deserialize(s.into_deserializer())
15399        }
15400    }
15401    impl<'de> Deserialize<'de> for LinkType {
15402        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15403        where
15404            D: Deserializer<'de>,
15405        {
15406            let s = String::deserialize(deserializer)?;
15407            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15408            Ok(deserialized)
15409        }
15410    }
15411    impl Serialize for LinkType {
15412        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15413        where
15414            S: Serializer,
15415        {
15416            match self {
15417                Self::Geo => serializer.serialize_unit_variant("LinkType", 0u32, "GEO"),
15418                Self::Named => serializer.serialize_unit_variant("LinkType", 1u32, "NAMED"),
15419                Self::Standby => serializer.serialize_unit_variant("LinkType", 2u32, "STANDBY"),
15420                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15421            }
15422        }
15423    }
15424}
15425#[doc = "A replication link update request."]
15426#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15427pub struct ReplicationLinkUpdate {
15428    #[serde(flatten)]
15429    pub proxy_resource: ProxyResource,
15430    #[doc = "Properties of a replication link update."]
15431    #[serde(default, skip_serializing_if = "Option::is_none")]
15432    pub properties: Option<ReplicationLinkUpdateProperties>,
15433}
15434impl ReplicationLinkUpdate {
15435    pub fn new() -> Self {
15436        Self::default()
15437    }
15438}
15439#[doc = "Properties of a replication link update."]
15440#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15441pub struct ReplicationLinkUpdateProperties {
15442    #[doc = "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED."]
15443    #[serde(rename = "linkType", default, skip_serializing_if = "Option::is_none")]
15444    pub link_type: Option<replication_link_update_properties::LinkType>,
15445}
15446impl ReplicationLinkUpdateProperties {
15447    pub fn new() -> Self {
15448        Self::default()
15449    }
15450}
15451pub mod replication_link_update_properties {
15452    use super::*;
15453    #[doc = "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED."]
15454    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15455    #[serde(remote = "LinkType")]
15456    pub enum LinkType {
15457        #[serde(rename = "GEO")]
15458        Geo,
15459        #[serde(rename = "NAMED")]
15460        Named,
15461        #[serde(rename = "STANDBY")]
15462        Standby,
15463        #[serde(skip_deserializing)]
15464        UnknownValue(String),
15465    }
15466    impl FromStr for LinkType {
15467        type Err = value::Error;
15468        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15469            Self::deserialize(s.into_deserializer())
15470        }
15471    }
15472    impl<'de> Deserialize<'de> for LinkType {
15473        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15474        where
15475            D: Deserializer<'de>,
15476        {
15477            let s = String::deserialize(deserializer)?;
15478            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15479            Ok(deserialized)
15480        }
15481    }
15482    impl Serialize for LinkType {
15483        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15484        where
15485            S: Serializer,
15486        {
15487            match self {
15488                Self::Geo => serializer.serialize_unit_variant("LinkType", 0u32, "GEO"),
15489                Self::Named => serializer.serialize_unit_variant("LinkType", 1u32, "NAMED"),
15490                Self::Standby => serializer.serialize_unit_variant("LinkType", 2u32, "STANDBY"),
15491                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15492            }
15493        }
15494    }
15495}
15496#[doc = "ARM resource."]
15497#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15498pub struct Resource {
15499    #[doc = "Resource ID."]
15500    #[serde(default, skip_serializing_if = "Option::is_none")]
15501    pub id: Option<String>,
15502    #[doc = "Resource name."]
15503    #[serde(default, skip_serializing_if = "Option::is_none")]
15504    pub name: Option<String>,
15505    #[doc = "Resource type."]
15506    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
15507    pub type_: Option<String>,
15508}
15509impl Resource {
15510    pub fn new() -> Self {
15511        Self::default()
15512    }
15513}
15514#[doc = "Azure Active Directory identity configuration for a resource."]
15515#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15516pub struct ResourceIdentity {
15517    #[doc = "The resource ids of the user assigned identities to use"]
15518    #[serde(rename = "userAssignedIdentities", default, skip_serializing_if = "Option::is_none")]
15519    pub user_assigned_identities: Option<serde_json::Value>,
15520    #[doc = "The Azure Active Directory principal id."]
15521    #[serde(rename = "principalId", default, skip_serializing_if = "Option::is_none")]
15522    pub principal_id: Option<String>,
15523    #[doc = "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource."]
15524    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
15525    pub type_: Option<resource_identity::Type>,
15526    #[doc = "The Azure Active Directory tenant id."]
15527    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
15528    pub tenant_id: Option<String>,
15529}
15530impl ResourceIdentity {
15531    pub fn new() -> Self {
15532        Self::default()
15533    }
15534}
15535pub mod resource_identity {
15536    use super::*;
15537    #[doc = "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource."]
15538    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15539    #[serde(remote = "Type")]
15540    pub enum Type {
15541        None,
15542        SystemAssigned,
15543        UserAssigned,
15544        #[serde(rename = "SystemAssigned,UserAssigned")]
15545        SystemAssignedUserAssigned,
15546        #[serde(skip_deserializing)]
15547        UnknownValue(String),
15548    }
15549    impl FromStr for Type {
15550        type Err = value::Error;
15551        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15552            Self::deserialize(s.into_deserializer())
15553        }
15554    }
15555    impl<'de> Deserialize<'de> for Type {
15556        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15557        where
15558            D: Deserializer<'de>,
15559        {
15560            let s = String::deserialize(deserializer)?;
15561            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15562            Ok(deserialized)
15563        }
15564    }
15565    impl Serialize for Type {
15566        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15567        where
15568            S: Serializer,
15569        {
15570            match self {
15571                Self::None => serializer.serialize_unit_variant("Type", 0u32, "None"),
15572                Self::SystemAssigned => serializer.serialize_unit_variant("Type", 1u32, "SystemAssigned"),
15573                Self::UserAssigned => serializer.serialize_unit_variant("Type", 2u32, "UserAssigned"),
15574                Self::SystemAssignedUserAssigned => serializer.serialize_unit_variant("Type", 3u32, "SystemAssigned,UserAssigned"),
15575                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15576            }
15577        }
15578    }
15579}
15580#[doc = "Contains the information necessary to perform a resource move (rename)."]
15581#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15582pub struct ResourceMoveDefinition {
15583    #[doc = "The target ID for the resource"]
15584    pub id: String,
15585}
15586impl ResourceMoveDefinition {
15587    pub fn new(id: String) -> Self {
15588        Self { id }
15589    }
15590}
15591#[doc = "ARM resource."]
15592#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15593pub struct ResourceWithWritableName {
15594    #[doc = "Resource ID."]
15595    #[serde(default, skip_serializing_if = "Option::is_none")]
15596    pub id: Option<String>,
15597    #[doc = "Resource name."]
15598    #[serde(default, skip_serializing_if = "Option::is_none")]
15599    pub name: Option<String>,
15600    #[doc = "Resource type."]
15601    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
15602    pub type_: Option<String>,
15603}
15604impl ResourceWithWritableName {
15605    pub fn new() -> Self {
15606        Self::default()
15607    }
15608}
15609#[doc = "A restorable dropped database resource."]
15610#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15611pub struct RestorableDroppedDatabase {
15612    #[serde(flatten)]
15613    pub proxy_resource: ProxyResource,
15614    #[doc = "An ARM Resource SKU."]
15615    #[serde(default, skip_serializing_if = "Option::is_none")]
15616    pub sku: Option<Sku>,
15617    #[doc = "Resource location."]
15618    #[serde(default, skip_serializing_if = "Option::is_none")]
15619    pub location: Option<String>,
15620    #[doc = "Resource tags."]
15621    #[serde(default, skip_serializing_if = "Option::is_none")]
15622    pub tags: Option<serde_json::Value>,
15623    #[doc = "The restorable dropped database's properties."]
15624    #[serde(default, skip_serializing_if = "Option::is_none")]
15625    pub properties: Option<RestorableDroppedDatabaseProperties>,
15626}
15627impl RestorableDroppedDatabase {
15628    pub fn new() -> Self {
15629        Self::default()
15630    }
15631}
15632#[doc = "A list of restorable dropped databases."]
15633#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15634pub struct RestorableDroppedDatabaseListResult {
15635    #[doc = "Array of results."]
15636    #[serde(
15637        default,
15638        deserialize_with = "azure_core::util::deserialize_null_as_default",
15639        skip_serializing_if = "Vec::is_empty"
15640    )]
15641    pub value: Vec<RestorableDroppedDatabase>,
15642    #[doc = "Link to retrieve next page of results."]
15643    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15644    pub next_link: Option<String>,
15645}
15646impl azure_core::Continuable for RestorableDroppedDatabaseListResult {
15647    type Continuation = String;
15648    fn continuation(&self) -> Option<Self::Continuation> {
15649        self.next_link.clone().filter(|value| !value.is_empty())
15650    }
15651}
15652impl RestorableDroppedDatabaseListResult {
15653    pub fn new() -> Self {
15654        Self::default()
15655    }
15656}
15657#[doc = "The restorable dropped database's properties."]
15658#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15659pub struct RestorableDroppedDatabaseProperties {
15660    #[doc = "The name of the database."]
15661    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
15662    pub database_name: Option<String>,
15663    #[doc = "The max size of the database expressed in bytes."]
15664    #[serde(rename = "maxSizeBytes", default, skip_serializing_if = "Option::is_none")]
15665    pub max_size_bytes: Option<i64>,
15666    #[doc = "The creation date of the database (ISO8601 format)."]
15667    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
15668    pub creation_date: Option<::time::OffsetDateTime>,
15669    #[doc = "The deletion date of the database (ISO8601 format)."]
15670    #[serde(rename = "deletionDate", default, with = "azure_core::date::rfc3339::option")]
15671    pub deletion_date: Option<::time::OffsetDateTime>,
15672    #[doc = "The earliest restore date of the database (ISO8601 format)."]
15673    #[serde(rename = "earliestRestoreDate", default, with = "azure_core::date::rfc3339::option")]
15674    pub earliest_restore_date: Option<::time::OffsetDateTime>,
15675    #[doc = "The storage account type used to store backups for this database."]
15676    #[serde(rename = "backupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
15677    pub backup_storage_redundancy: Option<restorable_dropped_database_properties::BackupStorageRedundancy>,
15678    #[doc = "The resource ids of the user assigned identities to use"]
15679    #[serde(default, skip_serializing_if = "Option::is_none")]
15680    pub keys: Option<serde_json::Value>,
15681}
15682impl RestorableDroppedDatabaseProperties {
15683    pub fn new() -> Self {
15684        Self::default()
15685    }
15686}
15687pub mod restorable_dropped_database_properties {
15688    use super::*;
15689    #[doc = "The storage account type used to store backups for this database."]
15690    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15691    #[serde(remote = "BackupStorageRedundancy")]
15692    pub enum BackupStorageRedundancy {
15693        Geo,
15694        Local,
15695        Zone,
15696        GeoZone,
15697        #[serde(skip_deserializing)]
15698        UnknownValue(String),
15699    }
15700    impl FromStr for BackupStorageRedundancy {
15701        type Err = value::Error;
15702        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15703            Self::deserialize(s.into_deserializer())
15704        }
15705    }
15706    impl<'de> Deserialize<'de> for BackupStorageRedundancy {
15707        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15708        where
15709            D: Deserializer<'de>,
15710        {
15711            let s = String::deserialize(deserializer)?;
15712            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15713            Ok(deserialized)
15714        }
15715    }
15716    impl Serialize for BackupStorageRedundancy {
15717        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15718        where
15719            S: Serializer,
15720        {
15721            match self {
15722                Self::Geo => serializer.serialize_unit_variant("BackupStorageRedundancy", 0u32, "Geo"),
15723                Self::Local => serializer.serialize_unit_variant("BackupStorageRedundancy", 1u32, "Local"),
15724                Self::Zone => serializer.serialize_unit_variant("BackupStorageRedundancy", 2u32, "Zone"),
15725                Self::GeoZone => serializer.serialize_unit_variant("BackupStorageRedundancy", 3u32, "GeoZone"),
15726                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15727            }
15728        }
15729    }
15730}
15731#[doc = "A restorable dropped managed database resource."]
15732#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15733pub struct RestorableDroppedManagedDatabase {
15734    #[serde(flatten)]
15735    pub tracked_resource: TrackedResource,
15736    #[doc = "The restorable dropped managed database's properties."]
15737    #[serde(default, skip_serializing_if = "Option::is_none")]
15738    pub properties: Option<RestorableDroppedManagedDatabaseProperties>,
15739}
15740impl RestorableDroppedManagedDatabase {
15741    pub fn new(tracked_resource: TrackedResource) -> Self {
15742        Self {
15743            tracked_resource,
15744            properties: None,
15745        }
15746    }
15747}
15748#[doc = "A list of restorable dropped managed databases."]
15749#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15750pub struct RestorableDroppedManagedDatabaseListResult {
15751    #[doc = "Array of results."]
15752    #[serde(
15753        default,
15754        deserialize_with = "azure_core::util::deserialize_null_as_default",
15755        skip_serializing_if = "Vec::is_empty"
15756    )]
15757    pub value: Vec<RestorableDroppedManagedDatabase>,
15758    #[doc = "Link to retrieve next page of results."]
15759    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15760    pub next_link: Option<String>,
15761}
15762impl azure_core::Continuable for RestorableDroppedManagedDatabaseListResult {
15763    type Continuation = String;
15764    fn continuation(&self) -> Option<Self::Continuation> {
15765        self.next_link.clone().filter(|value| !value.is_empty())
15766    }
15767}
15768impl RestorableDroppedManagedDatabaseListResult {
15769    pub fn new() -> Self {
15770        Self::default()
15771    }
15772}
15773#[doc = "The restorable dropped managed database's properties."]
15774#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15775pub struct RestorableDroppedManagedDatabaseProperties {
15776    #[doc = "The name of the database."]
15777    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
15778    pub database_name: Option<String>,
15779    #[doc = "The creation date of the database (ISO8601 format)."]
15780    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
15781    pub creation_date: Option<::time::OffsetDateTime>,
15782    #[doc = "The deletion date of the database (ISO8601 format)."]
15783    #[serde(rename = "deletionDate", default, with = "azure_core::date::rfc3339::option")]
15784    pub deletion_date: Option<::time::OffsetDateTime>,
15785    #[doc = "The earliest restore date of the database (ISO8601 format)."]
15786    #[serde(rename = "earliestRestoreDate", default, with = "azure_core::date::rfc3339::option")]
15787    pub earliest_restore_date: Option<::time::OffsetDateTime>,
15788}
15789impl RestorableDroppedManagedDatabaseProperties {
15790    pub fn new() -> Self {
15791        Self::default()
15792    }
15793}
15794#[doc = "Database restore points."]
15795#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15796pub struct RestorePoint {
15797    #[serde(flatten)]
15798    pub proxy_resource: ProxyResource,
15799    #[doc = "Resource location."]
15800    #[serde(default, skip_serializing_if = "Option::is_none")]
15801    pub location: Option<String>,
15802    #[doc = "Properties of a database restore point"]
15803    #[serde(default, skip_serializing_if = "Option::is_none")]
15804    pub properties: Option<RestorePointProperties>,
15805}
15806impl RestorePoint {
15807    pub fn new() -> Self {
15808        Self::default()
15809    }
15810}
15811#[doc = "A list of long term retention backups."]
15812#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15813pub struct RestorePointListResult {
15814    #[doc = "Array of results."]
15815    #[serde(
15816        default,
15817        deserialize_with = "azure_core::util::deserialize_null_as_default",
15818        skip_serializing_if = "Vec::is_empty"
15819    )]
15820    pub value: Vec<RestorePoint>,
15821    #[doc = "Link to retrieve next page of results."]
15822    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15823    pub next_link: Option<String>,
15824}
15825impl azure_core::Continuable for RestorePointListResult {
15826    type Continuation = String;
15827    fn continuation(&self) -> Option<Self::Continuation> {
15828        self.next_link.clone().filter(|value| !value.is_empty())
15829    }
15830}
15831impl RestorePointListResult {
15832    pub fn new() -> Self {
15833        Self::default()
15834    }
15835}
15836#[doc = "Properties of a database restore point"]
15837#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15838pub struct RestorePointProperties {
15839    #[doc = "The type of restore point"]
15840    #[serde(rename = "restorePointType", default, skip_serializing_if = "Option::is_none")]
15841    pub restore_point_type: Option<restore_point_properties::RestorePointType>,
15842    #[doc = "The earliest time to which this database can be restored"]
15843    #[serde(rename = "earliestRestoreDate", default, with = "azure_core::date::rfc3339::option")]
15844    pub earliest_restore_date: Option<::time::OffsetDateTime>,
15845    #[doc = "The time the backup was taken"]
15846    #[serde(rename = "restorePointCreationDate", default, with = "azure_core::date::rfc3339::option")]
15847    pub restore_point_creation_date: Option<::time::OffsetDateTime>,
15848    #[doc = "The label of restore point for backup request by user"]
15849    #[serde(rename = "restorePointLabel", default, skip_serializing_if = "Option::is_none")]
15850    pub restore_point_label: Option<String>,
15851}
15852impl RestorePointProperties {
15853    pub fn new() -> Self {
15854        Self::default()
15855    }
15856}
15857pub mod restore_point_properties {
15858    use super::*;
15859    #[doc = "The type of restore point"]
15860    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15861    pub enum RestorePointType {
15862        #[serde(rename = "CONTINUOUS")]
15863        Continuous,
15864        #[serde(rename = "DISCRETE")]
15865        Discrete,
15866    }
15867}
15868#[doc = "A list of vulnerability assessment scan results."]
15869#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
15870pub struct SqlVulnerabilityAssessmentScanListResult {
15871    #[doc = "Array of results."]
15872    #[serde(
15873        default,
15874        deserialize_with = "azure_core::util::deserialize_null_as_default",
15875        skip_serializing_if = "Vec::is_empty"
15876    )]
15877    pub value: Vec<SqlVulnerabilityAssessmentScanResults>,
15878    #[doc = "Link to retrieve next page of results."]
15879    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
15880    pub next_link: Option<String>,
15881}
15882impl azure_core::Continuable for SqlVulnerabilityAssessmentScanListResult {
15883    type Continuation = String;
15884    fn continuation(&self) -> Option<Self::Continuation> {
15885        self.next_link.clone().filter(|value| !value.is_empty())
15886    }
15887}
15888impl SqlVulnerabilityAssessmentScanListResult {
15889    pub fn new() -> Self {
15890        Self::default()
15891    }
15892}
15893#[doc = "Schedule info describing when the server should be started or stopped."]
15894#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15895pub struct ScheduleItem {
15896    #[doc = "Start day."]
15897    #[serde(rename = "startDay")]
15898    pub start_day: schedule_item::StartDay,
15899    #[doc = "Start time."]
15900    #[serde(rename = "startTime")]
15901    pub start_time: String,
15902    #[doc = "Stop day."]
15903    #[serde(rename = "stopDay")]
15904    pub stop_day: schedule_item::StopDay,
15905    #[doc = "Stop time."]
15906    #[serde(rename = "stopTime")]
15907    pub stop_time: String,
15908}
15909impl ScheduleItem {
15910    pub fn new(start_day: schedule_item::StartDay, start_time: String, stop_day: schedule_item::StopDay, stop_time: String) -> Self {
15911        Self {
15912            start_day,
15913            start_time,
15914            stop_day,
15915            stop_time,
15916        }
15917    }
15918}
15919pub mod schedule_item {
15920    use super::*;
15921    #[doc = "Start day."]
15922    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15923    #[serde(remote = "StartDay")]
15924    pub enum StartDay {
15925        Sunday,
15926        Monday,
15927        Tuesday,
15928        Wednesday,
15929        Thursday,
15930        Friday,
15931        Saturday,
15932        #[serde(skip_deserializing)]
15933        UnknownValue(String),
15934    }
15935    impl FromStr for StartDay {
15936        type Err = value::Error;
15937        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15938            Self::deserialize(s.into_deserializer())
15939        }
15940    }
15941    impl<'de> Deserialize<'de> for StartDay {
15942        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15943        where
15944            D: Deserializer<'de>,
15945        {
15946            let s = String::deserialize(deserializer)?;
15947            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15948            Ok(deserialized)
15949        }
15950    }
15951    impl Serialize for StartDay {
15952        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15953        where
15954            S: Serializer,
15955        {
15956            match self {
15957                Self::Sunday => serializer.serialize_unit_variant("StartDay", 0u32, "Sunday"),
15958                Self::Monday => serializer.serialize_unit_variant("StartDay", 1u32, "Monday"),
15959                Self::Tuesday => serializer.serialize_unit_variant("StartDay", 2u32, "Tuesday"),
15960                Self::Wednesday => serializer.serialize_unit_variant("StartDay", 3u32, "Wednesday"),
15961                Self::Thursday => serializer.serialize_unit_variant("StartDay", 4u32, "Thursday"),
15962                Self::Friday => serializer.serialize_unit_variant("StartDay", 5u32, "Friday"),
15963                Self::Saturday => serializer.serialize_unit_variant("StartDay", 6u32, "Saturday"),
15964                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
15965            }
15966        }
15967    }
15968    #[doc = "Stop day."]
15969    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15970    #[serde(remote = "StopDay")]
15971    pub enum StopDay {
15972        Sunday,
15973        Monday,
15974        Tuesday,
15975        Wednesday,
15976        Thursday,
15977        Friday,
15978        Saturday,
15979        #[serde(skip_deserializing)]
15980        UnknownValue(String),
15981    }
15982    impl FromStr for StopDay {
15983        type Err = value::Error;
15984        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
15985            Self::deserialize(s.into_deserializer())
15986        }
15987    }
15988    impl<'de> Deserialize<'de> for StopDay {
15989        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15990        where
15991            D: Deserializer<'de>,
15992        {
15993            let s = String::deserialize(deserializer)?;
15994            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
15995            Ok(deserialized)
15996        }
15997    }
15998    impl Serialize for StopDay {
15999        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16000        where
16001            S: Serializer,
16002        {
16003            match self {
16004                Self::Sunday => serializer.serialize_unit_variant("StopDay", 0u32, "Sunday"),
16005                Self::Monday => serializer.serialize_unit_variant("StopDay", 1u32, "Monday"),
16006                Self::Tuesday => serializer.serialize_unit_variant("StopDay", 2u32, "Tuesday"),
16007                Self::Wednesday => serializer.serialize_unit_variant("StopDay", 3u32, "Wednesday"),
16008                Self::Thursday => serializer.serialize_unit_variant("StopDay", 4u32, "Thursday"),
16009                Self::Friday => serializer.serialize_unit_variant("StopDay", 5u32, "Friday"),
16010                Self::Saturday => serializer.serialize_unit_variant("StopDay", 6u32, "Saturday"),
16011                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
16012            }
16013        }
16014    }
16015}
16016#[doc = "Properties of a security alert policy."]
16017#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16018pub struct SecurityAlertPolicyProperties {
16019    #[doc = "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database."]
16020    pub state: security_alert_policy_properties::State,
16021    #[doc = "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force"]
16022    #[serde(
16023        rename = "disabledAlerts",
16024        default,
16025        deserialize_with = "azure_core::util::deserialize_null_as_default",
16026        skip_serializing_if = "Vec::is_empty"
16027    )]
16028    pub disabled_alerts: Vec<String>,
16029    #[doc = "Specifies an array of e-mail addresses to which the alert is sent."]
16030    #[serde(
16031        rename = "emailAddresses",
16032        default,
16033        deserialize_with = "azure_core::util::deserialize_null_as_default",
16034        skip_serializing_if = "Vec::is_empty"
16035    )]
16036    pub email_addresses: Vec<String>,
16037    #[doc = "Specifies that the alert is sent to the account administrators."]
16038    #[serde(rename = "emailAccountAdmins", default, skip_serializing_if = "Option::is_none")]
16039    pub email_account_admins: Option<bool>,
16040    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs."]
16041    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
16042    pub storage_endpoint: Option<String>,
16043    #[doc = "Specifies the identifier key of the Threat Detection audit storage account."]
16044    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
16045    pub storage_account_access_key: Option<String>,
16046    #[doc = "Specifies the number of days to keep in the Threat Detection audit logs."]
16047    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
16048    pub retention_days: Option<i32>,
16049    #[doc = "Specifies the UTC creation time of the policy."]
16050    #[serde(rename = "creationTime", default, with = "azure_core::date::rfc3339::option")]
16051    pub creation_time: Option<::time::OffsetDateTime>,
16052}
16053impl SecurityAlertPolicyProperties {
16054    pub fn new(state: security_alert_policy_properties::State) -> Self {
16055        Self {
16056            state,
16057            disabled_alerts: Vec::new(),
16058            email_addresses: Vec::new(),
16059            email_account_admins: None,
16060            storage_endpoint: None,
16061            storage_account_access_key: None,
16062            retention_days: None,
16063            creation_time: None,
16064        }
16065    }
16066}
16067pub mod security_alert_policy_properties {
16068    use super::*;
16069    #[doc = "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database."]
16070    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16071    pub enum State {
16072        New,
16073        Enabled,
16074        Disabled,
16075    }
16076}
16077#[doc = "Properties of a security alert policy."]
16078#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16079pub struct SecurityAlertsPolicyProperties {
16080    #[doc = "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database."]
16081    pub state: security_alerts_policy_properties::State,
16082    #[doc = "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force"]
16083    #[serde(
16084        rename = "disabledAlerts",
16085        default,
16086        deserialize_with = "azure_core::util::deserialize_null_as_default",
16087        skip_serializing_if = "Vec::is_empty"
16088    )]
16089    pub disabled_alerts: Vec<String>,
16090    #[doc = "Specifies an array of e-mail addresses to which the alert is sent."]
16091    #[serde(
16092        rename = "emailAddresses",
16093        default,
16094        deserialize_with = "azure_core::util::deserialize_null_as_default",
16095        skip_serializing_if = "Vec::is_empty"
16096    )]
16097    pub email_addresses: Vec<String>,
16098    #[doc = "Specifies that the alert is sent to the account administrators."]
16099    #[serde(rename = "emailAccountAdmins", default, skip_serializing_if = "Option::is_none")]
16100    pub email_account_admins: Option<bool>,
16101    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs."]
16102    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
16103    pub storage_endpoint: Option<String>,
16104    #[doc = "Specifies the identifier key of the Threat Detection audit storage account."]
16105    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
16106    pub storage_account_access_key: Option<String>,
16107    #[doc = "Specifies the number of days to keep in the Threat Detection audit logs."]
16108    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
16109    pub retention_days: Option<i32>,
16110    #[doc = "Specifies the UTC creation time of the policy."]
16111    #[serde(rename = "creationTime", default, with = "azure_core::date::rfc3339::option")]
16112    pub creation_time: Option<::time::OffsetDateTime>,
16113}
16114impl SecurityAlertsPolicyProperties {
16115    pub fn new(state: security_alerts_policy_properties::State) -> Self {
16116        Self {
16117            state,
16118            disabled_alerts: Vec::new(),
16119            email_addresses: Vec::new(),
16120            email_account_admins: None,
16121            storage_endpoint: None,
16122            storage_account_access_key: None,
16123            retention_days: None,
16124            creation_time: None,
16125        }
16126    }
16127}
16128pub mod security_alerts_policy_properties {
16129    use super::*;
16130    #[doc = "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database."]
16131    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16132    pub enum State {
16133        Enabled,
16134        Disabled,
16135    }
16136}
16137#[doc = "A security event."]
16138#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16139pub struct SecurityEvent {
16140    #[serde(flatten)]
16141    pub proxy_resource: ProxyResource,
16142    #[doc = "The properties of a security event."]
16143    #[serde(default, skip_serializing_if = "Option::is_none")]
16144    pub properties: Option<SecurityEventProperties>,
16145}
16146impl SecurityEvent {
16147    pub fn new() -> Self {
16148        Self::default()
16149    }
16150}
16151#[doc = "A list of security events."]
16152#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16153pub struct SecurityEventCollection {
16154    #[doc = "Array of results."]
16155    #[serde(
16156        default,
16157        deserialize_with = "azure_core::util::deserialize_null_as_default",
16158        skip_serializing_if = "Vec::is_empty"
16159    )]
16160    pub value: Vec<SecurityEvent>,
16161    #[doc = "Link to retrieve next page of results."]
16162    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16163    pub next_link: Option<String>,
16164}
16165impl azure_core::Continuable for SecurityEventCollection {
16166    type Continuation = String;
16167    fn continuation(&self) -> Option<Self::Continuation> {
16168        self.next_link.clone().filter(|value| !value.is_empty())
16169    }
16170}
16171impl SecurityEventCollection {
16172    pub fn new() -> Self {
16173        Self::default()
16174    }
16175}
16176#[doc = "The properties of a security event."]
16177#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16178pub struct SecurityEventProperties {
16179    #[doc = "The time when the security event occurred."]
16180    #[serde(rename = "eventTime", default, with = "azure_core::date::rfc3339::option")]
16181    pub event_time: Option<::time::OffsetDateTime>,
16182    #[doc = "The type of the security event."]
16183    #[serde(rename = "securityEventType", default, skip_serializing_if = "Option::is_none")]
16184    pub security_event_type: Option<security_event_properties::SecurityEventType>,
16185    #[doc = "The subscription name"]
16186    #[serde(default, skip_serializing_if = "Option::is_none")]
16187    pub subscription: Option<String>,
16188    #[doc = "The server name"]
16189    #[serde(default, skip_serializing_if = "Option::is_none")]
16190    pub server: Option<String>,
16191    #[doc = "The database name"]
16192    #[serde(default, skip_serializing_if = "Option::is_none")]
16193    pub database: Option<String>,
16194    #[doc = "The IP address of the client who executed the statement."]
16195    #[serde(rename = "clientIp", default, skip_serializing_if = "Option::is_none")]
16196    pub client_ip: Option<String>,
16197    #[doc = "The application used to execute the statement."]
16198    #[serde(rename = "applicationName", default, skip_serializing_if = "Option::is_none")]
16199    pub application_name: Option<String>,
16200    #[doc = "The principal user who executed the statement"]
16201    #[serde(rename = "principalName", default, skip_serializing_if = "Option::is_none")]
16202    pub principal_name: Option<String>,
16203    #[doc = "The properties of a security event sql injection additional properties."]
16204    #[serde(
16205        rename = "securityEventSqlInjectionAdditionalProperties",
16206        default,
16207        skip_serializing_if = "Option::is_none"
16208    )]
16209    pub security_event_sql_injection_additional_properties: Option<SecurityEventSqlInjectionAdditionalProperties>,
16210}
16211impl SecurityEventProperties {
16212    pub fn new() -> Self {
16213        Self::default()
16214    }
16215}
16216pub mod security_event_properties {
16217    use super::*;
16218    #[doc = "The type of the security event."]
16219    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16220    pub enum SecurityEventType {
16221        Undefined,
16222        SqlInjectionVulnerability,
16223        SqlInjectionExploit,
16224    }
16225}
16226#[doc = "The properties of a security event sql injection additional properties."]
16227#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16228pub struct SecurityEventSqlInjectionAdditionalProperties {
16229    #[doc = "The threat ID."]
16230    #[serde(rename = "threatId", default, skip_serializing_if = "Option::is_none")]
16231    pub threat_id: Option<String>,
16232    #[doc = "The statement"]
16233    #[serde(default, skip_serializing_if = "Option::is_none")]
16234    pub statement: Option<String>,
16235    #[doc = "The statement highlight offset"]
16236    #[serde(rename = "statementHighlightOffset", default, skip_serializing_if = "Option::is_none")]
16237    pub statement_highlight_offset: Option<i32>,
16238    #[doc = "The statement highlight length"]
16239    #[serde(rename = "statementHighlightLength", default, skip_serializing_if = "Option::is_none")]
16240    pub statement_highlight_length: Option<i32>,
16241    #[doc = "The sql error code"]
16242    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
16243    pub error_code: Option<i32>,
16244    #[doc = "The sql error severity"]
16245    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
16246    pub error_severity: Option<i32>,
16247    #[doc = "The sql error message"]
16248    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
16249    pub error_message: Option<String>,
16250}
16251impl SecurityEventSqlInjectionAdditionalProperties {
16252    pub fn new() -> Self {
16253        Self::default()
16254    }
16255}
16256#[doc = "The properties that are supported in the $filter operation."]
16257#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16258pub struct SecurityEventsFilterParameters {
16259    #[doc = "Filter on the event time."]
16260    #[serde(rename = "eventTime", default, with = "azure_core::date::rfc3339::option")]
16261    pub event_time: Option<::time::OffsetDateTime>,
16262    #[doc = "Whether to show server records or not."]
16263    #[serde(rename = "showServerRecords", default, skip_serializing_if = "Option::is_none")]
16264    pub show_server_records: Option<bool>,
16265}
16266impl SecurityEventsFilterParameters {
16267    pub fn new() -> Self {
16268        Self::default()
16269    }
16270}
16271#[doc = "A sensitivity label."]
16272#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16273pub struct SensitivityLabel {
16274    #[serde(flatten)]
16275    pub proxy_resource: ProxyResource,
16276    #[doc = "Resource that manages the sensitivity label."]
16277    #[serde(rename = "managedBy", default, skip_serializing_if = "Option::is_none")]
16278    pub managed_by: Option<String>,
16279    #[doc = "Properties of a sensitivity label."]
16280    #[serde(default, skip_serializing_if = "Option::is_none")]
16281    pub properties: Option<SensitivityLabelProperties>,
16282}
16283impl SensitivityLabel {
16284    pub fn new() -> Self {
16285        Self::default()
16286    }
16287}
16288#[doc = "A list of sensitivity labels."]
16289#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16290pub struct SensitivityLabelListResult {
16291    #[doc = "Array of results."]
16292    #[serde(
16293        default,
16294        deserialize_with = "azure_core::util::deserialize_null_as_default",
16295        skip_serializing_if = "Vec::is_empty"
16296    )]
16297    pub value: Vec<SensitivityLabel>,
16298    #[doc = "Link to retrieve next page of results."]
16299    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16300    pub next_link: Option<String>,
16301}
16302impl azure_core::Continuable for SensitivityLabelListResult {
16303    type Continuation = String;
16304    fn continuation(&self) -> Option<Self::Continuation> {
16305        self.next_link.clone().filter(|value| !value.is_empty())
16306    }
16307}
16308impl SensitivityLabelListResult {
16309    pub fn new() -> Self {
16310        Self::default()
16311    }
16312}
16313#[doc = "Properties of a sensitivity label."]
16314#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16315pub struct SensitivityLabelProperties {
16316    #[doc = "The schema name."]
16317    #[serde(rename = "schemaName", default, skip_serializing_if = "Option::is_none")]
16318    pub schema_name: Option<String>,
16319    #[doc = "The table name."]
16320    #[serde(rename = "tableName", default, skip_serializing_if = "Option::is_none")]
16321    pub table_name: Option<String>,
16322    #[doc = "The column name."]
16323    #[serde(rename = "columnName", default, skip_serializing_if = "Option::is_none")]
16324    pub column_name: Option<String>,
16325    #[doc = "The label name."]
16326    #[serde(rename = "labelName", default, skip_serializing_if = "Option::is_none")]
16327    pub label_name: Option<String>,
16328    #[doc = "The label ID."]
16329    #[serde(rename = "labelId", default, skip_serializing_if = "Option::is_none")]
16330    pub label_id: Option<String>,
16331    #[doc = "The information type."]
16332    #[serde(rename = "informationType", default, skip_serializing_if = "Option::is_none")]
16333    pub information_type: Option<String>,
16334    #[doc = "The information type ID."]
16335    #[serde(rename = "informationTypeId", default, skip_serializing_if = "Option::is_none")]
16336    pub information_type_id: Option<String>,
16337    #[doc = "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not."]
16338    #[serde(rename = "isDisabled", default, skip_serializing_if = "Option::is_none")]
16339    pub is_disabled: Option<bool>,
16340    #[serde(default, skip_serializing_if = "Option::is_none")]
16341    pub rank: Option<sensitivity_label_properties::Rank>,
16342    #[serde(rename = "clientClassificationSource", default, skip_serializing_if = "Option::is_none")]
16343    pub client_classification_source: Option<sensitivity_label_properties::ClientClassificationSource>,
16344}
16345impl SensitivityLabelProperties {
16346    pub fn new() -> Self {
16347        Self::default()
16348    }
16349}
16350pub mod sensitivity_label_properties {
16351    use super::*;
16352    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16353    pub enum Rank {
16354        None,
16355        Low,
16356        Medium,
16357        High,
16358        Critical,
16359    }
16360    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16361    #[serde(remote = "ClientClassificationSource")]
16362    pub enum ClientClassificationSource {
16363        None,
16364        Native,
16365        Recommended,
16366        #[serde(rename = "MIP")]
16367        Mip,
16368        #[serde(skip_deserializing)]
16369        UnknownValue(String),
16370    }
16371    impl FromStr for ClientClassificationSource {
16372        type Err = value::Error;
16373        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
16374            Self::deserialize(s.into_deserializer())
16375        }
16376    }
16377    impl<'de> Deserialize<'de> for ClientClassificationSource {
16378        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16379        where
16380            D: Deserializer<'de>,
16381        {
16382            let s = String::deserialize(deserializer)?;
16383            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
16384            Ok(deserialized)
16385        }
16386    }
16387    impl Serialize for ClientClassificationSource {
16388        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16389        where
16390            S: Serializer,
16391        {
16392            match self {
16393                Self::None => serializer.serialize_unit_variant("ClientClassificationSource", 0u32, "None"),
16394                Self::Native => serializer.serialize_unit_variant("ClientClassificationSource", 1u32, "Native"),
16395                Self::Recommended => serializer.serialize_unit_variant("ClientClassificationSource", 2u32, "Recommended"),
16396                Self::Mip => serializer.serialize_unit_variant("ClientClassificationSource", 3u32, "MIP"),
16397                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
16398            }
16399        }
16400    }
16401}
16402#[doc = "A sensitivity label update operation."]
16403#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16404pub struct SensitivityLabelUpdate {
16405    #[serde(flatten)]
16406    pub proxy_resource: ProxyResource,
16407    #[doc = "Properties of an operation executed on a sensitivity label."]
16408    #[serde(default, skip_serializing_if = "Option::is_none")]
16409    pub properties: Option<SensitivityLabelUpdateProperties>,
16410}
16411impl SensitivityLabelUpdate {
16412    pub fn new() -> Self {
16413        Self::default()
16414    }
16415}
16416#[doc = "A list of sensitivity label update operations."]
16417#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16418pub struct SensitivityLabelUpdateList {
16419    #[serde(
16420        default,
16421        deserialize_with = "azure_core::util::deserialize_null_as_default",
16422        skip_serializing_if = "Vec::is_empty"
16423    )]
16424    pub operations: Vec<SensitivityLabelUpdate>,
16425}
16426impl SensitivityLabelUpdateList {
16427    pub fn new() -> Self {
16428        Self::default()
16429    }
16430}
16431#[doc = "Properties of an operation executed on a sensitivity label."]
16432#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16433pub struct SensitivityLabelUpdateProperties {
16434    pub op: sensitivity_label_update_properties::Op,
16435    #[doc = "Schema name of the column to update."]
16436    pub schema: String,
16437    #[doc = "Table name of the column to update."]
16438    pub table: String,
16439    #[doc = "Column name to update."]
16440    pub column: String,
16441    #[doc = "A sensitivity label."]
16442    #[serde(rename = "sensitivityLabel", default, skip_serializing_if = "Option::is_none")]
16443    pub sensitivity_label: Option<SensitivityLabel>,
16444}
16445impl SensitivityLabelUpdateProperties {
16446    pub fn new(op: sensitivity_label_update_properties::Op, schema: String, table: String, column: String) -> Self {
16447        Self {
16448            op,
16449            schema,
16450            table,
16451            column,
16452            sensitivity_label: None,
16453        }
16454    }
16455}
16456pub mod sensitivity_label_update_properties {
16457    use super::*;
16458    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16459    pub enum Op {
16460        #[serde(rename = "set")]
16461        Set,
16462        #[serde(rename = "remove")]
16463        Remove,
16464    }
16465}
16466#[doc = "An Azure SQL Database server."]
16467#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16468pub struct Server {
16469    #[serde(flatten)]
16470    pub tracked_resource: TrackedResource,
16471    #[doc = "Azure Active Directory identity configuration for a resource."]
16472    #[serde(default, skip_serializing_if = "Option::is_none")]
16473    pub identity: Option<ResourceIdentity>,
16474    #[doc = "Kind of sql server. This is metadata used for the Azure portal experience."]
16475    #[serde(default, skip_serializing_if = "Option::is_none")]
16476    pub kind: Option<String>,
16477    #[doc = "The properties of a server."]
16478    #[serde(default, skip_serializing_if = "Option::is_none")]
16479    pub properties: Option<ServerProperties>,
16480}
16481impl Server {
16482    pub fn new(tracked_resource: TrackedResource) -> Self {
16483        Self {
16484            tracked_resource,
16485            identity: None,
16486            kind: None,
16487            properties: None,
16488        }
16489    }
16490}
16491#[doc = "A server Advanced Threat Protection."]
16492#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16493pub struct ServerAdvancedThreatProtection {
16494    #[serde(flatten)]
16495    pub proxy_resource: ProxyResource,
16496    #[doc = "Metadata pertaining to creation and last modification of the resource."]
16497    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
16498    pub system_data: Option<SystemData>,
16499    #[doc = "Properties of an Advanced Threat Protection state."]
16500    #[serde(default, skip_serializing_if = "Option::is_none")]
16501    pub properties: Option<AdvancedThreatProtectionProperties>,
16502}
16503impl ServerAdvancedThreatProtection {
16504    pub fn new() -> Self {
16505        Self::default()
16506    }
16507}
16508#[doc = "Server-level Automatic Tuning."]
16509#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16510pub struct ServerAutomaticTuning {
16511    #[serde(flatten)]
16512    pub proxy_resource: ProxyResource,
16513    #[doc = "Server-level Automatic Tuning properties."]
16514    #[serde(default, skip_serializing_if = "Option::is_none")]
16515    pub properties: Option<AutomaticTuningServerProperties>,
16516}
16517impl ServerAutomaticTuning {
16518    pub fn new() -> Self {
16519        Self::default()
16520    }
16521}
16522#[doc = "Azure Active Directory administrator."]
16523#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16524pub struct ServerAzureAdAdministrator {
16525    #[serde(flatten)]
16526    pub proxy_resource: ProxyResource,
16527    #[doc = "Properties of a active directory administrator."]
16528    #[serde(default, skip_serializing_if = "Option::is_none")]
16529    pub properties: Option<AdministratorProperties>,
16530}
16531impl ServerAzureAdAdministrator {
16532    pub fn new() -> Self {
16533        Self::default()
16534    }
16535}
16536#[doc = "Azure Active Directory only authentication."]
16537#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16538pub struct ServerAzureAdOnlyAuthentication {
16539    #[serde(flatten)]
16540    pub proxy_resource: ProxyResource,
16541    #[doc = "Properties of a active directory only authentication."]
16542    #[serde(default, skip_serializing_if = "Option::is_none")]
16543    pub properties: Option<AzureAdOnlyAuthProperties>,
16544}
16545impl ServerAzureAdOnlyAuthentication {
16546    pub fn new() -> Self {
16547        Self::default()
16548    }
16549}
16550#[doc = "A server blob auditing policy."]
16551#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16552pub struct ServerBlobAuditingPolicy {
16553    #[serde(flatten)]
16554    pub proxy_resource: ProxyResource,
16555    #[doc = "Properties of a server blob auditing policy."]
16556    #[serde(default, skip_serializing_if = "Option::is_none")]
16557    pub properties: Option<ServerBlobAuditingPolicyProperties>,
16558}
16559impl ServerBlobAuditingPolicy {
16560    pub fn new() -> Self {
16561        Self::default()
16562    }
16563}
16564#[doc = "A list of server auditing settings."]
16565#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16566pub struct ServerBlobAuditingPolicyListResult {
16567    #[doc = "Array of results."]
16568    #[serde(
16569        default,
16570        deserialize_with = "azure_core::util::deserialize_null_as_default",
16571        skip_serializing_if = "Vec::is_empty"
16572    )]
16573    pub value: Vec<ServerBlobAuditingPolicy>,
16574    #[doc = "Link to retrieve next page of results."]
16575    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16576    pub next_link: Option<String>,
16577}
16578impl azure_core::Continuable for ServerBlobAuditingPolicyListResult {
16579    type Continuation = String;
16580    fn continuation(&self) -> Option<Self::Continuation> {
16581        self.next_link.clone().filter(|value| !value.is_empty())
16582    }
16583}
16584impl ServerBlobAuditingPolicyListResult {
16585    pub fn new() -> Self {
16586        Self::default()
16587    }
16588}
16589#[doc = "Properties of a server blob auditing policy."]
16590#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16591pub struct ServerBlobAuditingPolicyProperties {
16592    #[doc = "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
16593    #[serde(rename = "isDevopsAuditEnabled", default, skip_serializing_if = "Option::is_none")]
16594    pub is_devops_audit_enabled: Option<bool>,
16595    #[doc = "Specifies the number of days to keep in the audit logs in the storage account."]
16596    #[serde(rename = "retentionDays", default, skip_serializing_if = "Option::is_none")]
16597    pub retention_days: Option<i32>,
16598    #[doc = "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)"]
16599    #[serde(
16600        rename = "auditActionsAndGroups",
16601        default,
16602        deserialize_with = "azure_core::util::deserialize_null_as_default",
16603        skip_serializing_if = "Vec::is_empty"
16604    )]
16605    pub audit_actions_and_groups: Vec<String>,
16606    #[doc = "Specifies whether storageAccountAccessKey value is the storage's secondary key."]
16607    #[serde(rename = "isStorageSecondaryKeyInUse", default, skip_serializing_if = "Option::is_none")]
16608    pub is_storage_secondary_key_in_use: Option<bool>,
16609    #[doc = "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
16610    #[serde(rename = "isAzureMonitorTargetEnabled", default, skip_serializing_if = "Option::is_none")]
16611    pub is_azure_monitor_target_enabled: Option<bool>,
16612    #[doc = "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647."]
16613    #[serde(rename = "queueDelayMs", default, skip_serializing_if = "Option::is_none")]
16614    pub queue_delay_ms: Option<i32>,
16615    #[doc = "Specifies whether Managed Identity is used to access blob storage"]
16616    #[serde(rename = "isManagedIdentityInUse", default, skip_serializing_if = "Option::is_none")]
16617    pub is_managed_identity_in_use: Option<bool>,
16618    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
16619    pub state: server_blob_auditing_policy_properties::State,
16620    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required."]
16621    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
16622    pub storage_endpoint: Option<String>,
16623    #[doc = "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)"]
16624    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
16625    pub storage_account_access_key: Option<String>,
16626    #[doc = "Specifies the blob storage subscription Id."]
16627    #[serde(rename = "storageAccountSubscriptionId", default, skip_serializing_if = "Option::is_none")]
16628    pub storage_account_subscription_id: Option<String>,
16629}
16630impl ServerBlobAuditingPolicyProperties {
16631    pub fn new(state: server_blob_auditing_policy_properties::State) -> Self {
16632        Self {
16633            is_devops_audit_enabled: None,
16634            retention_days: None,
16635            audit_actions_and_groups: Vec::new(),
16636            is_storage_secondary_key_in_use: None,
16637            is_azure_monitor_target_enabled: None,
16638            queue_delay_ms: None,
16639            is_managed_identity_in_use: None,
16640            state,
16641            storage_endpoint: None,
16642            storage_account_access_key: None,
16643            storage_account_subscription_id: None,
16644        }
16645    }
16646}
16647pub mod server_blob_auditing_policy_properties {
16648    use super::*;
16649    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
16650    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16651    pub enum State {
16652        Enabled,
16653        Disabled,
16654    }
16655}
16656#[doc = "A server configuration option"]
16657#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16658pub struct ServerConfigurationOption {
16659    #[serde(flatten)]
16660    pub proxy_resource: ProxyResource,
16661    #[doc = "The properties of server configuration option."]
16662    #[serde(default, skip_serializing_if = "Option::is_none")]
16663    pub properties: Option<ServerConfigurationOptionProperties>,
16664}
16665impl ServerConfigurationOption {
16666    pub fn new() -> Self {
16667        Self::default()
16668    }
16669}
16670#[doc = "A list of server configuration options."]
16671#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16672pub struct ServerConfigurationOptionListResult {
16673    #[doc = "Array of results."]
16674    #[serde(
16675        default,
16676        deserialize_with = "azure_core::util::deserialize_null_as_default",
16677        skip_serializing_if = "Vec::is_empty"
16678    )]
16679    pub value: Vec<ServerConfigurationOption>,
16680    #[doc = "Link to retrieve next page of results."]
16681    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16682    pub next_link: Option<String>,
16683}
16684impl azure_core::Continuable for ServerConfigurationOptionListResult {
16685    type Continuation = String;
16686    fn continuation(&self) -> Option<Self::Continuation> {
16687        self.next_link.clone().filter(|value| !value.is_empty())
16688    }
16689}
16690impl ServerConfigurationOptionListResult {
16691    pub fn new() -> Self {
16692        Self::default()
16693    }
16694}
16695#[doc = "The properties of server configuration option."]
16696#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16697pub struct ServerConfigurationOptionProperties {
16698    #[doc = "Value of the server configuration option."]
16699    #[serde(rename = "serverConfigurationOptionValue")]
16700    pub server_configuration_option_value: i32,
16701    #[doc = "Provisioning state of server configuration option."]
16702    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
16703    pub provisioning_state: Option<server_configuration_option_properties::ProvisioningState>,
16704}
16705impl ServerConfigurationOptionProperties {
16706    pub fn new(server_configuration_option_value: i32) -> Self {
16707        Self {
16708            server_configuration_option_value,
16709            provisioning_state: None,
16710        }
16711    }
16712}
16713pub mod server_configuration_option_properties {
16714    use super::*;
16715    #[doc = "Provisioning state of server configuration option."]
16716    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16717    #[serde(remote = "ProvisioningState")]
16718    pub enum ProvisioningState {
16719        Created,
16720        InProgress,
16721        Succeeded,
16722        Failed,
16723        Canceled,
16724        #[serde(skip_deserializing)]
16725        UnknownValue(String),
16726    }
16727    impl FromStr for ProvisioningState {
16728        type Err = value::Error;
16729        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
16730            Self::deserialize(s.into_deserializer())
16731        }
16732    }
16733    impl<'de> Deserialize<'de> for ProvisioningState {
16734        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16735        where
16736            D: Deserializer<'de>,
16737        {
16738            let s = String::deserialize(deserializer)?;
16739            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
16740            Ok(deserialized)
16741        }
16742    }
16743    impl Serialize for ProvisioningState {
16744        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16745        where
16746            S: Serializer,
16747        {
16748            match self {
16749                Self::Created => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Created"),
16750                Self::InProgress => serializer.serialize_unit_variant("ProvisioningState", 1u32, "InProgress"),
16751                Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
16752                Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
16753                Self::Canceled => serializer.serialize_unit_variant("ProvisioningState", 4u32, "Canceled"),
16754                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
16755            }
16756        }
16757    }
16758}
16759#[doc = "A server connection policy"]
16760#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16761pub struct ServerConnectionPolicy {
16762    #[serde(flatten)]
16763    pub proxy_resource: ProxyResource,
16764    #[doc = "Resource location."]
16765    #[serde(default, skip_serializing_if = "Option::is_none")]
16766    pub location: Option<String>,
16767    #[doc = "Metadata used for the Azure portal experience."]
16768    #[serde(default, skip_serializing_if = "Option::is_none")]
16769    pub kind: Option<String>,
16770    #[doc = "The properties of a server connection policy."]
16771    #[serde(default, skip_serializing_if = "Option::is_none")]
16772    pub properties: Option<ServerConnectionPolicyProperties>,
16773}
16774impl ServerConnectionPolicy {
16775    pub fn new() -> Self {
16776        Self::default()
16777    }
16778}
16779#[doc = "A list of server connection policy objects."]
16780#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16781pub struct ServerConnectionPolicyListResult {
16782    #[doc = "Array of results."]
16783    #[serde(
16784        default,
16785        deserialize_with = "azure_core::util::deserialize_null_as_default",
16786        skip_serializing_if = "Vec::is_empty"
16787    )]
16788    pub value: Vec<ServerConnectionPolicy>,
16789    #[doc = "Link to retrieve next page of results."]
16790    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16791    pub next_link: Option<String>,
16792}
16793impl azure_core::Continuable for ServerConnectionPolicyListResult {
16794    type Continuation = String;
16795    fn continuation(&self) -> Option<Self::Continuation> {
16796        self.next_link.clone().filter(|value| !value.is_empty())
16797    }
16798}
16799impl ServerConnectionPolicyListResult {
16800    pub fn new() -> Self {
16801        Self::default()
16802    }
16803}
16804#[doc = "The properties of a server connection policy."]
16805#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16806pub struct ServerConnectionPolicyProperties {
16807    #[doc = "The server connection type."]
16808    #[serde(rename = "connectionType")]
16809    pub connection_type: server_connection_policy_properties::ConnectionType,
16810}
16811impl ServerConnectionPolicyProperties {
16812    pub fn new(connection_type: server_connection_policy_properties::ConnectionType) -> Self {
16813        Self { connection_type }
16814    }
16815}
16816pub mod server_connection_policy_properties {
16817    use super::*;
16818    #[doc = "The server connection type."]
16819    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16820    #[serde(remote = "ConnectionType")]
16821    pub enum ConnectionType {
16822        Default,
16823        Redirect,
16824        Proxy,
16825        #[serde(skip_deserializing)]
16826        UnknownValue(String),
16827    }
16828    impl FromStr for ConnectionType {
16829        type Err = value::Error;
16830        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
16831            Self::deserialize(s.into_deserializer())
16832        }
16833    }
16834    impl<'de> Deserialize<'de> for ConnectionType {
16835        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16836        where
16837            D: Deserializer<'de>,
16838        {
16839            let s = String::deserialize(deserializer)?;
16840            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
16841            Ok(deserialized)
16842        }
16843    }
16844    impl Serialize for ConnectionType {
16845        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16846        where
16847            S: Serializer,
16848        {
16849            match self {
16850                Self::Default => serializer.serialize_unit_variant("ConnectionType", 0u32, "Default"),
16851                Self::Redirect => serializer.serialize_unit_variant("ConnectionType", 1u32, "Redirect"),
16852                Self::Proxy => serializer.serialize_unit_variant("ConnectionType", 2u32, "Proxy"),
16853                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
16854            }
16855        }
16856    }
16857}
16858#[doc = "A list of server DevOps audit settings."]
16859#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16860pub struct ServerDevOpsAuditSettingsListResult {
16861    #[doc = "Array of results."]
16862    #[serde(
16863        default,
16864        deserialize_with = "azure_core::util::deserialize_null_as_default",
16865        skip_serializing_if = "Vec::is_empty"
16866    )]
16867    pub value: Vec<ServerDevOpsAuditingSettings>,
16868    #[doc = "Link to retrieve next page of results."]
16869    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16870    pub next_link: Option<String>,
16871}
16872impl azure_core::Continuable for ServerDevOpsAuditSettingsListResult {
16873    type Continuation = String;
16874    fn continuation(&self) -> Option<Self::Continuation> {
16875        self.next_link.clone().filter(|value| !value.is_empty())
16876    }
16877}
16878impl ServerDevOpsAuditSettingsListResult {
16879    pub fn new() -> Self {
16880        Self::default()
16881    }
16882}
16883#[doc = "Properties of a server DevOps audit settings."]
16884#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16885pub struct ServerDevOpsAuditSettingsProperties {
16886    #[doc = "Specifies whether DevOps audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n"]
16887    #[serde(rename = "isAzureMonitorTargetEnabled", default, skip_serializing_if = "Option::is_none")]
16888    pub is_azure_monitor_target_enabled: Option<bool>,
16889    #[doc = "Specifies whether Managed Identity is used to access blob storage"]
16890    #[serde(rename = "isManagedIdentityInUse", default, skip_serializing_if = "Option::is_none")]
16891    pub is_managed_identity_in_use: Option<bool>,
16892    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
16893    pub state: server_dev_ops_audit_settings_properties::State,
16894    #[doc = "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required."]
16895    #[serde(rename = "storageEndpoint", default, skip_serializing_if = "Option::is_none")]
16896    pub storage_endpoint: Option<String>,
16897    #[doc = "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)"]
16898    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
16899    pub storage_account_access_key: Option<String>,
16900    #[doc = "Specifies the blob storage subscription Id."]
16901    #[serde(rename = "storageAccountSubscriptionId", default, skip_serializing_if = "Option::is_none")]
16902    pub storage_account_subscription_id: Option<String>,
16903}
16904impl ServerDevOpsAuditSettingsProperties {
16905    pub fn new(state: server_dev_ops_audit_settings_properties::State) -> Self {
16906        Self {
16907            is_azure_monitor_target_enabled: None,
16908            is_managed_identity_in_use: None,
16909            state,
16910            storage_endpoint: None,
16911            storage_account_access_key: None,
16912            storage_account_subscription_id: None,
16913        }
16914    }
16915}
16916pub mod server_dev_ops_audit_settings_properties {
16917    use super::*;
16918    #[doc = "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required."]
16919    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16920    pub enum State {
16921        Enabled,
16922        Disabled,
16923    }
16924}
16925#[doc = "A server DevOps auditing settings."]
16926#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16927pub struct ServerDevOpsAuditingSettings {
16928    #[serde(flatten)]
16929    pub proxy_resource: ProxyResource,
16930    #[doc = "Metadata pertaining to creation and last modification of the resource."]
16931    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
16932    pub system_data: Option<SystemData>,
16933    #[doc = "Properties of a server DevOps audit settings."]
16934    #[serde(default, skip_serializing_if = "Option::is_none")]
16935    pub properties: Option<ServerDevOpsAuditSettingsProperties>,
16936}
16937impl ServerDevOpsAuditingSettings {
16938    pub fn new() -> Self {
16939        Self::default()
16940    }
16941}
16942#[doc = "A server DNS alias."]
16943#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16944pub struct ServerDnsAlias {
16945    #[serde(flatten)]
16946    pub proxy_resource: ProxyResource,
16947    #[doc = "Properties of a server DNS alias."]
16948    #[serde(default, skip_serializing_if = "Option::is_none")]
16949    pub properties: Option<ServerDnsAliasProperties>,
16950}
16951impl ServerDnsAlias {
16952    pub fn new() -> Self {
16953        Self::default()
16954    }
16955}
16956#[doc = "A server dns alias acquisition request."]
16957#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16958pub struct ServerDnsAliasAcquisition {
16959    #[doc = "The id of the server alias that will be acquired to point to this server instead."]
16960    #[serde(rename = "oldServerDnsAliasId")]
16961    pub old_server_dns_alias_id: String,
16962}
16963impl ServerDnsAliasAcquisition {
16964    pub fn new(old_server_dns_alias_id: String) -> Self {
16965        Self { old_server_dns_alias_id }
16966    }
16967}
16968#[doc = "A list of server DNS aliases."]
16969#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16970pub struct ServerDnsAliasListResult {
16971    #[doc = "Array of results."]
16972    #[serde(
16973        default,
16974        deserialize_with = "azure_core::util::deserialize_null_as_default",
16975        skip_serializing_if = "Vec::is_empty"
16976    )]
16977    pub value: Vec<ServerDnsAlias>,
16978    #[doc = "Link to retrieve next page of results."]
16979    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
16980    pub next_link: Option<String>,
16981}
16982impl azure_core::Continuable for ServerDnsAliasListResult {
16983    type Continuation = String;
16984    fn continuation(&self) -> Option<Self::Continuation> {
16985        self.next_link.clone().filter(|value| !value.is_empty())
16986    }
16987}
16988impl ServerDnsAliasListResult {
16989    pub fn new() -> Self {
16990        Self::default()
16991    }
16992}
16993#[doc = "Properties of a server DNS alias."]
16994#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
16995pub struct ServerDnsAliasProperties {
16996    #[doc = "The fully qualified DNS record for alias"]
16997    #[serde(rename = "azureDnsRecord", default, skip_serializing_if = "Option::is_none")]
16998    pub azure_dns_record: Option<String>,
16999}
17000impl ServerDnsAliasProperties {
17001    pub fn new() -> Self {
17002        Self::default()
17003    }
17004}
17005#[doc = "Properties of a active directory administrator."]
17006#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17007pub struct ServerExternalAdministrator {
17008    #[doc = "Type of the sever administrator."]
17009    #[serde(rename = "administratorType", default, skip_serializing_if = "Option::is_none")]
17010    pub administrator_type: Option<server_external_administrator::AdministratorType>,
17011    #[doc = "Principal Type of the sever administrator."]
17012    #[serde(rename = "principalType", default, skip_serializing_if = "Option::is_none")]
17013    pub principal_type: Option<server_external_administrator::PrincipalType>,
17014    #[doc = "Login name of the server administrator."]
17015    #[serde(default, skip_serializing_if = "Option::is_none")]
17016    pub login: Option<String>,
17017    #[doc = "SID (object ID) of the server administrator."]
17018    #[serde(default, skip_serializing_if = "Option::is_none")]
17019    pub sid: Option<String>,
17020    #[doc = "Tenant ID of the administrator."]
17021    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
17022    pub tenant_id: Option<String>,
17023    #[doc = "Azure Active Directory only Authentication enabled."]
17024    #[serde(rename = "azureADOnlyAuthentication", default, skip_serializing_if = "Option::is_none")]
17025    pub azure_ad_only_authentication: Option<bool>,
17026}
17027impl ServerExternalAdministrator {
17028    pub fn new() -> Self {
17029        Self::default()
17030    }
17031}
17032pub mod server_external_administrator {
17033    use super::*;
17034    #[doc = "Type of the sever administrator."]
17035    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17036    #[serde(remote = "AdministratorType")]
17037    pub enum AdministratorType {
17038        ActiveDirectory,
17039        #[serde(skip_deserializing)]
17040        UnknownValue(String),
17041    }
17042    impl FromStr for AdministratorType {
17043        type Err = value::Error;
17044        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17045            Self::deserialize(s.into_deserializer())
17046        }
17047    }
17048    impl<'de> Deserialize<'de> for AdministratorType {
17049        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17050        where
17051            D: Deserializer<'de>,
17052        {
17053            let s = String::deserialize(deserializer)?;
17054            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17055            Ok(deserialized)
17056        }
17057    }
17058    impl Serialize for AdministratorType {
17059        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17060        where
17061            S: Serializer,
17062        {
17063            match self {
17064                Self::ActiveDirectory => serializer.serialize_unit_variant("AdministratorType", 0u32, "ActiveDirectory"),
17065                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17066            }
17067        }
17068    }
17069    #[doc = "Principal Type of the sever administrator."]
17070    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17071    #[serde(remote = "PrincipalType")]
17072    pub enum PrincipalType {
17073        User,
17074        Group,
17075        Application,
17076        #[serde(skip_deserializing)]
17077        UnknownValue(String),
17078    }
17079    impl FromStr for PrincipalType {
17080        type Err = value::Error;
17081        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17082            Self::deserialize(s.into_deserializer())
17083        }
17084    }
17085    impl<'de> Deserialize<'de> for PrincipalType {
17086        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17087        where
17088            D: Deserializer<'de>,
17089        {
17090            let s = String::deserialize(deserializer)?;
17091            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17092            Ok(deserialized)
17093        }
17094    }
17095    impl Serialize for PrincipalType {
17096        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17097        where
17098            S: Serializer,
17099        {
17100            match self {
17101                Self::User => serializer.serialize_unit_variant("PrincipalType", 0u32, "User"),
17102                Self::Group => serializer.serialize_unit_variant("PrincipalType", 1u32, "Group"),
17103                Self::Application => serializer.serialize_unit_variant("PrincipalType", 2u32, "Application"),
17104                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17105            }
17106        }
17107    }
17108}
17109#[doc = "The properties of a server firewall rule."]
17110#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17111pub struct ServerFirewallRuleProperties {
17112    #[doc = "The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses."]
17113    #[serde(rename = "startIpAddress", default, skip_serializing_if = "Option::is_none")]
17114    pub start_ip_address: Option<String>,
17115    #[doc = "The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses."]
17116    #[serde(rename = "endIpAddress", default, skip_serializing_if = "Option::is_none")]
17117    pub end_ip_address: Option<String>,
17118}
17119impl ServerFirewallRuleProperties {
17120    pub fn new() -> Self {
17121        Self::default()
17122    }
17123}
17124#[doc = "Server info for the server trust group."]
17125#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17126pub struct ServerInfo {
17127    #[doc = "Server Id."]
17128    #[serde(rename = "serverId")]
17129    pub server_id: String,
17130}
17131impl ServerInfo {
17132    pub fn new(server_id: String) -> Self {
17133        Self { server_id }
17134    }
17135}
17136#[doc = "A server key."]
17137#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17138pub struct ServerKey {
17139    #[serde(flatten)]
17140    pub proxy_resource: ProxyResource,
17141    #[doc = "Kind of encryption protector. This is metadata used for the Azure portal experience."]
17142    #[serde(default, skip_serializing_if = "Option::is_none")]
17143    pub kind: Option<String>,
17144    #[doc = "Resource location."]
17145    #[serde(default, skip_serializing_if = "Option::is_none")]
17146    pub location: Option<String>,
17147    #[doc = "Properties for a server key execution."]
17148    #[serde(default, skip_serializing_if = "Option::is_none")]
17149    pub properties: Option<ServerKeyProperties>,
17150}
17151impl ServerKey {
17152    pub fn new() -> Self {
17153        Self::default()
17154    }
17155}
17156#[doc = "A list of server keys."]
17157#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17158pub struct ServerKeyListResult {
17159    #[doc = "Array of results."]
17160    #[serde(
17161        default,
17162        deserialize_with = "azure_core::util::deserialize_null_as_default",
17163        skip_serializing_if = "Vec::is_empty"
17164    )]
17165    pub value: Vec<ServerKey>,
17166    #[doc = "Link to retrieve next page of results."]
17167    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17168    pub next_link: Option<String>,
17169}
17170impl azure_core::Continuable for ServerKeyListResult {
17171    type Continuation = String;
17172    fn continuation(&self) -> Option<Self::Continuation> {
17173        self.next_link.clone().filter(|value| !value.is_empty())
17174    }
17175}
17176impl ServerKeyListResult {
17177    pub fn new() -> Self {
17178        Self::default()
17179    }
17180}
17181#[doc = "Properties for a server key execution."]
17182#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17183pub struct ServerKeyProperties {
17184    #[doc = "Subregion of the server key."]
17185    #[serde(default, skip_serializing_if = "Option::is_none")]
17186    pub subregion: Option<String>,
17187    #[doc = "The server key type like 'ServiceManaged', 'AzureKeyVault'."]
17188    #[serde(rename = "serverKeyType")]
17189    pub server_key_type: server_key_properties::ServerKeyType,
17190    #[doc = "The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'"]
17191    #[serde(default, skip_serializing_if = "Option::is_none")]
17192    pub uri: Option<String>,
17193    #[doc = "Thumbprint of the server key."]
17194    #[serde(default, skip_serializing_if = "Option::is_none")]
17195    pub thumbprint: Option<String>,
17196    #[doc = "The server key creation date."]
17197    #[serde(rename = "creationDate", default, with = "azure_core::date::rfc3339::option")]
17198    pub creation_date: Option<::time::OffsetDateTime>,
17199    #[doc = "Key auto rotation opt-in flag. Either true or false."]
17200    #[serde(rename = "autoRotationEnabled", default, skip_serializing_if = "Option::is_none")]
17201    pub auto_rotation_enabled: Option<bool>,
17202}
17203impl ServerKeyProperties {
17204    pub fn new(server_key_type: server_key_properties::ServerKeyType) -> Self {
17205        Self {
17206            subregion: None,
17207            server_key_type,
17208            uri: None,
17209            thumbprint: None,
17210            creation_date: None,
17211            auto_rotation_enabled: None,
17212        }
17213    }
17214}
17215pub mod server_key_properties {
17216    use super::*;
17217    #[doc = "The server key type like 'ServiceManaged', 'AzureKeyVault'."]
17218    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17219    #[serde(remote = "ServerKeyType")]
17220    pub enum ServerKeyType {
17221        ServiceManaged,
17222        AzureKeyVault,
17223        #[serde(skip_deserializing)]
17224        UnknownValue(String),
17225    }
17226    impl FromStr for ServerKeyType {
17227        type Err = value::Error;
17228        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17229            Self::deserialize(s.into_deserializer())
17230        }
17231    }
17232    impl<'de> Deserialize<'de> for ServerKeyType {
17233        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17234        where
17235            D: Deserializer<'de>,
17236        {
17237            let s = String::deserialize(deserializer)?;
17238            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17239            Ok(deserialized)
17240        }
17241    }
17242    impl Serialize for ServerKeyType {
17243        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17244        where
17245            S: Serializer,
17246        {
17247            match self {
17248                Self::ServiceManaged => serializer.serialize_unit_variant("ServerKeyType", 0u32, "ServiceManaged"),
17249                Self::AzureKeyVault => serializer.serialize_unit_variant("ServerKeyType", 1u32, "AzureKeyVault"),
17250                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17251            }
17252        }
17253    }
17254}
17255#[doc = "A list of servers."]
17256#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17257pub struct ServerListResult {
17258    #[doc = "Array of results."]
17259    #[serde(
17260        default,
17261        deserialize_with = "azure_core::util::deserialize_null_as_default",
17262        skip_serializing_if = "Vec::is_empty"
17263    )]
17264    pub value: Vec<Server>,
17265    #[doc = "Link to retrieve next page of results."]
17266    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17267    pub next_link: Option<String>,
17268}
17269impl azure_core::Continuable for ServerListResult {
17270    type Continuation = String;
17271    fn continuation(&self) -> Option<Self::Continuation> {
17272        self.next_link.clone().filter(|value| !value.is_empty())
17273    }
17274}
17275impl ServerListResult {
17276    pub fn new() -> Self {
17277        Self::default()
17278    }
17279}
17280#[doc = "A server operation."]
17281#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17282pub struct ServerOperation {
17283    #[serde(flatten)]
17284    pub proxy_resource: ProxyResource,
17285    #[doc = "The properties of a server operation."]
17286    #[serde(default, skip_serializing_if = "Option::is_none")]
17287    pub properties: Option<ServerOperationProperties>,
17288}
17289impl ServerOperation {
17290    pub fn new() -> Self {
17291        Self::default()
17292    }
17293}
17294#[doc = "The response to a list server operations request"]
17295#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17296pub struct ServerOperationListResult {
17297    #[doc = "Array of results."]
17298    #[serde(
17299        default,
17300        deserialize_with = "azure_core::util::deserialize_null_as_default",
17301        skip_serializing_if = "Vec::is_empty"
17302    )]
17303    pub value: Vec<ServerOperation>,
17304    #[doc = "Link to retrieve next page of results."]
17305    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17306    pub next_link: Option<String>,
17307}
17308impl azure_core::Continuable for ServerOperationListResult {
17309    type Continuation = String;
17310    fn continuation(&self) -> Option<Self::Continuation> {
17311        self.next_link.clone().filter(|value| !value.is_empty())
17312    }
17313}
17314impl ServerOperationListResult {
17315    pub fn new() -> Self {
17316        Self::default()
17317    }
17318}
17319#[doc = "The properties of a server operation."]
17320#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17321pub struct ServerOperationProperties {
17322    #[doc = "The name of operation."]
17323    #[serde(default, skip_serializing_if = "Option::is_none")]
17324    pub operation: Option<String>,
17325    #[doc = "The friendly name of operation."]
17326    #[serde(rename = "operationFriendlyName", default, skip_serializing_if = "Option::is_none")]
17327    pub operation_friendly_name: Option<String>,
17328    #[doc = "The percentage of the operation completed."]
17329    #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
17330    pub percent_complete: Option<i32>,
17331    #[doc = "The name of the server."]
17332    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
17333    pub server_name: Option<String>,
17334    #[doc = "The operation start time."]
17335    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
17336    pub start_time: Option<::time::OffsetDateTime>,
17337    #[doc = "The operation state."]
17338    #[serde(default, skip_serializing_if = "Option::is_none")]
17339    pub state: Option<server_operation_properties::State>,
17340    #[doc = "The operation error code."]
17341    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
17342    pub error_code: Option<i32>,
17343    #[doc = "The operation error description."]
17344    #[serde(rename = "errorDescription", default, skip_serializing_if = "Option::is_none")]
17345    pub error_description: Option<String>,
17346    #[doc = "The operation error severity."]
17347    #[serde(rename = "errorSeverity", default, skip_serializing_if = "Option::is_none")]
17348    pub error_severity: Option<i32>,
17349    #[doc = "Whether or not the error is a user error."]
17350    #[serde(rename = "isUserError", default, skip_serializing_if = "Option::is_none")]
17351    pub is_user_error: Option<bool>,
17352    #[doc = "The estimated completion time of the operation."]
17353    #[serde(rename = "estimatedCompletionTime", default, with = "azure_core::date::rfc3339::option")]
17354    pub estimated_completion_time: Option<::time::OffsetDateTime>,
17355    #[doc = "The operation description."]
17356    #[serde(default, skip_serializing_if = "Option::is_none")]
17357    pub description: Option<String>,
17358    #[doc = "Whether the operation can be cancelled."]
17359    #[serde(rename = "isCancellable", default, skip_serializing_if = "Option::is_none")]
17360    pub is_cancellable: Option<bool>,
17361}
17362impl ServerOperationProperties {
17363    pub fn new() -> Self {
17364        Self::default()
17365    }
17366}
17367pub mod server_operation_properties {
17368    use super::*;
17369    #[doc = "The operation state."]
17370    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17371    #[serde(remote = "State")]
17372    pub enum State {
17373        Pending,
17374        InProgress,
17375        Succeeded,
17376        Failed,
17377        CancelInProgress,
17378        Cancelled,
17379        #[serde(skip_deserializing)]
17380        UnknownValue(String),
17381    }
17382    impl FromStr for State {
17383        type Err = value::Error;
17384        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17385            Self::deserialize(s.into_deserializer())
17386        }
17387    }
17388    impl<'de> Deserialize<'de> for State {
17389        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17390        where
17391            D: Deserializer<'de>,
17392        {
17393            let s = String::deserialize(deserializer)?;
17394            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17395            Ok(deserialized)
17396        }
17397    }
17398    impl Serialize for State {
17399        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17400        where
17401            S: Serializer,
17402        {
17403            match self {
17404                Self::Pending => serializer.serialize_unit_variant("State", 0u32, "Pending"),
17405                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
17406                Self::Succeeded => serializer.serialize_unit_variant("State", 2u32, "Succeeded"),
17407                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
17408                Self::CancelInProgress => serializer.serialize_unit_variant("State", 4u32, "CancelInProgress"),
17409                Self::Cancelled => serializer.serialize_unit_variant("State", 5u32, "Cancelled"),
17410                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17411            }
17412        }
17413    }
17414}
17415#[doc = "A private endpoint connection under a server"]
17416#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17417pub struct ServerPrivateEndpointConnection {
17418    #[doc = "Resource ID."]
17419    #[serde(default, skip_serializing_if = "Option::is_none")]
17420    pub id: Option<String>,
17421    #[doc = "Properties of a private endpoint connection."]
17422    #[serde(default, skip_serializing_if = "Option::is_none")]
17423    pub properties: Option<PrivateEndpointConnectionProperties>,
17424}
17425impl ServerPrivateEndpointConnection {
17426    pub fn new() -> Self {
17427        Self::default()
17428    }
17429}
17430#[doc = "The properties of a server."]
17431#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17432pub struct ServerProperties {
17433    #[doc = "Administrator username for the server. Once created it cannot be changed."]
17434    #[serde(rename = "administratorLogin", default, skip_serializing_if = "Option::is_none")]
17435    pub administrator_login: Option<String>,
17436    #[doc = "The administrator login password (required for server creation)."]
17437    #[serde(rename = "administratorLoginPassword", default, skip_serializing_if = "Option::is_none")]
17438    pub administrator_login_password: Option<String>,
17439    #[doc = "The version of the server."]
17440    #[serde(default, skip_serializing_if = "Option::is_none")]
17441    pub version: Option<String>,
17442    #[doc = "The state of the server."]
17443    #[serde(default, skip_serializing_if = "Option::is_none")]
17444    pub state: Option<String>,
17445    #[doc = "The fully qualified domain name of the server."]
17446    #[serde(rename = "fullyQualifiedDomainName", default, skip_serializing_if = "Option::is_none")]
17447    pub fully_qualified_domain_name: Option<String>,
17448    #[doc = "List of private endpoint connections on a server"]
17449    #[serde(
17450        rename = "privateEndpointConnections",
17451        default,
17452        deserialize_with = "azure_core::util::deserialize_null_as_default",
17453        skip_serializing_if = "Vec::is_empty"
17454    )]
17455    pub private_endpoint_connections: Vec<ServerPrivateEndpointConnection>,
17456    #[doc = "Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'"]
17457    #[serde(rename = "minimalTlsVersion", default, skip_serializing_if = "Option::is_none")]
17458    pub minimal_tls_version: Option<server_properties::MinimalTlsVersion>,
17459    #[doc = "Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'"]
17460    #[serde(rename = "publicNetworkAccess", default, skip_serializing_if = "Option::is_none")]
17461    pub public_network_access: Option<server_properties::PublicNetworkAccess>,
17462    #[doc = "Whether or not existing server has a workspace created and if it allows connection from workspace"]
17463    #[serde(rename = "workspaceFeature", default, skip_serializing_if = "Option::is_none")]
17464    pub workspace_feature: Option<server_properties::WorkspaceFeature>,
17465    #[doc = "The resource id of a user assigned identity to be used by default."]
17466    #[serde(rename = "primaryUserAssignedIdentityId", default, skip_serializing_if = "Option::is_none")]
17467    pub primary_user_assigned_identity_id: Option<String>,
17468    #[doc = "The Client id used for cross tenant CMK scenario"]
17469    #[serde(rename = "federatedClientId", default, skip_serializing_if = "Option::is_none")]
17470    pub federated_client_id: Option<String>,
17471    #[doc = "A CMK URI of the key to use for encryption."]
17472    #[serde(rename = "keyId", default, skip_serializing_if = "Option::is_none")]
17473    pub key_id: Option<String>,
17474    #[doc = "Properties of a active directory administrator."]
17475    #[serde(default, skip_serializing_if = "Option::is_none")]
17476    pub administrators: Option<ServerExternalAdministrator>,
17477    #[doc = "Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'"]
17478    #[serde(rename = "restrictOutboundNetworkAccess", default, skip_serializing_if = "Option::is_none")]
17479    pub restrict_outbound_network_access: Option<server_properties::RestrictOutboundNetworkAccess>,
17480    #[doc = "Whether or not to enable IPv6 support for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'"]
17481    #[serde(rename = "isIPv6Enabled", default, skip_serializing_if = "Option::is_none")]
17482    pub is_i_pv6_enabled: Option<server_properties::IsIPv6Enabled>,
17483    #[doc = "Status of external governance."]
17484    #[serde(rename = "externalGovernanceStatus", default, skip_serializing_if = "Option::is_none")]
17485    pub external_governance_status: Option<server_properties::ExternalGovernanceStatus>,
17486}
17487impl ServerProperties {
17488    pub fn new() -> Self {
17489        Self::default()
17490    }
17491}
17492pub mod server_properties {
17493    use super::*;
17494    #[doc = "Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'"]
17495    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17496    #[serde(remote = "MinimalTlsVersion")]
17497    pub enum MinimalTlsVersion {
17498        None,
17499        #[serde(rename = "1.0")]
17500        N1_0,
17501        #[serde(rename = "1.1")]
17502        N1_1,
17503        #[serde(rename = "1.2")]
17504        N1_2,
17505        #[serde(rename = "1.3")]
17506        N1_3,
17507        #[serde(skip_deserializing)]
17508        UnknownValue(String),
17509    }
17510    impl FromStr for MinimalTlsVersion {
17511        type Err = value::Error;
17512        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17513            Self::deserialize(s.into_deserializer())
17514        }
17515    }
17516    impl<'de> Deserialize<'de> for MinimalTlsVersion {
17517        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17518        where
17519            D: Deserializer<'de>,
17520        {
17521            let s = String::deserialize(deserializer)?;
17522            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17523            Ok(deserialized)
17524        }
17525    }
17526    impl Serialize for MinimalTlsVersion {
17527        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17528        where
17529            S: Serializer,
17530        {
17531            match self {
17532                Self::None => serializer.serialize_unit_variant("MinimalTlsVersion", 0u32, "None"),
17533                Self::N1_0 => serializer.serialize_unit_variant("MinimalTlsVersion", 1u32, "1.0"),
17534                Self::N1_1 => serializer.serialize_unit_variant("MinimalTlsVersion", 2u32, "1.1"),
17535                Self::N1_2 => serializer.serialize_unit_variant("MinimalTlsVersion", 3u32, "1.2"),
17536                Self::N1_3 => serializer.serialize_unit_variant("MinimalTlsVersion", 4u32, "1.3"),
17537                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17538            }
17539        }
17540    }
17541    #[doc = "Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'"]
17542    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17543    #[serde(remote = "PublicNetworkAccess")]
17544    pub enum PublicNetworkAccess {
17545        Enabled,
17546        Disabled,
17547        SecuredByPerimeter,
17548        #[serde(skip_deserializing)]
17549        UnknownValue(String),
17550    }
17551    impl FromStr for PublicNetworkAccess {
17552        type Err = value::Error;
17553        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17554            Self::deserialize(s.into_deserializer())
17555        }
17556    }
17557    impl<'de> Deserialize<'de> for PublicNetworkAccess {
17558        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17559        where
17560            D: Deserializer<'de>,
17561        {
17562            let s = String::deserialize(deserializer)?;
17563            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17564            Ok(deserialized)
17565        }
17566    }
17567    impl Serialize for PublicNetworkAccess {
17568        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17569        where
17570            S: Serializer,
17571        {
17572            match self {
17573                Self::Enabled => serializer.serialize_unit_variant("PublicNetworkAccess", 0u32, "Enabled"),
17574                Self::Disabled => serializer.serialize_unit_variant("PublicNetworkAccess", 1u32, "Disabled"),
17575                Self::SecuredByPerimeter => serializer.serialize_unit_variant("PublicNetworkAccess", 2u32, "SecuredByPerimeter"),
17576                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17577            }
17578        }
17579    }
17580    #[doc = "Whether or not existing server has a workspace created and if it allows connection from workspace"]
17581    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17582    #[serde(remote = "WorkspaceFeature")]
17583    pub enum WorkspaceFeature {
17584        Connected,
17585        Disconnected,
17586        #[serde(skip_deserializing)]
17587        UnknownValue(String),
17588    }
17589    impl FromStr for WorkspaceFeature {
17590        type Err = value::Error;
17591        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17592            Self::deserialize(s.into_deserializer())
17593        }
17594    }
17595    impl<'de> Deserialize<'de> for WorkspaceFeature {
17596        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17597        where
17598            D: Deserializer<'de>,
17599        {
17600            let s = String::deserialize(deserializer)?;
17601            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17602            Ok(deserialized)
17603        }
17604    }
17605    impl Serialize for WorkspaceFeature {
17606        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17607        where
17608            S: Serializer,
17609        {
17610            match self {
17611                Self::Connected => serializer.serialize_unit_variant("WorkspaceFeature", 0u32, "Connected"),
17612                Self::Disconnected => serializer.serialize_unit_variant("WorkspaceFeature", 1u32, "Disconnected"),
17613                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17614            }
17615        }
17616    }
17617    #[doc = "Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'"]
17618    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17619    #[serde(remote = "RestrictOutboundNetworkAccess")]
17620    pub enum RestrictOutboundNetworkAccess {
17621        Enabled,
17622        Disabled,
17623        #[serde(skip_deserializing)]
17624        UnknownValue(String),
17625    }
17626    impl FromStr for RestrictOutboundNetworkAccess {
17627        type Err = value::Error;
17628        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17629            Self::deserialize(s.into_deserializer())
17630        }
17631    }
17632    impl<'de> Deserialize<'de> for RestrictOutboundNetworkAccess {
17633        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17634        where
17635            D: Deserializer<'de>,
17636        {
17637            let s = String::deserialize(deserializer)?;
17638            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17639            Ok(deserialized)
17640        }
17641    }
17642    impl Serialize for RestrictOutboundNetworkAccess {
17643        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17644        where
17645            S: Serializer,
17646        {
17647            match self {
17648                Self::Enabled => serializer.serialize_unit_variant("RestrictOutboundNetworkAccess", 0u32, "Enabled"),
17649                Self::Disabled => serializer.serialize_unit_variant("RestrictOutboundNetworkAccess", 1u32, "Disabled"),
17650                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17651            }
17652        }
17653    }
17654    #[doc = "Whether or not to enable IPv6 support for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'"]
17655    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17656    #[serde(remote = "IsIPv6Enabled")]
17657    pub enum IsIPv6Enabled {
17658        Enabled,
17659        Disabled,
17660        #[serde(skip_deserializing)]
17661        UnknownValue(String),
17662    }
17663    impl FromStr for IsIPv6Enabled {
17664        type Err = value::Error;
17665        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17666            Self::deserialize(s.into_deserializer())
17667        }
17668    }
17669    impl<'de> Deserialize<'de> for IsIPv6Enabled {
17670        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17671        where
17672            D: Deserializer<'de>,
17673        {
17674            let s = String::deserialize(deserializer)?;
17675            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17676            Ok(deserialized)
17677        }
17678    }
17679    impl Serialize for IsIPv6Enabled {
17680        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17681        where
17682            S: Serializer,
17683        {
17684            match self {
17685                Self::Enabled => serializer.serialize_unit_variant("IsIPv6Enabled", 0u32, "Enabled"),
17686                Self::Disabled => serializer.serialize_unit_variant("IsIPv6Enabled", 1u32, "Disabled"),
17687                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17688            }
17689        }
17690    }
17691    #[doc = "Status of external governance."]
17692    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17693    #[serde(remote = "ExternalGovernanceStatus")]
17694    pub enum ExternalGovernanceStatus {
17695        Enabled,
17696        Disabled,
17697        #[serde(skip_deserializing)]
17698        UnknownValue(String),
17699    }
17700    impl FromStr for ExternalGovernanceStatus {
17701        type Err = value::Error;
17702        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
17703            Self::deserialize(s.into_deserializer())
17704        }
17705    }
17706    impl<'de> Deserialize<'de> for ExternalGovernanceStatus {
17707        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17708        where
17709            D: Deserializer<'de>,
17710        {
17711            let s = String::deserialize(deserializer)?;
17712            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
17713            Ok(deserialized)
17714        }
17715    }
17716    impl Serialize for ExternalGovernanceStatus {
17717        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17718        where
17719            S: Serializer,
17720        {
17721            match self {
17722                Self::Enabled => serializer.serialize_unit_variant("ExternalGovernanceStatus", 0u32, "Enabled"),
17723                Self::Disabled => serializer.serialize_unit_variant("ExternalGovernanceStatus", 1u32, "Disabled"),
17724                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
17725            }
17726        }
17727    }
17728}
17729#[doc = "A server security alert policy."]
17730#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17731pub struct ServerSecurityAlertPolicy {
17732    #[serde(flatten)]
17733    pub proxy_resource: ProxyResource,
17734    #[doc = "Metadata pertaining to creation and last modification of the resource."]
17735    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
17736    pub system_data: Option<SystemData>,
17737    #[doc = "Properties of a security alert policy."]
17738    #[serde(default, skip_serializing_if = "Option::is_none")]
17739    pub properties: Option<SecurityAlertsPolicyProperties>,
17740}
17741impl ServerSecurityAlertPolicy {
17742    pub fn new() -> Self {
17743        Self::default()
17744    }
17745}
17746#[doc = "Server trust certificate imported from box to enable connection between box and Sql Managed Instance."]
17747#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17748pub struct ServerTrustCertificate {
17749    #[serde(flatten)]
17750    pub proxy_resource: ProxyResource,
17751    #[doc = "The properties of a server trust certificate."]
17752    #[serde(default, skip_serializing_if = "Option::is_none")]
17753    pub properties: Option<ServerTrustCertificateProperties>,
17754}
17755impl ServerTrustCertificate {
17756    pub fn new() -> Self {
17757        Self::default()
17758    }
17759}
17760#[doc = "The properties of a server trust certificate."]
17761#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17762pub struct ServerTrustCertificateProperties {
17763    #[doc = "The certificate public blob"]
17764    #[serde(rename = "publicBlob", default, skip_serializing_if = "Option::is_none")]
17765    pub public_blob: Option<String>,
17766    #[doc = "The certificate thumbprint"]
17767    #[serde(default, skip_serializing_if = "Option::is_none")]
17768    pub thumbprint: Option<String>,
17769    #[doc = "The certificate name"]
17770    #[serde(rename = "certificateName", default, skip_serializing_if = "Option::is_none")]
17771    pub certificate_name: Option<String>,
17772}
17773impl ServerTrustCertificateProperties {
17774    pub fn new() -> Self {
17775        Self::default()
17776    }
17777}
17778#[doc = "A list of server trust certificates in instance."]
17779#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17780pub struct ServerTrustCertificatesListResult {
17781    #[doc = "Array of results."]
17782    #[serde(
17783        default,
17784        deserialize_with = "azure_core::util::deserialize_null_as_default",
17785        skip_serializing_if = "Vec::is_empty"
17786    )]
17787    pub value: Vec<ServerTrustCertificate>,
17788    #[doc = "Link to retrieve next page of results."]
17789    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17790    pub next_link: Option<String>,
17791}
17792impl azure_core::Continuable for ServerTrustCertificatesListResult {
17793    type Continuation = String;
17794    fn continuation(&self) -> Option<Self::Continuation> {
17795        self.next_link.clone().filter(|value| !value.is_empty())
17796    }
17797}
17798impl ServerTrustCertificatesListResult {
17799    pub fn new() -> Self {
17800        Self::default()
17801    }
17802}
17803#[doc = "A server trust group."]
17804#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17805pub struct ServerTrustGroup {
17806    #[serde(flatten)]
17807    pub proxy_resource: ProxyResource,
17808    #[doc = "Properties of a server trust group."]
17809    #[serde(default, skip_serializing_if = "Option::is_none")]
17810    pub properties: Option<ServerTrustGroupProperties>,
17811}
17812impl ServerTrustGroup {
17813    pub fn new() -> Self {
17814        Self::default()
17815    }
17816}
17817#[doc = "A list of server trust groups."]
17818#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17819pub struct ServerTrustGroupListResult {
17820    #[doc = "Array of results."]
17821    #[serde(
17822        default,
17823        deserialize_with = "azure_core::util::deserialize_null_as_default",
17824        skip_serializing_if = "Vec::is_empty"
17825    )]
17826    pub value: Vec<ServerTrustGroup>,
17827    #[doc = "Link to retrieve next page of results."]
17828    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17829    pub next_link: Option<String>,
17830}
17831impl azure_core::Continuable for ServerTrustGroupListResult {
17832    type Continuation = String;
17833    fn continuation(&self) -> Option<Self::Continuation> {
17834        self.next_link.clone().filter(|value| !value.is_empty())
17835    }
17836}
17837impl ServerTrustGroupListResult {
17838    pub fn new() -> Self {
17839        Self::default()
17840    }
17841}
17842#[doc = "Properties of a server trust group."]
17843#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17844pub struct ServerTrustGroupProperties {
17845    #[doc = "Group members information for the server trust group."]
17846    #[serde(rename = "groupMembers")]
17847    pub group_members: Vec<ServerInfo>,
17848    #[doc = "Trust scope of the server trust group."]
17849    #[serde(rename = "trustScopes")]
17850    pub trust_scopes: Vec<String>,
17851}
17852impl ServerTrustGroupProperties {
17853    pub fn new(group_members: Vec<ServerInfo>, trust_scopes: Vec<String>) -> Self {
17854        Self {
17855            group_members,
17856            trust_scopes,
17857        }
17858    }
17859}
17860#[doc = "An update request for an Azure SQL Database server."]
17861#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17862pub struct ServerUpdate {
17863    #[doc = "Azure Active Directory identity configuration for a resource."]
17864    #[serde(default, skip_serializing_if = "Option::is_none")]
17865    pub identity: Option<ResourceIdentity>,
17866    #[doc = "The properties of a server."]
17867    #[serde(default, skip_serializing_if = "Option::is_none")]
17868    pub properties: Option<ServerProperties>,
17869    #[doc = "Resource tags."]
17870    #[serde(default, skip_serializing_if = "Option::is_none")]
17871    pub tags: Option<serde_json::Value>,
17872}
17873impl ServerUpdate {
17874    pub fn new() -> Self {
17875        Self::default()
17876    }
17877}
17878#[doc = "Usage metric of a server."]
17879#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17880pub struct ServerUsage {
17881    #[serde(flatten)]
17882    pub proxy_resource: ProxyResource,
17883    #[doc = "Properties of a server usage."]
17884    #[serde(default, skip_serializing_if = "Option::is_none")]
17885    pub properties: Option<ServerUsageProperties>,
17886}
17887impl ServerUsage {
17888    pub fn new() -> Self {
17889        Self::default()
17890    }
17891}
17892#[doc = "A list of server usage metrics."]
17893#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17894pub struct ServerUsageListResult {
17895    #[doc = "Array of results."]
17896    #[serde(
17897        default,
17898        deserialize_with = "azure_core::util::deserialize_null_as_default",
17899        skip_serializing_if = "Vec::is_empty"
17900    )]
17901    pub value: Vec<ServerUsage>,
17902    #[doc = "Link to retrieve next page of results."]
17903    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
17904    pub next_link: Option<String>,
17905}
17906impl azure_core::Continuable for ServerUsageListResult {
17907    type Continuation = String;
17908    fn continuation(&self) -> Option<Self::Continuation> {
17909        self.next_link.clone().filter(|value| !value.is_empty())
17910    }
17911}
17912impl ServerUsageListResult {
17913    pub fn new() -> Self {
17914        Self::default()
17915    }
17916}
17917#[doc = "Properties of a server usage."]
17918#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17919pub struct ServerUsageProperties {
17920    #[doc = "User-readable name of the metric."]
17921    #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
17922    pub display_name: Option<String>,
17923    #[doc = "Current value of the metric."]
17924    #[serde(rename = "currentValue", default, skip_serializing_if = "Option::is_none")]
17925    pub current_value: Option<f64>,
17926    #[doc = "Boundary value of the metric."]
17927    #[serde(default, skip_serializing_if = "Option::is_none")]
17928    pub limit: Option<f64>,
17929    #[doc = "Unit of the metric."]
17930    #[serde(default, skip_serializing_if = "Option::is_none")]
17931    pub unit: Option<String>,
17932}
17933impl ServerUsageProperties {
17934    pub fn new() -> Self {
17935        Self::default()
17936    }
17937}
17938#[doc = "The server capability"]
17939#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17940pub struct ServerVersionCapability {
17941    #[doc = "The server version name."]
17942    #[serde(default, skip_serializing_if = "Option::is_none")]
17943    pub name: Option<String>,
17944    #[doc = "The list of supported database editions."]
17945    #[serde(
17946        rename = "supportedEditions",
17947        default,
17948        deserialize_with = "azure_core::util::deserialize_null_as_default",
17949        skip_serializing_if = "Vec::is_empty"
17950    )]
17951    pub supported_editions: Vec<EditionCapability>,
17952    #[doc = "The list of supported elastic pool editions."]
17953    #[serde(
17954        rename = "supportedElasticPoolEditions",
17955        default,
17956        deserialize_with = "azure_core::util::deserialize_null_as_default",
17957        skip_serializing_if = "Vec::is_empty"
17958    )]
17959    pub supported_elastic_pool_editions: Vec<ElasticPoolEditionCapability>,
17960    #[doc = "The status of the capability."]
17961    #[serde(default, skip_serializing_if = "Option::is_none")]
17962    pub status: Option<server_version_capability::Status>,
17963    #[doc = "The reason for the capability not being available."]
17964    #[serde(default, skip_serializing_if = "Option::is_none")]
17965    pub reason: Option<String>,
17966}
17967impl ServerVersionCapability {
17968    pub fn new() -> Self {
17969        Self::default()
17970    }
17971}
17972pub mod server_version_capability {
17973    use super::*;
17974    #[doc = "The status of the capability."]
17975    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17976    pub enum Status {
17977        Visible,
17978        Available,
17979        Default,
17980        Disabled,
17981    }
17982}
17983#[doc = "A server vulnerability assessment."]
17984#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17985pub struct ServerVulnerabilityAssessment {
17986    #[serde(flatten)]
17987    pub proxy_resource: ProxyResource,
17988    #[doc = "Properties of a server Vulnerability Assessment."]
17989    #[serde(default, skip_serializing_if = "Option::is_none")]
17990    pub properties: Option<ServerVulnerabilityAssessmentProperties>,
17991}
17992impl ServerVulnerabilityAssessment {
17993    pub fn new() -> Self {
17994        Self::default()
17995    }
17996}
17997#[doc = "A list of the server's vulnerability assessments."]
17998#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
17999pub struct ServerVulnerabilityAssessmentListResult {
18000    #[doc = "Array of results."]
18001    #[serde(
18002        default,
18003        deserialize_with = "azure_core::util::deserialize_null_as_default",
18004        skip_serializing_if = "Vec::is_empty"
18005    )]
18006    pub value: Vec<ServerVulnerabilityAssessment>,
18007    #[doc = "Link to retrieve next page of results."]
18008    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18009    pub next_link: Option<String>,
18010}
18011impl azure_core::Continuable for ServerVulnerabilityAssessmentListResult {
18012    type Continuation = String;
18013    fn continuation(&self) -> Option<Self::Continuation> {
18014        self.next_link.clone().filter(|value| !value.is_empty())
18015    }
18016}
18017impl ServerVulnerabilityAssessmentListResult {
18018    pub fn new() -> Self {
18019        Self::default()
18020    }
18021}
18022#[doc = "Properties of a server Vulnerability Assessment."]
18023#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18024pub struct ServerVulnerabilityAssessmentProperties {
18025    #[doc = "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/)."]
18026    #[serde(rename = "storageContainerPath")]
18027    pub storage_container_path: String,
18028    #[doc = "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
18029    #[serde(rename = "storageContainerSasKey", default, skip_serializing_if = "Option::is_none")]
18030    pub storage_container_sas_key: Option<String>,
18031    #[doc = "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall"]
18032    #[serde(rename = "storageAccountAccessKey", default, skip_serializing_if = "Option::is_none")]
18033    pub storage_account_access_key: Option<String>,
18034    #[doc = "Properties of a Vulnerability Assessment recurring scans."]
18035    #[serde(rename = "recurringScans", default, skip_serializing_if = "Option::is_none")]
18036    pub recurring_scans: Option<VulnerabilityAssessmentRecurringScansProperties>,
18037}
18038impl ServerVulnerabilityAssessmentProperties {
18039    pub fn new(storage_container_path: String) -> Self {
18040        Self {
18041            storage_container_path,
18042            storage_container_sas_key: None,
18043            storage_account_access_key: None,
18044            recurring_scans: None,
18045        }
18046    }
18047}
18048#[doc = "The service objectives capability."]
18049#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18050pub struct ServiceObjectiveCapability {
18051    #[doc = "The unique ID of the service objective."]
18052    #[serde(default, skip_serializing_if = "Option::is_none")]
18053    pub id: Option<String>,
18054    #[doc = "The service objective name."]
18055    #[serde(default, skip_serializing_if = "Option::is_none")]
18056    pub name: Option<String>,
18057    #[doc = "The list of supported maximum database sizes."]
18058    #[serde(
18059        rename = "supportedMaxSizes",
18060        default,
18061        deserialize_with = "azure_core::util::deserialize_null_as_default",
18062        skip_serializing_if = "Vec::is_empty"
18063    )]
18064    pub supported_max_sizes: Vec<MaxSizeRangeCapability>,
18065    #[doc = "The performance level capability."]
18066    #[serde(rename = "performanceLevel", default, skip_serializing_if = "Option::is_none")]
18067    pub performance_level: Option<PerformanceLevelCapability>,
18068    #[doc = "An ARM Resource SKU."]
18069    #[serde(default, skip_serializing_if = "Option::is_none")]
18070    pub sku: Option<Sku>,
18071    #[doc = "List of supported license types."]
18072    #[serde(
18073        rename = "supportedLicenseTypes",
18074        default,
18075        deserialize_with = "azure_core::util::deserialize_null_as_default",
18076        skip_serializing_if = "Vec::is_empty"
18077    )]
18078    pub supported_license_types: Vec<LicenseTypeCapability>,
18079    #[doc = "The maximum size capability."]
18080    #[serde(rename = "includedMaxSize", default, skip_serializing_if = "Option::is_none")]
18081    pub included_max_size: Option<MaxSizeCapability>,
18082    #[doc = "Whether or not zone redundancy is supported for the service objective."]
18083    #[serde(rename = "zoneRedundant", default, skip_serializing_if = "Option::is_none")]
18084    pub zone_redundant: Option<bool>,
18085    #[doc = "Supported auto pause delay time range"]
18086    #[serde(rename = "supportedAutoPauseDelay", default, skip_serializing_if = "Option::is_none")]
18087    pub supported_auto_pause_delay: Option<AutoPauseDelayTimeRange>,
18088    #[doc = "List of supported min capacities"]
18089    #[serde(
18090        rename = "supportedMinCapacities",
18091        default,
18092        deserialize_with = "azure_core::util::deserialize_null_as_default",
18093        skip_serializing_if = "Vec::is_empty"
18094    )]
18095    pub supported_min_capacities: Vec<MinCapacityCapability>,
18096    #[doc = "The compute model"]
18097    #[serde(rename = "computeModel", default, skip_serializing_if = "Option::is_none")]
18098    pub compute_model: Option<String>,
18099    #[doc = "List of supported maintenance configurations"]
18100    #[serde(
18101        rename = "supportedMaintenanceConfigurations",
18102        default,
18103        deserialize_with = "azure_core::util::deserialize_null_as_default",
18104        skip_serializing_if = "Vec::is_empty"
18105    )]
18106    pub supported_maintenance_configurations: Vec<MaintenanceConfigurationCapability>,
18107    #[doc = "Whether or not zone pinning is supported."]
18108    #[serde(rename = "zonePinning", default, skip_serializing_if = "Option::is_none")]
18109    pub zone_pinning: Option<bool>,
18110    #[doc = "List of supported availability zones"]
18111    #[serde(
18112        rename = "supportedZones",
18113        default,
18114        deserialize_with = "azure_core::util::deserialize_null_as_default",
18115        skip_serializing_if = "Vec::is_empty"
18116    )]
18117    pub supported_zones: Vec<ZonePinningCapability>,
18118    #[doc = "List of supported free limit exhaustion behaviors"]
18119    #[serde(
18120        rename = "supportedFreeLimitExhaustionBehaviors",
18121        default,
18122        deserialize_with = "azure_core::util::deserialize_null_as_default",
18123        skip_serializing_if = "Vec::is_empty"
18124    )]
18125    pub supported_free_limit_exhaustion_behaviors: Vec<FreeLimitExhaustionBehaviorCapability>,
18126    #[doc = "The status of the capability."]
18127    #[serde(default, skip_serializing_if = "Option::is_none")]
18128    pub status: Option<service_objective_capability::Status>,
18129    #[doc = "The reason for the capability not being available."]
18130    #[serde(default, skip_serializing_if = "Option::is_none")]
18131    pub reason: Option<String>,
18132}
18133impl ServiceObjectiveCapability {
18134    pub fn new() -> Self {
18135        Self::default()
18136    }
18137}
18138pub mod service_objective_capability {
18139    use super::*;
18140    #[doc = "The status of the capability."]
18141    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18142    pub enum Status {
18143        Visible,
18144        Available,
18145        Default,
18146        Disabled,
18147    }
18148}
18149#[doc = "The managed instance's service principal configuration for a resource."]
18150#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18151pub struct ServicePrincipal {
18152    #[doc = "The Azure Active Directory application object id."]
18153    #[serde(rename = "principalId", default, skip_serializing_if = "Option::is_none")]
18154    pub principal_id: Option<String>,
18155    #[doc = "The Azure Active Directory application client id."]
18156    #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")]
18157    pub client_id: Option<String>,
18158    #[doc = "The Azure Active Directory tenant id."]
18159    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
18160    pub tenant_id: Option<String>,
18161    #[doc = "Service principal type."]
18162    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
18163    pub type_: Option<service_principal::Type>,
18164}
18165impl ServicePrincipal {
18166    pub fn new() -> Self {
18167        Self::default()
18168    }
18169}
18170pub mod service_principal {
18171    use super::*;
18172    #[doc = "Service principal type."]
18173    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18174    #[serde(remote = "Type")]
18175    pub enum Type {
18176        None,
18177        SystemAssigned,
18178        #[serde(skip_deserializing)]
18179        UnknownValue(String),
18180    }
18181    impl FromStr for Type {
18182        type Err = value::Error;
18183        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
18184            Self::deserialize(s.into_deserializer())
18185        }
18186    }
18187    impl<'de> Deserialize<'de> for Type {
18188        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18189        where
18190            D: Deserializer<'de>,
18191        {
18192            let s = String::deserialize(deserializer)?;
18193            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
18194            Ok(deserialized)
18195        }
18196    }
18197    impl Serialize for Type {
18198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18199        where
18200            S: Serializer,
18201        {
18202            match self {
18203                Self::None => serializer.serialize_unit_variant("Type", 0u32, "None"),
18204                Self::SystemAssigned => serializer.serialize_unit_variant("Type", 1u32, "SystemAssigned"),
18205                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
18206            }
18207        }
18208    }
18209}
18210#[doc = "An ARM Resource SKU."]
18211#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18212pub struct Sku {
18213    #[doc = "The name of the SKU, typically, a letter + Number code, e.g. P3."]
18214    pub name: String,
18215    #[doc = "The tier or edition of the particular SKU, e.g. Basic, Premium."]
18216    #[serde(default, skip_serializing_if = "Option::is_none")]
18217    pub tier: Option<String>,
18218    #[doc = "Size of the particular SKU"]
18219    #[serde(default, skip_serializing_if = "Option::is_none")]
18220    pub size: Option<String>,
18221    #[doc = "If the service has different generations of hardware, for the same SKU, then that can be captured here."]
18222    #[serde(default, skip_serializing_if = "Option::is_none")]
18223    pub family: Option<String>,
18224    #[doc = "Capacity of the particular SKU."]
18225    #[serde(default, skip_serializing_if = "Option::is_none")]
18226    pub capacity: Option<i32>,
18227}
18228impl Sku {
18229    pub fn new(name: String) -> Self {
18230        Self {
18231            name,
18232            tier: None,
18233            size: None,
18234            family: None,
18235            capacity: None,
18236        }
18237    }
18238}
18239#[doc = "A recoverable managed database resource."]
18240#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18241pub struct SqlAgentConfiguration {
18242    #[serde(flatten)]
18243    pub proxy_resource: ProxyResource,
18244    #[doc = "Sql agent configuration properties."]
18245    #[serde(default, skip_serializing_if = "Option::is_none")]
18246    pub properties: Option<SqlAgentConfigurationProperties>,
18247}
18248impl SqlAgentConfiguration {
18249    pub fn new() -> Self {
18250        Self::default()
18251    }
18252}
18253#[doc = "Sql agent configuration properties."]
18254#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18255pub struct SqlAgentConfigurationProperties {
18256    #[doc = "The state of Sql Agent."]
18257    #[serde(default, skip_serializing_if = "Option::is_none")]
18258    pub state: Option<sql_agent_configuration_properties::State>,
18259}
18260impl SqlAgentConfigurationProperties {
18261    pub fn new() -> Self {
18262        Self::default()
18263    }
18264}
18265pub mod sql_agent_configuration_properties {
18266    use super::*;
18267    #[doc = "The state of Sql Agent."]
18268    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18269    pub enum State {
18270        Enabled,
18271        Disabled,
18272    }
18273}
18274#[doc = "A SQL Vulnerability Assessment."]
18275#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18276pub struct SqlVulnerabilityAssessment {
18277    #[serde(flatten)]
18278    pub proxy_resource: ProxyResource,
18279    #[doc = "Metadata pertaining to creation and last modification of the resource."]
18280    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
18281    pub system_data: Option<SystemData>,
18282    #[serde(default, skip_serializing_if = "Option::is_none")]
18283    pub properties: Option<SqlVulnerabilityAssessmentPolicyProperties>,
18284}
18285impl SqlVulnerabilityAssessment {
18286    pub fn new() -> Self {
18287        Self::default()
18288    }
18289}
18290#[doc = "A list of SQL Vulnerability Assessments."]
18291#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18292pub struct SqlVulnerabilityAssessmentListResult {
18293    #[doc = "Array of results."]
18294    #[serde(
18295        default,
18296        deserialize_with = "azure_core::util::deserialize_null_as_default",
18297        skip_serializing_if = "Vec::is_empty"
18298    )]
18299    pub value: Vec<SqlVulnerabilityAssessment>,
18300    #[doc = "Link to retrieve next page of results."]
18301    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18302    pub next_link: Option<String>,
18303}
18304impl azure_core::Continuable for SqlVulnerabilityAssessmentListResult {
18305    type Continuation = String;
18306    fn continuation(&self) -> Option<Self::Continuation> {
18307        self.next_link.clone().filter(|value| !value.is_empty())
18308    }
18309}
18310impl SqlVulnerabilityAssessmentListResult {
18311    pub fn new() -> Self {
18312        Self::default()
18313    }
18314}
18315#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18316pub struct SqlVulnerabilityAssessmentPolicyProperties {
18317    #[doc = "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server."]
18318    #[serde(default, skip_serializing_if = "Option::is_none")]
18319    pub state: Option<sql_vulnerability_assessment_policy_properties::State>,
18320}
18321impl SqlVulnerabilityAssessmentPolicyProperties {
18322    pub fn new() -> Self {
18323        Self::default()
18324    }
18325}
18326pub mod sql_vulnerability_assessment_policy_properties {
18327    use super::*;
18328    #[doc = "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server."]
18329    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18330    pub enum State {
18331        Enabled,
18332        Disabled,
18333    }
18334}
18335#[doc = "Properties of a vulnerability assessment scan error."]
18336#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18337pub struct SqlVulnerabilityAssessmentScanError {
18338    #[doc = "The error code."]
18339    #[serde(default, skip_serializing_if = "Option::is_none")]
18340    pub code: Option<String>,
18341    #[doc = "The error message."]
18342    #[serde(default, skip_serializing_if = "Option::is_none")]
18343    pub message: Option<String>,
18344}
18345impl SqlVulnerabilityAssessmentScanError {
18346    pub fn new() -> Self {
18347        Self::default()
18348    }
18349}
18350#[doc = "A vulnerability assessment scan record."]
18351#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18352pub struct SqlVulnerabilityAssessmentScanRecord {
18353    #[serde(flatten)]
18354    pub proxy_resource: ProxyResource,
18355    #[doc = "Metadata pertaining to creation and last modification of the resource."]
18356    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
18357    pub system_data: Option<SystemData>,
18358    #[doc = "Properties of a vulnerability assessment scan record."]
18359    #[serde(default, skip_serializing_if = "Option::is_none")]
18360    pub properties: Option<SqlVulnerabilityAssessmentScanRecordProperties>,
18361}
18362impl SqlVulnerabilityAssessmentScanRecord {
18363    pub fn new() -> Self {
18364        Self::default()
18365    }
18366}
18367#[doc = "A list of vulnerability assessment scan records."]
18368#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18369pub struct SqlVulnerabilityAssessmentScanRecordListResult {
18370    #[doc = "Array of results."]
18371    #[serde(
18372        default,
18373        deserialize_with = "azure_core::util::deserialize_null_as_default",
18374        skip_serializing_if = "Vec::is_empty"
18375    )]
18376    pub value: Vec<SqlVulnerabilityAssessmentScanRecord>,
18377    #[doc = "Link to retrieve next page of results."]
18378    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18379    pub next_link: Option<String>,
18380}
18381impl azure_core::Continuable for SqlVulnerabilityAssessmentScanRecordListResult {
18382    type Continuation = String;
18383    fn continuation(&self) -> Option<Self::Continuation> {
18384        self.next_link.clone().filter(|value| !value.is_empty())
18385    }
18386}
18387impl SqlVulnerabilityAssessmentScanRecordListResult {
18388    pub fn new() -> Self {
18389        Self::default()
18390    }
18391}
18392#[doc = "Properties of a vulnerability assessment scan record."]
18393#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18394pub struct SqlVulnerabilityAssessmentScanRecordProperties {
18395    #[doc = "The scan ID."]
18396    #[serde(rename = "scanId", default, skip_serializing_if = "Option::is_none")]
18397    pub scan_id: Option<String>,
18398    #[doc = "The scan trigger type."]
18399    #[serde(rename = "triggerType", default, skip_serializing_if = "Option::is_none")]
18400    pub trigger_type: Option<sql_vulnerability_assessment_scan_record_properties::TriggerType>,
18401    #[doc = "The scan status."]
18402    #[serde(default, skip_serializing_if = "Option::is_none")]
18403    pub state: Option<sql_vulnerability_assessment_scan_record_properties::State>,
18404    #[doc = "The scan start time (UTC)."]
18405    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
18406    pub start_time: Option<::time::OffsetDateTime>,
18407    #[doc = "The scan end time (UTC)."]
18408    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
18409    pub end_time: Option<::time::OffsetDateTime>,
18410    #[doc = "The scan errors."]
18411    #[serde(
18412        default,
18413        deserialize_with = "azure_core::util::deserialize_null_as_default",
18414        skip_serializing_if = "Vec::is_empty"
18415    )]
18416    pub errors: Vec<SqlVulnerabilityAssessmentScanError>,
18417    #[doc = "The server name."]
18418    #[serde(default, skip_serializing_if = "Option::is_none")]
18419    pub server: Option<String>,
18420    #[doc = "The database name."]
18421    #[serde(default, skip_serializing_if = "Option::is_none")]
18422    pub database: Option<String>,
18423    #[doc = "The SQL version."]
18424    #[serde(rename = "sqlVersion", default, skip_serializing_if = "Option::is_none")]
18425    pub sql_version: Option<String>,
18426    #[doc = "The number of failed rules with high severity."]
18427    #[serde(rename = "highSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
18428    pub high_severity_failed_rules_count: Option<i32>,
18429    #[doc = "The number of failed rules with medium severity."]
18430    #[serde(rename = "mediumSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
18431    pub medium_severity_failed_rules_count: Option<i32>,
18432    #[doc = "The number of failed rules with low severity."]
18433    #[serde(rename = "lowSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
18434    pub low_severity_failed_rules_count: Option<i32>,
18435    #[doc = "The number of total passed rules."]
18436    #[serde(rename = "totalPassedRulesCount", default, skip_serializing_if = "Option::is_none")]
18437    pub total_passed_rules_count: Option<i32>,
18438    #[doc = "The number of total failed rules."]
18439    #[serde(rename = "totalFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
18440    pub total_failed_rules_count: Option<i32>,
18441    #[doc = "The number of total rules assessed."]
18442    #[serde(rename = "totalRulesCount", default, skip_serializing_if = "Option::is_none")]
18443    pub total_rules_count: Option<i32>,
18444    #[doc = "Baseline created for this database, and has one or more rules."]
18445    #[serde(rename = "isBaselineApplied", default, skip_serializing_if = "Option::is_none")]
18446    pub is_baseline_applied: Option<bool>,
18447    #[doc = "The last scan time."]
18448    #[serde(rename = "lastScanTime", default, with = "azure_core::date::rfc3339::option")]
18449    pub last_scan_time: Option<::time::OffsetDateTime>,
18450}
18451impl SqlVulnerabilityAssessmentScanRecordProperties {
18452    pub fn new() -> Self {
18453        Self::default()
18454    }
18455}
18456pub mod sql_vulnerability_assessment_scan_record_properties {
18457    use super::*;
18458    #[doc = "The scan trigger type."]
18459    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18460    #[serde(remote = "TriggerType")]
18461    pub enum TriggerType {
18462        OnDemand,
18463        Recurring,
18464        #[serde(skip_deserializing)]
18465        UnknownValue(String),
18466    }
18467    impl FromStr for TriggerType {
18468        type Err = value::Error;
18469        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
18470            Self::deserialize(s.into_deserializer())
18471        }
18472    }
18473    impl<'de> Deserialize<'de> for TriggerType {
18474        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18475        where
18476            D: Deserializer<'de>,
18477        {
18478            let s = String::deserialize(deserializer)?;
18479            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
18480            Ok(deserialized)
18481        }
18482    }
18483    impl Serialize for TriggerType {
18484        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18485        where
18486            S: Serializer,
18487        {
18488            match self {
18489                Self::OnDemand => serializer.serialize_unit_variant("TriggerType", 0u32, "OnDemand"),
18490                Self::Recurring => serializer.serialize_unit_variant("TriggerType", 1u32, "Recurring"),
18491                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
18492            }
18493        }
18494    }
18495    #[doc = "The scan status."]
18496    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18497    #[serde(remote = "State")]
18498    pub enum State {
18499        Passed,
18500        Failed,
18501        FailedToRun,
18502        InProgress,
18503        #[serde(skip_deserializing)]
18504        UnknownValue(String),
18505    }
18506    impl FromStr for State {
18507        type Err = value::Error;
18508        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
18509            Self::deserialize(s.into_deserializer())
18510        }
18511    }
18512    impl<'de> Deserialize<'de> for State {
18513        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18514        where
18515            D: Deserializer<'de>,
18516        {
18517            let s = String::deserialize(deserializer)?;
18518            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
18519            Ok(deserialized)
18520        }
18521    }
18522    impl Serialize for State {
18523        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18524        where
18525            S: Serializer,
18526        {
18527            match self {
18528                Self::Passed => serializer.serialize_unit_variant("State", 0u32, "Passed"),
18529                Self::Failed => serializer.serialize_unit_variant("State", 1u32, "Failed"),
18530                Self::FailedToRun => serializer.serialize_unit_variant("State", 2u32, "FailedToRun"),
18531                Self::InProgress => serializer.serialize_unit_variant("State", 3u32, "InProgress"),
18532                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
18533            }
18534        }
18535    }
18536}
18537#[doc = "SQL Vulnerability Assessment scan result properties for a single rule."]
18538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18539pub struct SqlVulnerabilityAssessmentScanResultProperties {
18540    #[doc = "SQL Vulnerability Assessment rule Id."]
18541    #[serde(rename = "ruleId", default, skip_serializing_if = "Option::is_none")]
18542    pub rule_id: Option<String>,
18543    #[doc = "SQL Vulnerability Assessment rule result status."]
18544    #[serde(default, skip_serializing_if = "Option::is_none")]
18545    pub status: Option<sql_vulnerability_assessment_scan_result_properties::Status>,
18546    #[doc = "SQL Vulnerability Assessment error message."]
18547    #[serde(rename = "errorMessage", default, skip_serializing_if = "Option::is_none")]
18548    pub error_message: Option<String>,
18549    #[doc = "SQL Vulnerability Assessment is the query results trimmed."]
18550    #[serde(rename = "isTrimmed", default, skip_serializing_if = "Option::is_none")]
18551    pub is_trimmed: Option<bool>,
18552    #[doc = "SQL Vulnerability Assessment query results that was run."]
18553    #[serde(
18554        rename = "queryResults",
18555        default,
18556        deserialize_with = "azure_core::util::deserialize_null_as_default",
18557        skip_serializing_if = "Vec::is_empty"
18558    )]
18559    pub query_results: Vec<Vec<String>>,
18560    #[doc = "SQL Vulnerability Assessment remediation Details."]
18561    #[serde(default, skip_serializing_if = "Option::is_none")]
18562    pub remediation: Option<Remediation>,
18563    #[doc = "SQL Vulnerability Assessment baseline adjusted results"]
18564    #[serde(rename = "baselineAdjustedResult", default, skip_serializing_if = "Option::is_none")]
18565    pub baseline_adjusted_result: Option<BaselineAdjustedResult>,
18566    #[doc = "SQL Vulnerability Assessment rule metadata details."]
18567    #[serde(rename = "ruleMetadata", default, skip_serializing_if = "Option::is_none")]
18568    pub rule_metadata: Option<VaRule>,
18569}
18570impl SqlVulnerabilityAssessmentScanResultProperties {
18571    pub fn new() -> Self {
18572        Self::default()
18573    }
18574}
18575pub mod sql_vulnerability_assessment_scan_result_properties {
18576    use super::*;
18577    #[doc = "SQL Vulnerability Assessment rule result status."]
18578    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18579    #[serde(remote = "Status")]
18580    pub enum Status {
18581        NonFinding,
18582        Finding,
18583        InternalError,
18584        #[serde(skip_deserializing)]
18585        UnknownValue(String),
18586    }
18587    impl FromStr for Status {
18588        type Err = value::Error;
18589        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
18590            Self::deserialize(s.into_deserializer())
18591        }
18592    }
18593    impl<'de> Deserialize<'de> for Status {
18594        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18595        where
18596            D: Deserializer<'de>,
18597        {
18598            let s = String::deserialize(deserializer)?;
18599            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
18600            Ok(deserialized)
18601        }
18602    }
18603    impl Serialize for Status {
18604        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18605        where
18606            S: Serializer,
18607        {
18608            match self {
18609                Self::NonFinding => serializer.serialize_unit_variant("Status", 0u32, "NonFinding"),
18610                Self::Finding => serializer.serialize_unit_variant("Status", 1u32, "Finding"),
18611                Self::InternalError => serializer.serialize_unit_variant("Status", 2u32, "InternalError"),
18612                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
18613            }
18614        }
18615    }
18616}
18617#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18618pub struct SqlVulnerabilityAssessmentScanResults {
18619    #[serde(flatten)]
18620    pub proxy_resource: ProxyResource,
18621    #[doc = "Metadata pertaining to creation and last modification of the resource."]
18622    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
18623    pub system_data: Option<SystemData>,
18624    #[doc = "SQL Vulnerability Assessment scan result properties for a single rule."]
18625    #[serde(default, skip_serializing_if = "Option::is_none")]
18626    pub properties: Option<SqlVulnerabilityAssessmentScanResultProperties>,
18627}
18628impl SqlVulnerabilityAssessmentScanResults {
18629    pub fn new() -> Self {
18630        Self::default()
18631    }
18632}
18633#[doc = "Managed instance's Start/Stop schedule."]
18634#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18635pub struct StartStopManagedInstanceSchedule {
18636    #[serde(flatten)]
18637    pub proxy_resource: ProxyResource,
18638    #[doc = "Metadata pertaining to creation and last modification of the resource."]
18639    #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
18640    pub system_data: Option<SystemData>,
18641    #[doc = "Properties of managed instance's Start/Stop schedule."]
18642    #[serde(default, skip_serializing_if = "Option::is_none")]
18643    pub properties: Option<StartStopManagedInstanceScheduleProperties>,
18644}
18645impl StartStopManagedInstanceSchedule {
18646    pub fn new() -> Self {
18647        Self::default()
18648    }
18649}
18650#[doc = "Managed instance's Start/Stop schedule list result."]
18651#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18652pub struct StartStopManagedInstanceScheduleListResult {
18653    #[doc = "Array of results."]
18654    #[serde(
18655        default,
18656        deserialize_with = "azure_core::util::deserialize_null_as_default",
18657        skip_serializing_if = "Vec::is_empty"
18658    )]
18659    pub value: Vec<StartStopManagedInstanceSchedule>,
18660    #[doc = "Link to retrieve next page of results."]
18661    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18662    pub next_link: Option<String>,
18663}
18664impl azure_core::Continuable for StartStopManagedInstanceScheduleListResult {
18665    type Continuation = String;
18666    fn continuation(&self) -> Option<Self::Continuation> {
18667        self.next_link.clone().filter(|value| !value.is_empty())
18668    }
18669}
18670impl StartStopManagedInstanceScheduleListResult {
18671    pub fn new() -> Self {
18672        Self::default()
18673    }
18674}
18675#[doc = "Properties of managed instance's Start/Stop schedule."]
18676#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18677pub struct StartStopManagedInstanceScheduleProperties {
18678    #[doc = "The description of the schedule."]
18679    #[serde(default, skip_serializing_if = "Option::is_none")]
18680    pub description: Option<String>,
18681    #[doc = "The time zone of the schedule."]
18682    #[serde(rename = "timeZoneId", default, skip_serializing_if = "Option::is_none")]
18683    pub time_zone_id: Option<String>,
18684    #[doc = "Schedule list."]
18685    #[serde(rename = "scheduleList")]
18686    pub schedule_list: Vec<ScheduleItem>,
18687    #[doc = "Next action to be executed (Start or Stop)"]
18688    #[serde(rename = "nextRunAction", default, skip_serializing_if = "Option::is_none")]
18689    pub next_run_action: Option<String>,
18690    #[doc = "Timestamp when the next action will be executed in the corresponding schedule time zone."]
18691    #[serde(rename = "nextExecutionTime", default, skip_serializing_if = "Option::is_none")]
18692    pub next_execution_time: Option<String>,
18693}
18694impl StartStopManagedInstanceScheduleProperties {
18695    pub fn new(schedule_list: Vec<ScheduleItem>) -> Self {
18696        Self {
18697            description: None,
18698            time_zone_id: None,
18699            schedule_list,
18700            next_run_action: None,
18701            next_execution_time: None,
18702        }
18703    }
18704}
18705#[doc = "The storage account type capability."]
18706#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18707pub struct StorageCapability {
18708    #[doc = "The storage account type for the database's backups."]
18709    #[serde(rename = "storageAccountType", default, skip_serializing_if = "Option::is_none")]
18710    pub storage_account_type: Option<storage_capability::StorageAccountType>,
18711    #[doc = "The status of the capability."]
18712    #[serde(default, skip_serializing_if = "Option::is_none")]
18713    pub status: Option<storage_capability::Status>,
18714    #[doc = "The reason for the capability not being available."]
18715    #[serde(default, skip_serializing_if = "Option::is_none")]
18716    pub reason: Option<String>,
18717}
18718impl StorageCapability {
18719    pub fn new() -> Self {
18720        Self::default()
18721    }
18722}
18723pub mod storage_capability {
18724    use super::*;
18725    #[doc = "The storage account type for the database's backups."]
18726    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18727    pub enum StorageAccountType {
18728        #[serde(rename = "GRS")]
18729        Grs,
18730        #[serde(rename = "LRS")]
18731        Lrs,
18732        #[serde(rename = "ZRS")]
18733        Zrs,
18734        #[serde(rename = "GZRS")]
18735        Gzrs,
18736    }
18737    #[doc = "The status of the capability."]
18738    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18739    pub enum Status {
18740        Visible,
18741        Available,
18742        Default,
18743        Disabled,
18744    }
18745}
18746#[doc = "Usage Metric of a Subscription in a Location."]
18747#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18748pub struct SubscriptionUsage {
18749    #[serde(flatten)]
18750    pub proxy_resource: ProxyResource,
18751    #[doc = "Properties of a subscription usage."]
18752    #[serde(default, skip_serializing_if = "Option::is_none")]
18753    pub properties: Option<SubscriptionUsageProperties>,
18754}
18755impl SubscriptionUsage {
18756    pub fn new() -> Self {
18757        Self::default()
18758    }
18759}
18760#[doc = "A list of subscription usage metrics in a location."]
18761#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18762pub struct SubscriptionUsageListResult {
18763    #[doc = "Array of results."]
18764    #[serde(
18765        default,
18766        deserialize_with = "azure_core::util::deserialize_null_as_default",
18767        skip_serializing_if = "Vec::is_empty"
18768    )]
18769    pub value: Vec<SubscriptionUsage>,
18770    #[doc = "Link to retrieve next page of results."]
18771    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18772    pub next_link: Option<String>,
18773}
18774impl azure_core::Continuable for SubscriptionUsageListResult {
18775    type Continuation = String;
18776    fn continuation(&self) -> Option<Self::Continuation> {
18777        self.next_link.clone().filter(|value| !value.is_empty())
18778    }
18779}
18780impl SubscriptionUsageListResult {
18781    pub fn new() -> Self {
18782        Self::default()
18783    }
18784}
18785#[doc = "Properties of a subscription usage."]
18786#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18787pub struct SubscriptionUsageProperties {
18788    #[doc = "User-readable name of the metric."]
18789    #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
18790    pub display_name: Option<String>,
18791    #[doc = "Current value of the metric."]
18792    #[serde(rename = "currentValue", default, skip_serializing_if = "Option::is_none")]
18793    pub current_value: Option<f64>,
18794    #[doc = "Boundary value of the metric."]
18795    #[serde(default, skip_serializing_if = "Option::is_none")]
18796    pub limit: Option<f64>,
18797    #[doc = "Unit of the metric."]
18798    #[serde(default, skip_serializing_if = "Option::is_none")]
18799    pub unit: Option<String>,
18800}
18801impl SubscriptionUsageProperties {
18802    pub fn new() -> Self {
18803        Self::default()
18804    }
18805}
18806#[doc = "Synapse link workspace resource"]
18807#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18808pub struct SynapseLinkWorkspace {
18809    #[serde(flatten)]
18810    pub proxy_resource: ProxyResource,
18811    #[doc = "Properties of a Synapse link workspaces"]
18812    #[serde(default, skip_serializing_if = "Option::is_none")]
18813    pub properties: Option<SynapseLinkWorkspaceProperties>,
18814}
18815impl SynapseLinkWorkspace {
18816    pub fn new() -> Self {
18817        Self::default()
18818    }
18819}
18820#[doc = "Properties of a Synapse link workspaces"]
18821#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18822pub struct SynapseLinkWorkspaceInfoProperties {
18823    #[doc = "Synapse link workspace id."]
18824    #[serde(rename = "workspaceId", default, skip_serializing_if = "Option::is_none")]
18825    pub workspace_id: Option<String>,
18826    #[doc = "Link connection name."]
18827    #[serde(rename = "linkConnectionName", default, skip_serializing_if = "Option::is_none")]
18828    pub link_connection_name: Option<String>,
18829}
18830impl SynapseLinkWorkspaceInfoProperties {
18831    pub fn new() -> Self {
18832        Self::default()
18833    }
18834}
18835#[doc = "A list of synapselink workspaces"]
18836#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18837pub struct SynapseLinkWorkspaceListResult {
18838    #[doc = "Array of results."]
18839    #[serde(
18840        default,
18841        deserialize_with = "azure_core::util::deserialize_null_as_default",
18842        skip_serializing_if = "Vec::is_empty"
18843    )]
18844    pub value: Vec<SynapseLinkWorkspace>,
18845    #[doc = "Link to retrieve next page of results."]
18846    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18847    pub next_link: Option<String>,
18848}
18849impl azure_core::Continuable for SynapseLinkWorkspaceListResult {
18850    type Continuation = String;
18851    fn continuation(&self) -> Option<Self::Continuation> {
18852        self.next_link.clone().filter(|value| !value.is_empty())
18853    }
18854}
18855impl SynapseLinkWorkspaceListResult {
18856    pub fn new() -> Self {
18857        Self::default()
18858    }
18859}
18860#[doc = "Properties of a Synapse link workspaces"]
18861#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18862pub struct SynapseLinkWorkspaceProperties {
18863    #[doc = "List of all synapselink workspaces"]
18864    #[serde(
18865        default,
18866        deserialize_with = "azure_core::util::deserialize_null_as_default",
18867        skip_serializing_if = "Vec::is_empty"
18868    )]
18869    pub workspaces: Vec<SynapseLinkWorkspaceInfoProperties>,
18870}
18871impl SynapseLinkWorkspaceProperties {
18872    pub fn new() -> Self {
18873        Self::default()
18874    }
18875}
18876#[doc = "An Azure SQL Database sync agent."]
18877#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18878pub struct SyncAgent {
18879    #[serde(flatten)]
18880    pub proxy_resource: ProxyResource,
18881    #[doc = "Properties of an Azure SQL Database sync agent."]
18882    #[serde(default, skip_serializing_if = "Option::is_none")]
18883    pub properties: Option<SyncAgentProperties>,
18884}
18885impl SyncAgent {
18886    pub fn new() -> Self {
18887        Self::default()
18888    }
18889}
18890#[doc = "Properties of an Azure SQL Database sync agent key."]
18891#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18892pub struct SyncAgentKeyProperties {
18893    #[doc = "Key of sync agent."]
18894    #[serde(rename = "syncAgentKey", default, skip_serializing_if = "Option::is_none")]
18895    pub sync_agent_key: Option<String>,
18896}
18897impl SyncAgentKeyProperties {
18898    pub fn new() -> Self {
18899        Self::default()
18900    }
18901}
18902#[doc = "An Azure SQL Database sync agent linked database."]
18903#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18904pub struct SyncAgentLinkedDatabase {
18905    #[serde(flatten)]
18906    pub proxy_resource: ProxyResource,
18907    #[doc = "Properties of an Azure SQL Database sync agent linked database."]
18908    #[serde(default, skip_serializing_if = "Option::is_none")]
18909    pub properties: Option<SyncAgentLinkedDatabaseProperties>,
18910}
18911impl SyncAgentLinkedDatabase {
18912    pub fn new() -> Self {
18913        Self::default()
18914    }
18915}
18916#[doc = "A list of sync agent linked databases."]
18917#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18918pub struct SyncAgentLinkedDatabaseListResult {
18919    #[doc = "Array of results."]
18920    #[serde(
18921        default,
18922        deserialize_with = "azure_core::util::deserialize_null_as_default",
18923        skip_serializing_if = "Vec::is_empty"
18924    )]
18925    pub value: Vec<SyncAgentLinkedDatabase>,
18926    #[doc = "Link to retrieve next page of results."]
18927    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
18928    pub next_link: Option<String>,
18929}
18930impl azure_core::Continuable for SyncAgentLinkedDatabaseListResult {
18931    type Continuation = String;
18932    fn continuation(&self) -> Option<Self::Continuation> {
18933        self.next_link.clone().filter(|value| !value.is_empty())
18934    }
18935}
18936impl SyncAgentLinkedDatabaseListResult {
18937    pub fn new() -> Self {
18938        Self::default()
18939    }
18940}
18941#[doc = "Properties of an Azure SQL Database sync agent linked database."]
18942#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
18943pub struct SyncAgentLinkedDatabaseProperties {
18944    #[doc = "Type of the sync agent linked database."]
18945    #[serde(rename = "databaseType", default, skip_serializing_if = "Option::is_none")]
18946    pub database_type: Option<sync_agent_linked_database_properties::DatabaseType>,
18947    #[doc = "Id of the sync agent linked database."]
18948    #[serde(rename = "databaseId", default, skip_serializing_if = "Option::is_none")]
18949    pub database_id: Option<String>,
18950    #[doc = "Description of the sync agent linked database."]
18951    #[serde(default, skip_serializing_if = "Option::is_none")]
18952    pub description: Option<String>,
18953    #[doc = "Server name of the sync agent linked database."]
18954    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
18955    pub server_name: Option<String>,
18956    #[doc = "Database name of the sync agent linked database."]
18957    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
18958    pub database_name: Option<String>,
18959    #[doc = "User name of the sync agent linked database."]
18960    #[serde(rename = "userName", default, skip_serializing_if = "Option::is_none")]
18961    pub user_name: Option<String>,
18962}
18963impl SyncAgentLinkedDatabaseProperties {
18964    pub fn new() -> Self {
18965        Self::default()
18966    }
18967}
18968pub mod sync_agent_linked_database_properties {
18969    use super::*;
18970    #[doc = "Type of the sync agent linked database."]
18971    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18972    #[serde(remote = "DatabaseType")]
18973    pub enum DatabaseType {
18974        AzureSqlDatabase,
18975        SqlServerDatabase,
18976        #[serde(skip_deserializing)]
18977        UnknownValue(String),
18978    }
18979    impl FromStr for DatabaseType {
18980        type Err = value::Error;
18981        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
18982            Self::deserialize(s.into_deserializer())
18983        }
18984    }
18985    impl<'de> Deserialize<'de> for DatabaseType {
18986        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18987        where
18988            D: Deserializer<'de>,
18989        {
18990            let s = String::deserialize(deserializer)?;
18991            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
18992            Ok(deserialized)
18993        }
18994    }
18995    impl Serialize for DatabaseType {
18996        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18997        where
18998            S: Serializer,
18999        {
19000            match self {
19001                Self::AzureSqlDatabase => serializer.serialize_unit_variant("DatabaseType", 0u32, "AzureSqlDatabase"),
19002                Self::SqlServerDatabase => serializer.serialize_unit_variant("DatabaseType", 1u32, "SqlServerDatabase"),
19003                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19004            }
19005        }
19006    }
19007}
19008#[doc = "A list of sync agents."]
19009#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19010pub struct SyncAgentListResult {
19011    #[doc = "Array of results."]
19012    #[serde(
19013        default,
19014        deserialize_with = "azure_core::util::deserialize_null_as_default",
19015        skip_serializing_if = "Vec::is_empty"
19016    )]
19017    pub value: Vec<SyncAgent>,
19018    #[doc = "Link to retrieve next page of results."]
19019    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19020    pub next_link: Option<String>,
19021}
19022impl azure_core::Continuable for SyncAgentListResult {
19023    type Continuation = String;
19024    fn continuation(&self) -> Option<Self::Continuation> {
19025        self.next_link.clone().filter(|value| !value.is_empty())
19026    }
19027}
19028impl SyncAgentListResult {
19029    pub fn new() -> Self {
19030        Self::default()
19031    }
19032}
19033#[doc = "Properties of an Azure SQL Database sync agent."]
19034#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19035pub struct SyncAgentProperties {
19036    #[doc = "Name of the sync agent."]
19037    #[serde(default, skip_serializing_if = "Option::is_none")]
19038    pub name: Option<String>,
19039    #[doc = "ARM resource id of the sync database in the sync agent."]
19040    #[serde(rename = "syncDatabaseId", default, skip_serializing_if = "Option::is_none")]
19041    pub sync_database_id: Option<String>,
19042    #[doc = "Last alive time of the sync agent."]
19043    #[serde(rename = "lastAliveTime", default, with = "azure_core::date::rfc3339::option")]
19044    pub last_alive_time: Option<::time::OffsetDateTime>,
19045    #[doc = "State of the sync agent."]
19046    #[serde(default, skip_serializing_if = "Option::is_none")]
19047    pub state: Option<sync_agent_properties::State>,
19048    #[doc = "If the sync agent version is up to date."]
19049    #[serde(rename = "isUpToDate", default, skip_serializing_if = "Option::is_none")]
19050    pub is_up_to_date: Option<bool>,
19051    #[doc = "Expiration time of the sync agent version."]
19052    #[serde(rename = "expiryTime", default, with = "azure_core::date::rfc3339::option")]
19053    pub expiry_time: Option<::time::OffsetDateTime>,
19054    #[doc = "Version of the sync agent."]
19055    #[serde(default, skip_serializing_if = "Option::is_none")]
19056    pub version: Option<String>,
19057}
19058impl SyncAgentProperties {
19059    pub fn new() -> Self {
19060        Self::default()
19061    }
19062}
19063pub mod sync_agent_properties {
19064    use super::*;
19065    #[doc = "State of the sync agent."]
19066    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19067    #[serde(remote = "State")]
19068    pub enum State {
19069        Online,
19070        Offline,
19071        NeverConnected,
19072        #[serde(skip_deserializing)]
19073        UnknownValue(String),
19074    }
19075    impl FromStr for State {
19076        type Err = value::Error;
19077        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19078            Self::deserialize(s.into_deserializer())
19079        }
19080    }
19081    impl<'de> Deserialize<'de> for State {
19082        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19083        where
19084            D: Deserializer<'de>,
19085        {
19086            let s = String::deserialize(deserializer)?;
19087            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19088            Ok(deserialized)
19089        }
19090    }
19091    impl Serialize for State {
19092        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19093        where
19094            S: Serializer,
19095        {
19096            match self {
19097                Self::Online => serializer.serialize_unit_variant("State", 0u32, "Online"),
19098                Self::Offline => serializer.serialize_unit_variant("State", 1u32, "Offline"),
19099                Self::NeverConnected => serializer.serialize_unit_variant("State", 2u32, "NeverConnected"),
19100                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19101            }
19102        }
19103    }
19104}
19105#[doc = "A list of sync database ID properties."]
19106#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19107pub struct SyncDatabaseIdListResult {
19108    #[doc = "Array of results."]
19109    #[serde(
19110        default,
19111        deserialize_with = "azure_core::util::deserialize_null_as_default",
19112        skip_serializing_if = "Vec::is_empty"
19113    )]
19114    pub value: Vec<SyncDatabaseIdProperties>,
19115    #[doc = "Link to retrieve next page of results."]
19116    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19117    pub next_link: Option<String>,
19118}
19119impl azure_core::Continuable for SyncDatabaseIdListResult {
19120    type Continuation = String;
19121    fn continuation(&self) -> Option<Self::Continuation> {
19122        self.next_link.clone().filter(|value| !value.is_empty())
19123    }
19124}
19125impl SyncDatabaseIdListResult {
19126    pub fn new() -> Self {
19127        Self::default()
19128    }
19129}
19130#[doc = "Properties of the sync database id."]
19131#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19132pub struct SyncDatabaseIdProperties {
19133    #[doc = "ARM resource id of sync database."]
19134    #[serde(default, skip_serializing_if = "Option::is_none")]
19135    pub id: Option<String>,
19136}
19137impl SyncDatabaseIdProperties {
19138    pub fn new() -> Self {
19139        Self::default()
19140    }
19141}
19142#[doc = "Properties of the database full schema."]
19143#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19144pub struct SyncFullSchemaProperties {
19145    #[doc = "List of tables in the database full schema."]
19146    #[serde(
19147        default,
19148        deserialize_with = "azure_core::util::deserialize_null_as_default",
19149        skip_serializing_if = "Vec::is_empty"
19150    )]
19151    pub tables: Vec<SyncFullSchemaTable>,
19152    #[doc = "Last update time of the database schema."]
19153    #[serde(rename = "lastUpdateTime", default, with = "azure_core::date::rfc3339::option")]
19154    pub last_update_time: Option<::time::OffsetDateTime>,
19155}
19156impl SyncFullSchemaProperties {
19157    pub fn new() -> Self {
19158        Self::default()
19159    }
19160}
19161#[doc = "A list of sync schema properties."]
19162#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19163pub struct SyncFullSchemaPropertiesListResult {
19164    #[doc = "Array of results."]
19165    #[serde(
19166        default,
19167        deserialize_with = "azure_core::util::deserialize_null_as_default",
19168        skip_serializing_if = "Vec::is_empty"
19169    )]
19170    pub value: Vec<SyncFullSchemaProperties>,
19171    #[doc = "Link to retrieve next page of results."]
19172    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19173    pub next_link: Option<String>,
19174}
19175impl azure_core::Continuable for SyncFullSchemaPropertiesListResult {
19176    type Continuation = String;
19177    fn continuation(&self) -> Option<Self::Continuation> {
19178        self.next_link.clone().filter(|value| !value.is_empty())
19179    }
19180}
19181impl SyncFullSchemaPropertiesListResult {
19182    pub fn new() -> Self {
19183        Self::default()
19184    }
19185}
19186#[doc = "Properties of the table in the database full schema."]
19187#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19188pub struct SyncFullSchemaTable {
19189    #[doc = "List of columns in the table of database full schema."]
19190    #[serde(
19191        default,
19192        deserialize_with = "azure_core::util::deserialize_null_as_default",
19193        skip_serializing_if = "Vec::is_empty"
19194    )]
19195    pub columns: Vec<SyncFullSchemaTableColumn>,
19196    #[doc = "Error id of the table."]
19197    #[serde(rename = "errorId", default, skip_serializing_if = "Option::is_none")]
19198    pub error_id: Option<String>,
19199    #[doc = "If there is error in the table."]
19200    #[serde(rename = "hasError", default, skip_serializing_if = "Option::is_none")]
19201    pub has_error: Option<bool>,
19202    #[doc = "Name of the table."]
19203    #[serde(default, skip_serializing_if = "Option::is_none")]
19204    pub name: Option<String>,
19205    #[doc = "Quoted name of the table."]
19206    #[serde(rename = "quotedName", default, skip_serializing_if = "Option::is_none")]
19207    pub quoted_name: Option<String>,
19208}
19209impl SyncFullSchemaTable {
19210    pub fn new() -> Self {
19211        Self::default()
19212    }
19213}
19214#[doc = "Properties of the column in the table of database full schema."]
19215#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19216pub struct SyncFullSchemaTableColumn {
19217    #[doc = "Data size of the column."]
19218    #[serde(rename = "dataSize", default, skip_serializing_if = "Option::is_none")]
19219    pub data_size: Option<String>,
19220    #[doc = "Data type of the column."]
19221    #[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
19222    pub data_type: Option<String>,
19223    #[doc = "Error id of the column."]
19224    #[serde(rename = "errorId", default, skip_serializing_if = "Option::is_none")]
19225    pub error_id: Option<String>,
19226    #[doc = "If there is error in the table."]
19227    #[serde(rename = "hasError", default, skip_serializing_if = "Option::is_none")]
19228    pub has_error: Option<bool>,
19229    #[doc = "If it is the primary key of the table."]
19230    #[serde(rename = "isPrimaryKey", default, skip_serializing_if = "Option::is_none")]
19231    pub is_primary_key: Option<bool>,
19232    #[doc = "Name of the column."]
19233    #[serde(default, skip_serializing_if = "Option::is_none")]
19234    pub name: Option<String>,
19235    #[doc = "Quoted name of the column."]
19236    #[serde(rename = "quotedName", default, skip_serializing_if = "Option::is_none")]
19237    pub quoted_name: Option<String>,
19238}
19239impl SyncFullSchemaTableColumn {
19240    pub fn new() -> Self {
19241        Self::default()
19242    }
19243}
19244#[doc = "An Azure SQL Database sync group."]
19245#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19246pub struct SyncGroup {
19247    #[serde(flatten)]
19248    pub proxy_resource: ProxyResource,
19249    #[doc = "An ARM Resource SKU."]
19250    #[serde(default, skip_serializing_if = "Option::is_none")]
19251    pub sku: Option<Sku>,
19252    #[doc = "Properties of a sync group."]
19253    #[serde(default, skip_serializing_if = "Option::is_none")]
19254    pub properties: Option<SyncGroupProperties>,
19255}
19256impl SyncGroup {
19257    pub fn new() -> Self {
19258        Self::default()
19259    }
19260}
19261#[doc = "A list of sync groups."]
19262#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19263pub struct SyncGroupListResult {
19264    #[doc = "Array of results."]
19265    #[serde(
19266        default,
19267        deserialize_with = "azure_core::util::deserialize_null_as_default",
19268        skip_serializing_if = "Vec::is_empty"
19269    )]
19270    pub value: Vec<SyncGroup>,
19271    #[doc = "Link to retrieve next page of results."]
19272    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19273    pub next_link: Option<String>,
19274}
19275impl azure_core::Continuable for SyncGroupListResult {
19276    type Continuation = String;
19277    fn continuation(&self) -> Option<Self::Continuation> {
19278        self.next_link.clone().filter(|value| !value.is_empty())
19279    }
19280}
19281impl SyncGroupListResult {
19282    pub fn new() -> Self {
19283        Self::default()
19284    }
19285}
19286#[doc = "A list of sync group log properties."]
19287#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19288pub struct SyncGroupLogListResult {
19289    #[doc = "Array of results."]
19290    #[serde(
19291        default,
19292        deserialize_with = "azure_core::util::deserialize_null_as_default",
19293        skip_serializing_if = "Vec::is_empty"
19294    )]
19295    pub value: Vec<SyncGroupLogProperties>,
19296    #[doc = "Link to retrieve next page of results."]
19297    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19298    pub next_link: Option<String>,
19299}
19300impl azure_core::Continuable for SyncGroupLogListResult {
19301    type Continuation = String;
19302    fn continuation(&self) -> Option<Self::Continuation> {
19303        self.next_link.clone().filter(|value| !value.is_empty())
19304    }
19305}
19306impl SyncGroupLogListResult {
19307    pub fn new() -> Self {
19308        Self::default()
19309    }
19310}
19311#[doc = "Properties of an Azure SQL Database sync group log."]
19312#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19313pub struct SyncGroupLogProperties {
19314    #[doc = "Timestamp of the sync group log."]
19315    #[serde(default, with = "azure_core::date::rfc3339::option")]
19316    pub timestamp: Option<::time::OffsetDateTime>,
19317    #[doc = "Type of the sync group log."]
19318    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
19319    pub type_: Option<sync_group_log_properties::Type>,
19320    #[doc = "Source of the sync group log."]
19321    #[serde(default, skip_serializing_if = "Option::is_none")]
19322    pub source: Option<String>,
19323    #[doc = "Details of the sync group log."]
19324    #[serde(default, skip_serializing_if = "Option::is_none")]
19325    pub details: Option<String>,
19326    #[doc = "TracingId of the sync group log."]
19327    #[serde(rename = "tracingId", default, skip_serializing_if = "Option::is_none")]
19328    pub tracing_id: Option<String>,
19329    #[doc = "OperationStatus of the sync group log."]
19330    #[serde(rename = "operationStatus", default, skip_serializing_if = "Option::is_none")]
19331    pub operation_status: Option<String>,
19332}
19333impl SyncGroupLogProperties {
19334    pub fn new() -> Self {
19335        Self::default()
19336    }
19337}
19338pub mod sync_group_log_properties {
19339    use super::*;
19340    #[doc = "Type of the sync group log."]
19341    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19342    #[serde(remote = "Type")]
19343    pub enum Type {
19344        All,
19345        Error,
19346        Warning,
19347        Success,
19348        #[serde(skip_deserializing)]
19349        UnknownValue(String),
19350    }
19351    impl FromStr for Type {
19352        type Err = value::Error;
19353        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19354            Self::deserialize(s.into_deserializer())
19355        }
19356    }
19357    impl<'de> Deserialize<'de> for Type {
19358        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19359        where
19360            D: Deserializer<'de>,
19361        {
19362            let s = String::deserialize(deserializer)?;
19363            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19364            Ok(deserialized)
19365        }
19366    }
19367    impl Serialize for Type {
19368        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19369        where
19370            S: Serializer,
19371        {
19372            match self {
19373                Self::All => serializer.serialize_unit_variant("Type", 0u32, "All"),
19374                Self::Error => serializer.serialize_unit_variant("Type", 1u32, "Error"),
19375                Self::Warning => serializer.serialize_unit_variant("Type", 2u32, "Warning"),
19376                Self::Success => serializer.serialize_unit_variant("Type", 3u32, "Success"),
19377                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19378            }
19379        }
19380    }
19381}
19382#[doc = "Properties of a sync group."]
19383#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19384pub struct SyncGroupProperties {
19385    #[doc = "Sync interval of the sync group."]
19386    #[serde(default, skip_serializing_if = "Option::is_none")]
19387    pub interval: Option<i32>,
19388    #[doc = "Last sync time of the sync group."]
19389    #[serde(rename = "lastSyncTime", default, with = "azure_core::date::rfc3339::option")]
19390    pub last_sync_time: Option<::time::OffsetDateTime>,
19391    #[doc = "Conflict resolution policy of the sync group."]
19392    #[serde(rename = "conflictResolutionPolicy", default, skip_serializing_if = "Option::is_none")]
19393    pub conflict_resolution_policy: Option<sync_group_properties::ConflictResolutionPolicy>,
19394    #[doc = "ARM resource id of the sync database in the sync group."]
19395    #[serde(rename = "syncDatabaseId", default, skip_serializing_if = "Option::is_none")]
19396    pub sync_database_id: Option<String>,
19397    #[doc = "User name for the sync group hub database credential."]
19398    #[serde(rename = "hubDatabaseUserName", default, skip_serializing_if = "Option::is_none")]
19399    pub hub_database_user_name: Option<String>,
19400    #[doc = "Password for the sync group hub database credential."]
19401    #[serde(rename = "hubDatabasePassword", default, skip_serializing_if = "Option::is_none")]
19402    pub hub_database_password: Option<String>,
19403    #[doc = "Sync state of the sync group."]
19404    #[serde(rename = "syncState", default, skip_serializing_if = "Option::is_none")]
19405    pub sync_state: Option<sync_group_properties::SyncState>,
19406    #[doc = "Properties of sync group schema."]
19407    #[serde(default, skip_serializing_if = "Option::is_none")]
19408    pub schema: Option<SyncGroupSchema>,
19409    #[doc = "If conflict logging is enabled."]
19410    #[serde(rename = "enableConflictLogging", default, skip_serializing_if = "Option::is_none")]
19411    pub enable_conflict_logging: Option<bool>,
19412    #[doc = "Conflict logging retention period."]
19413    #[serde(rename = "conflictLoggingRetentionInDays", default, skip_serializing_if = "Option::is_none")]
19414    pub conflict_logging_retention_in_days: Option<i32>,
19415    #[doc = "If use private link connection is enabled."]
19416    #[serde(rename = "usePrivateLinkConnection", default, skip_serializing_if = "Option::is_none")]
19417    pub use_private_link_connection: Option<bool>,
19418    #[doc = "Private endpoint name of the sync group if use private link connection is enabled."]
19419    #[serde(rename = "privateEndpointName", default, skip_serializing_if = "Option::is_none")]
19420    pub private_endpoint_name: Option<String>,
19421}
19422impl SyncGroupProperties {
19423    pub fn new() -> Self {
19424        Self::default()
19425    }
19426}
19427pub mod sync_group_properties {
19428    use super::*;
19429    #[doc = "Conflict resolution policy of the sync group."]
19430    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19431    #[serde(remote = "ConflictResolutionPolicy")]
19432    pub enum ConflictResolutionPolicy {
19433        HubWin,
19434        MemberWin,
19435        #[serde(skip_deserializing)]
19436        UnknownValue(String),
19437    }
19438    impl FromStr for ConflictResolutionPolicy {
19439        type Err = value::Error;
19440        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19441            Self::deserialize(s.into_deserializer())
19442        }
19443    }
19444    impl<'de> Deserialize<'de> for ConflictResolutionPolicy {
19445        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19446        where
19447            D: Deserializer<'de>,
19448        {
19449            let s = String::deserialize(deserializer)?;
19450            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19451            Ok(deserialized)
19452        }
19453    }
19454    impl Serialize for ConflictResolutionPolicy {
19455        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19456        where
19457            S: Serializer,
19458        {
19459            match self {
19460                Self::HubWin => serializer.serialize_unit_variant("ConflictResolutionPolicy", 0u32, "HubWin"),
19461                Self::MemberWin => serializer.serialize_unit_variant("ConflictResolutionPolicy", 1u32, "MemberWin"),
19462                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19463            }
19464        }
19465    }
19466    #[doc = "Sync state of the sync group."]
19467    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19468    #[serde(remote = "SyncState")]
19469    pub enum SyncState {
19470        NotReady,
19471        Error,
19472        Warning,
19473        Progressing,
19474        Good,
19475        #[serde(skip_deserializing)]
19476        UnknownValue(String),
19477    }
19478    impl FromStr for SyncState {
19479        type Err = value::Error;
19480        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19481            Self::deserialize(s.into_deserializer())
19482        }
19483    }
19484    impl<'de> Deserialize<'de> for SyncState {
19485        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19486        where
19487            D: Deserializer<'de>,
19488        {
19489            let s = String::deserialize(deserializer)?;
19490            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19491            Ok(deserialized)
19492        }
19493    }
19494    impl Serialize for SyncState {
19495        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19496        where
19497            S: Serializer,
19498        {
19499            match self {
19500                Self::NotReady => serializer.serialize_unit_variant("SyncState", 0u32, "NotReady"),
19501                Self::Error => serializer.serialize_unit_variant("SyncState", 1u32, "Error"),
19502                Self::Warning => serializer.serialize_unit_variant("SyncState", 2u32, "Warning"),
19503                Self::Progressing => serializer.serialize_unit_variant("SyncState", 3u32, "Progressing"),
19504                Self::Good => serializer.serialize_unit_variant("SyncState", 4u32, "Good"),
19505                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19506            }
19507        }
19508    }
19509}
19510#[doc = "Properties of sync group schema."]
19511#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19512pub struct SyncGroupSchema {
19513    #[doc = "List of tables in sync group schema."]
19514    #[serde(
19515        default,
19516        deserialize_with = "azure_core::util::deserialize_null_as_default",
19517        skip_serializing_if = "Vec::is_empty"
19518    )]
19519    pub tables: Vec<SyncGroupSchemaTable>,
19520    #[doc = "Name of master sync member where the schema is from."]
19521    #[serde(rename = "masterSyncMemberName", default, skip_serializing_if = "Option::is_none")]
19522    pub master_sync_member_name: Option<String>,
19523}
19524impl SyncGroupSchema {
19525    pub fn new() -> Self {
19526        Self::default()
19527    }
19528}
19529#[doc = "Properties of table in sync group schema."]
19530#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19531pub struct SyncGroupSchemaTable {
19532    #[doc = "List of columns in sync group schema."]
19533    #[serde(
19534        default,
19535        deserialize_with = "azure_core::util::deserialize_null_as_default",
19536        skip_serializing_if = "Vec::is_empty"
19537    )]
19538    pub columns: Vec<SyncGroupSchemaTableColumn>,
19539    #[doc = "Quoted name of sync group schema table."]
19540    #[serde(rename = "quotedName", default, skip_serializing_if = "Option::is_none")]
19541    pub quoted_name: Option<String>,
19542}
19543impl SyncGroupSchemaTable {
19544    pub fn new() -> Self {
19545        Self::default()
19546    }
19547}
19548#[doc = "Properties of column in sync group table."]
19549#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19550pub struct SyncGroupSchemaTableColumn {
19551    #[doc = "Quoted name of sync group table column."]
19552    #[serde(rename = "quotedName", default, skip_serializing_if = "Option::is_none")]
19553    pub quoted_name: Option<String>,
19554    #[doc = "Data size of the column."]
19555    #[serde(rename = "dataSize", default, skip_serializing_if = "Option::is_none")]
19556    pub data_size: Option<String>,
19557    #[doc = "Data type of the column."]
19558    #[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
19559    pub data_type: Option<String>,
19560}
19561impl SyncGroupSchemaTableColumn {
19562    pub fn new() -> Self {
19563        Self::default()
19564    }
19565}
19566#[doc = "An Azure SQL Database sync member."]
19567#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19568pub struct SyncMember {
19569    #[serde(flatten)]
19570    pub proxy_resource: ProxyResource,
19571    #[doc = "Properties of a sync member."]
19572    #[serde(default, skip_serializing_if = "Option::is_none")]
19573    pub properties: Option<SyncMemberProperties>,
19574}
19575impl SyncMember {
19576    pub fn new() -> Self {
19577        Self::default()
19578    }
19579}
19580#[doc = "A list of Azure SQL Database sync members."]
19581#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19582pub struct SyncMemberListResult {
19583    #[doc = "Array of results."]
19584    #[serde(
19585        default,
19586        deserialize_with = "azure_core::util::deserialize_null_as_default",
19587        skip_serializing_if = "Vec::is_empty"
19588    )]
19589    pub value: Vec<SyncMember>,
19590    #[doc = "Link to retrieve next page of results."]
19591    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19592    pub next_link: Option<String>,
19593}
19594impl azure_core::Continuable for SyncMemberListResult {
19595    type Continuation = String;
19596    fn continuation(&self) -> Option<Self::Continuation> {
19597        self.next_link.clone().filter(|value| !value.is_empty())
19598    }
19599}
19600impl SyncMemberListResult {
19601    pub fn new() -> Self {
19602        Self::default()
19603    }
19604}
19605#[doc = "Properties of a sync member."]
19606#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19607pub struct SyncMemberProperties {
19608    #[doc = "Database type of the sync member."]
19609    #[serde(rename = "databaseType", default, skip_serializing_if = "Option::is_none")]
19610    pub database_type: Option<sync_member_properties::DatabaseType>,
19611    #[doc = "ARM resource id of the sync agent in the sync member."]
19612    #[serde(rename = "syncAgentId", default, skip_serializing_if = "Option::is_none")]
19613    pub sync_agent_id: Option<String>,
19614    #[doc = "SQL Server database id of the sync member."]
19615    #[serde(rename = "sqlServerDatabaseId", default, skip_serializing_if = "Option::is_none")]
19616    pub sql_server_database_id: Option<String>,
19617    #[doc = "ARM resource id of the sync member logical database, for sync members in Azure."]
19618    #[serde(rename = "syncMemberAzureDatabaseResourceId", default, skip_serializing_if = "Option::is_none")]
19619    pub sync_member_azure_database_resource_id: Option<String>,
19620    #[doc = "Whether to use private link connection."]
19621    #[serde(rename = "usePrivateLinkConnection", default, skip_serializing_if = "Option::is_none")]
19622    pub use_private_link_connection: Option<bool>,
19623    #[doc = "Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure."]
19624    #[serde(rename = "privateEndpointName", default, skip_serializing_if = "Option::is_none")]
19625    pub private_endpoint_name: Option<String>,
19626    #[doc = "Server name of the member database in the sync member"]
19627    #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")]
19628    pub server_name: Option<String>,
19629    #[doc = "Database name of the member database in the sync member."]
19630    #[serde(rename = "databaseName", default, skip_serializing_if = "Option::is_none")]
19631    pub database_name: Option<String>,
19632    #[doc = "User name of the member database in the sync member."]
19633    #[serde(rename = "userName", default, skip_serializing_if = "Option::is_none")]
19634    pub user_name: Option<String>,
19635    #[doc = "Password of the member database in the sync member."]
19636    #[serde(default, skip_serializing_if = "Option::is_none")]
19637    pub password: Option<String>,
19638    #[doc = "Sync direction of the sync member."]
19639    #[serde(rename = "syncDirection", default, skip_serializing_if = "Option::is_none")]
19640    pub sync_direction: Option<sync_member_properties::SyncDirection>,
19641    #[doc = "Sync state of the sync member."]
19642    #[serde(rename = "syncState", default, skip_serializing_if = "Option::is_none")]
19643    pub sync_state: Option<sync_member_properties::SyncState>,
19644}
19645impl SyncMemberProperties {
19646    pub fn new() -> Self {
19647        Self::default()
19648    }
19649}
19650pub mod sync_member_properties {
19651    use super::*;
19652    #[doc = "Database type of the sync member."]
19653    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19654    #[serde(remote = "DatabaseType")]
19655    pub enum DatabaseType {
19656        AzureSqlDatabase,
19657        SqlServerDatabase,
19658        #[serde(skip_deserializing)]
19659        UnknownValue(String),
19660    }
19661    impl FromStr for DatabaseType {
19662        type Err = value::Error;
19663        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19664            Self::deserialize(s.into_deserializer())
19665        }
19666    }
19667    impl<'de> Deserialize<'de> for DatabaseType {
19668        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19669        where
19670            D: Deserializer<'de>,
19671        {
19672            let s = String::deserialize(deserializer)?;
19673            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19674            Ok(deserialized)
19675        }
19676    }
19677    impl Serialize for DatabaseType {
19678        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19679        where
19680            S: Serializer,
19681        {
19682            match self {
19683                Self::AzureSqlDatabase => serializer.serialize_unit_variant("DatabaseType", 0u32, "AzureSqlDatabase"),
19684                Self::SqlServerDatabase => serializer.serialize_unit_variant("DatabaseType", 1u32, "SqlServerDatabase"),
19685                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19686            }
19687        }
19688    }
19689    #[doc = "Sync direction of the sync member."]
19690    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19691    #[serde(remote = "SyncDirection")]
19692    pub enum SyncDirection {
19693        Bidirectional,
19694        OneWayMemberToHub,
19695        OneWayHubToMember,
19696        #[serde(skip_deserializing)]
19697        UnknownValue(String),
19698    }
19699    impl FromStr for SyncDirection {
19700        type Err = value::Error;
19701        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19702            Self::deserialize(s.into_deserializer())
19703        }
19704    }
19705    impl<'de> Deserialize<'de> for SyncDirection {
19706        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19707        where
19708            D: Deserializer<'de>,
19709        {
19710            let s = String::deserialize(deserializer)?;
19711            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19712            Ok(deserialized)
19713        }
19714    }
19715    impl Serialize for SyncDirection {
19716        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19717        where
19718            S: Serializer,
19719        {
19720            match self {
19721                Self::Bidirectional => serializer.serialize_unit_variant("SyncDirection", 0u32, "Bidirectional"),
19722                Self::OneWayMemberToHub => serializer.serialize_unit_variant("SyncDirection", 1u32, "OneWayMemberToHub"),
19723                Self::OneWayHubToMember => serializer.serialize_unit_variant("SyncDirection", 2u32, "OneWayHubToMember"),
19724                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19725            }
19726        }
19727    }
19728    #[doc = "Sync state of the sync member."]
19729    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19730    #[serde(remote = "SyncState")]
19731    pub enum SyncState {
19732        SyncInProgress,
19733        SyncSucceeded,
19734        SyncFailed,
19735        DisabledTombstoneCleanup,
19736        DisabledBackupRestore,
19737        SyncSucceededWithWarnings,
19738        SyncCancelling,
19739        SyncCancelled,
19740        UnProvisioned,
19741        Provisioning,
19742        Provisioned,
19743        ProvisionFailed,
19744        DeProvisioning,
19745        DeProvisioned,
19746        DeProvisionFailed,
19747        Reprovisioning,
19748        ReprovisionFailed,
19749        UnReprovisioned,
19750        #[serde(skip_deserializing)]
19751        UnknownValue(String),
19752    }
19753    impl FromStr for SyncState {
19754        type Err = value::Error;
19755        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19756            Self::deserialize(s.into_deserializer())
19757        }
19758    }
19759    impl<'de> Deserialize<'de> for SyncState {
19760        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19761        where
19762            D: Deserializer<'de>,
19763        {
19764            let s = String::deserialize(deserializer)?;
19765            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19766            Ok(deserialized)
19767        }
19768    }
19769    impl Serialize for SyncState {
19770        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19771        where
19772            S: Serializer,
19773        {
19774            match self {
19775                Self::SyncInProgress => serializer.serialize_unit_variant("SyncState", 0u32, "SyncInProgress"),
19776                Self::SyncSucceeded => serializer.serialize_unit_variant("SyncState", 1u32, "SyncSucceeded"),
19777                Self::SyncFailed => serializer.serialize_unit_variant("SyncState", 2u32, "SyncFailed"),
19778                Self::DisabledTombstoneCleanup => serializer.serialize_unit_variant("SyncState", 3u32, "DisabledTombstoneCleanup"),
19779                Self::DisabledBackupRestore => serializer.serialize_unit_variant("SyncState", 4u32, "DisabledBackupRestore"),
19780                Self::SyncSucceededWithWarnings => serializer.serialize_unit_variant("SyncState", 5u32, "SyncSucceededWithWarnings"),
19781                Self::SyncCancelling => serializer.serialize_unit_variant("SyncState", 6u32, "SyncCancelling"),
19782                Self::SyncCancelled => serializer.serialize_unit_variant("SyncState", 7u32, "SyncCancelled"),
19783                Self::UnProvisioned => serializer.serialize_unit_variant("SyncState", 8u32, "UnProvisioned"),
19784                Self::Provisioning => serializer.serialize_unit_variant("SyncState", 9u32, "Provisioning"),
19785                Self::Provisioned => serializer.serialize_unit_variant("SyncState", 10u32, "Provisioned"),
19786                Self::ProvisionFailed => serializer.serialize_unit_variant("SyncState", 11u32, "ProvisionFailed"),
19787                Self::DeProvisioning => serializer.serialize_unit_variant("SyncState", 12u32, "DeProvisioning"),
19788                Self::DeProvisioned => serializer.serialize_unit_variant("SyncState", 13u32, "DeProvisioned"),
19789                Self::DeProvisionFailed => serializer.serialize_unit_variant("SyncState", 14u32, "DeProvisionFailed"),
19790                Self::Reprovisioning => serializer.serialize_unit_variant("SyncState", 15u32, "Reprovisioning"),
19791                Self::ReprovisionFailed => serializer.serialize_unit_variant("SyncState", 16u32, "ReprovisionFailed"),
19792                Self::UnReprovisioned => serializer.serialize_unit_variant("SyncState", 17u32, "UnReprovisioned"),
19793                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19794            }
19795        }
19796    }
19797}
19798#[doc = "A TDE certificate that can be uploaded into a server."]
19799#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19800pub struct TdeCertificate {
19801    #[serde(flatten)]
19802    pub proxy_resource: ProxyResource,
19803    #[doc = "Properties of a TDE certificate."]
19804    #[serde(default, skip_serializing_if = "Option::is_none")]
19805    pub properties: Option<TdeCertificateProperties>,
19806}
19807impl TdeCertificate {
19808    pub fn new() -> Self {
19809        Self::default()
19810    }
19811}
19812#[doc = "Properties of a TDE certificate."]
19813#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19814pub struct TdeCertificateProperties {
19815    #[doc = "The base64 encoded certificate private blob."]
19816    #[serde(rename = "privateBlob")]
19817    pub private_blob: String,
19818    #[doc = "The certificate password."]
19819    #[serde(rename = "certPassword", default, skip_serializing_if = "Option::is_none")]
19820    pub cert_password: Option<String>,
19821}
19822impl TdeCertificateProperties {
19823    pub fn new(private_blob: String) -> Self {
19824        Self {
19825            private_blob,
19826            cert_password: None,
19827        }
19828    }
19829}
19830#[doc = "Time Zone property."]
19831#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19832pub struct TimeZone {
19833    #[serde(flatten)]
19834    pub proxy_resource: ProxyResource,
19835    #[doc = "The properties of a time zone."]
19836    #[serde(default, skip_serializing_if = "Option::is_none")]
19837    pub properties: Option<TimeZoneProperties>,
19838}
19839impl TimeZone {
19840    pub fn new() -> Self {
19841        Self::default()
19842    }
19843}
19844#[doc = "A list of time zones."]
19845#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19846pub struct TimeZoneListResult {
19847    #[doc = "Array of results."]
19848    #[serde(
19849        default,
19850        deserialize_with = "azure_core::util::deserialize_null_as_default",
19851        skip_serializing_if = "Vec::is_empty"
19852    )]
19853    pub value: Vec<TimeZone>,
19854    #[doc = "Link to retrieve next page of results."]
19855    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19856    pub next_link: Option<String>,
19857}
19858impl azure_core::Continuable for TimeZoneListResult {
19859    type Continuation = String;
19860    fn continuation(&self) -> Option<Self::Continuation> {
19861        self.next_link.clone().filter(|value| !value.is_empty())
19862    }
19863}
19864impl TimeZoneListResult {
19865    pub fn new() -> Self {
19866        Self::default()
19867    }
19868}
19869#[doc = "The properties of a time zone."]
19870#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19871pub struct TimeZoneProperties {
19872    #[doc = "The time zone id"]
19873    #[serde(rename = "timeZoneId", default, skip_serializing_if = "Option::is_none")]
19874    pub time_zone_id: Option<String>,
19875    #[doc = "The time zone display name"]
19876    #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
19877    pub display_name: Option<String>,
19878}
19879impl TimeZoneProperties {
19880    pub fn new() -> Self {
19881        Self::default()
19882    }
19883}
19884#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19885pub struct TopQueries {
19886    #[doc = "Requested number of top queries."]
19887    #[serde(rename = "numberOfQueries", default, skip_serializing_if = "Option::is_none")]
19888    pub number_of_queries: Option<i32>,
19889    #[doc = "Aggregation function used to calculate query metrics."]
19890    #[serde(rename = "aggregationFunction", default, skip_serializing_if = "Option::is_none")]
19891    pub aggregation_function: Option<String>,
19892    #[doc = "Metric used to rank queries."]
19893    #[serde(rename = "observationMetric", default, skip_serializing_if = "Option::is_none")]
19894    pub observation_metric: Option<String>,
19895    #[doc = "Interval type (length)."]
19896    #[serde(rename = "intervalType", default, skip_serializing_if = "Option::is_none")]
19897    pub interval_type: Option<top_queries::IntervalType>,
19898    #[doc = "The start time for the metric (ISO-8601 format)."]
19899    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
19900    pub start_time: Option<String>,
19901    #[doc = "The end time for the metric (ISO-8601 format)."]
19902    #[serde(rename = "endTime", default, skip_serializing_if = "Option::is_none")]
19903    pub end_time: Option<String>,
19904    #[doc = "List of top resource consuming queries with appropriate metric data"]
19905    #[serde(
19906        default,
19907        deserialize_with = "azure_core::util::deserialize_null_as_default",
19908        skip_serializing_if = "Vec::is_empty"
19909    )]
19910    pub queries: Vec<QueryStatisticsProperties>,
19911}
19912impl TopQueries {
19913    pub fn new() -> Self {
19914        Self::default()
19915    }
19916}
19917pub mod top_queries {
19918    use super::*;
19919    #[doc = "Interval type (length)."]
19920    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19921    #[serde(remote = "IntervalType")]
19922    pub enum IntervalType {
19923        #[serde(rename = "PT1H")]
19924        Pt1h,
19925        #[serde(rename = "P1D")]
19926        P1d,
19927        #[serde(skip_deserializing)]
19928        UnknownValue(String),
19929    }
19930    impl FromStr for IntervalType {
19931        type Err = value::Error;
19932        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
19933            Self::deserialize(s.into_deserializer())
19934        }
19935    }
19936    impl<'de> Deserialize<'de> for IntervalType {
19937        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19938        where
19939            D: Deserializer<'de>,
19940        {
19941            let s = String::deserialize(deserializer)?;
19942            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
19943            Ok(deserialized)
19944        }
19945    }
19946    impl Serialize for IntervalType {
19947        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19948        where
19949            S: Serializer,
19950        {
19951            match self {
19952                Self::Pt1h => serializer.serialize_unit_variant("IntervalType", 0u32, "PT1H"),
19953                Self::P1d => serializer.serialize_unit_variant("IntervalType", 1u32, "P1D"),
19954                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
19955            }
19956        }
19957    }
19958}
19959#[doc = "A list of top resource consuming queries on managed instance"]
19960#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
19961pub struct TopQueriesListResult {
19962    #[doc = "Array of results."]
19963    #[serde(
19964        default,
19965        deserialize_with = "azure_core::util::deserialize_null_as_default",
19966        skip_serializing_if = "Vec::is_empty"
19967    )]
19968    pub value: Vec<TopQueries>,
19969    #[doc = "Link to retrieve next page of results."]
19970    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
19971    pub next_link: Option<String>,
19972}
19973impl azure_core::Continuable for TopQueriesListResult {
19974    type Continuation = String;
19975    fn continuation(&self) -> Option<Self::Continuation> {
19976        self.next_link.clone().filter(|value| !value.is_empty())
19977    }
19978}
19979impl TopQueriesListResult {
19980    pub fn new() -> Self {
19981        Self::default()
19982    }
19983}
19984#[doc = "ARM tracked top level resource."]
19985#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
19986pub struct TrackedResource {
19987    #[serde(flatten)]
19988    pub resource: Resource,
19989    #[doc = "Resource location."]
19990    pub location: String,
19991    #[doc = "Resource tags."]
19992    #[serde(default, skip_serializing_if = "Option::is_none")]
19993    pub tags: Option<serde_json::Value>,
19994}
19995impl TrackedResource {
19996    pub fn new(location: String) -> Self {
19997        Self {
19998            resource: Resource::default(),
19999            location,
20000            tags: None,
20001        }
20002    }
20003}
20004#[doc = "Properties of a transparent data encryption."]
20005#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20006pub struct TransparentDataEncryptionProperties {
20007    #[doc = "Specifies the state of the transparent data encryption."]
20008    pub state: transparent_data_encryption_properties::State,
20009}
20010impl TransparentDataEncryptionProperties {
20011    pub fn new(state: transparent_data_encryption_properties::State) -> Self {
20012        Self { state }
20013    }
20014}
20015pub mod transparent_data_encryption_properties {
20016    use super::*;
20017    #[doc = "Specifies the state of the transparent data encryption."]
20018    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20019    pub enum State {
20020        Enabled,
20021        Disabled,
20022    }
20023}
20024#[doc = "Contains the information necessary to perform long term retention backup update operation."]
20025#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20026pub struct UpdateLongTermRetentionBackupParameters {
20027    #[doc = "Contains the properties to perform long term retention backup copy operation."]
20028    #[serde(default, skip_serializing_if = "Option::is_none")]
20029    pub properties: Option<UpdateLongTermRetentionBackupParametersProperties>,
20030}
20031impl UpdateLongTermRetentionBackupParameters {
20032    pub fn new() -> Self {
20033        Self::default()
20034    }
20035}
20036#[doc = "Contains the properties to perform long term retention backup copy operation."]
20037#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20038pub struct UpdateLongTermRetentionBackupParametersProperties {
20039    #[doc = "The storage redundancy type of the copied backup"]
20040    #[serde(rename = "requestedBackupStorageRedundancy", default, skip_serializing_if = "Option::is_none")]
20041    pub requested_backup_storage_redundancy:
20042        Option<update_long_term_retention_backup_parameters_properties::RequestedBackupStorageRedundancy>,
20043}
20044impl UpdateLongTermRetentionBackupParametersProperties {
20045    pub fn new() -> Self {
20046        Self::default()
20047    }
20048}
20049pub mod update_long_term_retention_backup_parameters_properties {
20050    use super::*;
20051    #[doc = "The storage redundancy type of the copied backup"]
20052    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20053    #[serde(remote = "RequestedBackupStorageRedundancy")]
20054    pub enum RequestedBackupStorageRedundancy {
20055        Geo,
20056        Local,
20057        Zone,
20058        GeoZone,
20059        #[serde(skip_deserializing)]
20060        UnknownValue(String),
20061    }
20062    impl FromStr for RequestedBackupStorageRedundancy {
20063        type Err = value::Error;
20064        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20065            Self::deserialize(s.into_deserializer())
20066        }
20067    }
20068    impl<'de> Deserialize<'de> for RequestedBackupStorageRedundancy {
20069        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20070        where
20071            D: Deserializer<'de>,
20072        {
20073            let s = String::deserialize(deserializer)?;
20074            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20075            Ok(deserialized)
20076        }
20077    }
20078    impl Serialize for RequestedBackupStorageRedundancy {
20079        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20080        where
20081            S: Serializer,
20082        {
20083            match self {
20084                Self::Geo => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 0u32, "Geo"),
20085                Self::Local => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 1u32, "Local"),
20086                Self::Zone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 2u32, "Zone"),
20087                Self::GeoZone => serializer.serialize_unit_variant("RequestedBackupStorageRedundancy", 3u32, "GeoZone"),
20088                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20089            }
20090        }
20091    }
20092}
20093#[doc = "A refresh DNS servers operation."]
20094#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20095pub struct UpdateVirtualClusterDnsServersOperation {
20096    #[serde(flatten)]
20097    pub proxy_resource: ProxyResource,
20098    #[doc = "The properties of dns servers on virtual cluster."]
20099    #[serde(default, skip_serializing_if = "Option::is_none")]
20100    pub properties: Option<VirtualClusterDnsServersProperties>,
20101}
20102impl UpdateVirtualClusterDnsServersOperation {
20103    pub fn new() -> Self {
20104        Self::default()
20105    }
20106}
20107#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20108pub struct UpsertManagedServerOperationParameters {
20109    #[serde(default, skip_serializing_if = "Option::is_none")]
20110    pub family: Option<String>,
20111    #[serde(default, skip_serializing_if = "Option::is_none")]
20112    pub tier: Option<String>,
20113    #[serde(rename = "vCores", default, skip_serializing_if = "Option::is_none")]
20114    pub v_cores: Option<i32>,
20115    #[serde(rename = "storageSizeInGB", default, skip_serializing_if = "Option::is_none")]
20116    pub storage_size_in_gb: Option<i32>,
20117}
20118impl UpsertManagedServerOperationParameters {
20119    pub fn new() -> Self {
20120        Self::default()
20121    }
20122}
20123#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20124pub struct UpsertManagedServerOperationStepWithEstimatesAndDuration {
20125    #[serde(rename = "stepStartTime", default, with = "azure_core::date::rfc3339::option")]
20126    pub step_start_time: Option<::time::OffsetDateTime>,
20127    #[serde(rename = "stepEndTime", default, with = "azure_core::date::rfc3339::option")]
20128    pub step_end_time: Option<::time::OffsetDateTime>,
20129    #[serde(rename = "timeElapsed", default, skip_serializing_if = "Option::is_none")]
20130    pub time_elapsed: Option<String>,
20131    #[serde(default, skip_serializing_if = "Option::is_none")]
20132    pub order: Option<i32>,
20133    #[serde(default, skip_serializing_if = "Option::is_none")]
20134    pub name: Option<String>,
20135    #[serde(default, skip_serializing_if = "Option::is_none")]
20136    pub status: Option<upsert_managed_server_operation_step_with_estimates_and_duration::Status>,
20137}
20138impl UpsertManagedServerOperationStepWithEstimatesAndDuration {
20139    pub fn new() -> Self {
20140        Self::default()
20141    }
20142}
20143pub mod upsert_managed_server_operation_step_with_estimates_and_duration {
20144    use super::*;
20145    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20146    #[serde(remote = "Status")]
20147    pub enum Status {
20148        NotStarted,
20149        InProgress,
20150        SlowedDown,
20151        Completed,
20152        Failed,
20153        Canceled,
20154        #[serde(skip_deserializing)]
20155        UnknownValue(String),
20156    }
20157    impl FromStr for Status {
20158        type Err = value::Error;
20159        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20160            Self::deserialize(s.into_deserializer())
20161        }
20162    }
20163    impl<'de> Deserialize<'de> for Status {
20164        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20165        where
20166            D: Deserializer<'de>,
20167        {
20168            let s = String::deserialize(deserializer)?;
20169            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20170            Ok(deserialized)
20171        }
20172    }
20173    impl Serialize for Status {
20174        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20175        where
20176            S: Serializer,
20177        {
20178            match self {
20179                Self::NotStarted => serializer.serialize_unit_variant("Status", 0u32, "NotStarted"),
20180                Self::InProgress => serializer.serialize_unit_variant("Status", 1u32, "InProgress"),
20181                Self::SlowedDown => serializer.serialize_unit_variant("Status", 2u32, "SlowedDown"),
20182                Self::Completed => serializer.serialize_unit_variant("Status", 3u32, "Completed"),
20183                Self::Failed => serializer.serialize_unit_variant("Status", 4u32, "Failed"),
20184                Self::Canceled => serializer.serialize_unit_variant("Status", 5u32, "Canceled"),
20185                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20186            }
20187        }
20188    }
20189}
20190#[doc = "ARM usage."]
20191#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20192pub struct Usage {
20193    #[doc = "Resource ID."]
20194    #[serde(default, skip_serializing_if = "Option::is_none")]
20195    pub id: Option<String>,
20196    #[doc = "ARM Usage Name"]
20197    #[serde(default, skip_serializing_if = "Option::is_none")]
20198    pub name: Option<Name>,
20199    #[doc = "Resource type."]
20200    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
20201    pub type_: Option<String>,
20202    #[doc = "Usage unit."]
20203    #[serde(default, skip_serializing_if = "Option::is_none")]
20204    pub unit: Option<String>,
20205    #[doc = "Usage current value."]
20206    #[serde(rename = "currentValue", default, skip_serializing_if = "Option::is_none")]
20207    pub current_value: Option<i32>,
20208    #[doc = "Usage limit."]
20209    #[serde(default, skip_serializing_if = "Option::is_none")]
20210    pub limit: Option<i32>,
20211    #[doc = "Usage requested limit."]
20212    #[serde(rename = "requestedLimit", default, skip_serializing_if = "Option::is_none")]
20213    pub requested_limit: Option<i32>,
20214}
20215impl Usage {
20216    pub fn new() -> Self {
20217        Self::default()
20218    }
20219}
20220#[doc = "A list of usages."]
20221#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20222pub struct UsageListResult {
20223    #[doc = "Array of results."]
20224    #[serde(
20225        default,
20226        deserialize_with = "azure_core::util::deserialize_null_as_default",
20227        skip_serializing_if = "Vec::is_empty"
20228    )]
20229    pub value: Vec<Usage>,
20230    #[doc = "Link to retrieve next page of results."]
20231    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20232    pub next_link: Option<String>,
20233}
20234impl azure_core::Continuable for UsageListResult {
20235    type Continuation = String;
20236    fn continuation(&self) -> Option<Self::Continuation> {
20237        self.next_link.clone().filter(|value| !value.is_empty())
20238    }
20239}
20240impl UsageListResult {
20241    pub fn new() -> Self {
20242        Self::default()
20243    }
20244}
20245#[doc = "Azure Active Directory identity configuration for a resource."]
20246#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20247pub struct UserIdentity {
20248    #[doc = "The Azure Active Directory principal id."]
20249    #[serde(rename = "principalId", default, skip_serializing_if = "Option::is_none")]
20250    pub principal_id: Option<String>,
20251    #[doc = "The Azure Active Directory client id."]
20252    #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")]
20253    pub client_id: Option<String>,
20254}
20255impl UserIdentity {
20256    pub fn new() -> Self {
20257        Self::default()
20258    }
20259}
20260#[doc = "SQL Vulnerability Assessment rule metadata details."]
20261#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20262pub struct VaRule {
20263    #[doc = "SQL Vulnerability Assessment rule Id."]
20264    #[serde(rename = "ruleId", default, skip_serializing_if = "Option::is_none")]
20265    pub rule_id: Option<String>,
20266    #[doc = "SQL Vulnerability Assessment rule severity."]
20267    #[serde(default, skip_serializing_if = "Option::is_none")]
20268    pub severity: Option<va_rule::Severity>,
20269    #[doc = "SQL Vulnerability Assessment rule category."]
20270    #[serde(default, skip_serializing_if = "Option::is_none")]
20271    pub category: Option<String>,
20272    #[doc = "SQL Vulnerability Assessment rule type."]
20273    #[serde(rename = "ruleType", default, skip_serializing_if = "Option::is_none")]
20274    pub rule_type: Option<va_rule::RuleType>,
20275    #[doc = "SQL Vulnerability Assessment rule title."]
20276    #[serde(default, skip_serializing_if = "Option::is_none")]
20277    pub title: Option<String>,
20278    #[doc = "SQL Vulnerability Assessment rule description."]
20279    #[serde(default, skip_serializing_if = "Option::is_none")]
20280    pub description: Option<String>,
20281    #[doc = "SQL Vulnerability Assessment rule rationale."]
20282    #[serde(default, skip_serializing_if = "Option::is_none")]
20283    pub rationale: Option<String>,
20284    #[doc = "SQL Vulnerability Assessment query check object."]
20285    #[serde(rename = "queryCheck", default, skip_serializing_if = "Option::is_none")]
20286    pub query_check: Option<QueryCheck>,
20287    #[doc = "SQL Vulnerability Assessment benchmark references."]
20288    #[serde(
20289        rename = "benchmarkReferences",
20290        default,
20291        deserialize_with = "azure_core::util::deserialize_null_as_default",
20292        skip_serializing_if = "Vec::is_empty"
20293    )]
20294    pub benchmark_references: Vec<BenchmarkReference>,
20295}
20296impl VaRule {
20297    pub fn new() -> Self {
20298        Self::default()
20299    }
20300}
20301pub mod va_rule {
20302    use super::*;
20303    #[doc = "SQL Vulnerability Assessment rule severity."]
20304    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20305    #[serde(remote = "Severity")]
20306    pub enum Severity {
20307        High,
20308        Medium,
20309        Low,
20310        Informational,
20311        Obsolete,
20312        #[serde(skip_deserializing)]
20313        UnknownValue(String),
20314    }
20315    impl FromStr for Severity {
20316        type Err = value::Error;
20317        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20318            Self::deserialize(s.into_deserializer())
20319        }
20320    }
20321    impl<'de> Deserialize<'de> for Severity {
20322        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20323        where
20324            D: Deserializer<'de>,
20325        {
20326            let s = String::deserialize(deserializer)?;
20327            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20328            Ok(deserialized)
20329        }
20330    }
20331    impl Serialize for Severity {
20332        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20333        where
20334            S: Serializer,
20335        {
20336            match self {
20337                Self::High => serializer.serialize_unit_variant("Severity", 0u32, "High"),
20338                Self::Medium => serializer.serialize_unit_variant("Severity", 1u32, "Medium"),
20339                Self::Low => serializer.serialize_unit_variant("Severity", 2u32, "Low"),
20340                Self::Informational => serializer.serialize_unit_variant("Severity", 3u32, "Informational"),
20341                Self::Obsolete => serializer.serialize_unit_variant("Severity", 4u32, "Obsolete"),
20342                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20343            }
20344        }
20345    }
20346    #[doc = "SQL Vulnerability Assessment rule type."]
20347    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20348    #[serde(remote = "RuleType")]
20349    pub enum RuleType {
20350        Binary,
20351        BaselineExpected,
20352        PositiveList,
20353        NegativeList,
20354        #[serde(skip_deserializing)]
20355        UnknownValue(String),
20356    }
20357    impl FromStr for RuleType {
20358        type Err = value::Error;
20359        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20360            Self::deserialize(s.into_deserializer())
20361        }
20362    }
20363    impl<'de> Deserialize<'de> for RuleType {
20364        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20365        where
20366            D: Deserializer<'de>,
20367        {
20368            let s = String::deserialize(deserializer)?;
20369            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20370            Ok(deserialized)
20371        }
20372    }
20373    impl Serialize for RuleType {
20374        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20375        where
20376            S: Serializer,
20377        {
20378            match self {
20379                Self::Binary => serializer.serialize_unit_variant("RuleType", 0u32, "Binary"),
20380                Self::BaselineExpected => serializer.serialize_unit_variant("RuleType", 1u32, "BaselineExpected"),
20381                Self::PositiveList => serializer.serialize_unit_variant("RuleType", 2u32, "PositiveList"),
20382                Self::NegativeList => serializer.serialize_unit_variant("RuleType", 3u32, "NegativeList"),
20383                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20384            }
20385        }
20386    }
20387}
20388#[doc = "An Azure SQL virtual cluster."]
20389#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20390pub struct VirtualCluster {
20391    #[serde(flatten)]
20392    pub tracked_resource: TrackedResource,
20393    #[doc = "The properties of a virtual cluster."]
20394    #[serde(default, skip_serializing_if = "Option::is_none")]
20395    pub properties: Option<VirtualClusterProperties>,
20396}
20397impl VirtualCluster {
20398    pub fn new(tracked_resource: TrackedResource) -> Self {
20399        Self {
20400            tracked_resource,
20401            properties: None,
20402        }
20403    }
20404}
20405#[doc = "The properties of dns servers on virtual cluster."]
20406#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20407pub struct VirtualClusterDnsServersProperties {
20408    #[doc = "The status of the DNS refresh operation."]
20409    #[serde(default, skip_serializing_if = "Option::is_none")]
20410    pub status: Option<virtual_cluster_dns_servers_properties::Status>,
20411}
20412impl VirtualClusterDnsServersProperties {
20413    pub fn new() -> Self {
20414        Self::default()
20415    }
20416}
20417pub mod virtual_cluster_dns_servers_properties {
20418    use super::*;
20419    #[doc = "The status of the DNS refresh operation."]
20420    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20421    #[serde(remote = "Status")]
20422    pub enum Status {
20423        Succeeded,
20424        Failed,
20425        InProgress,
20426        #[serde(skip_deserializing)]
20427        UnknownValue(String),
20428    }
20429    impl FromStr for Status {
20430        type Err = value::Error;
20431        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20432            Self::deserialize(s.into_deserializer())
20433        }
20434    }
20435    impl<'de> Deserialize<'de> for Status {
20436        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20437        where
20438            D: Deserializer<'de>,
20439        {
20440            let s = String::deserialize(deserializer)?;
20441            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20442            Ok(deserialized)
20443        }
20444    }
20445    impl Serialize for Status {
20446        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20447        where
20448            S: Serializer,
20449        {
20450            match self {
20451                Self::Succeeded => serializer.serialize_unit_variant("Status", 0u32, "Succeeded"),
20452                Self::Failed => serializer.serialize_unit_variant("Status", 1u32, "Failed"),
20453                Self::InProgress => serializer.serialize_unit_variant("Status", 2u32, "InProgress"),
20454                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20455            }
20456        }
20457    }
20458}
20459#[doc = "A list of virtual clusters."]
20460#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20461pub struct VirtualClusterListResult {
20462    #[doc = "Array of results."]
20463    #[serde(
20464        default,
20465        deserialize_with = "azure_core::util::deserialize_null_as_default",
20466        skip_serializing_if = "Vec::is_empty"
20467    )]
20468    pub value: Vec<VirtualCluster>,
20469    #[doc = "Link to retrieve next page of results."]
20470    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20471    pub next_link: Option<String>,
20472}
20473impl azure_core::Continuable for VirtualClusterListResult {
20474    type Continuation = String;
20475    fn continuation(&self) -> Option<Self::Continuation> {
20476        self.next_link.clone().filter(|value| !value.is_empty())
20477    }
20478}
20479impl VirtualClusterListResult {
20480    pub fn new() -> Self {
20481        Self::default()
20482    }
20483}
20484#[doc = "The properties of a virtual cluster."]
20485#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20486pub struct VirtualClusterProperties {
20487    #[doc = "Subnet resource ID for the virtual cluster."]
20488    #[serde(rename = "subnetId", default, skip_serializing_if = "Option::is_none")]
20489    pub subnet_id: Option<String>,
20490    #[doc = "Virtual cluster version."]
20491    #[serde(default, skip_serializing_if = "Option::is_none")]
20492    pub version: Option<String>,
20493    #[doc = "List of resources in this virtual cluster."]
20494    #[serde(
20495        rename = "childResources",
20496        default,
20497        deserialize_with = "azure_core::util::deserialize_null_as_default",
20498        skip_serializing_if = "Vec::is_empty"
20499    )]
20500    pub child_resources: Vec<String>,
20501}
20502impl VirtualClusterProperties {
20503    pub fn new() -> Self {
20504        Self::default()
20505    }
20506}
20507#[doc = "An update request for virtual cluster."]
20508#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20509pub struct VirtualClusterUpdate {
20510    #[doc = "The properties of a virtual cluster."]
20511    #[serde(default, skip_serializing_if = "Option::is_none")]
20512    pub properties: Option<VirtualClusterProperties>,
20513    #[doc = "Resource tags."]
20514    #[serde(default, skip_serializing_if = "Option::is_none")]
20515    pub tags: Option<serde_json::Value>,
20516}
20517impl VirtualClusterUpdate {
20518    pub fn new() -> Self {
20519        Self::default()
20520    }
20521}
20522#[doc = "A virtual network rule."]
20523#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20524pub struct VirtualNetworkRule {
20525    #[serde(flatten)]
20526    pub proxy_resource: ProxyResource,
20527    #[doc = "Properties of a virtual network rule."]
20528    #[serde(default, skip_serializing_if = "Option::is_none")]
20529    pub properties: Option<VirtualNetworkRuleProperties>,
20530}
20531impl VirtualNetworkRule {
20532    pub fn new() -> Self {
20533        Self::default()
20534    }
20535}
20536#[doc = "A list of virtual network rules."]
20537#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20538pub struct VirtualNetworkRuleListResult {
20539    #[doc = "Array of results."]
20540    #[serde(
20541        default,
20542        deserialize_with = "azure_core::util::deserialize_null_as_default",
20543        skip_serializing_if = "Vec::is_empty"
20544    )]
20545    pub value: Vec<VirtualNetworkRule>,
20546    #[doc = "Link to retrieve next page of results."]
20547    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20548    pub next_link: Option<String>,
20549}
20550impl azure_core::Continuable for VirtualNetworkRuleListResult {
20551    type Continuation = String;
20552    fn continuation(&self) -> Option<Self::Continuation> {
20553        self.next_link.clone().filter(|value| !value.is_empty())
20554    }
20555}
20556impl VirtualNetworkRuleListResult {
20557    pub fn new() -> Self {
20558        Self::default()
20559    }
20560}
20561#[doc = "Properties of a virtual network rule."]
20562#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20563pub struct VirtualNetworkRuleProperties {
20564    #[doc = "The ARM resource id of the virtual network subnet."]
20565    #[serde(rename = "virtualNetworkSubnetId")]
20566    pub virtual_network_subnet_id: String,
20567    #[doc = "Create firewall rule before the virtual network has vnet service endpoint enabled."]
20568    #[serde(rename = "ignoreMissingVnetServiceEndpoint", default, skip_serializing_if = "Option::is_none")]
20569    pub ignore_missing_vnet_service_endpoint: Option<bool>,
20570    #[doc = "Virtual Network Rule State"]
20571    #[serde(default, skip_serializing_if = "Option::is_none")]
20572    pub state: Option<virtual_network_rule_properties::State>,
20573}
20574impl VirtualNetworkRuleProperties {
20575    pub fn new(virtual_network_subnet_id: String) -> Self {
20576        Self {
20577            virtual_network_subnet_id,
20578            ignore_missing_vnet_service_endpoint: None,
20579            state: None,
20580        }
20581    }
20582}
20583pub mod virtual_network_rule_properties {
20584    use super::*;
20585    #[doc = "Virtual Network Rule State"]
20586    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20587    #[serde(remote = "State")]
20588    pub enum State {
20589        Initializing,
20590        InProgress,
20591        Ready,
20592        Failed,
20593        Deleting,
20594        Unknown,
20595        #[serde(skip_deserializing)]
20596        UnknownValue(String),
20597    }
20598    impl FromStr for State {
20599        type Err = value::Error;
20600        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20601            Self::deserialize(s.into_deserializer())
20602        }
20603    }
20604    impl<'de> Deserialize<'de> for State {
20605        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20606        where
20607            D: Deserializer<'de>,
20608        {
20609            let s = String::deserialize(deserializer)?;
20610            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20611            Ok(deserialized)
20612        }
20613    }
20614    impl Serialize for State {
20615        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20616        where
20617            S: Serializer,
20618        {
20619            match self {
20620                Self::Initializing => serializer.serialize_unit_variant("State", 0u32, "Initializing"),
20621                Self::InProgress => serializer.serialize_unit_variant("State", 1u32, "InProgress"),
20622                Self::Ready => serializer.serialize_unit_variant("State", 2u32, "Ready"),
20623                Self::Failed => serializer.serialize_unit_variant("State", 3u32, "Failed"),
20624                Self::Deleting => serializer.serialize_unit_variant("State", 4u32, "Deleting"),
20625                Self::Unknown => serializer.serialize_unit_variant("State", 5u32, "Unknown"),
20626                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20627            }
20628        }
20629    }
20630}
20631#[doc = "Properties of a Vulnerability Assessment recurring scans."]
20632#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20633pub struct VulnerabilityAssessmentRecurringScansProperties {
20634    #[doc = "Recurring scans state."]
20635    #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
20636    pub is_enabled: Option<bool>,
20637    #[doc = "Specifies that the schedule scan notification will be is sent to the subscription administrators."]
20638    #[serde(rename = "emailSubscriptionAdmins", default, skip_serializing_if = "Option::is_none")]
20639    pub email_subscription_admins: Option<bool>,
20640    #[doc = "Specifies an array of e-mail addresses to which the scan notification is sent."]
20641    #[serde(
20642        default,
20643        deserialize_with = "azure_core::util::deserialize_null_as_default",
20644        skip_serializing_if = "Vec::is_empty"
20645    )]
20646    pub emails: Vec<String>,
20647}
20648impl VulnerabilityAssessmentRecurringScansProperties {
20649    pub fn new() -> Self {
20650        Self::default()
20651    }
20652}
20653#[doc = "Properties of a vulnerability assessment scan error."]
20654#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20655pub struct VulnerabilityAssessmentScanError {
20656    #[doc = "The error code."]
20657    #[serde(default, skip_serializing_if = "Option::is_none")]
20658    pub code: Option<String>,
20659    #[doc = "The error message."]
20660    #[serde(default, skip_serializing_if = "Option::is_none")]
20661    pub message: Option<String>,
20662}
20663impl VulnerabilityAssessmentScanError {
20664    pub fn new() -> Self {
20665        Self::default()
20666    }
20667}
20668#[doc = "A vulnerability assessment scan record."]
20669#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20670pub struct VulnerabilityAssessmentScanRecord {
20671    #[serde(flatten)]
20672    pub proxy_resource: ProxyResource,
20673    #[doc = "Properties of a vulnerability assessment scan record."]
20674    #[serde(default, skip_serializing_if = "Option::is_none")]
20675    pub properties: Option<VulnerabilityAssessmentScanRecordProperties>,
20676}
20677impl VulnerabilityAssessmentScanRecord {
20678    pub fn new() -> Self {
20679        Self::default()
20680    }
20681}
20682#[doc = "A list of vulnerability assessment scan records."]
20683#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20684pub struct VulnerabilityAssessmentScanRecordListResult {
20685    #[doc = "Array of results."]
20686    #[serde(
20687        default,
20688        deserialize_with = "azure_core::util::deserialize_null_as_default",
20689        skip_serializing_if = "Vec::is_empty"
20690    )]
20691    pub value: Vec<VulnerabilityAssessmentScanRecord>,
20692    #[doc = "Link to retrieve next page of results."]
20693    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20694    pub next_link: Option<String>,
20695}
20696impl azure_core::Continuable for VulnerabilityAssessmentScanRecordListResult {
20697    type Continuation = String;
20698    fn continuation(&self) -> Option<Self::Continuation> {
20699        self.next_link.clone().filter(|value| !value.is_empty())
20700    }
20701}
20702impl VulnerabilityAssessmentScanRecordListResult {
20703    pub fn new() -> Self {
20704        Self::default()
20705    }
20706}
20707#[doc = "Properties of a vulnerability assessment scan record."]
20708#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20709pub struct VulnerabilityAssessmentScanRecordProperties {
20710    #[doc = "The scan ID."]
20711    #[serde(rename = "scanId", default, skip_serializing_if = "Option::is_none")]
20712    pub scan_id: Option<String>,
20713    #[doc = "The scan trigger type."]
20714    #[serde(rename = "triggerType", default, skip_serializing_if = "Option::is_none")]
20715    pub trigger_type: Option<vulnerability_assessment_scan_record_properties::TriggerType>,
20716    #[doc = "The scan status."]
20717    #[serde(default, skip_serializing_if = "Option::is_none")]
20718    pub state: Option<vulnerability_assessment_scan_record_properties::State>,
20719    #[doc = "The scan start time (UTC)."]
20720    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
20721    pub start_time: Option<::time::OffsetDateTime>,
20722    #[doc = "The scan end time (UTC)."]
20723    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
20724    pub end_time: Option<::time::OffsetDateTime>,
20725    #[doc = "The scan errors."]
20726    #[serde(
20727        default,
20728        deserialize_with = "azure_core::util::deserialize_null_as_default",
20729        skip_serializing_if = "Vec::is_empty"
20730    )]
20731    pub errors: Vec<VulnerabilityAssessmentScanError>,
20732    #[doc = "The scan results storage container path."]
20733    #[serde(rename = "storageContainerPath", default, skip_serializing_if = "Option::is_none")]
20734    pub storage_container_path: Option<String>,
20735    #[doc = "The number of failed security checks."]
20736    #[serde(rename = "numberOfFailedSecurityChecks", default, skip_serializing_if = "Option::is_none")]
20737    pub number_of_failed_security_checks: Option<i32>,
20738}
20739impl VulnerabilityAssessmentScanRecordProperties {
20740    pub fn new() -> Self {
20741        Self::default()
20742    }
20743}
20744pub mod vulnerability_assessment_scan_record_properties {
20745    use super::*;
20746    #[doc = "The scan trigger type."]
20747    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20748    #[serde(remote = "TriggerType")]
20749    pub enum TriggerType {
20750        OnDemand,
20751        Recurring,
20752        #[serde(skip_deserializing)]
20753        UnknownValue(String),
20754    }
20755    impl FromStr for TriggerType {
20756        type Err = value::Error;
20757        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20758            Self::deserialize(s.into_deserializer())
20759        }
20760    }
20761    impl<'de> Deserialize<'de> for TriggerType {
20762        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20763        where
20764            D: Deserializer<'de>,
20765        {
20766            let s = String::deserialize(deserializer)?;
20767            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20768            Ok(deserialized)
20769        }
20770    }
20771    impl Serialize for TriggerType {
20772        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20773        where
20774            S: Serializer,
20775        {
20776            match self {
20777                Self::OnDemand => serializer.serialize_unit_variant("TriggerType", 0u32, "OnDemand"),
20778                Self::Recurring => serializer.serialize_unit_variant("TriggerType", 1u32, "Recurring"),
20779                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20780            }
20781        }
20782    }
20783    #[doc = "The scan status."]
20784    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20785    #[serde(remote = "State")]
20786    pub enum State {
20787        Passed,
20788        Failed,
20789        FailedToRun,
20790        InProgress,
20791        #[serde(skip_deserializing)]
20792        UnknownValue(String),
20793    }
20794    impl FromStr for State {
20795        type Err = value::Error;
20796        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
20797            Self::deserialize(s.into_deserializer())
20798        }
20799    }
20800    impl<'de> Deserialize<'de> for State {
20801        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20802        where
20803            D: Deserializer<'de>,
20804        {
20805            let s = String::deserialize(deserializer)?;
20806            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
20807            Ok(deserialized)
20808        }
20809    }
20810    impl Serialize for State {
20811        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20812        where
20813            S: Serializer,
20814        {
20815            match self {
20816                Self::Passed => serializer.serialize_unit_variant("State", 0u32, "Passed"),
20817                Self::Failed => serializer.serialize_unit_variant("State", 1u32, "Failed"),
20818                Self::FailedToRun => serializer.serialize_unit_variant("State", 2u32, "FailedToRun"),
20819                Self::InProgress => serializer.serialize_unit_variant("State", 3u32, "InProgress"),
20820                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
20821            }
20822        }
20823    }
20824}
20825#[doc = "Workload classifier operations for a data warehouse"]
20826#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20827pub struct WorkloadClassifier {
20828    #[serde(flatten)]
20829    pub proxy_resource: ProxyResource,
20830    #[doc = "Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV)."]
20831    #[serde(default, skip_serializing_if = "Option::is_none")]
20832    pub properties: Option<WorkloadClassifierProperties>,
20833}
20834impl WorkloadClassifier {
20835    pub fn new() -> Self {
20836        Self::default()
20837    }
20838}
20839#[doc = "A list of workload classifiers for a workload group."]
20840#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20841pub struct WorkloadClassifierListResult {
20842    #[doc = "Array of results."]
20843    #[serde(
20844        default,
20845        deserialize_with = "azure_core::util::deserialize_null_as_default",
20846        skip_serializing_if = "Vec::is_empty"
20847    )]
20848    pub value: Vec<WorkloadClassifier>,
20849    #[doc = "Link to retrieve next page of results."]
20850    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20851    pub next_link: Option<String>,
20852}
20853impl azure_core::Continuable for WorkloadClassifierListResult {
20854    type Continuation = String;
20855    fn continuation(&self) -> Option<Self::Continuation> {
20856        self.next_link.clone().filter(|value| !value.is_empty())
20857    }
20858}
20859impl WorkloadClassifierListResult {
20860    pub fn new() -> Self {
20861        Self::default()
20862    }
20863}
20864#[doc = "Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV)."]
20865#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20866pub struct WorkloadClassifierProperties {
20867    #[doc = "The workload classifier member name."]
20868    #[serde(rename = "memberName")]
20869    pub member_name: String,
20870    #[doc = "The workload classifier label."]
20871    #[serde(default, skip_serializing_if = "Option::is_none")]
20872    pub label: Option<String>,
20873    #[doc = "The workload classifier context."]
20874    #[serde(default, skip_serializing_if = "Option::is_none")]
20875    pub context: Option<String>,
20876    #[doc = "The workload classifier start time for classification."]
20877    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
20878    pub start_time: Option<String>,
20879    #[doc = "The workload classifier end time for classification."]
20880    #[serde(rename = "endTime", default, skip_serializing_if = "Option::is_none")]
20881    pub end_time: Option<String>,
20882    #[doc = "The workload classifier importance."]
20883    #[serde(default, skip_serializing_if = "Option::is_none")]
20884    pub importance: Option<String>,
20885}
20886impl WorkloadClassifierProperties {
20887    pub fn new(member_name: String) -> Self {
20888        Self {
20889            member_name,
20890            label: None,
20891            context: None,
20892            start_time: None,
20893            end_time: None,
20894            importance: None,
20895        }
20896    }
20897}
20898#[doc = "Workload group operations for a data warehouse"]
20899#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20900pub struct WorkloadGroup {
20901    #[serde(flatten)]
20902    pub proxy_resource: ProxyResource,
20903    #[doc = "Workload group definition. For more information look at sys.workload_management_workload_groups (DMV)."]
20904    #[serde(default, skip_serializing_if = "Option::is_none")]
20905    pub properties: Option<WorkloadGroupProperties>,
20906}
20907impl WorkloadGroup {
20908    pub fn new() -> Self {
20909        Self::default()
20910    }
20911}
20912#[doc = "A list of workload groups."]
20913#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20914pub struct WorkloadGroupListResult {
20915    #[doc = "Array of results."]
20916    #[serde(
20917        default,
20918        deserialize_with = "azure_core::util::deserialize_null_as_default",
20919        skip_serializing_if = "Vec::is_empty"
20920    )]
20921    pub value: Vec<WorkloadGroup>,
20922    #[doc = "Link to retrieve next page of results."]
20923    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
20924    pub next_link: Option<String>,
20925}
20926impl azure_core::Continuable for WorkloadGroupListResult {
20927    type Continuation = String;
20928    fn continuation(&self) -> Option<Self::Continuation> {
20929        self.next_link.clone().filter(|value| !value.is_empty())
20930    }
20931}
20932impl WorkloadGroupListResult {
20933    pub fn new() -> Self {
20934        Self::default()
20935    }
20936}
20937#[doc = "Workload group definition. For more information look at sys.workload_management_workload_groups (DMV)."]
20938#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20939pub struct WorkloadGroupProperties {
20940    #[doc = "The workload group minimum percentage resource."]
20941    #[serde(rename = "minResourcePercent")]
20942    pub min_resource_percent: i32,
20943    #[doc = "The workload group cap percentage resource."]
20944    #[serde(rename = "maxResourcePercent")]
20945    pub max_resource_percent: i32,
20946    #[doc = "The workload group request minimum grant percentage."]
20947    #[serde(rename = "minResourcePercentPerRequest")]
20948    pub min_resource_percent_per_request: f64,
20949    #[doc = "The workload group request maximum grant percentage."]
20950    #[serde(rename = "maxResourcePercentPerRequest", default, skip_serializing_if = "Option::is_none")]
20951    pub max_resource_percent_per_request: Option<f64>,
20952    #[doc = "The workload group importance level."]
20953    #[serde(default, skip_serializing_if = "Option::is_none")]
20954    pub importance: Option<String>,
20955    #[doc = "The workload group query execution timeout."]
20956    #[serde(rename = "queryExecutionTimeout", default, skip_serializing_if = "Option::is_none")]
20957    pub query_execution_timeout: Option<i32>,
20958}
20959impl WorkloadGroupProperties {
20960    pub fn new(min_resource_percent: i32, max_resource_percent: i32, min_resource_percent_per_request: f64) -> Self {
20961        Self {
20962            min_resource_percent,
20963            max_resource_percent,
20964            min_resource_percent_per_request,
20965            max_resource_percent_per_request: None,
20966            importance: None,
20967            query_execution_timeout: None,
20968        }
20969    }
20970}
20971#[doc = "The zone pinning capability"]
20972#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
20973pub struct ZonePinningCapability {
20974    #[doc = "Name of the availability zone"]
20975    #[serde(rename = "availabilityZone", default, skip_serializing_if = "Option::is_none")]
20976    pub availability_zone: Option<String>,
20977    #[doc = "The status of the capability."]
20978    #[serde(default, skip_serializing_if = "Option::is_none")]
20979    pub status: Option<zone_pinning_capability::Status>,
20980    #[doc = "The reason for the capability not being available."]
20981    #[serde(default, skip_serializing_if = "Option::is_none")]
20982    pub reason: Option<String>,
20983}
20984impl ZonePinningCapability {
20985    pub fn new() -> Self {
20986        Self::default()
20987    }
20988}
20989pub mod zone_pinning_capability {
20990    use super::*;
20991    #[doc = "The status of the capability."]
20992    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20993    pub enum Status {
20994        Visible,
20995        Available,
20996        Default,
20997        Disabled,
20998    }
20999}
21000#[doc = "Metadata pertaining to creation and last modification of the resource."]
21001#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
21002pub struct SystemData {
21003    #[doc = "The identity that created the resource."]
21004    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
21005    pub created_by: Option<String>,
21006    #[doc = "The type of identity that created the resource."]
21007    #[serde(rename = "createdByType", default, skip_serializing_if = "Option::is_none")]
21008    pub created_by_type: Option<system_data::CreatedByType>,
21009    #[doc = "The timestamp of resource creation (UTC)."]
21010    #[serde(rename = "createdAt", default, with = "azure_core::date::rfc3339::option")]
21011    pub created_at: Option<::time::OffsetDateTime>,
21012    #[doc = "The identity that last modified the resource."]
21013    #[serde(rename = "lastModifiedBy", default, skip_serializing_if = "Option::is_none")]
21014    pub last_modified_by: Option<String>,
21015    #[doc = "The type of identity that last modified the resource."]
21016    #[serde(rename = "lastModifiedByType", default, skip_serializing_if = "Option::is_none")]
21017    pub last_modified_by_type: Option<system_data::LastModifiedByType>,
21018    #[doc = "The timestamp of resource last modification (UTC)"]
21019    #[serde(rename = "lastModifiedAt", default, with = "azure_core::date::rfc3339::option")]
21020    pub last_modified_at: Option<::time::OffsetDateTime>,
21021}
21022impl SystemData {
21023    pub fn new() -> Self {
21024        Self::default()
21025    }
21026}
21027pub mod system_data {
21028    use super::*;
21029    #[doc = "The type of identity that created the resource."]
21030    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
21031    #[serde(remote = "CreatedByType")]
21032    pub enum CreatedByType {
21033        User,
21034        Application,
21035        ManagedIdentity,
21036        Key,
21037        #[serde(skip_deserializing)]
21038        UnknownValue(String),
21039    }
21040    impl FromStr for CreatedByType {
21041        type Err = value::Error;
21042        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
21043            Self::deserialize(s.into_deserializer())
21044        }
21045    }
21046    impl<'de> Deserialize<'de> for CreatedByType {
21047        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21048        where
21049            D: Deserializer<'de>,
21050        {
21051            let s = String::deserialize(deserializer)?;
21052            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
21053            Ok(deserialized)
21054        }
21055    }
21056    impl Serialize for CreatedByType {
21057        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21058        where
21059            S: Serializer,
21060        {
21061            match self {
21062                Self::User => serializer.serialize_unit_variant("CreatedByType", 0u32, "User"),
21063                Self::Application => serializer.serialize_unit_variant("CreatedByType", 1u32, "Application"),
21064                Self::ManagedIdentity => serializer.serialize_unit_variant("CreatedByType", 2u32, "ManagedIdentity"),
21065                Self::Key => serializer.serialize_unit_variant("CreatedByType", 3u32, "Key"),
21066                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
21067            }
21068        }
21069    }
21070    #[doc = "The type of identity that last modified the resource."]
21071    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
21072    #[serde(remote = "LastModifiedByType")]
21073    pub enum LastModifiedByType {
21074        User,
21075        Application,
21076        ManagedIdentity,
21077        Key,
21078        #[serde(skip_deserializing)]
21079        UnknownValue(String),
21080    }
21081    impl FromStr for LastModifiedByType {
21082        type Err = value::Error;
21083        fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
21084            Self::deserialize(s.into_deserializer())
21085        }
21086    }
21087    impl<'de> Deserialize<'de> for LastModifiedByType {
21088        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21089        where
21090            D: Deserializer<'de>,
21091        {
21092            let s = String::deserialize(deserializer)?;
21093            let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
21094            Ok(deserialized)
21095        }
21096    }
21097    impl Serialize for LastModifiedByType {
21098        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21099        where
21100            S: Serializer,
21101        {
21102            match self {
21103                Self::User => serializer.serialize_unit_variant("LastModifiedByType", 0u32, "User"),
21104                Self::Application => serializer.serialize_unit_variant("LastModifiedByType", 1u32, "Application"),
21105                Self::ManagedIdentity => serializer.serialize_unit_variant("LastModifiedByType", 2u32, "ManagedIdentity"),
21106                Self::Key => serializer.serialize_unit_variant("LastModifiedByType", 3u32, "Key"),
21107                Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
21108            }
21109        }
21110    }
21111}