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 = "Describes an Azure resource with kind"]
7#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
8pub struct AadConnectivityState {
9 #[serde(rename = "connectivityState", default, skip_serializing_if = "Option::is_none")]
10 pub connectivity_state: Option<aad_connectivity_state::ConnectivityState>,
11}
12impl AadConnectivityState {
13 pub fn new() -> Self {
14 Self::default()
15 }
16}
17pub mod aad_connectivity_state {
18 use super::*;
19 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20 #[serde(remote = "ConnectivityState")]
21 pub enum ConnectivityState {
22 Discovered,
23 NotLicensed,
24 Connected,
25 #[serde(skip_deserializing)]
26 UnknownValue(String),
27 }
28 impl FromStr for ConnectivityState {
29 type Err = value::Error;
30 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
31 Self::deserialize(s.into_deserializer())
32 }
33 }
34 impl<'de> Deserialize<'de> for ConnectivityState {
35 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36 where
37 D: Deserializer<'de>,
38 {
39 let s = String::deserialize(deserializer)?;
40 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
41 Ok(deserialized)
42 }
43 }
44 impl Serialize for ConnectivityState {
45 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46 where
47 S: Serializer,
48 {
49 match self {
50 Self::Discovered => serializer.serialize_unit_variant("ConnectivityState", 0u32, "Discovered"),
51 Self::NotLicensed => serializer.serialize_unit_variant("ConnectivityState", 1u32, "NotLicensed"),
52 Self::Connected => serializer.serialize_unit_variant("ConnectivityState", 2u32, "Connected"),
53 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
54 }
55 }
56 }
57}
58#[doc = "Represents an AAD identity protection solution which sends logs to an OMS workspace."]
59#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
60pub struct AadExternalSecuritySolution {
61 #[serde(flatten)]
62 pub external_security_solution: ExternalSecuritySolution,
63 #[serde(default, skip_serializing_if = "Option::is_none")]
64 pub properties: Option<AadSolutionProperties>,
65}
66impl AadExternalSecuritySolution {
67 pub fn new() -> Self {
68 Self::default()
69 }
70}
71#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
72pub struct AadSolutionProperties {
73 #[serde(flatten)]
74 pub external_security_solution_properties: ExternalSecuritySolutionProperties,
75 #[serde(flatten)]
76 pub aad_connectivity_state: AadConnectivityState,
77}
78impl AadSolutionProperties {
79 pub fn new() -> Self {
80 Self::default()
81 }
82}
83#[doc = "Number of active connections is not in allowed range."]
84#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
85pub struct ActiveConnectionsNotInAllowedRange {
86 #[serde(flatten)]
87 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
88}
89impl ActiveConnectionsNotInAllowedRange {
90 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
91 Self {
92 time_window_custom_alert_rule,
93 }
94 }
95}
96#[doc = "Sub-assessment resource type"]
97#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
98#[serde(tag = "assessedResourceType")]
99pub enum AdditionalDataUnion {
100 ContainerRegistryVulnerability(ContainerRegistryVulnerabilityProperties),
101 ServerVulnerabilityAssessment(ServerVulnerabilityProperties),
102 SqlServerVulnerability(SqlServerVulnerabilityProperties),
103}
104#[doc = "The Advanced Threat Protection settings."]
105#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
106pub struct AdvancedThreatProtectionProperties {
107 #[doc = "Indicates whether Advanced Threat Protection is enabled."]
108 #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
109 pub is_enabled: Option<bool>,
110}
111impl AdvancedThreatProtectionProperties {
112 pub fn new() -> Self {
113 Self::default()
114 }
115}
116#[doc = "The Advanced Threat Protection resource."]
117#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
118pub struct AdvancedThreatProtectionSetting {
119 #[serde(flatten)]
120 pub resource: Resource,
121 #[doc = "The Advanced Threat Protection settings."]
122 #[serde(default, skip_serializing_if = "Option::is_none")]
123 pub properties: Option<AdvancedThreatProtectionProperties>,
124}
125impl AdvancedThreatProtectionSetting {
126 pub fn new() -> Self {
127 Self::default()
128 }
129}
130#[doc = "Security alert"]
131#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
132pub struct Alert {
133 #[serde(flatten)]
134 pub resource: Resource,
135 #[doc = "describes security alert properties."]
136 #[serde(default, skip_serializing_if = "Option::is_none")]
137 pub properties: Option<AlertProperties>,
138}
139impl Alert {
140 pub fn new() -> Self {
141 Self::default()
142 }
143}
144#[doc = "Factors that increase our confidence that the alert is a true positive"]
145#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
146pub struct AlertConfidenceReason {
147 #[doc = "Type of confidence factor"]
148 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
149 pub type_: Option<String>,
150 #[doc = "description of the confidence reason"]
151 #[serde(default, skip_serializing_if = "Option::is_none")]
152 pub reason: Option<String>,
153}
154impl AlertConfidenceReason {
155 pub fn new() -> Self {
156 Self::default()
157 }
158}
159#[doc = "Changing set of properties depending on the entity type."]
160#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
161pub struct AlertEntity {
162 #[doc = "Type of entity"]
163 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
164 pub type_: Option<String>,
165}
166impl AlertEntity {
167 pub fn new() -> Self {
168 Self::default()
169 }
170}
171#[doc = "Changing set of properties depending on the alert type."]
172#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
173pub struct AlertExtendedProperties {}
174impl AlertExtendedProperties {
175 pub fn new() -> Self {
176 Self::default()
177 }
178}
179#[doc = "List of security alerts"]
180#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
181pub struct AlertList {
182 #[serde(
183 default,
184 deserialize_with = "azure_core::util::deserialize_null_as_default",
185 skip_serializing_if = "Vec::is_empty"
186 )]
187 pub value: Vec<Alert>,
188 #[doc = "The URI to fetch the next page."]
189 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
190 pub next_link: Option<String>,
191}
192impl azure_core::Continuable for AlertList {
193 type Continuation = String;
194 fn continuation(&self) -> Option<Self::Continuation> {
195 self.next_link.clone().filter(|value| !value.is_empty())
196 }
197}
198impl AlertList {
199 pub fn new() -> Self {
200 Self::default()
201 }
202}
203#[doc = "describes security alert properties."]
204#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
205pub struct AlertProperties {
206 #[doc = "State of the alert (Active, Dismissed etc.)"]
207 #[serde(default, skip_serializing_if = "Option::is_none")]
208 pub state: Option<String>,
209 #[doc = "The time the incident was reported to Microsoft.Security in UTC"]
210 #[serde(rename = "reportedTimeUtc", default, with = "azure_core::date::rfc3339::option")]
211 pub reported_time_utc: Option<::time::OffsetDateTime>,
212 #[doc = "Name of the vendor that discovered the incident"]
213 #[serde(rename = "vendorName", default, skip_serializing_if = "Option::is_none")]
214 pub vendor_name: Option<String>,
215 #[doc = "Name of the alert type"]
216 #[serde(rename = "alertName", default, skip_serializing_if = "Option::is_none")]
217 pub alert_name: Option<String>,
218 #[doc = "Display name of the alert type"]
219 #[serde(rename = "alertDisplayName", default, skip_serializing_if = "Option::is_none")]
220 pub alert_display_name: Option<String>,
221 #[doc = "The time the incident was detected by the vendor"]
222 #[serde(rename = "detectedTimeUtc", default, with = "azure_core::date::rfc3339::option")]
223 pub detected_time_utc: Option<::time::OffsetDateTime>,
224 #[doc = "Description of the incident and what it means"]
225 #[serde(default, skip_serializing_if = "Option::is_none")]
226 pub description: Option<String>,
227 #[doc = "Recommended steps to reradiate the incident"]
228 #[serde(rename = "remediationSteps", default, skip_serializing_if = "Option::is_none")]
229 pub remediation_steps: Option<String>,
230 #[doc = "The action that was taken as a response to the alert (Active, Blocked etc.)"]
231 #[serde(rename = "actionTaken", default, skip_serializing_if = "Option::is_none")]
232 pub action_taken: Option<String>,
233 #[doc = "Estimated severity of this alert"]
234 #[serde(rename = "reportedSeverity", default, skip_serializing_if = "Option::is_none")]
235 pub reported_severity: Option<alert_properties::ReportedSeverity>,
236 #[doc = "The entity that the incident happened on"]
237 #[serde(rename = "compromisedEntity", default, skip_serializing_if = "Option::is_none")]
238 pub compromised_entity: Option<String>,
239 #[doc = "Azure resource ID of the associated resource"]
240 #[serde(rename = "associatedResource", default, skip_serializing_if = "Option::is_none")]
241 pub associated_resource: Option<String>,
242 #[doc = "Changing set of properties depending on the alert type."]
243 #[serde(rename = "extendedProperties", default, skip_serializing_if = "Option::is_none")]
244 pub extended_properties: Option<AlertExtendedProperties>,
245 #[doc = "The type of the alerted resource (Azure, Non-Azure)"]
246 #[serde(rename = "systemSource", default, skip_serializing_if = "Option::is_none")]
247 pub system_source: Option<String>,
248 #[doc = "Whether this alert can be investigated with Azure Security Center"]
249 #[serde(rename = "canBeInvestigated", default, skip_serializing_if = "Option::is_none")]
250 pub can_be_investigated: Option<bool>,
251 #[doc = "Whether this alert is for incident type or not (otherwise - single alert)"]
252 #[serde(rename = "isIncident", default, skip_serializing_if = "Option::is_none")]
253 pub is_incident: Option<bool>,
254 #[doc = "objects that are related to this alerts"]
255 #[serde(
256 default,
257 deserialize_with = "azure_core::util::deserialize_null_as_default",
258 skip_serializing_if = "Vec::is_empty"
259 )]
260 pub entities: Vec<AlertEntity>,
261 #[doc = "level of confidence we have on the alert"]
262 #[serde(rename = "confidenceScore", default, skip_serializing_if = "Option::is_none")]
263 pub confidence_score: Option<f32>,
264 #[doc = "reasons the alert got the confidenceScore value"]
265 #[serde(
266 rename = "confidenceReasons",
267 default,
268 deserialize_with = "azure_core::util::deserialize_null_as_default",
269 skip_serializing_if = "Vec::is_empty"
270 )]
271 pub confidence_reasons: Vec<AlertConfidenceReason>,
272 #[doc = "Azure subscription ID of the resource that had the security alert or the subscription ID of the workspace that this resource reports to"]
273 #[serde(rename = "subscriptionId", default, skip_serializing_if = "Option::is_none")]
274 pub subscription_id: Option<String>,
275 #[doc = "Instance ID of the alert."]
276 #[serde(rename = "instanceId", default, skip_serializing_if = "Option::is_none")]
277 pub instance_id: Option<String>,
278 #[doc = "Azure resource ID of the workspace that the alert was reported to."]
279 #[serde(rename = "workspaceArmId", default, skip_serializing_if = "Option::is_none")]
280 pub workspace_arm_id: Option<String>,
281 #[doc = "Alerts with the same CorrelationKey will be grouped together in Ibiza."]
282 #[serde(rename = "correlationKey", default, skip_serializing_if = "Option::is_none")]
283 pub correlation_key: Option<String>,
284}
285impl AlertProperties {
286 pub fn new() -> Self {
287 Self::default()
288 }
289}
290pub mod alert_properties {
291 use super::*;
292 #[doc = "Estimated severity of this alert"]
293 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
294 #[serde(remote = "ReportedSeverity")]
295 pub enum ReportedSeverity {
296 Silent,
297 Information,
298 Low,
299 High,
300 #[serde(skip_deserializing)]
301 UnknownValue(String),
302 }
303 impl FromStr for ReportedSeverity {
304 type Err = value::Error;
305 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
306 Self::deserialize(s.into_deserializer())
307 }
308 }
309 impl<'de> Deserialize<'de> for ReportedSeverity {
310 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
311 where
312 D: Deserializer<'de>,
313 {
314 let s = String::deserialize(deserializer)?;
315 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
316 Ok(deserialized)
317 }
318 }
319 impl Serialize for ReportedSeverity {
320 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
321 where
322 S: Serializer,
323 {
324 match self {
325 Self::Silent => serializer.serialize_unit_variant("ReportedSeverity", 0u32, "Silent"),
326 Self::Information => serializer.serialize_unit_variant("ReportedSeverity", 1u32, "Information"),
327 Self::Low => serializer.serialize_unit_variant("ReportedSeverity", 2u32, "Low"),
328 Self::High => serializer.serialize_unit_variant("ReportedSeverity", 3u32, "High"),
329 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
330 }
331 }
332 }
333}
334#[doc = "Describes the suppression rule"]
335#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
336pub struct AlertsSuppressionRule {
337 #[serde(flatten)]
338 pub resource: Resource,
339 #[doc = "describes AlertsSuppressionRule properties"]
340 #[serde(default, skip_serializing_if = "Option::is_none")]
341 pub properties: Option<AlertsSuppressionRuleProperties>,
342}
343impl AlertsSuppressionRule {
344 pub fn new() -> Self {
345 Self::default()
346 }
347}
348#[doc = "describes AlertsSuppressionRule properties"]
349#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
350pub struct AlertsSuppressionRuleProperties {
351 #[doc = "Type of the alert to automatically suppress. For all alert types, use '*'"]
352 #[serde(rename = "alertType")]
353 pub alert_type: String,
354 #[doc = "The last time this rule was modified"]
355 #[serde(rename = "lastModifiedUtc", default, with = "azure_core::date::rfc3339::option")]
356 pub last_modified_utc: Option<::time::OffsetDateTime>,
357 #[doc = "Expiration date of the rule, if value is not provided or provided as null there will no expiration at all"]
358 #[serde(rename = "expirationDateUtc", default, with = "azure_core::date::rfc3339::option")]
359 pub expiration_date_utc: Option<::time::OffsetDateTime>,
360 #[doc = "The reason for dismissing the alert"]
361 pub reason: String,
362 #[doc = "Possible states of the rule"]
363 pub state: alerts_suppression_rule_properties::State,
364 #[doc = "Any comment regarding the rule"]
365 #[serde(default, skip_serializing_if = "Option::is_none")]
366 pub comment: Option<String>,
367 #[serde(rename = "suppressionAlertsScope", default, skip_serializing_if = "Option::is_none")]
368 pub suppression_alerts_scope: Option<SuppressionAlertsScope>,
369}
370impl AlertsSuppressionRuleProperties {
371 pub fn new(alert_type: String, reason: String, state: alerts_suppression_rule_properties::State) -> Self {
372 Self {
373 alert_type,
374 last_modified_utc: None,
375 expiration_date_utc: None,
376 reason,
377 state,
378 comment: None,
379 suppression_alerts_scope: None,
380 }
381 }
382}
383pub mod alerts_suppression_rule_properties {
384 use super::*;
385 #[doc = "Possible states of the rule"]
386 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
387 pub enum State {
388 Enabled,
389 Disabled,
390 Expired,
391 }
392}
393#[doc = "Suppression rules list for subscription."]
394#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
395pub struct AlertsSuppressionRulesList {
396 pub value: Vec<AlertsSuppressionRule>,
397 #[doc = "URI to fetch the next page."]
398 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
399 pub next_link: Option<String>,
400}
401impl azure_core::Continuable for AlertsSuppressionRulesList {
402 type Continuation = String;
403 fn continuation(&self) -> Option<Self::Continuation> {
404 self.next_link.clone().filter(|value| !value.is_empty())
405 }
406}
407impl AlertsSuppressionRulesList {
408 pub fn new(value: Vec<AlertsSuppressionRule>) -> Self {
409 Self { value, next_link: None }
410 }
411}
412#[doc = "List of all possible traffic between Azure resources"]
413#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
414pub struct AllowedConnectionsList {
415 #[serde(
416 default,
417 deserialize_with = "azure_core::util::deserialize_null_as_default",
418 skip_serializing_if = "Vec::is_empty"
419 )]
420 pub value: Vec<AllowedConnectionsResource>,
421 #[doc = "The URI to fetch the next page."]
422 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
423 pub next_link: Option<String>,
424}
425impl azure_core::Continuable for AllowedConnectionsList {
426 type Continuation = String;
427 fn continuation(&self) -> Option<Self::Continuation> {
428 self.next_link.clone().filter(|value| !value.is_empty())
429 }
430}
431impl AllowedConnectionsList {
432 pub fn new() -> Self {
433 Self::default()
434 }
435}
436#[doc = "The resource whose properties describes the allowed traffic between Azure resources"]
437#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
438pub struct AllowedConnectionsResource {
439 #[serde(flatten)]
440 pub resource: Resource,
441 #[serde(flatten)]
442 pub location: Location,
443 #[doc = "Describes the allowed traffic between Azure resources"]
444 #[serde(default, skip_serializing_if = "Option::is_none")]
445 pub properties: Option<AllowedConnectionsResourceProperties>,
446}
447impl AllowedConnectionsResource {
448 pub fn new() -> Self {
449 Self::default()
450 }
451}
452#[doc = "Describes the allowed traffic between Azure resources"]
453#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
454pub struct AllowedConnectionsResourceProperties {
455 #[doc = "The UTC time on which the allowed connections resource was calculated"]
456 #[serde(rename = "calculatedDateTime", default, with = "azure_core::date::rfc3339::option")]
457 pub calculated_date_time: Option<::time::OffsetDateTime>,
458 #[doc = "List of connectable resources"]
459 #[serde(
460 rename = "connectableResources",
461 default,
462 deserialize_with = "azure_core::util::deserialize_null_as_default",
463 skip_serializing_if = "Vec::is_empty"
464 )]
465 pub connectable_resources: Vec<ConnectableResource>,
466}
467impl AllowedConnectionsResourceProperties {
468 pub fn new() -> Self {
469 Self::default()
470 }
471}
472#[doc = "A custom alert rule that checks if a value (depends on the custom alert type) is allowed."]
473#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
474pub struct AllowlistCustomAlertRule {
475 #[serde(flatten)]
476 pub list_custom_alert_rule: ListCustomAlertRule,
477 #[doc = "The values to allow. The format of the values depends on the rule type."]
478 #[serde(rename = "allowlistValues")]
479 pub allowlist_values: Vec<String>,
480}
481impl AllowlistCustomAlertRule {
482 pub fn new(list_custom_alert_rule: ListCustomAlertRule, allowlist_values: Vec<String>) -> Self {
483 Self {
484 list_custom_alert_rule,
485 allowlist_values,
486 }
487 }
488}
489#[doc = "Number of cloud to device messages (AMQP protocol) is not in allowed range."]
490#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
491pub struct AmqpC2dMessagesNotInAllowedRange {
492 #[serde(flatten)]
493 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
494}
495impl AmqpC2dMessagesNotInAllowedRange {
496 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
497 Self {
498 time_window_custom_alert_rule,
499 }
500 }
501}
502#[doc = "Number of rejected cloud to device messages (AMQP protocol) is not in allowed range."]
503#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
504pub struct AmqpC2dRejectedMessagesNotInAllowedRange {
505 #[serde(flatten)]
506 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
507}
508impl AmqpC2dRejectedMessagesNotInAllowedRange {
509 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
510 Self {
511 time_window_custom_alert_rule,
512 }
513 }
514}
515#[doc = "Number of device to cloud messages (AMQP protocol) is not in allowed range."]
516#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
517pub struct AmqpD2cMessagesNotInAllowedRange {
518 #[serde(flatten)]
519 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
520}
521impl AmqpD2cMessagesNotInAllowedRange {
522 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
523 Self {
524 time_window_custom_alert_rule,
525 }
526 }
527}
528#[doc = "The ASC location of the subscription is in the \"name\" field"]
529#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
530pub struct AscLocation {
531 #[serde(flatten)]
532 pub resource: Resource,
533 #[doc = "An empty set of properties"]
534 #[serde(default, skip_serializing_if = "Option::is_none")]
535 pub properties: Option<AscLocationProperties>,
536}
537impl AscLocation {
538 pub fn new() -> Self {
539 Self::default()
540 }
541}
542#[doc = "List of locations where ASC saves your data"]
543#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
544pub struct AscLocationList {
545 #[serde(
546 default,
547 deserialize_with = "azure_core::util::deserialize_null_as_default",
548 skip_serializing_if = "Vec::is_empty"
549 )]
550 pub value: Vec<AscLocation>,
551 #[doc = "The URI to fetch the next page."]
552 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
553 pub next_link: Option<String>,
554}
555impl azure_core::Continuable for AscLocationList {
556 type Continuation = String;
557 fn continuation(&self) -> Option<Self::Continuation> {
558 self.next_link.clone().filter(|value| !value.is_empty())
559 }
560}
561impl AscLocationList {
562 pub fn new() -> Self {
563 Self::default()
564 }
565}
566#[doc = "An empty set of properties"]
567#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
568pub struct AscLocationProperties {}
569impl AscLocationProperties {
570 pub fn new() -> Self {
571 Self::default()
572 }
573}
574#[doc = "Represents an ATA security solution which sends logs to an OMS workspace"]
575#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
576pub struct AtaExternalSecuritySolution {
577 #[serde(flatten)]
578 pub external_security_solution: ExternalSecuritySolution,
579 #[serde(default, skip_serializing_if = "Option::is_none")]
580 pub properties: Option<AtaSolutionProperties>,
581}
582impl AtaExternalSecuritySolution {
583 pub fn new() -> Self {
584 Self::default()
585 }
586}
587#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
588pub struct AtaSolutionProperties {
589 #[serde(flatten)]
590 pub external_security_solution_properties: ExternalSecuritySolutionProperties,
591 #[serde(rename = "lastEventReceived", default, skip_serializing_if = "Option::is_none")]
592 pub last_event_received: Option<String>,
593}
594impl AtaSolutionProperties {
595 pub fn new() -> Self {
596 Self::default()
597 }
598}
599#[doc = "Settings for cloud authentication management"]
600#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
601pub struct AuthenticationDetailsProperties {
602 #[doc = "State of the multi-cloud connector"]
603 #[serde(rename = "authenticationProvisioningState", default, skip_serializing_if = "Option::is_none")]
604 pub authentication_provisioning_state: Option<authentication_details_properties::AuthenticationProvisioningState>,
605 #[doc = "The permissions detected in the cloud account."]
606 #[serde(
607 rename = "grantedPermissions",
608 default,
609 deserialize_with = "azure_core::util::deserialize_null_as_default",
610 skip_serializing_if = "Vec::is_empty"
611 )]
612 pub granted_permissions: Vec<PermissionProperty>,
613}
614impl AuthenticationDetailsProperties {
615 pub fn new() -> Self {
616 Self {
617 authentication_provisioning_state: None,
618 granted_permissions: Vec::new(),
619 }
620 }
621}
622pub mod authentication_details_properties {
623 use super::*;
624 #[doc = "State of the multi-cloud connector"]
625 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
626 #[serde(remote = "AuthenticationProvisioningState")]
627 pub enum AuthenticationProvisioningState {
628 Valid,
629 Invalid,
630 Expired,
631 IncorrectPolicy,
632 #[serde(skip_deserializing)]
633 UnknownValue(String),
634 }
635 impl FromStr for AuthenticationProvisioningState {
636 type Err = value::Error;
637 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
638 Self::deserialize(s.into_deserializer())
639 }
640 }
641 impl<'de> Deserialize<'de> for AuthenticationProvisioningState {
642 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
643 where
644 D: Deserializer<'de>,
645 {
646 let s = String::deserialize(deserializer)?;
647 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
648 Ok(deserialized)
649 }
650 }
651 impl Serialize for AuthenticationProvisioningState {
652 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
653 where
654 S: Serializer,
655 {
656 match self {
657 Self::Valid => serializer.serialize_unit_variant("AuthenticationProvisioningState", 0u32, "Valid"),
658 Self::Invalid => serializer.serialize_unit_variant("AuthenticationProvisioningState", 1u32, "Invalid"),
659 Self::Expired => serializer.serialize_unit_variant("AuthenticationProvisioningState", 2u32, "Expired"),
660 Self::IncorrectPolicy => serializer.serialize_unit_variant("AuthenticationProvisioningState", 3u32, "IncorrectPolicy"),
661 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
662 }
663 }
664 }
665}
666#[doc = "Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use account organization credentials."]
667#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
668#[serde(tag = "authenticationType")]
669pub enum AuthenticationDetailsPropertiesUnion {
670 #[serde(rename = "awsAssumeRole")]
671 AwsAssumeRole(AwAssumeRoleAuthenticationDetailsProperties),
672 #[serde(rename = "awsCreds")]
673 AwsCreds(AwsCredsAuthenticationDetailsProperties),
674 #[serde(rename = "gcpCredentials")]
675 GcpCredentials(GcpCredentialsDetailsProperties),
676}
677#[doc = "Auto provisioning setting"]
678#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
679pub struct AutoProvisioningSetting {
680 #[serde(flatten)]
681 pub resource: Resource,
682 #[doc = "describes properties of an auto provisioning setting"]
683 #[serde(default, skip_serializing_if = "Option::is_none")]
684 pub properties: Option<AutoProvisioningSettingProperties>,
685}
686impl AutoProvisioningSetting {
687 pub fn new() -> Self {
688 Self::default()
689 }
690}
691#[doc = "List of all the auto provisioning settings response"]
692#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
693pub struct AutoProvisioningSettingList {
694 #[doc = "List of all the auto provisioning settings"]
695 #[serde(
696 default,
697 deserialize_with = "azure_core::util::deserialize_null_as_default",
698 skip_serializing_if = "Vec::is_empty"
699 )]
700 pub value: Vec<AutoProvisioningSetting>,
701 #[doc = "The URI to fetch the next page."]
702 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
703 pub next_link: Option<String>,
704}
705impl azure_core::Continuable for AutoProvisioningSettingList {
706 type Continuation = String;
707 fn continuation(&self) -> Option<Self::Continuation> {
708 self.next_link.clone().filter(|value| !value.is_empty())
709 }
710}
711impl AutoProvisioningSettingList {
712 pub fn new() -> Self {
713 Self::default()
714 }
715}
716#[doc = "describes properties of an auto provisioning setting"]
717#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
718pub struct AutoProvisioningSettingProperties {
719 #[doc = "Describes what kind of security agent provisioning action to take"]
720 #[serde(rename = "autoProvision")]
721 pub auto_provision: auto_provisioning_setting_properties::AutoProvision,
722}
723impl AutoProvisioningSettingProperties {
724 pub fn new(auto_provision: auto_provisioning_setting_properties::AutoProvision) -> Self {
725 Self { auto_provision }
726 }
727}
728pub mod auto_provisioning_setting_properties {
729 use super::*;
730 #[doc = "Describes what kind of security agent provisioning action to take"]
731 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
732 #[serde(remote = "AutoProvision")]
733 pub enum AutoProvision {
734 On,
735 Off,
736 #[serde(skip_deserializing)]
737 UnknownValue(String),
738 }
739 impl FromStr for AutoProvision {
740 type Err = value::Error;
741 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
742 Self::deserialize(s.into_deserializer())
743 }
744 }
745 impl<'de> Deserialize<'de> for AutoProvision {
746 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
747 where
748 D: Deserializer<'de>,
749 {
750 let s = String::deserialize(deserializer)?;
751 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
752 Ok(deserialized)
753 }
754 }
755 impl Serialize for AutoProvision {
756 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
757 where
758 S: Serializer,
759 {
760 match self {
761 Self::On => serializer.serialize_unit_variant("AutoProvision", 0u32, "On"),
762 Self::Off => serializer.serialize_unit_variant("AutoProvision", 1u32, "Off"),
763 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
764 }
765 }
766 }
767}
768#[doc = "The security automation resource."]
769#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
770pub struct Automation {
771 #[serde(flatten)]
772 pub tracked_resource: TrackedResource,
773 #[doc = "A set of properties that defines the behavior of the automation configuration. To learn more about the supported security events data models schemas - please visit https://aka.ms/ASCAutomationSchemas."]
774 #[serde(default, skip_serializing_if = "Option::is_none")]
775 pub properties: Option<AutomationProperties>,
776}
777impl Automation {
778 pub fn new() -> Self {
779 Self::default()
780 }
781}
782#[doc = "The type of the action that will be triggered by the Automation"]
783#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
784#[serde(tag = "actionType")]
785pub enum AutomationActionUnion {
786 EventHub(AutomationActionEventHub),
787 LogicApp(AutomationActionLogicApp),
788 Workspace(AutomationActionWorkspace),
789}
790#[doc = "The target Event Hub to which event data will be exported. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore"]
791#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
792pub struct AutomationActionEventHub {
793 #[doc = "The target Event Hub Azure Resource ID."]
794 #[serde(rename = "eventHubResourceId", default, skip_serializing_if = "Option::is_none")]
795 pub event_hub_resource_id: Option<String>,
796 #[doc = "The target Event Hub SAS policy name."]
797 #[serde(rename = "sasPolicyName", default, skip_serializing_if = "Option::is_none")]
798 pub sas_policy_name: Option<String>,
799 #[doc = "The target Event Hub connection string (it will not be included in any response)."]
800 #[serde(rename = "connectionString", default, skip_serializing_if = "Option::is_none")]
801 pub connection_string: Option<String>,
802}
803impl AutomationActionEventHub {
804 pub fn new() -> Self {
805 Self {
806 event_hub_resource_id: None,
807 sas_policy_name: None,
808 connection_string: None,
809 }
810 }
811}
812#[doc = "The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore"]
813#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
814pub struct AutomationActionLogicApp {
815 #[doc = "The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given that you have permissions to trigger the Logic App"]
816 #[serde(rename = "logicAppResourceId", default, skip_serializing_if = "Option::is_none")]
817 pub logic_app_resource_id: Option<String>,
818 #[doc = "The Logic App trigger URI endpoint (it will not be included in any response)."]
819 #[serde(default, skip_serializing_if = "Option::is_none")]
820 pub uri: Option<String>,
821}
822impl AutomationActionLogicApp {
823 pub fn new() -> Self {
824 Self {
825 logic_app_resource_id: None,
826 uri: None,
827 }
828 }
829}
830#[doc = "The\u{a0}Log\u{a0}Analytics\u{a0}Workspace\u{a0}to\u{a0}which\u{a0}event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore"]
831#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
832pub struct AutomationActionWorkspace {
833 #[doc = "The fully qualified Log Analytics Workspace Azure Resource ID."]
834 #[serde(rename = "workspaceResourceId", default, skip_serializing_if = "Option::is_none")]
835 pub workspace_resource_id: Option<String>,
836}
837impl AutomationActionWorkspace {
838 pub fn new() -> Self {
839 Self {
840 workspace_resource_id: None,
841 }
842 }
843}
844#[doc = "List of security automations response."]
845#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
846pub struct AutomationList {
847 #[doc = "The list of security automations under the given scope."]
848 pub value: Vec<Automation>,
849 #[doc = "The URI to fetch the next page."]
850 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
851 pub next_link: Option<String>,
852}
853impl azure_core::Continuable for AutomationList {
854 type Continuation = String;
855 fn continuation(&self) -> Option<Self::Continuation> {
856 self.next_link.clone().filter(|value| !value.is_empty())
857 }
858}
859impl AutomationList {
860 pub fn new(value: Vec<Automation>) -> Self {
861 Self { value, next_link: None }
862 }
863}
864#[doc = "A set of properties that defines the behavior of the automation configuration. To learn more about the supported security events data models schemas - please visit https://aka.ms/ASCAutomationSchemas."]
865#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
866pub struct AutomationProperties {
867 #[doc = "The security automation description."]
868 #[serde(default, skip_serializing_if = "Option::is_none")]
869 pub description: Option<String>,
870 #[doc = "Indicates whether the security automation is enabled."]
871 #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
872 pub is_enabled: Option<bool>,
873 #[doc = "A collection of scopes on which the security automations logic is applied. Supported scopes are the subscription itself or a resource group under that subscription. The automation will only apply on defined scopes."]
874 #[serde(
875 default,
876 deserialize_with = "azure_core::util::deserialize_null_as_default",
877 skip_serializing_if = "Vec::is_empty"
878 )]
879 pub scopes: Vec<AutomationScope>,
880 #[doc = "A collection of the source event types which evaluate the security automation set of rules."]
881 #[serde(
882 default,
883 deserialize_with = "azure_core::util::deserialize_null_as_default",
884 skip_serializing_if = "Vec::is_empty"
885 )]
886 pub sources: Vec<AutomationSource>,
887 #[doc = "A collection of the actions which are triggered if all the configured rules evaluations, within at least one rule set, are true."]
888 #[serde(
889 default,
890 deserialize_with = "azure_core::util::deserialize_null_as_default",
891 skip_serializing_if = "Vec::is_empty"
892 )]
893 pub actions: Vec<AutomationActionUnion>,
894}
895impl AutomationProperties {
896 pub fn new() -> Self {
897 Self::default()
898 }
899}
900#[doc = "A rule set which evaluates all its rules upon an event interception. Only when all the included rules in the rule set will be evaluated as 'true', will the event trigger the defined actions."]
901#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
902pub struct AutomationRuleSet {
903 #[serde(
904 default,
905 deserialize_with = "azure_core::util::deserialize_null_as_default",
906 skip_serializing_if = "Vec::is_empty"
907 )]
908 pub rules: Vec<AutomationTriggeringRule>,
909}
910impl AutomationRuleSet {
911 pub fn new() -> Self {
912 Self::default()
913 }
914}
915#[doc = "A single automation scope."]
916#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
917pub struct AutomationScope {
918 #[doc = "The resources scope description."]
919 #[serde(default, skip_serializing_if = "Option::is_none")]
920 pub description: Option<String>,
921 #[doc = "The resources scope path. Can be the subscription on which the automation is defined on or a resource group under that subscription (fully qualified Azure resource IDs)."]
922 #[serde(rename = "scopePath", default, skip_serializing_if = "Option::is_none")]
923 pub scope_path: Option<String>,
924}
925impl AutomationScope {
926 pub fn new() -> Self {
927 Self::default()
928 }
929}
930#[doc = "The source event types which evaluate the security automation set of rules. For example - security alerts and security assessments. To learn more about the supported security events data models schemas - please visit https://aka.ms/ASCAutomationSchemas."]
931#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
932pub struct AutomationSource {
933 #[doc = "A valid event source type."]
934 #[serde(rename = "eventSource", default, skip_serializing_if = "Option::is_none")]
935 pub event_source: Option<automation_source::EventSource>,
936 #[doc = "A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or')."]
937 #[serde(
938 rename = "ruleSets",
939 default,
940 deserialize_with = "azure_core::util::deserialize_null_as_default",
941 skip_serializing_if = "Vec::is_empty"
942 )]
943 pub rule_sets: Vec<AutomationRuleSet>,
944}
945impl AutomationSource {
946 pub fn new() -> Self {
947 Self::default()
948 }
949}
950pub mod automation_source {
951 use super::*;
952 #[doc = "A valid event source type."]
953 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
954 #[serde(remote = "EventSource")]
955 pub enum EventSource {
956 Assessments,
957 AssessmentsSnapshot,
958 SubAssessments,
959 SubAssessmentsSnapshot,
960 Alerts,
961 SecureScores,
962 SecureScoresSnapshot,
963 SecureScoreControls,
964 SecureScoreControlsSnapshot,
965 RegulatoryComplianceAssessment,
966 RegulatoryComplianceAssessmentSnapshot,
967 #[serde(skip_deserializing)]
968 UnknownValue(String),
969 }
970 impl FromStr for EventSource {
971 type Err = value::Error;
972 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
973 Self::deserialize(s.into_deserializer())
974 }
975 }
976 impl<'de> Deserialize<'de> for EventSource {
977 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
978 where
979 D: Deserializer<'de>,
980 {
981 let s = String::deserialize(deserializer)?;
982 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
983 Ok(deserialized)
984 }
985 }
986 impl Serialize for EventSource {
987 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
988 where
989 S: Serializer,
990 {
991 match self {
992 Self::Assessments => serializer.serialize_unit_variant("EventSource", 0u32, "Assessments"),
993 Self::AssessmentsSnapshot => serializer.serialize_unit_variant("EventSource", 1u32, "AssessmentsSnapshot"),
994 Self::SubAssessments => serializer.serialize_unit_variant("EventSource", 2u32, "SubAssessments"),
995 Self::SubAssessmentsSnapshot => serializer.serialize_unit_variant("EventSource", 3u32, "SubAssessmentsSnapshot"),
996 Self::Alerts => serializer.serialize_unit_variant("EventSource", 4u32, "Alerts"),
997 Self::SecureScores => serializer.serialize_unit_variant("EventSource", 5u32, "SecureScores"),
998 Self::SecureScoresSnapshot => serializer.serialize_unit_variant("EventSource", 6u32, "SecureScoresSnapshot"),
999 Self::SecureScoreControls => serializer.serialize_unit_variant("EventSource", 7u32, "SecureScoreControls"),
1000 Self::SecureScoreControlsSnapshot => serializer.serialize_unit_variant("EventSource", 8u32, "SecureScoreControlsSnapshot"),
1001 Self::RegulatoryComplianceAssessment => {
1002 serializer.serialize_unit_variant("EventSource", 9u32, "RegulatoryComplianceAssessment")
1003 }
1004 Self::RegulatoryComplianceAssessmentSnapshot => {
1005 serializer.serialize_unit_variant("EventSource", 10u32, "RegulatoryComplianceAssessmentSnapshot")
1006 }
1007 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1008 }
1009 }
1010 }
1011}
1012#[doc = "A rule which is evaluated upon event interception. The rule is configured by comparing a specific value from the event model to an expected value. This comparison is done by using one of the supported operators set."]
1013#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1014pub struct AutomationTriggeringRule {
1015 #[doc = "The JPath of the entity model property that should be checked."]
1016 #[serde(rename = "propertyJPath", default, skip_serializing_if = "Option::is_none")]
1017 pub property_j_path: Option<String>,
1018 #[doc = "The data type of the compared operands (string, integer, floating point number or a boolean [true/false]]"]
1019 #[serde(rename = "propertyType", default, skip_serializing_if = "Option::is_none")]
1020 pub property_type: Option<automation_triggering_rule::PropertyType>,
1021 #[doc = "The expected value."]
1022 #[serde(rename = "expectedValue", default, skip_serializing_if = "Option::is_none")]
1023 pub expected_value: Option<String>,
1024 #[doc = "A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType."]
1025 #[serde(default, skip_serializing_if = "Option::is_none")]
1026 pub operator: Option<automation_triggering_rule::Operator>,
1027}
1028impl AutomationTriggeringRule {
1029 pub fn new() -> Self {
1030 Self::default()
1031 }
1032}
1033pub mod automation_triggering_rule {
1034 use super::*;
1035 #[doc = "The data type of the compared operands (string, integer, floating point number or a boolean [true/false]]"]
1036 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1037 #[serde(remote = "PropertyType")]
1038 pub enum PropertyType {
1039 String,
1040 Integer,
1041 Number,
1042 Boolean,
1043 #[serde(skip_deserializing)]
1044 UnknownValue(String),
1045 }
1046 impl FromStr for PropertyType {
1047 type Err = value::Error;
1048 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1049 Self::deserialize(s.into_deserializer())
1050 }
1051 }
1052 impl<'de> Deserialize<'de> for PropertyType {
1053 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1054 where
1055 D: Deserializer<'de>,
1056 {
1057 let s = String::deserialize(deserializer)?;
1058 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1059 Ok(deserialized)
1060 }
1061 }
1062 impl Serialize for PropertyType {
1063 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1064 where
1065 S: Serializer,
1066 {
1067 match self {
1068 Self::String => serializer.serialize_unit_variant("PropertyType", 0u32, "String"),
1069 Self::Integer => serializer.serialize_unit_variant("PropertyType", 1u32, "Integer"),
1070 Self::Number => serializer.serialize_unit_variant("PropertyType", 2u32, "Number"),
1071 Self::Boolean => serializer.serialize_unit_variant("PropertyType", 3u32, "Boolean"),
1072 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1073 }
1074 }
1075 }
1076 #[doc = "A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType."]
1077 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1078 #[serde(remote = "Operator")]
1079 pub enum Operator {
1080 Equals,
1081 GreaterThan,
1082 GreaterThanOrEqualTo,
1083 LesserThan,
1084 LesserThanOrEqualTo,
1085 NotEquals,
1086 Contains,
1087 StartsWith,
1088 EndsWith,
1089 #[serde(skip_deserializing)]
1090 UnknownValue(String),
1091 }
1092 impl FromStr for Operator {
1093 type Err = value::Error;
1094 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1095 Self::deserialize(s.into_deserializer())
1096 }
1097 }
1098 impl<'de> Deserialize<'de> for Operator {
1099 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1100 where
1101 D: Deserializer<'de>,
1102 {
1103 let s = String::deserialize(deserializer)?;
1104 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1105 Ok(deserialized)
1106 }
1107 }
1108 impl Serialize for Operator {
1109 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1110 where
1111 S: Serializer,
1112 {
1113 match self {
1114 Self::Equals => serializer.serialize_unit_variant("Operator", 0u32, "Equals"),
1115 Self::GreaterThan => serializer.serialize_unit_variant("Operator", 1u32, "GreaterThan"),
1116 Self::GreaterThanOrEqualTo => serializer.serialize_unit_variant("Operator", 2u32, "GreaterThanOrEqualTo"),
1117 Self::LesserThan => serializer.serialize_unit_variant("Operator", 3u32, "LesserThan"),
1118 Self::LesserThanOrEqualTo => serializer.serialize_unit_variant("Operator", 4u32, "LesserThanOrEqualTo"),
1119 Self::NotEquals => serializer.serialize_unit_variant("Operator", 5u32, "NotEquals"),
1120 Self::Contains => serializer.serialize_unit_variant("Operator", 6u32, "Contains"),
1121 Self::StartsWith => serializer.serialize_unit_variant("Operator", 7u32, "StartsWith"),
1122 Self::EndsWith => serializer.serialize_unit_variant("Operator", 8u32, "EndsWith"),
1123 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1124 }
1125 }
1126 }
1127}
1128#[doc = "The security automation model state property bag."]
1129#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1130pub struct AutomationValidationStatus {
1131 #[doc = "Indicates whether the model is valid or not."]
1132 #[serde(rename = "isValid", default, skip_serializing_if = "Option::is_none")]
1133 pub is_valid: Option<bool>,
1134 #[doc = "The validation message."]
1135 #[serde(default, skip_serializing_if = "Option::is_none")]
1136 pub message: Option<String>,
1137}
1138impl AutomationValidationStatus {
1139 pub fn new() -> Self {
1140 Self::default()
1141 }
1142}
1143#[doc = "AWS cloud account connector based assume role, the role enables delegating access to your AWS resources. The role is composed of role Amazon Resource Name (ARN) and external ID. For more details, refer to <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html\">Creating a Role to Delegate Permissions to an IAM User (write only)</a>"]
1144#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1145pub struct AwAssumeRoleAuthenticationDetailsProperties {
1146 #[serde(flatten)]
1147 pub authentication_details_properties: AuthenticationDetailsProperties,
1148 #[doc = "The ID of the cloud account"]
1149 #[serde(rename = "accountId", default, skip_serializing_if = "Option::is_none")]
1150 pub account_id: Option<String>,
1151 #[doc = "Assumed role ID is an identifier that you can use to create temporary security credentials."]
1152 #[serde(rename = "awsAssumeRoleArn")]
1153 pub aws_assume_role_arn: String,
1154 #[doc = "A unique identifier that is required when you assume a role in another account."]
1155 #[serde(rename = "awsExternalId")]
1156 pub aws_external_id: String,
1157}
1158impl AwAssumeRoleAuthenticationDetailsProperties {
1159 pub fn new(
1160 authentication_details_properties: AuthenticationDetailsProperties,
1161 aws_assume_role_arn: String,
1162 aws_external_id: String,
1163 ) -> Self {
1164 Self {
1165 authentication_details_properties,
1166 account_id: None,
1167 aws_assume_role_arn,
1168 aws_external_id,
1169 }
1170 }
1171}
1172#[doc = "AWS cloud account connector based credentials, the credentials is composed of access key ID and secret key, for more details, refer to <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html\">Creating an IAM User in Your AWS Account (write only)</a>"]
1173#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1174pub struct AwsCredsAuthenticationDetailsProperties {
1175 #[serde(flatten)]
1176 pub authentication_details_properties: AuthenticationDetailsProperties,
1177 #[doc = "The ID of the cloud account"]
1178 #[serde(rename = "accountId", default, skip_serializing_if = "Option::is_none")]
1179 pub account_id: Option<String>,
1180 #[doc = "Public key element of the AWS credential object (write only)"]
1181 #[serde(rename = "awsAccessKeyId")]
1182 pub aws_access_key_id: String,
1183 #[doc = "Secret key element of the AWS credential object (write only)"]
1184 #[serde(rename = "awsSecretAccessKey")]
1185 pub aws_secret_access_key: String,
1186}
1187impl AwsCredsAuthenticationDetailsProperties {
1188 pub fn new(
1189 authentication_details_properties: AuthenticationDetailsProperties,
1190 aws_access_key_id: String,
1191 aws_secret_access_key: String,
1192 ) -> Self {
1193 Self {
1194 authentication_details_properties,
1195 account_id: None,
1196 aws_access_key_id,
1197 aws_secret_access_key,
1198 }
1199 }
1200}
1201#[doc = "The aws connector environment data"]
1202#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1203pub struct AwsEnvironmentData {
1204 #[doc = "The awsOrganization data "]
1205 #[serde(rename = "organizationalData", default, skip_serializing_if = "Option::is_none")]
1206 pub organizational_data: Option<AwsOrganizationalDataUnion>,
1207}
1208impl AwsEnvironmentData {
1209 pub fn new() -> Self {
1210 Self { organizational_data: None }
1211 }
1212}
1213#[doc = "The multi cloud account's membership type in the organization"]
1214#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1215#[serde(tag = "organizationMembershipType")]
1216pub enum AwsOrganizationalDataUnion {
1217 Organization(AwsOrganizationalDataMaster),
1218 Member(AwsOrganizationalDataMember),
1219}
1220#[doc = "The awsOrganization data for the master account"]
1221#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1222pub struct AwsOrganizationalDataMaster {
1223 #[doc = "If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset"]
1224 #[serde(rename = "stacksetName", default, skip_serializing_if = "Option::is_none")]
1225 pub stackset_name: Option<String>,
1226 #[doc = "If the multi cloud account is of membership type organization, list of accounts excluded from offering"]
1227 #[serde(
1228 rename = "excludedAccountIds",
1229 default,
1230 deserialize_with = "azure_core::util::deserialize_null_as_default",
1231 skip_serializing_if = "Vec::is_empty"
1232 )]
1233 pub excluded_account_ids: Vec<String>,
1234}
1235impl AwsOrganizationalDataMaster {
1236 pub fn new() -> Self {
1237 Self {
1238 stackset_name: None,
1239 excluded_account_ids: Vec::new(),
1240 }
1241 }
1242}
1243#[doc = "The awsOrganization data for the member account"]
1244#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1245pub struct AwsOrganizationalDataMember {
1246 #[doc = "If the multi cloud account is not of membership type organization, this will be the ID of the account's parent"]
1247 #[serde(rename = "parentHierarchyId", default, skip_serializing_if = "Option::is_none")]
1248 pub parent_hierarchy_id: Option<String>,
1249}
1250impl AwsOrganizationalDataMember {
1251 pub fn new() -> Self {
1252 Self { parent_hierarchy_id: None }
1253 }
1254}
1255#[doc = "The AzureDevOps scope connector's environment data"]
1256#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1257pub struct AzureDevOpsScopeEnvironmentData {}
1258impl AzureDevOpsScopeEnvironmentData {
1259 pub fn new() -> Self {
1260 Self {}
1261 }
1262}
1263#[doc = "Describes an Azure resource with kind"]
1264#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1265pub struct AzureResourceLink {
1266 #[doc = "Azure resource Id"]
1267 #[serde(default, skip_serializing_if = "Option::is_none")]
1268 pub id: Option<String>,
1269}
1270impl AzureResourceLink {
1271 pub fn new() -> Self {
1272 Self::default()
1273 }
1274}
1275pub type AzureResourceLinks = Vec<AzureResourceLink>;
1276#[doc = "Describes an Azure resource with location"]
1277#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1278pub struct AzureTrackedResourceLocation {
1279 #[doc = "Location where the resource is stored"]
1280 #[serde(default, skip_serializing_if = "Option::is_none")]
1281 pub location: Option<String>,
1282}
1283impl AzureTrackedResourceLocation {
1284 pub fn new() -> Self {
1285 Self::default()
1286 }
1287}
1288#[doc = "Baseline details."]
1289#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1290pub struct Baseline {
1291 #[doc = "Expected results."]
1292 #[serde(
1293 rename = "expectedResults",
1294 default,
1295 deserialize_with = "azure_core::util::deserialize_null_as_default",
1296 skip_serializing_if = "Vec::is_empty"
1297 )]
1298 pub expected_results: Vec<Vec<String>>,
1299 #[doc = "Baseline update time (UTC)."]
1300 #[serde(rename = "updatedTime", default, with = "azure_core::date::rfc3339::option")]
1301 pub updated_time: Option<::time::OffsetDateTime>,
1302}
1303impl Baseline {
1304 pub fn new() -> Self {
1305 Self::default()
1306 }
1307}
1308#[doc = "The rule result adjusted with baseline."]
1309#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1310pub struct BaselineAdjustedResult {
1311 #[doc = "Baseline details."]
1312 #[serde(default, skip_serializing_if = "Option::is_none")]
1313 pub baseline: Option<Baseline>,
1314 #[doc = "The rule result status."]
1315 #[serde(default, skip_serializing_if = "Option::is_none")]
1316 pub status: Option<RuleStatus>,
1317 #[doc = "Results the are not in baseline."]
1318 #[serde(
1319 rename = "resultsNotInBaseline",
1320 default,
1321 deserialize_with = "azure_core::util::deserialize_null_as_default",
1322 skip_serializing_if = "Vec::is_empty"
1323 )]
1324 pub results_not_in_baseline: Vec<Vec<String>>,
1325 #[doc = "Results the are in baseline."]
1326 #[serde(
1327 rename = "resultsOnlyInBaseline",
1328 default,
1329 deserialize_with = "azure_core::util::deserialize_null_as_default",
1330 skip_serializing_if = "Vec::is_empty"
1331 )]
1332 pub results_only_in_baseline: Vec<Vec<String>>,
1333}
1334impl BaselineAdjustedResult {
1335 pub fn new() -> Self {
1336 Self::default()
1337 }
1338}
1339#[doc = "The benchmark references."]
1340#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1341pub struct BenchmarkReference {
1342 #[doc = "The benchmark name."]
1343 #[serde(default, skip_serializing_if = "Option::is_none")]
1344 pub benchmark: Option<String>,
1345 #[doc = "The benchmark reference."]
1346 #[serde(default, skip_serializing_if = "Option::is_none")]
1347 pub reference: Option<String>,
1348}
1349impl BenchmarkReference {
1350 pub fn new() -> Self {
1351 Self::default()
1352 }
1353}
1354#[doc = "CVE details"]
1355#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1356pub struct Cve {
1357 #[doc = "CVE title"]
1358 #[serde(default, skip_serializing_if = "Option::is_none")]
1359 pub title: Option<String>,
1360 #[doc = "Link url"]
1361 #[serde(default, skip_serializing_if = "Option::is_none")]
1362 pub link: Option<String>,
1363}
1364impl Cve {
1365 pub fn new() -> Self {
1366 Self::default()
1367 }
1368}
1369#[doc = "CVSS details"]
1370#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1371pub struct Cvss {
1372 #[doc = "CVSS base"]
1373 #[serde(default, skip_serializing_if = "Option::is_none")]
1374 pub base: Option<f64>,
1375}
1376impl Cvss {
1377 pub fn new() -> Self {
1378 Self::default()
1379 }
1380}
1381#[doc = "Represents a security solution which sends CEF logs to an OMS workspace"]
1382#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1383pub struct CefExternalSecuritySolution {
1384 #[serde(flatten)]
1385 pub external_security_solution: ExternalSecuritySolution,
1386 #[serde(default, skip_serializing_if = "Option::is_none")]
1387 pub properties: Option<CefSolutionProperties>,
1388}
1389impl CefExternalSecuritySolution {
1390 pub fn new() -> Self {
1391 Self::default()
1392 }
1393}
1394#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1395pub struct CefSolutionProperties {
1396 #[serde(flatten)]
1397 pub external_security_solution_properties: ExternalSecuritySolutionProperties,
1398 #[serde(default, skip_serializing_if = "Option::is_none")]
1399 pub hostname: Option<String>,
1400 #[serde(default, skip_serializing_if = "Option::is_none")]
1401 pub agent: Option<String>,
1402 #[serde(rename = "lastEventReceived", default, skip_serializing_if = "Option::is_none")]
1403 pub last_event_received: Option<String>,
1404}
1405impl CefSolutionProperties {
1406 pub fn new() -> Self {
1407 Self::default()
1408 }
1409}
1410#[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.)."]
1411#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1412pub struct CloudError {
1413 #[doc = "The error detail."]
1414 #[serde(default, skip_serializing_if = "Option::is_none")]
1415 pub error: Option<CloudErrorBody>,
1416}
1417impl azure_core::Continuable for CloudError {
1418 type Continuation = String;
1419 fn continuation(&self) -> Option<Self::Continuation> {
1420 None
1421 }
1422}
1423impl CloudError {
1424 pub fn new() -> Self {
1425 Self::default()
1426 }
1427}
1428#[doc = "The error detail."]
1429#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1430pub struct CloudErrorBody {
1431 #[doc = "The error code."]
1432 #[serde(default, skip_serializing_if = "Option::is_none")]
1433 pub code: Option<String>,
1434 #[doc = "The error message."]
1435 #[serde(default, skip_serializing_if = "Option::is_none")]
1436 pub message: Option<String>,
1437 #[doc = "The error target."]
1438 #[serde(default, skip_serializing_if = "Option::is_none")]
1439 pub target: Option<String>,
1440 #[doc = "The error details."]
1441 #[serde(
1442 default,
1443 deserialize_with = "azure_core::util::deserialize_null_as_default",
1444 skip_serializing_if = "Vec::is_empty"
1445 )]
1446 pub details: Vec<CloudErrorBody>,
1447 #[doc = "The error additional info."]
1448 #[serde(
1449 rename = "additionalInfo",
1450 default,
1451 deserialize_with = "azure_core::util::deserialize_null_as_default",
1452 skip_serializing_if = "Vec::is_empty"
1453 )]
1454 pub additional_info: Vec<ErrorAdditionalInfo>,
1455}
1456impl CloudErrorBody {
1457 pub fn new() -> Self {
1458 Self::default()
1459 }
1460}
1461#[doc = "Compliance of a scope"]
1462#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1463pub struct Compliance {
1464 #[serde(flatten)]
1465 pub resource: Resource,
1466 #[doc = "The Compliance score (percentage) of a Subscription is a sum of all Resources' Compliances under the given Subscription. A Resource Compliance is defined as the compliant ('healthy') Policy Definitions out of all Policy Definitions applicable to a given resource."]
1467 #[serde(default, skip_serializing_if = "Option::is_none")]
1468 pub properties: Option<ComplianceProperties>,
1469}
1470impl Compliance {
1471 pub fn new() -> Self {
1472 Self::default()
1473 }
1474}
1475#[doc = "List of Compliance objects response"]
1476#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1477pub struct ComplianceList {
1478 #[doc = "List of Compliance objects"]
1479 #[serde(
1480 default,
1481 deserialize_with = "azure_core::util::deserialize_null_as_default",
1482 skip_serializing_if = "Vec::is_empty"
1483 )]
1484 pub value: Vec<Compliance>,
1485 #[doc = "The URI to fetch the next page."]
1486 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1487 pub next_link: Option<String>,
1488}
1489impl azure_core::Continuable for ComplianceList {
1490 type Continuation = String;
1491 fn continuation(&self) -> Option<Self::Continuation> {
1492 self.next_link.clone().filter(|value| !value.is_empty())
1493 }
1494}
1495impl ComplianceList {
1496 pub fn new() -> Self {
1497 Self::default()
1498 }
1499}
1500#[doc = "The Compliance score (percentage) of a Subscription is a sum of all Resources' Compliances under the given Subscription. A Resource Compliance is defined as the compliant ('healthy') Policy Definitions out of all Policy Definitions applicable to a given resource."]
1501#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1502pub struct ComplianceProperties {
1503 #[doc = "The timestamp when the Compliance calculation was conducted."]
1504 #[serde(rename = "assessmentTimestampUtcDate", default, with = "azure_core::date::rfc3339::option")]
1505 pub assessment_timestamp_utc_date: Option<::time::OffsetDateTime>,
1506 #[doc = "The resource count of the given subscription for which the Compliance calculation was conducted (needed for Management Group Compliance calculation)."]
1507 #[serde(rename = "resourceCount", default, skip_serializing_if = "Option::is_none")]
1508 pub resource_count: Option<i64>,
1509 #[doc = "An array of segment, which is the actually the compliance assessment."]
1510 #[serde(
1511 rename = "assessmentResult",
1512 default,
1513 deserialize_with = "azure_core::util::deserialize_null_as_default",
1514 skip_serializing_if = "Vec::is_empty"
1515 )]
1516 pub assessment_result: Vec<ComplianceSegment>,
1517}
1518impl ComplianceProperties {
1519 pub fn new() -> Self {
1520 Self::default()
1521 }
1522}
1523#[doc = "A segment of a compliance assessment."]
1524#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1525pub struct ComplianceSegment {
1526 #[doc = "The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc."]
1527 #[serde(rename = "segmentType", default, skip_serializing_if = "Option::is_none")]
1528 pub segment_type: Option<String>,
1529 #[doc = "The size (%) of the segment."]
1530 #[serde(default, skip_serializing_if = "Option::is_none")]
1531 pub percentage: Option<f64>,
1532}
1533impl ComplianceSegment {
1534 pub fn new() -> Self {
1535 Self::default()
1536 }
1537}
1538#[doc = "Describes the allowed inbound and outbound traffic of an Azure resource"]
1539#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1540pub struct ConnectableResource {
1541 #[doc = "The Azure resource id"]
1542 #[serde(default, skip_serializing_if = "Option::is_none")]
1543 pub id: Option<String>,
1544 #[doc = "The list of Azure resources that the resource has inbound allowed connection from"]
1545 #[serde(
1546 rename = "inboundConnectedResources",
1547 default,
1548 deserialize_with = "azure_core::util::deserialize_null_as_default",
1549 skip_serializing_if = "Vec::is_empty"
1550 )]
1551 pub inbound_connected_resources: Vec<ConnectedResource>,
1552 #[doc = "The list of Azure resources that the resource has outbound allowed connection to"]
1553 #[serde(
1554 rename = "outboundConnectedResources",
1555 default,
1556 deserialize_with = "azure_core::util::deserialize_null_as_default",
1557 skip_serializing_if = "Vec::is_empty"
1558 )]
1559 pub outbound_connected_resources: Vec<ConnectedResource>,
1560}
1561impl ConnectableResource {
1562 pub fn new() -> Self {
1563 Self::default()
1564 }
1565}
1566#[doc = "Describes properties of a connected resource"]
1567#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1568pub struct ConnectedResource {
1569 #[doc = "The Azure resource id of the connected resource"]
1570 #[serde(rename = "connectedResourceId", default, skip_serializing_if = "Option::is_none")]
1571 pub connected_resource_id: Option<String>,
1572 #[doc = "The allowed tcp ports"]
1573 #[serde(rename = "tcpPorts", default, skip_serializing_if = "Option::is_none")]
1574 pub tcp_ports: Option<String>,
1575 #[doc = "The allowed udp ports"]
1576 #[serde(rename = "udpPorts", default, skip_serializing_if = "Option::is_none")]
1577 pub udp_ports: Option<String>,
1578}
1579impl ConnectedResource {
1580 pub fn new() -> Self {
1581 Self::default()
1582 }
1583}
1584#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1585pub struct ConnectedWorkspace {
1586 #[doc = "Azure resource ID of the connected OMS workspace"]
1587 #[serde(default, skip_serializing_if = "Option::is_none")]
1588 pub id: Option<String>,
1589}
1590impl ConnectedWorkspace {
1591 pub fn new() -> Self {
1592 Self::default()
1593 }
1594}
1595#[doc = "Outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation."]
1596#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1597pub struct ConnectionToIpNotAllowed {
1598 #[serde(flatten)]
1599 pub allowlist_custom_alert_rule: AllowlistCustomAlertRule,
1600}
1601impl ConnectionToIpNotAllowed {
1602 pub fn new(allowlist_custom_alert_rule: AllowlistCustomAlertRule) -> Self {
1603 Self {
1604 allowlist_custom_alert_rule,
1605 }
1606 }
1607}
1608#[doc = "The connector setting"]
1609#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1610pub struct ConnectorSetting {
1611 #[serde(flatten)]
1612 pub resource: Resource,
1613 #[doc = "Describes properties of a connector setting"]
1614 #[serde(default, skip_serializing_if = "Option::is_none")]
1615 pub properties: Option<ConnectorSettingProperties>,
1616}
1617impl ConnectorSetting {
1618 pub fn new() -> Self {
1619 Self::default()
1620 }
1621}
1622#[doc = "For a subscription, list of all cloud account connectors and their settings"]
1623#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1624pub struct ConnectorSettingList {
1625 #[doc = "List of all the cloud account connector settings"]
1626 #[serde(
1627 default,
1628 deserialize_with = "azure_core::util::deserialize_null_as_default",
1629 skip_serializing_if = "Vec::is_empty"
1630 )]
1631 pub value: Vec<ConnectorSetting>,
1632 #[doc = "The URI to fetch the next page."]
1633 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1634 pub next_link: Option<String>,
1635}
1636impl azure_core::Continuable for ConnectorSettingList {
1637 type Continuation = String;
1638 fn continuation(&self) -> Option<Self::Continuation> {
1639 self.next_link.clone().filter(|value| !value.is_empty())
1640 }
1641}
1642impl ConnectorSettingList {
1643 pub fn new() -> Self {
1644 Self::default()
1645 }
1646}
1647#[doc = "Describes properties of a connector setting"]
1648#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1649pub struct ConnectorSettingProperties {
1650 #[doc = "Settings for hybrid compute management"]
1651 #[serde(rename = "hybridComputeSettings", default, skip_serializing_if = "Option::is_none")]
1652 pub hybrid_compute_settings: Option<HybridComputeSettingsProperties>,
1653 #[doc = "Settings for cloud authentication management"]
1654 #[serde(rename = "authenticationDetails", default, skip_serializing_if = "Option::is_none")]
1655 pub authentication_details: Option<AuthenticationDetailsPropertiesUnion>,
1656}
1657impl ConnectorSettingProperties {
1658 pub fn new() -> Self {
1659 Self::default()
1660 }
1661}
1662#[doc = "Additional context fields for container registry Vulnerability assessment"]
1663#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1664pub struct ContainerRegistryVulnerabilityProperties {
1665 #[doc = "Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered, Vulnerability"]
1666 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1667 pub type_: Option<String>,
1668 #[doc = "Dictionary from cvss version to cvss details object"]
1669 #[serde(default, skip_serializing_if = "Option::is_none")]
1670 pub cvss: Option<serde_json::Value>,
1671 #[doc = "Indicates whether a patch is available or not"]
1672 #[serde(default, skip_serializing_if = "Option::is_none")]
1673 pub patchable: Option<bool>,
1674 #[doc = "List of CVEs"]
1675 #[serde(
1676 default,
1677 deserialize_with = "azure_core::util::deserialize_null_as_default",
1678 skip_serializing_if = "Vec::is_empty"
1679 )]
1680 pub cve: Vec<Cve>,
1681 #[doc = "Published time"]
1682 #[serde(rename = "publishedTime", default, with = "azure_core::date::rfc3339::option")]
1683 pub published_time: Option<::time::OffsetDateTime>,
1684 #[serde(
1685 rename = "vendorReferences",
1686 default,
1687 deserialize_with = "azure_core::util::deserialize_null_as_default",
1688 skip_serializing_if = "Vec::is_empty"
1689 )]
1690 pub vendor_references: Vec<VendorReference>,
1691 #[doc = "Name of the repository which the vulnerable image belongs to"]
1692 #[serde(rename = "repositoryName", default, skip_serializing_if = "Option::is_none")]
1693 pub repository_name: Option<String>,
1694 #[doc = "Digest of the vulnerable image"]
1695 #[serde(rename = "imageDigest", default, skip_serializing_if = "Option::is_none")]
1696 pub image_digest: Option<String>,
1697}
1698impl ContainerRegistryVulnerabilityProperties {
1699 pub fn new() -> Self {
1700 Self {
1701 type_: None,
1702 cvss: None,
1703 patchable: None,
1704 cve: Vec::new(),
1705 published_time: None,
1706 vendor_references: Vec::new(),
1707 repository_name: None,
1708 image_digest: None,
1709 }
1710 }
1711}
1712#[doc = "A custom alert rule."]
1713#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1714pub struct CustomAlertRule {
1715 #[doc = "The display name of the custom alert."]
1716 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
1717 pub display_name: Option<String>,
1718 #[doc = "The description of the custom alert."]
1719 #[serde(default, skip_serializing_if = "Option::is_none")]
1720 pub description: Option<String>,
1721 #[doc = "Status of the custom alert."]
1722 #[serde(rename = "isEnabled")]
1723 pub is_enabled: bool,
1724}
1725impl CustomAlertRule {
1726 pub fn new(is_enabled: bool) -> Self {
1727 Self {
1728 display_name: None,
1729 description: None,
1730 is_enabled,
1731 }
1732 }
1733}
1734#[doc = "The type of the custom alert rule."]
1735#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1736#[serde(tag = "ruleType")]
1737pub enum CustomAlertRuleUnion {}
1738#[doc = "Custom entity store assignment"]
1739#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1740pub struct CustomEntityStoreAssignment {
1741 #[serde(flatten)]
1742 pub resource: Resource,
1743 #[doc = "Metadata pertaining to creation and last modification of the resource."]
1744 #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
1745 pub system_data: Option<SystemData>,
1746 #[doc = "describes the custom entity store assignment properties"]
1747 #[serde(default, skip_serializing_if = "Option::is_none")]
1748 pub properties: Option<CustomEntityStoreAssignmentProperties>,
1749}
1750impl CustomEntityStoreAssignment {
1751 pub fn new() -> Self {
1752 Self::default()
1753 }
1754}
1755#[doc = "describes the custom entity store assignment properties"]
1756#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1757pub struct CustomEntityStoreAssignmentProperties {
1758 #[doc = "The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]"]
1759 #[serde(default, skip_serializing_if = "Option::is_none")]
1760 pub principal: Option<String>,
1761 #[doc = "The link to entity store database."]
1762 #[serde(rename = "entityStoreDatabaseLink", default, skip_serializing_if = "Option::is_none")]
1763 pub entity_store_database_link: Option<String>,
1764}
1765impl CustomEntityStoreAssignmentProperties {
1766 pub fn new() -> Self {
1767 Self::default()
1768 }
1769}
1770#[doc = "describes the custom entity store assignment request"]
1771#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1772pub struct CustomEntityStoreAssignmentRequest {
1773 #[doc = "describes properties of custom entity store assignment request"]
1774 #[serde(default, skip_serializing_if = "Option::is_none")]
1775 pub properties: Option<CustomEntityStoreAssignmentRequestProperties>,
1776}
1777impl CustomEntityStoreAssignmentRequest {
1778 pub fn new() -> Self {
1779 Self::default()
1780 }
1781}
1782#[doc = "describes properties of custom entity store assignment request"]
1783#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1784pub struct CustomEntityStoreAssignmentRequestProperties {
1785 #[doc = "The principal assigned with entity store. If not provided, will use caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]"]
1786 #[serde(default, skip_serializing_if = "Option::is_none")]
1787 pub principal: Option<String>,
1788}
1789impl CustomEntityStoreAssignmentRequestProperties {
1790 pub fn new() -> Self {
1791 Self::default()
1792 }
1793}
1794#[doc = "A list of custom entity store assignments"]
1795#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1796pub struct CustomEntityStoreAssignmentsListResult {
1797 #[doc = "Collection of custom entity store assignments"]
1798 #[serde(
1799 default,
1800 deserialize_with = "azure_core::util::deserialize_null_as_default",
1801 skip_serializing_if = "Vec::is_empty"
1802 )]
1803 pub value: Vec<CustomEntityStoreAssignment>,
1804 #[doc = "The link used to get the next page of operations."]
1805 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1806 pub next_link: Option<String>,
1807}
1808impl azure_core::Continuable for CustomEntityStoreAssignmentsListResult {
1809 type Continuation = String;
1810 fn continuation(&self) -> Option<Self::Continuation> {
1811 self.next_link.clone().filter(|value| !value.is_empty())
1812 }
1813}
1814impl CustomEntityStoreAssignmentsListResult {
1815 pub fn new() -> Self {
1816 Self::default()
1817 }
1818}
1819#[doc = "Represents a data export setting"]
1820#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1821pub struct DataExportSetting {
1822 #[serde(flatten)]
1823 pub setting: Setting,
1824 #[doc = "The data export setting properties"]
1825 #[serde(default, skip_serializing_if = "Option::is_none")]
1826 pub properties: Option<DataExportSettingProperties>,
1827}
1828impl DataExportSetting {
1829 pub fn new(setting: Setting) -> Self {
1830 Self { setting, properties: None }
1831 }
1832}
1833#[doc = "The data export setting properties"]
1834#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1835pub struct DataExportSettingProperties {
1836 #[doc = "Is the data export setting is enabled"]
1837 pub enabled: bool,
1838}
1839impl DataExportSettingProperties {
1840 pub fn new(enabled: bool) -> Self {
1841 Self { enabled }
1842 }
1843}
1844#[doc = "A custom alert rule that checks if a value (depends on the custom alert type) is denied."]
1845#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1846pub struct DenylistCustomAlertRule {
1847 #[serde(flatten)]
1848 pub list_custom_alert_rule: ListCustomAlertRule,
1849 #[doc = "The values to deny. The format of the values depends on the rule type."]
1850 #[serde(rename = "denylistValues")]
1851 pub denylist_values: Vec<String>,
1852}
1853impl DenylistCustomAlertRule {
1854 pub fn new(list_custom_alert_rule: ListCustomAlertRule, denylist_values: Vec<String>) -> Self {
1855 Self {
1856 list_custom_alert_rule,
1857 denylist_values,
1858 }
1859 }
1860}
1861#[doc = "The device security group resource"]
1862#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1863pub struct DeviceSecurityGroup {
1864 #[serde(flatten)]
1865 pub resource: Resource,
1866 #[doc = "describes properties of a security group."]
1867 #[serde(default, skip_serializing_if = "Option::is_none")]
1868 pub properties: Option<DeviceSecurityGroupProperties>,
1869}
1870impl DeviceSecurityGroup {
1871 pub fn new() -> Self {
1872 Self::default()
1873 }
1874}
1875#[doc = "List of device security groups"]
1876#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1877pub struct DeviceSecurityGroupList {
1878 #[doc = "List of device security group objects"]
1879 #[serde(
1880 default,
1881 deserialize_with = "azure_core::util::deserialize_null_as_default",
1882 skip_serializing_if = "Vec::is_empty"
1883 )]
1884 pub value: Vec<DeviceSecurityGroup>,
1885 #[doc = "The URI to fetch the next page."]
1886 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1887 pub next_link: Option<String>,
1888}
1889impl azure_core::Continuable for DeviceSecurityGroupList {
1890 type Continuation = String;
1891 fn continuation(&self) -> Option<Self::Continuation> {
1892 self.next_link.clone().filter(|value| !value.is_empty())
1893 }
1894}
1895impl DeviceSecurityGroupList {
1896 pub fn new() -> Self {
1897 Self::default()
1898 }
1899}
1900#[doc = "describes properties of a security group."]
1901#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1902pub struct DeviceSecurityGroupProperties {
1903 #[doc = "The list of custom alert threshold rules."]
1904 #[serde(
1905 rename = "thresholdRules",
1906 default,
1907 deserialize_with = "azure_core::util::deserialize_null_as_default",
1908 skip_serializing_if = "Vec::is_empty"
1909 )]
1910 pub threshold_rules: Vec<ThresholdCustomAlertRule>,
1911 #[doc = "The list of custom alert time-window rules."]
1912 #[serde(
1913 rename = "timeWindowRules",
1914 default,
1915 deserialize_with = "azure_core::util::deserialize_null_as_default",
1916 skip_serializing_if = "Vec::is_empty"
1917 )]
1918 pub time_window_rules: Vec<TimeWindowCustomAlertRule>,
1919 #[doc = "The allow-list custom alert rules."]
1920 #[serde(
1921 rename = "allowlistRules",
1922 default,
1923 deserialize_with = "azure_core::util::deserialize_null_as_default",
1924 skip_serializing_if = "Vec::is_empty"
1925 )]
1926 pub allowlist_rules: Vec<AllowlistCustomAlertRule>,
1927 #[doc = "The deny-list custom alert rules."]
1928 #[serde(
1929 rename = "denylistRules",
1930 default,
1931 deserialize_with = "azure_core::util::deserialize_null_as_default",
1932 skip_serializing_if = "Vec::is_empty"
1933 )]
1934 pub denylist_rules: Vec<DenylistCustomAlertRule>,
1935}
1936impl DeviceSecurityGroupProperties {
1937 pub fn new() -> Self {
1938 Self::default()
1939 }
1940}
1941#[doc = "Number of direct method invokes is not in allowed range."]
1942#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1943pub struct DirectMethodInvokesNotInAllowedRange {
1944 #[serde(flatten)]
1945 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
1946}
1947impl DirectMethodInvokesNotInAllowedRange {
1948 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
1949 Self {
1950 time_window_custom_alert_rule,
1951 }
1952 }
1953}
1954#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1955pub struct DiscoveredSecuritySolution {
1956 #[serde(flatten)]
1957 pub resource: Resource,
1958 #[serde(flatten)]
1959 pub location: Location,
1960 pub properties: DiscoveredSecuritySolutionProperties,
1961}
1962impl DiscoveredSecuritySolution {
1963 pub fn new(properties: DiscoveredSecuritySolutionProperties) -> Self {
1964 Self {
1965 resource: Resource::default(),
1966 location: Location::default(),
1967 properties,
1968 }
1969 }
1970}
1971#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1972pub struct DiscoveredSecuritySolutionList {
1973 #[serde(
1974 default,
1975 deserialize_with = "azure_core::util::deserialize_null_as_default",
1976 skip_serializing_if = "Vec::is_empty"
1977 )]
1978 pub value: Vec<DiscoveredSecuritySolution>,
1979 #[doc = "The URI to fetch the next page."]
1980 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1981 pub next_link: Option<String>,
1982}
1983impl azure_core::Continuable for DiscoveredSecuritySolutionList {
1984 type Continuation = String;
1985 fn continuation(&self) -> Option<Self::Continuation> {
1986 self.next_link.clone().filter(|value| !value.is_empty())
1987 }
1988}
1989impl DiscoveredSecuritySolutionList {
1990 pub fn new() -> Self {
1991 Self::default()
1992 }
1993}
1994#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1995pub struct DiscoveredSecuritySolutionProperties {
1996 #[doc = "The security family of the discovered solution"]
1997 #[serde(rename = "securityFamily")]
1998 pub security_family: discovered_security_solution_properties::SecurityFamily,
1999 #[doc = "The security solutions' image offer"]
2000 pub offer: String,
2001 #[doc = "The security solutions' image publisher"]
2002 pub publisher: String,
2003 #[doc = "The security solutions' image sku"]
2004 pub sku: String,
2005}
2006impl DiscoveredSecuritySolutionProperties {
2007 pub fn new(
2008 security_family: discovered_security_solution_properties::SecurityFamily,
2009 offer: String,
2010 publisher: String,
2011 sku: String,
2012 ) -> Self {
2013 Self {
2014 security_family,
2015 offer,
2016 publisher,
2017 sku,
2018 }
2019 }
2020}
2021pub mod discovered_security_solution_properties {
2022 use super::*;
2023 #[doc = "The security family of the discovered solution"]
2024 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2025 #[serde(remote = "SecurityFamily")]
2026 pub enum SecurityFamily {
2027 Waf,
2028 Ngfw,
2029 SaasWaf,
2030 Va,
2031 #[serde(skip_deserializing)]
2032 UnknownValue(String),
2033 }
2034 impl FromStr for SecurityFamily {
2035 type Err = value::Error;
2036 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2037 Self::deserialize(s.into_deserializer())
2038 }
2039 }
2040 impl<'de> Deserialize<'de> for SecurityFamily {
2041 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2042 where
2043 D: Deserializer<'de>,
2044 {
2045 let s = String::deserialize(deserializer)?;
2046 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2047 Ok(deserialized)
2048 }
2049 }
2050 impl Serialize for SecurityFamily {
2051 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2052 where
2053 S: Serializer,
2054 {
2055 match self {
2056 Self::Waf => serializer.serialize_unit_variant("SecurityFamily", 0u32, "Waf"),
2057 Self::Ngfw => serializer.serialize_unit_variant("SecurityFamily", 1u32, "Ngfw"),
2058 Self::SaasWaf => serializer.serialize_unit_variant("SecurityFamily", 2u32, "SaasWaf"),
2059 Self::Va => serializer.serialize_unit_variant("SecurityFamily", 3u32, "Va"),
2060 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2061 }
2062 }
2063 }
2064}
2065#[doc = "Entity tag is used for comparing two or more entities from the same requested resource."]
2066#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2067pub struct ETag {
2068 #[doc = "Entity tag is used for comparing two or more entities from the same requested resource."]
2069 #[serde(default, skip_serializing_if = "Option::is_none")]
2070 pub etag: Option<String>,
2071}
2072impl ETag {
2073 pub fn new() -> Self {
2074 Self::default()
2075 }
2076}
2077#[doc = "The type of the environment data."]
2078#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2079#[serde(tag = "environmentType")]
2080pub enum EnvironmentDataUnion {
2081 AwsAccount(AwsEnvironmentData),
2082 AzureDevOpsScope(AzureDevOpsScopeEnvironmentData),
2083 GcpProject(GcpProjectEnvironmentData),
2084 GithubScope(GithubScopeEnvironmentData),
2085}
2086#[doc = "The resource management error additional info."]
2087#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2088pub struct ErrorAdditionalInfo {
2089 #[doc = "The additional info type."]
2090 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2091 pub type_: Option<String>,
2092 #[doc = "The additional info."]
2093 #[serde(default, skip_serializing_if = "Option::is_none")]
2094 pub info: Option<serde_json::Value>,
2095}
2096impl ErrorAdditionalInfo {
2097 pub fn new() -> Self {
2098 Self::default()
2099 }
2100}
2101#[doc = "Represents a security solution external to Microsoft Defender for Cloud which sends information to an OMS workspace and whose data is displayed by Microsoft Defender for Cloud."]
2102#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2103pub struct ExternalSecuritySolution {
2104 #[serde(flatten)]
2105 pub resource: Resource,
2106 #[serde(flatten)]
2107 pub external_security_solution_kind: ExternalSecuritySolutionKind,
2108 #[serde(flatten)]
2109 pub location: Location,
2110}
2111impl ExternalSecuritySolution {
2112 pub fn new() -> Self {
2113 Self::default()
2114 }
2115}
2116#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2117#[serde(tag = "kind")]
2118pub enum ExternalSecuritySolutionUnion {
2119 #[serde(rename = "AAD")]
2120 Aad(AadExternalSecuritySolution),
2121 #[serde(rename = "ATA")]
2122 Ata(AtaExternalSecuritySolution),
2123 #[serde(rename = "CEF")]
2124 Cef(CefExternalSecuritySolution),
2125}
2126#[doc = "Describes an Azure resource with kind"]
2127#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2128pub struct ExternalSecuritySolutionKind {
2129 #[doc = "The kind of the external solution"]
2130 #[serde(default, skip_serializing_if = "Option::is_none")]
2131 pub kind: Option<external_security_solution_kind::Kind>,
2132}
2133impl ExternalSecuritySolutionKind {
2134 pub fn new() -> Self {
2135 Self::default()
2136 }
2137}
2138pub mod external_security_solution_kind {
2139 use super::*;
2140 #[doc = "The kind of the external solution"]
2141 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2142 #[serde(remote = "Kind")]
2143 pub enum Kind {
2144 #[serde(rename = "CEF")]
2145 Cef,
2146 #[serde(rename = "ATA")]
2147 Ata,
2148 #[serde(rename = "AAD")]
2149 Aad,
2150 #[serde(skip_deserializing)]
2151 UnknownValue(String),
2152 }
2153 impl FromStr for Kind {
2154 type Err = value::Error;
2155 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2156 Self::deserialize(s.into_deserializer())
2157 }
2158 }
2159 impl<'de> Deserialize<'de> for Kind {
2160 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2161 where
2162 D: Deserializer<'de>,
2163 {
2164 let s = String::deserialize(deserializer)?;
2165 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2166 Ok(deserialized)
2167 }
2168 }
2169 impl Serialize for Kind {
2170 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2171 where
2172 S: Serializer,
2173 {
2174 match self {
2175 Self::Cef => serializer.serialize_unit_variant("Kind", 0u32, "CEF"),
2176 Self::Ata => serializer.serialize_unit_variant("Kind", 1u32, "ATA"),
2177 Self::Aad => serializer.serialize_unit_variant("Kind", 2u32, "AAD"),
2178 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2179 }
2180 }
2181 }
2182}
2183#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2184pub struct ExternalSecuritySolutionList {
2185 #[serde(
2186 default,
2187 deserialize_with = "azure_core::util::deserialize_null_as_default",
2188 skip_serializing_if = "Vec::is_empty"
2189 )]
2190 pub value: Vec<ExternalSecuritySolutionUnion>,
2191 #[doc = "The URI to fetch the next page."]
2192 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2193 pub next_link: Option<String>,
2194}
2195impl azure_core::Continuable for ExternalSecuritySolutionList {
2196 type Continuation = String;
2197 fn continuation(&self) -> Option<Self::Continuation> {
2198 self.next_link.clone().filter(|value| !value.is_empty())
2199 }
2200}
2201impl ExternalSecuritySolutionList {
2202 pub fn new() -> Self {
2203 Self::default()
2204 }
2205}
2206#[doc = "The solution properties (correspond to the solution kind)"]
2207#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2208pub struct ExternalSecuritySolutionProperties {
2209 #[serde(rename = "deviceVendor", default, skip_serializing_if = "Option::is_none")]
2210 pub device_vendor: Option<String>,
2211 #[serde(rename = "deviceType", default, skip_serializing_if = "Option::is_none")]
2212 pub device_type: Option<String>,
2213 #[serde(default, skip_serializing_if = "Option::is_none")]
2214 pub workspace: Option<ConnectedWorkspace>,
2215}
2216impl ExternalSecuritySolutionProperties {
2217 pub fn new() -> Self {
2218 Self::default()
2219 }
2220}
2221#[doc = "Number of failed local logins is not in allowed range."]
2222#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2223pub struct FailedLocalLoginsNotInAllowedRange {
2224 #[serde(flatten)]
2225 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
2226}
2227impl FailedLocalLoginsNotInAllowedRange {
2228 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
2229 Self {
2230 time_window_custom_alert_rule,
2231 }
2232 }
2233}
2234#[doc = "Number of file uploads is not in allowed range."]
2235#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2236pub struct FileUploadsNotInAllowedRange {
2237 #[serde(flatten)]
2238 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
2239}
2240impl FileUploadsNotInAllowedRange {
2241 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
2242 Self {
2243 time_window_custom_alert_rule,
2244 }
2245 }
2246}
2247#[doc = "GCP cloud account connector based service to service credentials, the credentials are composed of the organization ID and a JSON API key (write only)"]
2248#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2249pub struct GcpCredentialsDetailsProperties {
2250 #[serde(flatten)]
2251 pub authentication_details_properties: AuthenticationDetailsProperties,
2252 #[doc = "The organization ID of the GCP cloud account"]
2253 #[serde(rename = "organizationId")]
2254 pub organization_id: String,
2255 #[doc = "Type field of the API key (write only)"]
2256 #[serde(rename = "type")]
2257 pub type_: String,
2258 #[doc = "Project ID field of the API key (write only)"]
2259 #[serde(rename = "projectId")]
2260 pub project_id: String,
2261 #[doc = "Private key ID field of the API key (write only)"]
2262 #[serde(rename = "privateKeyId")]
2263 pub private_key_id: String,
2264 #[doc = "Private key field of the API key (write only)"]
2265 #[serde(rename = "privateKey")]
2266 pub private_key: String,
2267 #[doc = "Client email field of the API key (write only)"]
2268 #[serde(rename = "clientEmail")]
2269 pub client_email: String,
2270 #[doc = "Client ID field of the API key (write only)"]
2271 #[serde(rename = "clientId")]
2272 pub client_id: String,
2273 #[doc = "Auth URI field of the API key (write only)"]
2274 #[serde(rename = "authUri")]
2275 pub auth_uri: String,
2276 #[doc = "Token URI field of the API key (write only)"]
2277 #[serde(rename = "tokenUri")]
2278 pub token_uri: String,
2279 #[doc = "Auth provider x509 certificate URL field of the API key (write only)"]
2280 #[serde(rename = "authProviderX509CertUrl")]
2281 pub auth_provider_x509_cert_url: String,
2282 #[doc = "Client x509 certificate URL field of the API key (write only)"]
2283 #[serde(rename = "clientX509CertUrl")]
2284 pub client_x509_cert_url: String,
2285}
2286impl GcpCredentialsDetailsProperties {
2287 pub fn new(
2288 authentication_details_properties: AuthenticationDetailsProperties,
2289 organization_id: String,
2290 type_: String,
2291 project_id: String,
2292 private_key_id: String,
2293 private_key: String,
2294 client_email: String,
2295 client_id: String,
2296 auth_uri: String,
2297 token_uri: String,
2298 auth_provider_x509_cert_url: String,
2299 client_x509_cert_url: String,
2300 ) -> Self {
2301 Self {
2302 authentication_details_properties,
2303 organization_id,
2304 type_,
2305 project_id,
2306 private_key_id,
2307 private_key,
2308 client_email,
2309 client_id,
2310 auth_uri,
2311 token_uri,
2312 auth_provider_x509_cert_url,
2313 client_x509_cert_url,
2314 }
2315 }
2316}
2317#[doc = "The multi cloud account's membership type in the organization"]
2318#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2319#[serde(tag = "organizationMembershipType")]
2320pub enum GcpOrganizationalDataUnion {
2321 Member(GcpOrganizationalDataMember),
2322 Organization(GcpOrganizationalDataOrganization),
2323}
2324#[doc = "The gcpOrganization data for the member account"]
2325#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2326pub struct GcpOrganizationalDataMember {
2327 #[doc = "If the multi cloud account is not of membership type organization, this will be the ID of the project's parent"]
2328 #[serde(rename = "parentHierarchyId", default, skip_serializing_if = "Option::is_none")]
2329 pub parent_hierarchy_id: Option<String>,
2330 #[doc = "The GCP management project number from organizational onboarding"]
2331 #[serde(rename = "managementProjectNumber", default, skip_serializing_if = "Option::is_none")]
2332 pub management_project_number: Option<String>,
2333}
2334impl GcpOrganizationalDataMember {
2335 pub fn new() -> Self {
2336 Self {
2337 parent_hierarchy_id: None,
2338 management_project_number: None,
2339 }
2340 }
2341}
2342#[doc = "The gcpOrganization data for the parent account"]
2343#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2344pub struct GcpOrganizationalDataOrganization {
2345 #[doc = "If the multi cloud account is of membership type organization, list of accounts excluded from offering"]
2346 #[serde(
2347 rename = "excludedProjectNumbers",
2348 default,
2349 deserialize_with = "azure_core::util::deserialize_null_as_default",
2350 skip_serializing_if = "Vec::is_empty"
2351 )]
2352 pub excluded_project_numbers: Vec<String>,
2353 #[doc = "The service account email address which represents the organization level permissions container."]
2354 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
2355 pub service_account_email_address: Option<String>,
2356 #[doc = "The GCP workload identity provider id which represents the permissions required to auto provision security connectors"]
2357 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
2358 pub workload_identity_provider_id: Option<String>,
2359}
2360impl GcpOrganizationalDataOrganization {
2361 pub fn new() -> Self {
2362 Self {
2363 excluded_project_numbers: Vec::new(),
2364 service_account_email_address: None,
2365 workload_identity_provider_id: None,
2366 }
2367 }
2368}
2369#[doc = "The details about the project represented by the security connector"]
2370#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2371pub struct GcpProjectDetails {
2372 #[doc = "The unique GCP Project number"]
2373 #[serde(rename = "projectNumber", default, skip_serializing_if = "Option::is_none")]
2374 pub project_number: Option<String>,
2375 #[doc = "The GCP Project id"]
2376 #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
2377 pub project_id: Option<String>,
2378 #[doc = "The GCP workload identity federation pool id"]
2379 #[serde(rename = "workloadIdentityPoolId", default, skip_serializing_if = "Option::is_none")]
2380 pub workload_identity_pool_id: Option<String>,
2381}
2382impl GcpProjectDetails {
2383 pub fn new() -> Self {
2384 Self::default()
2385 }
2386}
2387#[doc = "The GCP project connector environment data"]
2388#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2389pub struct GcpProjectEnvironmentData {
2390 #[doc = "The gcpOrganization data"]
2391 #[serde(rename = "organizationalData", default, skip_serializing_if = "Option::is_none")]
2392 pub organizational_data: Option<GcpOrganizationalDataUnion>,
2393 #[doc = "The details about the project represented by the security connector"]
2394 #[serde(rename = "projectDetails", default, skip_serializing_if = "Option::is_none")]
2395 pub project_details: Option<GcpProjectDetails>,
2396}
2397impl GcpProjectEnvironmentData {
2398 pub fn new() -> Self {
2399 Self {
2400 organizational_data: None,
2401 project_details: None,
2402 }
2403 }
2404}
2405#[doc = "The github scope connector's environment data"]
2406#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2407pub struct GithubScopeEnvironmentData {}
2408impl GithubScopeEnvironmentData {
2409 pub fn new() -> Self {
2410 Self {}
2411 }
2412}
2413#[doc = "Number of cloud to device messages (HTTP protocol) is not in allowed range."]
2414#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2415pub struct HttpC2dMessagesNotInAllowedRange {
2416 #[serde(flatten)]
2417 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
2418}
2419impl HttpC2dMessagesNotInAllowedRange {
2420 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
2421 Self {
2422 time_window_custom_alert_rule,
2423 }
2424 }
2425}
2426#[doc = "Number of rejected cloud to device messages (HTTP protocol) is not in allowed range."]
2427#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2428pub struct HttpC2dRejectedMessagesNotInAllowedRange {
2429 #[serde(flatten)]
2430 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
2431}
2432impl HttpC2dRejectedMessagesNotInAllowedRange {
2433 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
2434 Self {
2435 time_window_custom_alert_rule,
2436 }
2437 }
2438}
2439#[doc = "Number of device to cloud messages (HTTP protocol) is not in allowed range."]
2440#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2441pub struct HttpD2cMessagesNotInAllowedRange {
2442 #[serde(flatten)]
2443 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
2444}
2445impl HttpD2cMessagesNotInAllowedRange {
2446 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
2447 Self {
2448 time_window_custom_alert_rule,
2449 }
2450 }
2451}
2452#[doc = "Settings for hybrid compute management"]
2453#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2454pub struct HybridComputeSettingsProperties {
2455 #[doc = "State of the service principal and its secret"]
2456 #[serde(rename = "hybridComputeProvisioningState", default, skip_serializing_if = "Option::is_none")]
2457 pub hybrid_compute_provisioning_state: Option<hybrid_compute_settings_properties::HybridComputeProvisioningState>,
2458 #[doc = "Whether or not to automatically install Azure Arc (hybrid compute) agents on machines"]
2459 #[serde(rename = "autoProvision")]
2460 pub auto_provision: hybrid_compute_settings_properties::AutoProvision,
2461 #[doc = "The name of the resource group where Arc (Hybrid Compute) connectors are connected."]
2462 #[serde(rename = "resourceGroupName", default, skip_serializing_if = "Option::is_none")]
2463 pub resource_group_name: Option<String>,
2464 #[doc = "The location where the metadata of machines will be stored"]
2465 #[serde(default, skip_serializing_if = "Option::is_none")]
2466 pub region: Option<String>,
2467 #[doc = "For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine can use."]
2468 #[serde(rename = "proxyServer", default, skip_serializing_if = "Option::is_none")]
2469 pub proxy_server: Option<ProxyServerProperties>,
2470 #[doc = "Details of the service principal."]
2471 #[serde(rename = "servicePrincipal", default, skip_serializing_if = "Option::is_none")]
2472 pub service_principal: Option<ServicePrincipalProperties>,
2473}
2474impl HybridComputeSettingsProperties {
2475 pub fn new(auto_provision: hybrid_compute_settings_properties::AutoProvision) -> Self {
2476 Self {
2477 hybrid_compute_provisioning_state: None,
2478 auto_provision,
2479 resource_group_name: None,
2480 region: None,
2481 proxy_server: None,
2482 service_principal: None,
2483 }
2484 }
2485}
2486pub mod hybrid_compute_settings_properties {
2487 use super::*;
2488 #[doc = "State of the service principal and its secret"]
2489 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2490 #[serde(remote = "HybridComputeProvisioningState")]
2491 pub enum HybridComputeProvisioningState {
2492 Valid,
2493 Invalid,
2494 Expired,
2495 #[serde(skip_deserializing)]
2496 UnknownValue(String),
2497 }
2498 impl FromStr for HybridComputeProvisioningState {
2499 type Err = value::Error;
2500 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2501 Self::deserialize(s.into_deserializer())
2502 }
2503 }
2504 impl<'de> Deserialize<'de> for HybridComputeProvisioningState {
2505 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2506 where
2507 D: Deserializer<'de>,
2508 {
2509 let s = String::deserialize(deserializer)?;
2510 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2511 Ok(deserialized)
2512 }
2513 }
2514 impl Serialize for HybridComputeProvisioningState {
2515 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2516 where
2517 S: Serializer,
2518 {
2519 match self {
2520 Self::Valid => serializer.serialize_unit_variant("HybridComputeProvisioningState", 0u32, "Valid"),
2521 Self::Invalid => serializer.serialize_unit_variant("HybridComputeProvisioningState", 1u32, "Invalid"),
2522 Self::Expired => serializer.serialize_unit_variant("HybridComputeProvisioningState", 2u32, "Expired"),
2523 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2524 }
2525 }
2526 }
2527 #[doc = "Whether or not to automatically install Azure Arc (hybrid compute) agents on machines"]
2528 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2529 #[serde(remote = "AutoProvision")]
2530 pub enum AutoProvision {
2531 On,
2532 Off,
2533 #[serde(skip_deserializing)]
2534 UnknownValue(String),
2535 }
2536 impl FromStr for AutoProvision {
2537 type Err = value::Error;
2538 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2539 Self::deserialize(s.into_deserializer())
2540 }
2541 }
2542 impl<'de> Deserialize<'de> for AutoProvision {
2543 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2544 where
2545 D: Deserializer<'de>,
2546 {
2547 let s = String::deserialize(deserializer)?;
2548 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2549 Ok(deserialized)
2550 }
2551 }
2552 impl Serialize for AutoProvision {
2553 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2554 where
2555 S: Serializer,
2556 {
2557 match self {
2558 Self::On => serializer.serialize_unit_variant("AutoProvision", 0u32, "On"),
2559 Self::Off => serializer.serialize_unit_variant("AutoProvision", 1u32, "Off"),
2560 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2561 }
2562 }
2563 }
2564}
2565#[doc = "The information type keyword."]
2566#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2567pub struct InformationProtectionKeyword {
2568 #[doc = "The keyword pattern."]
2569 #[serde(default, skip_serializing_if = "Option::is_none")]
2570 pub pattern: Option<String>,
2571 #[doc = "Indicates whether the keyword is custom or not."]
2572 #[serde(default, skip_serializing_if = "Option::is_none")]
2573 pub custom: Option<bool>,
2574 #[doc = "Indicates whether the keyword can be applied on numeric types or not."]
2575 #[serde(rename = "canBeNumeric", default, skip_serializing_if = "Option::is_none")]
2576 pub can_be_numeric: Option<bool>,
2577 #[doc = "Indicates whether the keyword is excluded or not."]
2578 #[serde(default, skip_serializing_if = "Option::is_none")]
2579 pub excluded: Option<bool>,
2580}
2581impl InformationProtectionKeyword {
2582 pub fn new() -> Self {
2583 Self::default()
2584 }
2585}
2586#[doc = "Information protection policy."]
2587#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2588pub struct InformationProtectionPolicy {
2589 #[serde(flatten)]
2590 pub resource: Resource,
2591 #[doc = "describes properties of an information protection policy."]
2592 #[serde(default, skip_serializing_if = "Option::is_none")]
2593 pub properties: Option<InformationProtectionPolicyProperties>,
2594}
2595impl InformationProtectionPolicy {
2596 pub fn new() -> Self {
2597 Self::default()
2598 }
2599}
2600#[doc = "Information protection policies response."]
2601#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2602pub struct InformationProtectionPolicyList {
2603 #[doc = "List of information protection policies."]
2604 #[serde(
2605 default,
2606 deserialize_with = "azure_core::util::deserialize_null_as_default",
2607 skip_serializing_if = "Vec::is_empty"
2608 )]
2609 pub value: Vec<InformationProtectionPolicy>,
2610 #[doc = "The URI to fetch the next page."]
2611 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2612 pub next_link: Option<String>,
2613}
2614impl azure_core::Continuable for InformationProtectionPolicyList {
2615 type Continuation = String;
2616 fn continuation(&self) -> Option<Self::Continuation> {
2617 self.next_link.clone().filter(|value| !value.is_empty())
2618 }
2619}
2620impl InformationProtectionPolicyList {
2621 pub fn new() -> Self {
2622 Self::default()
2623 }
2624}
2625#[doc = "describes properties of an information protection policy."]
2626#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2627pub struct InformationProtectionPolicyProperties {
2628 #[doc = "Describes the last UTC time the policy was modified."]
2629 #[serde(rename = "lastModifiedUtc", default, with = "azure_core::date::rfc3339::option")]
2630 pub last_modified_utc: Option<::time::OffsetDateTime>,
2631 #[doc = "Describes the version of the policy."]
2632 #[serde(default, skip_serializing_if = "Option::is_none")]
2633 pub version: Option<String>,
2634 #[doc = "Dictionary of sensitivity labels."]
2635 #[serde(default, skip_serializing_if = "Option::is_none")]
2636 pub labels: Option<serde_json::Value>,
2637 #[doc = "The sensitivity information types."]
2638 #[serde(rename = "informationTypes", default, skip_serializing_if = "Option::is_none")]
2639 pub information_types: Option<serde_json::Value>,
2640}
2641impl InformationProtectionPolicyProperties {
2642 pub fn new() -> Self {
2643 Self::default()
2644 }
2645}
2646#[doc = "The information type."]
2647#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2648pub struct InformationType {
2649 #[doc = "The name of the information type."]
2650 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
2651 pub display_name: Option<String>,
2652 #[doc = "The description of the information type."]
2653 #[serde(default, skip_serializing_if = "Option::is_none")]
2654 pub description: Option<String>,
2655 #[doc = "The order of the information type."]
2656 #[serde(default, skip_serializing_if = "Option::is_none")]
2657 pub order: Option<i32>,
2658 #[doc = "The recommended label id to be associated with this information type."]
2659 #[serde(rename = "recommendedLabelId", default, skip_serializing_if = "Option::is_none")]
2660 pub recommended_label_id: Option<String>,
2661 #[doc = "Indicates whether the information type is enabled or not."]
2662 #[serde(default, skip_serializing_if = "Option::is_none")]
2663 pub enabled: Option<bool>,
2664 #[doc = "Indicates whether the information type is custom or not."]
2665 #[serde(default, skip_serializing_if = "Option::is_none")]
2666 pub custom: Option<bool>,
2667 #[doc = "The information type keywords."]
2668 #[serde(
2669 default,
2670 deserialize_with = "azure_core::util::deserialize_null_as_default",
2671 skip_serializing_if = "Vec::is_empty"
2672 )]
2673 pub keywords: Vec<InformationProtectionKeyword>,
2674}
2675impl InformationType {
2676 pub fn new() -> Self {
2677 Self::default()
2678 }
2679}
2680#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2681pub struct JitNetworkAccessPoliciesList {
2682 #[serde(
2683 default,
2684 deserialize_with = "azure_core::util::deserialize_null_as_default",
2685 skip_serializing_if = "Vec::is_empty"
2686 )]
2687 pub value: Vec<JitNetworkAccessPolicy>,
2688 #[doc = "The URI to fetch the next page."]
2689 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
2690 pub next_link: Option<String>,
2691}
2692impl azure_core::Continuable for JitNetworkAccessPoliciesList {
2693 type Continuation = String;
2694 fn continuation(&self) -> Option<Self::Continuation> {
2695 self.next_link.clone().filter(|value| !value.is_empty())
2696 }
2697}
2698impl JitNetworkAccessPoliciesList {
2699 pub fn new() -> Self {
2700 Self::default()
2701 }
2702}
2703#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2704pub struct JitNetworkAccessPolicy {
2705 #[serde(flatten)]
2706 pub resource: Resource,
2707 #[serde(flatten)]
2708 pub kind: Kind,
2709 #[serde(flatten)]
2710 pub location: Location,
2711 pub properties: JitNetworkAccessPolicyProperties,
2712}
2713impl JitNetworkAccessPolicy {
2714 pub fn new(properties: JitNetworkAccessPolicyProperties) -> Self {
2715 Self {
2716 resource: Resource::default(),
2717 kind: Kind::default(),
2718 location: Location::default(),
2719 properties,
2720 }
2721 }
2722}
2723#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2724pub struct JitNetworkAccessPolicyInitiatePort {
2725 pub number: PortNumber,
2726 #[doc = "Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request."]
2727 #[serde(rename = "allowedSourceAddressPrefix", default, skip_serializing_if = "Option::is_none")]
2728 pub allowed_source_address_prefix: Option<String>,
2729 #[doc = "The time to close the request in UTC"]
2730 #[serde(rename = "endTimeUtc", with = "azure_core::date::rfc3339")]
2731 pub end_time_utc: ::time::OffsetDateTime,
2732}
2733impl JitNetworkAccessPolicyInitiatePort {
2734 pub fn new(number: PortNumber, end_time_utc: ::time::OffsetDateTime) -> Self {
2735 Self {
2736 number,
2737 allowed_source_address_prefix: None,
2738 end_time_utc,
2739 }
2740 }
2741}
2742#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2743pub struct JitNetworkAccessPolicyInitiateRequest {
2744 #[doc = "A list of virtual machines & ports to open access for"]
2745 #[serde(rename = "virtualMachines")]
2746 pub virtual_machines: Vec<JitNetworkAccessPolicyInitiateVirtualMachine>,
2747 #[doc = "The justification for making the initiate request"]
2748 #[serde(default, skip_serializing_if = "Option::is_none")]
2749 pub justification: Option<String>,
2750}
2751impl JitNetworkAccessPolicyInitiateRequest {
2752 pub fn new(virtual_machines: Vec<JitNetworkAccessPolicyInitiateVirtualMachine>) -> Self {
2753 Self {
2754 virtual_machines,
2755 justification: None,
2756 }
2757 }
2758}
2759#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2760pub struct JitNetworkAccessPolicyInitiateVirtualMachine {
2761 #[doc = "Resource ID of the virtual machine that is linked to this policy"]
2762 pub id: String,
2763 #[doc = "The ports to open for the resource with the `id`"]
2764 pub ports: Vec<JitNetworkAccessPolicyInitiatePort>,
2765}
2766impl JitNetworkAccessPolicyInitiateVirtualMachine {
2767 pub fn new(id: String, ports: Vec<JitNetworkAccessPolicyInitiatePort>) -> Self {
2768 Self { id, ports }
2769 }
2770}
2771#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2772pub struct JitNetworkAccessPolicyProperties {
2773 #[doc = "Configurations for Microsoft.Compute/virtualMachines resource type."]
2774 #[serde(rename = "virtualMachines")]
2775 pub virtual_machines: Vec<JitNetworkAccessPolicyVirtualMachine>,
2776 #[serde(
2777 default,
2778 deserialize_with = "azure_core::util::deserialize_null_as_default",
2779 skip_serializing_if = "Vec::is_empty"
2780 )]
2781 pub requests: Vec<JitNetworkAccessRequest>,
2782 #[doc = "Gets the provisioning state of the Just-in-Time policy."]
2783 #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
2784 pub provisioning_state: Option<String>,
2785}
2786impl JitNetworkAccessPolicyProperties {
2787 pub fn new(virtual_machines: Vec<JitNetworkAccessPolicyVirtualMachine>) -> Self {
2788 Self {
2789 virtual_machines,
2790 requests: Vec::new(),
2791 provisioning_state: None,
2792 }
2793 }
2794}
2795#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2796pub struct JitNetworkAccessPolicyVirtualMachine {
2797 #[doc = "Resource ID of the virtual machine that is linked to this policy"]
2798 pub id: String,
2799 #[doc = "Port configurations for the virtual machine"]
2800 pub ports: Vec<JitNetworkAccessPortRule>,
2801 #[doc = "Public IP address of the Azure Firewall that is linked to this policy, if applicable"]
2802 #[serde(rename = "publicIpAddress", default, skip_serializing_if = "Option::is_none")]
2803 pub public_ip_address: Option<String>,
2804}
2805impl JitNetworkAccessPolicyVirtualMachine {
2806 pub fn new(id: String, ports: Vec<JitNetworkAccessPortRule>) -> Self {
2807 Self {
2808 id,
2809 ports,
2810 public_ip_address: None,
2811 }
2812 }
2813}
2814#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2815pub struct JitNetworkAccessPortRule {
2816 pub number: PortNumber,
2817 pub protocol: jit_network_access_port_rule::Protocol,
2818 #[doc = "Mutually exclusive with the \"allowedSourceAddressPrefixes\" parameter. Should be an IP address or CIDR, for example \"192.168.0.3\" or \"192.168.0.0/16\"."]
2819 #[serde(rename = "allowedSourceAddressPrefix", default, skip_serializing_if = "Option::is_none")]
2820 pub allowed_source_address_prefix: Option<String>,
2821 #[doc = "Mutually exclusive with the \"allowedSourceAddressPrefix\" parameter."]
2822 #[serde(
2823 rename = "allowedSourceAddressPrefixes",
2824 default,
2825 deserialize_with = "azure_core::util::deserialize_null_as_default",
2826 skip_serializing_if = "Vec::is_empty"
2827 )]
2828 pub allowed_source_address_prefixes: Vec<String>,
2829 #[doc = "Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day"]
2830 #[serde(rename = "maxRequestAccessDuration")]
2831 pub max_request_access_duration: String,
2832}
2833impl JitNetworkAccessPortRule {
2834 pub fn new(number: PortNumber, protocol: jit_network_access_port_rule::Protocol, max_request_access_duration: String) -> Self {
2835 Self {
2836 number,
2837 protocol,
2838 allowed_source_address_prefix: None,
2839 allowed_source_address_prefixes: Vec::new(),
2840 max_request_access_duration,
2841 }
2842 }
2843}
2844pub mod jit_network_access_port_rule {
2845 use super::*;
2846 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2847 #[serde(remote = "Protocol")]
2848 pub enum Protocol {
2849 #[serde(rename = "TCP")]
2850 Tcp,
2851 #[serde(rename = "UDP")]
2852 Udp,
2853 #[serde(rename = "*")]
2854 U2a,
2855 #[serde(skip_deserializing)]
2856 UnknownValue(String),
2857 }
2858 impl FromStr for Protocol {
2859 type Err = value::Error;
2860 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2861 Self::deserialize(s.into_deserializer())
2862 }
2863 }
2864 impl<'de> Deserialize<'de> for Protocol {
2865 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2866 where
2867 D: Deserializer<'de>,
2868 {
2869 let s = String::deserialize(deserializer)?;
2870 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2871 Ok(deserialized)
2872 }
2873 }
2874 impl Serialize for Protocol {
2875 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2876 where
2877 S: Serializer,
2878 {
2879 match self {
2880 Self::Tcp => serializer.serialize_unit_variant("Protocol", 0u32, "TCP"),
2881 Self::Udp => serializer.serialize_unit_variant("Protocol", 1u32, "UDP"),
2882 Self::U2a => serializer.serialize_unit_variant("Protocol", 2u32, "*"),
2883 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2884 }
2885 }
2886 }
2887}
2888#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2889pub struct JitNetworkAccessRequest {
2890 #[serde(rename = "virtualMachines")]
2891 pub virtual_machines: Vec<JitNetworkAccessRequestVirtualMachine>,
2892 #[doc = "The start time of the request in UTC"]
2893 #[serde(rename = "startTimeUtc", with = "azure_core::date::rfc3339")]
2894 pub start_time_utc: ::time::OffsetDateTime,
2895 #[doc = "The identity of the person who made the request"]
2896 pub requestor: String,
2897 #[doc = "The justification for making the initiate request"]
2898 #[serde(default, skip_serializing_if = "Option::is_none")]
2899 pub justification: Option<String>,
2900}
2901impl JitNetworkAccessRequest {
2902 pub fn new(
2903 virtual_machines: Vec<JitNetworkAccessRequestVirtualMachine>,
2904 start_time_utc: ::time::OffsetDateTime,
2905 requestor: String,
2906 ) -> Self {
2907 Self {
2908 virtual_machines,
2909 start_time_utc,
2910 requestor,
2911 justification: None,
2912 }
2913 }
2914}
2915#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2916pub struct JitNetworkAccessRequestPort {
2917 pub number: PortNumber,
2918 #[doc = "Mutually exclusive with the \"allowedSourceAddressPrefixes\" parameter. Should be an IP address or CIDR, for example \"192.168.0.3\" or \"192.168.0.0/16\"."]
2919 #[serde(rename = "allowedSourceAddressPrefix", default, skip_serializing_if = "Option::is_none")]
2920 pub allowed_source_address_prefix: Option<String>,
2921 #[doc = "Mutually exclusive with the \"allowedSourceAddressPrefix\" parameter."]
2922 #[serde(
2923 rename = "allowedSourceAddressPrefixes",
2924 default,
2925 deserialize_with = "azure_core::util::deserialize_null_as_default",
2926 skip_serializing_if = "Vec::is_empty"
2927 )]
2928 pub allowed_source_address_prefixes: Vec<String>,
2929 #[doc = "The date & time at which the request ends in UTC"]
2930 #[serde(rename = "endTimeUtc", with = "azure_core::date::rfc3339")]
2931 pub end_time_utc: ::time::OffsetDateTime,
2932 #[doc = "The status of the port"]
2933 pub status: jit_network_access_request_port::Status,
2934 #[doc = "A description of why the `status` has its value"]
2935 #[serde(rename = "statusReason")]
2936 pub status_reason: jit_network_access_request_port::StatusReason,
2937 #[doc = "The port which is mapped to this port's `number` in the Azure Firewall, if applicable"]
2938 #[serde(rename = "mappedPort", default, skip_serializing_if = "Option::is_none")]
2939 pub mapped_port: Option<i64>,
2940}
2941impl JitNetworkAccessRequestPort {
2942 pub fn new(
2943 number: PortNumber,
2944 end_time_utc: ::time::OffsetDateTime,
2945 status: jit_network_access_request_port::Status,
2946 status_reason: jit_network_access_request_port::StatusReason,
2947 ) -> Self {
2948 Self {
2949 number,
2950 allowed_source_address_prefix: None,
2951 allowed_source_address_prefixes: Vec::new(),
2952 end_time_utc,
2953 status,
2954 status_reason,
2955 mapped_port: None,
2956 }
2957 }
2958}
2959pub mod jit_network_access_request_port {
2960 use super::*;
2961 #[doc = "The status of the port"]
2962 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2963 #[serde(remote = "Status")]
2964 pub enum Status {
2965 Revoked,
2966 Initiated,
2967 #[serde(skip_deserializing)]
2968 UnknownValue(String),
2969 }
2970 impl FromStr for Status {
2971 type Err = value::Error;
2972 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2973 Self::deserialize(s.into_deserializer())
2974 }
2975 }
2976 impl<'de> Deserialize<'de> for Status {
2977 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2978 where
2979 D: Deserializer<'de>,
2980 {
2981 let s = String::deserialize(deserializer)?;
2982 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
2983 Ok(deserialized)
2984 }
2985 }
2986 impl Serialize for Status {
2987 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2988 where
2989 S: Serializer,
2990 {
2991 match self {
2992 Self::Revoked => serializer.serialize_unit_variant("Status", 0u32, "Revoked"),
2993 Self::Initiated => serializer.serialize_unit_variant("Status", 1u32, "Initiated"),
2994 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
2995 }
2996 }
2997 }
2998 #[doc = "A description of why the `status` has its value"]
2999 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3000 #[serde(remote = "StatusReason")]
3001 pub enum StatusReason {
3002 Expired,
3003 UserRequested,
3004 NewerRequestInitiated,
3005 #[serde(skip_deserializing)]
3006 UnknownValue(String),
3007 }
3008 impl FromStr for StatusReason {
3009 type Err = value::Error;
3010 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3011 Self::deserialize(s.into_deserializer())
3012 }
3013 }
3014 impl<'de> Deserialize<'de> for StatusReason {
3015 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3016 where
3017 D: Deserializer<'de>,
3018 {
3019 let s = String::deserialize(deserializer)?;
3020 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3021 Ok(deserialized)
3022 }
3023 }
3024 impl Serialize for StatusReason {
3025 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3026 where
3027 S: Serializer,
3028 {
3029 match self {
3030 Self::Expired => serializer.serialize_unit_variant("StatusReason", 0u32, "Expired"),
3031 Self::UserRequested => serializer.serialize_unit_variant("StatusReason", 1u32, "UserRequested"),
3032 Self::NewerRequestInitiated => serializer.serialize_unit_variant("StatusReason", 2u32, "NewerRequestInitiated"),
3033 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3034 }
3035 }
3036 }
3037}
3038#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3039pub struct JitNetworkAccessRequestVirtualMachine {
3040 #[doc = "Resource ID of the virtual machine that is linked to this policy"]
3041 pub id: String,
3042 #[doc = "The ports that were opened for the virtual machine"]
3043 pub ports: Vec<JitNetworkAccessRequestPort>,
3044}
3045impl JitNetworkAccessRequestVirtualMachine {
3046 pub fn new(id: String, ports: Vec<JitNetworkAccessRequestPort>) -> Self {
3047 Self { id, ports }
3048 }
3049}
3050#[doc = "Describes an Azure resource with kind"]
3051#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3052pub struct Kind {
3053 #[doc = "Kind of the resource"]
3054 #[serde(default, skip_serializing_if = "Option::is_none")]
3055 pub kind: Option<String>,
3056}
3057impl Kind {
3058 pub fn new() -> Self {
3059 Self::default()
3060 }
3061}
3062#[doc = "A List custom alert rule."]
3063#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3064pub struct ListCustomAlertRule {
3065 #[serde(flatten)]
3066 pub custom_alert_rule: CustomAlertRule,
3067 #[doc = "The value type of the items in the list."]
3068 #[serde(rename = "valueType", default, skip_serializing_if = "Option::is_none")]
3069 pub value_type: Option<list_custom_alert_rule::ValueType>,
3070}
3071impl ListCustomAlertRule {
3072 pub fn new(custom_alert_rule: CustomAlertRule) -> Self {
3073 Self {
3074 custom_alert_rule,
3075 value_type: None,
3076 }
3077 }
3078}
3079pub mod list_custom_alert_rule {
3080 use super::*;
3081 #[doc = "The value type of the items in the list."]
3082 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3083 #[serde(remote = "ValueType")]
3084 pub enum ValueType {
3085 IpCidr,
3086 String,
3087 #[serde(skip_deserializing)]
3088 UnknownValue(String),
3089 }
3090 impl FromStr for ValueType {
3091 type Err = value::Error;
3092 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3093 Self::deserialize(s.into_deserializer())
3094 }
3095 }
3096 impl<'de> Deserialize<'de> for ValueType {
3097 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3098 where
3099 D: Deserializer<'de>,
3100 {
3101 let s = String::deserialize(deserializer)?;
3102 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3103 Ok(deserialized)
3104 }
3105 }
3106 impl Serialize for ValueType {
3107 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3108 where
3109 S: Serializer,
3110 {
3111 match self {
3112 Self::IpCidr => serializer.serialize_unit_variant("ValueType", 0u32, "IpCidr"),
3113 Self::String => serializer.serialize_unit_variant("ValueType", 1u32, "String"),
3114 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3115 }
3116 }
3117 }
3118}
3119#[doc = "Login by a local user that isn't allowed. Allow list consists of login names to allow."]
3120#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3121pub struct LocalUserNotAllowed {
3122 #[serde(flatten)]
3123 pub allowlist_custom_alert_rule: AllowlistCustomAlertRule,
3124}
3125impl LocalUserNotAllowed {
3126 pub fn new(allowlist_custom_alert_rule: AllowlistCustomAlertRule) -> Self {
3127 Self {
3128 allowlist_custom_alert_rule,
3129 }
3130 }
3131}
3132#[doc = "Describes an Azure resource with location"]
3133#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3134pub struct Location {
3135 #[doc = "Location where the resource is stored"]
3136 #[serde(default, skip_serializing_if = "Option::is_none")]
3137 pub location: Option<String>,
3138}
3139impl Location {
3140 pub fn new() -> Self {
3141 Self::default()
3142 }
3143}
3144#[doc = "The resource of the configuration or data needed to onboard the machine to MDE"]
3145#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3146pub struct MdeOnboardingData {
3147 #[serde(flatten)]
3148 pub resource: Resource,
3149 #[doc = "Properties of the MDE configuration or data parameter needed to onboard the machine to MDE"]
3150 #[serde(default, skip_serializing_if = "Option::is_none")]
3151 pub properties: Option<MdeOnboardingDataProperties>,
3152}
3153impl MdeOnboardingData {
3154 pub fn new() -> Self {
3155 Self::default()
3156 }
3157}
3158#[doc = "List of all MDE onboarding data resources"]
3159#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3160pub struct MdeOnboardingDataList {
3161 #[doc = "List of the resources of the configuration or data needed to onboard the machine to MDE"]
3162 #[serde(
3163 default,
3164 deserialize_with = "azure_core::util::deserialize_null_as_default",
3165 skip_serializing_if = "Vec::is_empty"
3166 )]
3167 pub value: Vec<MdeOnboardingData>,
3168}
3169impl MdeOnboardingDataList {
3170 pub fn new() -> Self {
3171 Self::default()
3172 }
3173}
3174#[doc = "Properties of the MDE configuration or data parameter needed to onboard the machine to MDE"]
3175#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3176pub struct MdeOnboardingDataProperties {
3177 #[doc = "The onboarding package used to onboard Windows machines to MDE, coded in base64. This can also be used for onboarding using the dedicated VM Extension"]
3178 #[serde(rename = "onboardingPackageWindows", default, skip_serializing_if = "Option::is_none")]
3179 pub onboarding_package_windows: Option<String>,
3180 #[doc = "The onboarding package used to onboard Linux machines to MDE, coded in base64. This can also be used for onboarding using the dedicated VM Extension"]
3181 #[serde(rename = "onboardingPackageLinux", default, skip_serializing_if = "Option::is_none")]
3182 pub onboarding_package_linux: Option<String>,
3183}
3184impl MdeOnboardingDataProperties {
3185 pub fn new() -> Self {
3186 Self::default()
3187 }
3188}
3189#[doc = "Number of cloud to device messages (MQTT protocol) is not in allowed range."]
3190#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3191pub struct MqttC2dMessagesNotInAllowedRange {
3192 #[serde(flatten)]
3193 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
3194}
3195impl MqttC2dMessagesNotInAllowedRange {
3196 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
3197 Self {
3198 time_window_custom_alert_rule,
3199 }
3200 }
3201}
3202#[doc = "Number of rejected cloud to device messages (MQTT protocol) is not in allowed range."]
3203#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3204pub struct MqttC2dRejectedMessagesNotInAllowedRange {
3205 #[serde(flatten)]
3206 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
3207}
3208impl MqttC2dRejectedMessagesNotInAllowedRange {
3209 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
3210 Self {
3211 time_window_custom_alert_rule,
3212 }
3213 }
3214}
3215#[doc = "Number of device to cloud messages (MQTT protocol) is not in allowed range."]
3216#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3217pub struct MqttD2cMessagesNotInAllowedRange {
3218 #[serde(flatten)]
3219 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
3220}
3221impl MqttD2cMessagesNotInAllowedRange {
3222 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
3223 Self {
3224 time_window_custom_alert_rule,
3225 }
3226 }
3227}
3228#[doc = "Possible operation in the REST API of Microsoft.Security"]
3229#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3230pub struct Operation {
3231 #[doc = "Name of the operation"]
3232 #[serde(default, skip_serializing_if = "Option::is_none")]
3233 pub name: Option<String>,
3234 #[doc = "Where the operation is originated"]
3235 #[serde(default, skip_serializing_if = "Option::is_none")]
3236 pub origin: Option<String>,
3237 #[doc = "Security operation display"]
3238 #[serde(default, skip_serializing_if = "Option::is_none")]
3239 pub display: Option<OperationDisplay>,
3240}
3241impl Operation {
3242 pub fn new() -> Self {
3243 Self::default()
3244 }
3245}
3246#[doc = "Security operation display"]
3247#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3248pub struct OperationDisplay {
3249 #[doc = "The resource provider for the operation."]
3250 #[serde(default, skip_serializing_if = "Option::is_none")]
3251 pub provider: Option<String>,
3252 #[doc = "The display name of the resource the operation applies to."]
3253 #[serde(default, skip_serializing_if = "Option::is_none")]
3254 pub resource: Option<String>,
3255 #[doc = "The display name of the security operation."]
3256 #[serde(default, skip_serializing_if = "Option::is_none")]
3257 pub operation: Option<String>,
3258 #[doc = "The description of the operation."]
3259 #[serde(default, skip_serializing_if = "Option::is_none")]
3260 pub description: Option<String>,
3261}
3262impl OperationDisplay {
3263 pub fn new() -> Self {
3264 Self::default()
3265 }
3266}
3267#[doc = "List of possible operations for Microsoft.Security resource provider"]
3268#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3269pub struct OperationList {
3270 #[doc = "List of Security operations"]
3271 #[serde(
3272 default,
3273 deserialize_with = "azure_core::util::deserialize_null_as_default",
3274 skip_serializing_if = "Vec::is_empty"
3275 )]
3276 pub value: Vec<Operation>,
3277 #[doc = "The URI to fetch the next page."]
3278 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3279 pub next_link: Option<String>,
3280}
3281impl azure_core::Continuable for OperationList {
3282 type Continuation = String;
3283 fn continuation(&self) -> Option<Self::Continuation> {
3284 self.next_link.clone().filter(|value| !value.is_empty())
3285 }
3286}
3287impl OperationList {
3288 pub fn new() -> Self {
3289 Self::default()
3290 }
3291}
3292#[doc = "A permission detected in the cloud account."]
3293#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3294#[serde(remote = "PermissionProperty")]
3295pub enum PermissionProperty {
3296 #[serde(rename = "AWS::AWSSecurityHubReadOnlyAccess")]
3297 AwsAwsSecurityHubReadOnlyAccess,
3298 #[serde(rename = "AWS::SecurityAudit")]
3299 AwsSecurityAudit,
3300 #[serde(rename = "AWS::AmazonSSMAutomationRole")]
3301 AwsAmazonSsmAutomationRole,
3302 #[serde(rename = "GCP::Security Center Admin Viewer")]
3303 GcpSecurityCenterAdminViewer,
3304 #[serde(skip_deserializing)]
3305 UnknownValue(String),
3306}
3307impl FromStr for PermissionProperty {
3308 type Err = value::Error;
3309 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3310 Self::deserialize(s.into_deserializer())
3311 }
3312}
3313impl<'de> Deserialize<'de> for PermissionProperty {
3314 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3315 where
3316 D: Deserializer<'de>,
3317 {
3318 let s = String::deserialize(deserializer)?;
3319 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3320 Ok(deserialized)
3321 }
3322}
3323impl Serialize for PermissionProperty {
3324 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3325 where
3326 S: Serializer,
3327 {
3328 match self {
3329 Self::AwsAwsSecurityHubReadOnlyAccess => {
3330 serializer.serialize_unit_variant("PermissionProperty", 0u32, "AWS::AWSSecurityHubReadOnlyAccess")
3331 }
3332 Self::AwsSecurityAudit => serializer.serialize_unit_variant("PermissionProperty", 1u32, "AWS::SecurityAudit"),
3333 Self::AwsAmazonSsmAutomationRole => {
3334 serializer.serialize_unit_variant("PermissionProperty", 2u32, "AWS::AmazonSSMAutomationRole")
3335 }
3336 Self::GcpSecurityCenterAdminViewer => {
3337 serializer.serialize_unit_variant("PermissionProperty", 3u32, "GCP::Security Center Admin Viewer")
3338 }
3339 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3340 }
3341 }
3342}
3343pub type PortNumber = i64;
3344#[doc = "Execution of a process that isn't allowed. Allow list consists of process names to allow."]
3345#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3346pub struct ProcessNotAllowed {
3347 #[serde(flatten)]
3348 pub allowlist_custom_alert_rule: AllowlistCustomAlertRule,
3349}
3350impl ProcessNotAllowed {
3351 pub fn new(allowlist_custom_alert_rule: AllowlistCustomAlertRule) -> Self {
3352 Self {
3353 allowlist_custom_alert_rule,
3354 }
3355 }
3356}
3357#[doc = "For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine can use."]
3358#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3359pub struct ProxyServerProperties {
3360 #[doc = "Proxy server IP"]
3361 #[serde(default, skip_serializing_if = "Option::is_none")]
3362 pub ip: Option<String>,
3363 #[doc = "Proxy server port"]
3364 #[serde(default, skip_serializing_if = "Option::is_none")]
3365 pub port: Option<String>,
3366}
3367impl ProxyServerProperties {
3368 pub fn new() -> Self {
3369 Self::default()
3370 }
3371}
3372#[doc = "The rule query details."]
3373#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3374pub struct QueryCheck {
3375 #[doc = "The rule query."]
3376 #[serde(default, skip_serializing_if = "Option::is_none")]
3377 pub query: Option<String>,
3378 #[doc = "Expected result."]
3379 #[serde(
3380 rename = "expectedResult",
3381 default,
3382 deserialize_with = "azure_core::util::deserialize_null_as_default",
3383 skip_serializing_if = "Vec::is_empty"
3384 )]
3385 pub expected_result: Vec<Vec<String>>,
3386 #[doc = "Column names of expected result."]
3387 #[serde(
3388 rename = "columnNames",
3389 default,
3390 deserialize_with = "azure_core::util::deserialize_null_as_default",
3391 skip_serializing_if = "Vec::is_empty"
3392 )]
3393 pub column_names: Vec<String>,
3394}
3395impl QueryCheck {
3396 pub fn new() -> Self {
3397 Self::default()
3398 }
3399}
3400#[doc = "Number of device queue purges is not in allowed range."]
3401#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3402pub struct QueuePurgesNotInAllowedRange {
3403 #[serde(flatten)]
3404 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
3405}
3406impl QueuePurgesNotInAllowedRange {
3407 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
3408 Self {
3409 time_window_custom_alert_rule,
3410 }
3411 }
3412}
3413#[doc = "Regulatory compliance assessment details and state"]
3414#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3415pub struct RegulatoryComplianceAssessment {
3416 #[serde(flatten)]
3417 pub resource: Resource,
3418 #[doc = "Regulatory compliance assessment data"]
3419 #[serde(default, skip_serializing_if = "Option::is_none")]
3420 pub properties: Option<RegulatoryComplianceAssessmentProperties>,
3421}
3422impl RegulatoryComplianceAssessment {
3423 pub fn new() -> Self {
3424 Self::default()
3425 }
3426}
3427#[doc = "List of regulatory compliance assessment response"]
3428#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3429pub struct RegulatoryComplianceAssessmentList {
3430 pub value: Vec<RegulatoryComplianceAssessment>,
3431 #[doc = "The URI to fetch the next page."]
3432 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3433 pub next_link: Option<String>,
3434}
3435impl azure_core::Continuable for RegulatoryComplianceAssessmentList {
3436 type Continuation = String;
3437 fn continuation(&self) -> Option<Self::Continuation> {
3438 self.next_link.clone().filter(|value| !value.is_empty())
3439 }
3440}
3441impl RegulatoryComplianceAssessmentList {
3442 pub fn new(value: Vec<RegulatoryComplianceAssessment>) -> Self {
3443 Self { value, next_link: None }
3444 }
3445}
3446#[doc = "Regulatory compliance assessment data"]
3447#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3448pub struct RegulatoryComplianceAssessmentProperties {
3449 #[doc = "The description of the regulatory compliance assessment"]
3450 #[serde(default, skip_serializing_if = "Option::is_none")]
3451 pub description: Option<String>,
3452 #[doc = "The expected type of assessment contained in the AssessmentDetailsLink"]
3453 #[serde(rename = "assessmentType", default, skip_serializing_if = "Option::is_none")]
3454 pub assessment_type: Option<String>,
3455 #[doc = "Link to more detailed assessment results data. The response type will be according to the assessmentType field"]
3456 #[serde(rename = "assessmentDetailsLink", default, skip_serializing_if = "Option::is_none")]
3457 pub assessment_details_link: Option<String>,
3458 #[doc = "Aggregative state based on the assessment's scanned resources states"]
3459 #[serde(default, skip_serializing_if = "Option::is_none")]
3460 pub state: Option<regulatory_compliance_assessment_properties::State>,
3461 #[doc = "The given assessment's related resources count with passed state."]
3462 #[serde(rename = "passedResources", default, skip_serializing_if = "Option::is_none")]
3463 pub passed_resources: Option<i64>,
3464 #[doc = "The given assessment's related resources count with failed state."]
3465 #[serde(rename = "failedResources", default, skip_serializing_if = "Option::is_none")]
3466 pub failed_resources: Option<i64>,
3467 #[doc = "The given assessment's related resources count with skipped state."]
3468 #[serde(rename = "skippedResources", default, skip_serializing_if = "Option::is_none")]
3469 pub skipped_resources: Option<i64>,
3470 #[doc = "The given assessment's related resources count with unsupported state."]
3471 #[serde(rename = "unsupportedResources", default, skip_serializing_if = "Option::is_none")]
3472 pub unsupported_resources: Option<i64>,
3473}
3474impl RegulatoryComplianceAssessmentProperties {
3475 pub fn new() -> Self {
3476 Self::default()
3477 }
3478}
3479pub mod regulatory_compliance_assessment_properties {
3480 use super::*;
3481 #[doc = "Aggregative state based on the assessment's scanned resources states"]
3482 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3483 #[serde(remote = "State")]
3484 pub enum State {
3485 Passed,
3486 Failed,
3487 Skipped,
3488 Unsupported,
3489 #[serde(skip_deserializing)]
3490 UnknownValue(String),
3491 }
3492 impl FromStr for State {
3493 type Err = value::Error;
3494 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3495 Self::deserialize(s.into_deserializer())
3496 }
3497 }
3498 impl<'de> Deserialize<'de> for State {
3499 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3500 where
3501 D: Deserializer<'de>,
3502 {
3503 let s = String::deserialize(deserializer)?;
3504 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3505 Ok(deserialized)
3506 }
3507 }
3508 impl Serialize for State {
3509 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3510 where
3511 S: Serializer,
3512 {
3513 match self {
3514 Self::Passed => serializer.serialize_unit_variant("State", 0u32, "Passed"),
3515 Self::Failed => serializer.serialize_unit_variant("State", 1u32, "Failed"),
3516 Self::Skipped => serializer.serialize_unit_variant("State", 2u32, "Skipped"),
3517 Self::Unsupported => serializer.serialize_unit_variant("State", 3u32, "Unsupported"),
3518 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3519 }
3520 }
3521 }
3522}
3523#[doc = "Regulatory compliance control details and state"]
3524#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3525pub struct RegulatoryComplianceControl {
3526 #[serde(flatten)]
3527 pub resource: Resource,
3528 #[doc = "Regulatory compliance control data"]
3529 #[serde(default, skip_serializing_if = "Option::is_none")]
3530 pub properties: Option<RegulatoryComplianceControlProperties>,
3531}
3532impl RegulatoryComplianceControl {
3533 pub fn new() -> Self {
3534 Self::default()
3535 }
3536}
3537#[doc = "List of regulatory compliance controls response"]
3538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3539pub struct RegulatoryComplianceControlList {
3540 #[doc = "List of regulatory compliance controls"]
3541 pub value: Vec<RegulatoryComplianceControl>,
3542 #[doc = "The URI to fetch the next page."]
3543 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3544 pub next_link: Option<String>,
3545}
3546impl azure_core::Continuable for RegulatoryComplianceControlList {
3547 type Continuation = String;
3548 fn continuation(&self) -> Option<Self::Continuation> {
3549 self.next_link.clone().filter(|value| !value.is_empty())
3550 }
3551}
3552impl RegulatoryComplianceControlList {
3553 pub fn new(value: Vec<RegulatoryComplianceControl>) -> Self {
3554 Self { value, next_link: None }
3555 }
3556}
3557#[doc = "Regulatory compliance control data"]
3558#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3559pub struct RegulatoryComplianceControlProperties {
3560 #[doc = "The description of the regulatory compliance control"]
3561 #[serde(default, skip_serializing_if = "Option::is_none")]
3562 pub description: Option<String>,
3563 #[doc = "Aggregative state based on the control's supported assessments states"]
3564 #[serde(default, skip_serializing_if = "Option::is_none")]
3565 pub state: Option<regulatory_compliance_control_properties::State>,
3566 #[doc = "The number of supported regulatory compliance assessments of the given control with a passed state"]
3567 #[serde(rename = "passedAssessments", default, skip_serializing_if = "Option::is_none")]
3568 pub passed_assessments: Option<i64>,
3569 #[doc = "The number of supported regulatory compliance assessments of the given control with a failed state"]
3570 #[serde(rename = "failedAssessments", default, skip_serializing_if = "Option::is_none")]
3571 pub failed_assessments: Option<i64>,
3572 #[doc = "The number of supported regulatory compliance assessments of the given control with a skipped state"]
3573 #[serde(rename = "skippedAssessments", default, skip_serializing_if = "Option::is_none")]
3574 pub skipped_assessments: Option<i64>,
3575}
3576impl RegulatoryComplianceControlProperties {
3577 pub fn new() -> Self {
3578 Self::default()
3579 }
3580}
3581pub mod regulatory_compliance_control_properties {
3582 use super::*;
3583 #[doc = "Aggregative state based on the control's supported assessments states"]
3584 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3585 #[serde(remote = "State")]
3586 pub enum State {
3587 Passed,
3588 Failed,
3589 Skipped,
3590 Unsupported,
3591 #[serde(skip_deserializing)]
3592 UnknownValue(String),
3593 }
3594 impl FromStr for State {
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 State {
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 State {
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::Passed => serializer.serialize_unit_variant("State", 0u32, "Passed"),
3617 Self::Failed => serializer.serialize_unit_variant("State", 1u32, "Failed"),
3618 Self::Skipped => serializer.serialize_unit_variant("State", 2u32, "Skipped"),
3619 Self::Unsupported => serializer.serialize_unit_variant("State", 3u32, "Unsupported"),
3620 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3621 }
3622 }
3623 }
3624}
3625#[doc = "Regulatory compliance standard details and state"]
3626#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3627pub struct RegulatoryComplianceStandard {
3628 #[serde(flatten)]
3629 pub resource: Resource,
3630 #[doc = "Regulatory compliance standard data"]
3631 #[serde(default, skip_serializing_if = "Option::is_none")]
3632 pub properties: Option<RegulatoryComplianceStandardProperties>,
3633}
3634impl RegulatoryComplianceStandard {
3635 pub fn new() -> Self {
3636 Self::default()
3637 }
3638}
3639#[doc = "List of regulatory compliance standards response"]
3640#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3641pub struct RegulatoryComplianceStandardList {
3642 pub value: Vec<RegulatoryComplianceStandard>,
3643 #[doc = "The URI to fetch the next page."]
3644 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
3645 pub next_link: Option<String>,
3646}
3647impl azure_core::Continuable for RegulatoryComplianceStandardList {
3648 type Continuation = String;
3649 fn continuation(&self) -> Option<Self::Continuation> {
3650 self.next_link.clone().filter(|value| !value.is_empty())
3651 }
3652}
3653impl RegulatoryComplianceStandardList {
3654 pub fn new(value: Vec<RegulatoryComplianceStandard>) -> Self {
3655 Self { value, next_link: None }
3656 }
3657}
3658#[doc = "Regulatory compliance standard data"]
3659#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3660pub struct RegulatoryComplianceStandardProperties {
3661 #[doc = "Aggregative state based on the standard's supported controls states"]
3662 #[serde(default, skip_serializing_if = "Option::is_none")]
3663 pub state: Option<regulatory_compliance_standard_properties::State>,
3664 #[doc = "The number of supported regulatory compliance controls of the given standard with a passed state"]
3665 #[serde(rename = "passedControls", default, skip_serializing_if = "Option::is_none")]
3666 pub passed_controls: Option<i64>,
3667 #[doc = "The number of supported regulatory compliance controls of the given standard with a failed state"]
3668 #[serde(rename = "failedControls", default, skip_serializing_if = "Option::is_none")]
3669 pub failed_controls: Option<i64>,
3670 #[doc = "The number of supported regulatory compliance controls of the given standard with a skipped state"]
3671 #[serde(rename = "skippedControls", default, skip_serializing_if = "Option::is_none")]
3672 pub skipped_controls: Option<i64>,
3673 #[doc = "The number of regulatory compliance controls of the given standard which are unsupported by automated assessments"]
3674 #[serde(rename = "unsupportedControls", default, skip_serializing_if = "Option::is_none")]
3675 pub unsupported_controls: Option<i64>,
3676}
3677impl RegulatoryComplianceStandardProperties {
3678 pub fn new() -> Self {
3679 Self::default()
3680 }
3681}
3682pub mod regulatory_compliance_standard_properties {
3683 use super::*;
3684 #[doc = "Aggregative state based on the standard's supported controls states"]
3685 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3686 #[serde(remote = "State")]
3687 pub enum State {
3688 Passed,
3689 Failed,
3690 Skipped,
3691 Unsupported,
3692 #[serde(skip_deserializing)]
3693 UnknownValue(String),
3694 }
3695 impl FromStr for State {
3696 type Err = value::Error;
3697 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3698 Self::deserialize(s.into_deserializer())
3699 }
3700 }
3701 impl<'de> Deserialize<'de> for State {
3702 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3703 where
3704 D: Deserializer<'de>,
3705 {
3706 let s = String::deserialize(deserializer)?;
3707 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3708 Ok(deserialized)
3709 }
3710 }
3711 impl Serialize for State {
3712 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3713 where
3714 S: Serializer,
3715 {
3716 match self {
3717 Self::Passed => serializer.serialize_unit_variant("State", 0u32, "Passed"),
3718 Self::Failed => serializer.serialize_unit_variant("State", 1u32, "Failed"),
3719 Self::Skipped => serializer.serialize_unit_variant("State", 2u32, "Skipped"),
3720 Self::Unsupported => serializer.serialize_unit_variant("State", 3u32, "Unsupported"),
3721 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3722 }
3723 }
3724 }
3725}
3726#[doc = "Remediation details."]
3727#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3728pub struct Remediation {
3729 #[doc = "Remediation description."]
3730 #[serde(default, skip_serializing_if = "Option::is_none")]
3731 pub description: Option<String>,
3732 #[doc = "Remediation script."]
3733 #[serde(
3734 default,
3735 deserialize_with = "azure_core::util::deserialize_null_as_default",
3736 skip_serializing_if = "Vec::is_empty"
3737 )]
3738 pub scripts: Vec<String>,
3739 #[doc = "Is remediation automated."]
3740 #[serde(default, skip_serializing_if = "Option::is_none")]
3741 pub automated: Option<bool>,
3742 #[doc = "Optional link to remediate in Azure Portal."]
3743 #[serde(rename = "portalLink", default, skip_serializing_if = "Option::is_none")]
3744 pub portal_link: Option<String>,
3745}
3746impl Remediation {
3747 pub fn new() -> Self {
3748 Self::default()
3749 }
3750}
3751#[doc = "Describes an Azure resource."]
3752#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3753pub struct Resource {
3754 #[doc = "Resource Id"]
3755 #[serde(default, skip_serializing_if = "Option::is_none")]
3756 pub id: Option<String>,
3757 #[doc = "Resource name"]
3758 #[serde(default, skip_serializing_if = "Option::is_none")]
3759 pub name: Option<String>,
3760 #[doc = "Resource type"]
3761 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
3762 pub type_: Option<String>,
3763}
3764impl Resource {
3765 pub fn new() -> Self {
3766 Self::default()
3767 }
3768}
3769#[doc = "The platform where the assessed resource resides"]
3770#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3771#[serde(tag = "source")]
3772pub enum ResourceDetailsUnion {}
3773#[doc = "Rule results."]
3774#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3775pub struct RuleResults {
3776 #[serde(flatten)]
3777 pub resource: Resource,
3778 #[doc = "Rule results properties."]
3779 #[serde(default, skip_serializing_if = "Option::is_none")]
3780 pub properties: Option<RuleResultsProperties>,
3781}
3782impl RuleResults {
3783 pub fn new() -> Self {
3784 Self::default()
3785 }
3786}
3787#[doc = "Rule results input."]
3788#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3789pub struct RuleResultsInput {
3790 #[doc = "Take results from latest scan."]
3791 #[serde(rename = "latestScan", default, skip_serializing_if = "Option::is_none")]
3792 pub latest_scan: Option<bool>,
3793 #[doc = "Expected results to be inserted into the baseline.\r\nLeave this field empty it LatestScan == true."]
3794 #[serde(
3795 default,
3796 deserialize_with = "azure_core::util::deserialize_null_as_default",
3797 skip_serializing_if = "Vec::is_empty"
3798 )]
3799 pub results: Vec<Vec<String>>,
3800}
3801impl RuleResultsInput {
3802 pub fn new() -> Self {
3803 Self::default()
3804 }
3805}
3806#[doc = "Rule results properties."]
3807#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3808pub struct RuleResultsProperties {
3809 #[doc = "Expected results in the baseline."]
3810 #[serde(
3811 default,
3812 deserialize_with = "azure_core::util::deserialize_null_as_default",
3813 skip_serializing_if = "Vec::is_empty"
3814 )]
3815 pub results: Vec<Vec<String>>,
3816}
3817impl RuleResultsProperties {
3818 pub fn new() -> Self {
3819 Self::default()
3820 }
3821}
3822#[doc = "The rule severity."]
3823#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3824#[serde(remote = "RuleSeverity")]
3825pub enum RuleSeverity {
3826 High,
3827 Medium,
3828 Low,
3829 Informational,
3830 Obsolete,
3831 #[serde(skip_deserializing)]
3832 UnknownValue(String),
3833}
3834impl FromStr for RuleSeverity {
3835 type Err = value::Error;
3836 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3837 Self::deserialize(s.into_deserializer())
3838 }
3839}
3840impl<'de> Deserialize<'de> for RuleSeverity {
3841 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3842 where
3843 D: Deserializer<'de>,
3844 {
3845 let s = String::deserialize(deserializer)?;
3846 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3847 Ok(deserialized)
3848 }
3849}
3850impl Serialize for RuleSeverity {
3851 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3852 where
3853 S: Serializer,
3854 {
3855 match self {
3856 Self::High => serializer.serialize_unit_variant("RuleSeverity", 0u32, "High"),
3857 Self::Medium => serializer.serialize_unit_variant("RuleSeverity", 1u32, "Medium"),
3858 Self::Low => serializer.serialize_unit_variant("RuleSeverity", 2u32, "Low"),
3859 Self::Informational => serializer.serialize_unit_variant("RuleSeverity", 3u32, "Informational"),
3860 Self::Obsolete => serializer.serialize_unit_variant("RuleSeverity", 4u32, "Obsolete"),
3861 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3862 }
3863 }
3864}
3865#[doc = "The rule result status."]
3866#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3867#[serde(remote = "RuleStatus")]
3868pub enum RuleStatus {
3869 NonFinding,
3870 Finding,
3871 InternalError,
3872 #[serde(skip_deserializing)]
3873 UnknownValue(String),
3874}
3875impl FromStr for RuleStatus {
3876 type Err = value::Error;
3877 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3878 Self::deserialize(s.into_deserializer())
3879 }
3880}
3881impl<'de> Deserialize<'de> for RuleStatus {
3882 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3883 where
3884 D: Deserializer<'de>,
3885 {
3886 let s = String::deserialize(deserializer)?;
3887 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3888 Ok(deserialized)
3889 }
3890}
3891impl Serialize for RuleStatus {
3892 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3893 where
3894 S: Serializer,
3895 {
3896 match self {
3897 Self::NonFinding => serializer.serialize_unit_variant("RuleStatus", 0u32, "NonFinding"),
3898 Self::Finding => serializer.serialize_unit_variant("RuleStatus", 1u32, "Finding"),
3899 Self::InternalError => serializer.serialize_unit_variant("RuleStatus", 2u32, "InternalError"),
3900 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3901 }
3902 }
3903}
3904#[doc = "The rule type."]
3905#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3906#[serde(remote = "RuleType")]
3907pub enum RuleType {
3908 Binary,
3909 BaselineExpected,
3910 PositiveList,
3911 NegativeList,
3912 #[serde(skip_deserializing)]
3913 UnknownValue(String),
3914}
3915impl FromStr for RuleType {
3916 type Err = value::Error;
3917 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
3918 Self::deserialize(s.into_deserializer())
3919 }
3920}
3921impl<'de> Deserialize<'de> for RuleType {
3922 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3923 where
3924 D: Deserializer<'de>,
3925 {
3926 let s = String::deserialize(deserializer)?;
3927 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
3928 Ok(deserialized)
3929 }
3930}
3931impl Serialize for RuleType {
3932 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3933 where
3934 S: Serializer,
3935 {
3936 match self {
3937 Self::Binary => serializer.serialize_unit_variant("RuleType", 0u32, "Binary"),
3938 Self::BaselineExpected => serializer.serialize_unit_variant("RuleType", 1u32, "BaselineExpected"),
3939 Self::PositiveList => serializer.serialize_unit_variant("RuleType", 2u32, "PositiveList"),
3940 Self::NegativeList => serializer.serialize_unit_variant("RuleType", 3u32, "NegativeList"),
3941 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
3942 }
3943 }
3944}
3945#[doc = "A list of rules results."]
3946#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3947pub struct RulesResults {
3948 #[doc = "List of rule results."]
3949 #[serde(
3950 default,
3951 deserialize_with = "azure_core::util::deserialize_null_as_default",
3952 skip_serializing_if = "Vec::is_empty"
3953 )]
3954 pub value: Vec<RuleResults>,
3955}
3956impl RulesResults {
3957 pub fn new() -> Self {
3958 Self::default()
3959 }
3960}
3961#[doc = "Rules results input."]
3962#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3963pub struct RulesResultsInput {
3964 #[doc = "Take results from latest scan."]
3965 #[serde(rename = "latestScan", default, skip_serializing_if = "Option::is_none")]
3966 pub latest_scan: Option<bool>,
3967 #[doc = "Expected results to be inserted into the baseline.\r\nLeave this field empty it LatestScan == true."]
3968 #[serde(default, skip_serializing_if = "Option::is_none")]
3969 pub results: Option<serde_json::Value>,
3970}
3971impl RulesResultsInput {
3972 pub fn new() -> Self {
3973 Self::default()
3974 }
3975}
3976#[doc = "A vulnerability assessment scan record."]
3977#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3978pub struct Scan {
3979 #[serde(flatten)]
3980 pub resource: Resource,
3981 #[doc = "A vulnerability assessment scan record properties."]
3982 #[serde(default, skip_serializing_if = "Option::is_none")]
3983 pub properties: Option<ScanProperties>,
3984}
3985impl Scan {
3986 pub fn new() -> Self {
3987 Self::default()
3988 }
3989}
3990#[doc = "A vulnerability assessment scan record properties."]
3991#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3992pub struct ScanProperties {
3993 #[doc = "The scan trigger type."]
3994 #[serde(rename = "triggerType", default, skip_serializing_if = "Option::is_none")]
3995 pub trigger_type: Option<ScanTriggerType>,
3996 #[doc = "The scan status."]
3997 #[serde(default, skip_serializing_if = "Option::is_none")]
3998 pub state: Option<ScanState>,
3999 #[doc = "The server name."]
4000 #[serde(default, skip_serializing_if = "Option::is_none")]
4001 pub server: Option<String>,
4002 #[doc = "The database name."]
4003 #[serde(default, skip_serializing_if = "Option::is_none")]
4004 pub database: Option<String>,
4005 #[doc = "The SQL version."]
4006 #[serde(rename = "sqlVersion", default, skip_serializing_if = "Option::is_none")]
4007 pub sql_version: Option<String>,
4008 #[doc = "The scan start time (UTC)."]
4009 #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
4010 pub start_time: Option<::time::OffsetDateTime>,
4011 #[doc = "Scan results are valid until end time (UTC)."]
4012 #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
4013 pub end_time: Option<::time::OffsetDateTime>,
4014 #[doc = "The number of failed rules with high severity."]
4015 #[serde(rename = "highSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
4016 pub high_severity_failed_rules_count: Option<i32>,
4017 #[doc = "The number of failed rules with medium severity."]
4018 #[serde(rename = "mediumSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
4019 pub medium_severity_failed_rules_count: Option<i32>,
4020 #[doc = "The number of failed rules with low severity."]
4021 #[serde(rename = "lowSeverityFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
4022 pub low_severity_failed_rules_count: Option<i32>,
4023 #[doc = "The number of total passed rules."]
4024 #[serde(rename = "totalPassedRulesCount", default, skip_serializing_if = "Option::is_none")]
4025 pub total_passed_rules_count: Option<i32>,
4026 #[doc = "The number of total failed rules."]
4027 #[serde(rename = "totalFailedRulesCount", default, skip_serializing_if = "Option::is_none")]
4028 pub total_failed_rules_count: Option<i32>,
4029 #[doc = "The number of total rules assessed."]
4030 #[serde(rename = "totalRulesCount", default, skip_serializing_if = "Option::is_none")]
4031 pub total_rules_count: Option<i32>,
4032 #[doc = "Baseline created for this database, and has one or more rules."]
4033 #[serde(rename = "isBaselineApplied", default, skip_serializing_if = "Option::is_none")]
4034 pub is_baseline_applied: Option<bool>,
4035}
4036impl ScanProperties {
4037 pub fn new() -> Self {
4038 Self::default()
4039 }
4040}
4041#[doc = "A vulnerability assessment scan result for a single rule."]
4042#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4043pub struct ScanResult {
4044 #[serde(flatten)]
4045 pub resource: Resource,
4046 #[doc = "A vulnerability assessment scan result properties for a single rule."]
4047 #[serde(default, skip_serializing_if = "Option::is_none")]
4048 pub properties: Option<ScanResultProperties>,
4049}
4050impl ScanResult {
4051 pub fn new() -> Self {
4052 Self::default()
4053 }
4054}
4055#[doc = "A vulnerability assessment scan result properties for a single rule."]
4056#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4057pub struct ScanResultProperties {
4058 #[doc = "The rule Id."]
4059 #[serde(rename = "ruleId", default, skip_serializing_if = "Option::is_none")]
4060 pub rule_id: Option<String>,
4061 #[doc = "The rule result status."]
4062 #[serde(default, skip_serializing_if = "Option::is_none")]
4063 pub status: Option<RuleStatus>,
4064 #[doc = "Indicated whether the results specified here are trimmed."]
4065 #[serde(rename = "isTrimmed", default, skip_serializing_if = "Option::is_none")]
4066 pub is_trimmed: Option<bool>,
4067 #[doc = "The results of the query that was run."]
4068 #[serde(
4069 rename = "queryResults",
4070 default,
4071 deserialize_with = "azure_core::util::deserialize_null_as_default",
4072 skip_serializing_if = "Vec::is_empty"
4073 )]
4074 pub query_results: Vec<Vec<String>>,
4075 #[doc = "Remediation details."]
4076 #[serde(default, skip_serializing_if = "Option::is_none")]
4077 pub remediation: Option<Remediation>,
4078 #[doc = "The rule result adjusted with baseline."]
4079 #[serde(rename = "baselineAdjustedResult", default, skip_serializing_if = "Option::is_none")]
4080 pub baseline_adjusted_result: Option<BaselineAdjustedResult>,
4081 #[doc = "vulnerability assessment rule metadata details."]
4082 #[serde(rename = "ruleMetadata", default, skip_serializing_if = "Option::is_none")]
4083 pub rule_metadata: Option<VaRule>,
4084}
4085impl ScanResultProperties {
4086 pub fn new() -> Self {
4087 Self::default()
4088 }
4089}
4090#[doc = "A list of vulnerability assessment scan results."]
4091#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4092pub struct ScanResults {
4093 #[doc = "List of vulnerability assessment scan results."]
4094 #[serde(
4095 default,
4096 deserialize_with = "azure_core::util::deserialize_null_as_default",
4097 skip_serializing_if = "Vec::is_empty"
4098 )]
4099 pub value: Vec<ScanResult>,
4100}
4101impl ScanResults {
4102 pub fn new() -> Self {
4103 Self::default()
4104 }
4105}
4106#[doc = "The scan status."]
4107#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4108#[serde(remote = "ScanState")]
4109pub enum ScanState {
4110 Failed,
4111 FailedToRun,
4112 InProgress,
4113 Passed,
4114 #[serde(skip_deserializing)]
4115 UnknownValue(String),
4116}
4117impl FromStr for ScanState {
4118 type Err = value::Error;
4119 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4120 Self::deserialize(s.into_deserializer())
4121 }
4122}
4123impl<'de> Deserialize<'de> for ScanState {
4124 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4125 where
4126 D: Deserializer<'de>,
4127 {
4128 let s = String::deserialize(deserializer)?;
4129 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4130 Ok(deserialized)
4131 }
4132}
4133impl Serialize for ScanState {
4134 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4135 where
4136 S: Serializer,
4137 {
4138 match self {
4139 Self::Failed => serializer.serialize_unit_variant("ScanState", 0u32, "Failed"),
4140 Self::FailedToRun => serializer.serialize_unit_variant("ScanState", 1u32, "FailedToRun"),
4141 Self::InProgress => serializer.serialize_unit_variant("ScanState", 2u32, "InProgress"),
4142 Self::Passed => serializer.serialize_unit_variant("ScanState", 3u32, "Passed"),
4143 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4144 }
4145 }
4146}
4147#[doc = "The scan trigger type."]
4148#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4149#[serde(remote = "ScanTriggerType")]
4150pub enum ScanTriggerType {
4151 OnDemand,
4152 Recurring,
4153 #[serde(skip_deserializing)]
4154 UnknownValue(String),
4155}
4156impl FromStr for ScanTriggerType {
4157 type Err = value::Error;
4158 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4159 Self::deserialize(s.into_deserializer())
4160 }
4161}
4162impl<'de> Deserialize<'de> for ScanTriggerType {
4163 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4164 where
4165 D: Deserializer<'de>,
4166 {
4167 let s = String::deserialize(deserializer)?;
4168 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4169 Ok(deserialized)
4170 }
4171}
4172impl Serialize for ScanTriggerType {
4173 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4174 where
4175 S: Serializer,
4176 {
4177 match self {
4178 Self::OnDemand => serializer.serialize_unit_variant("ScanTriggerType", 0u32, "OnDemand"),
4179 Self::Recurring => serializer.serialize_unit_variant("ScanTriggerType", 1u32, "Recurring"),
4180 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4181 }
4182 }
4183}
4184#[doc = "A list of vulnerability assessment scan records."]
4185#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4186pub struct Scans {
4187 #[doc = "List of vulnerability assessment scan records."]
4188 #[serde(
4189 default,
4190 deserialize_with = "azure_core::util::deserialize_null_as_default",
4191 skip_serializing_if = "Vec::is_empty"
4192 )]
4193 pub value: Vec<Scan>,
4194}
4195impl Scans {
4196 pub fn new() -> Self {
4197 Self::default()
4198 }
4199}
4200#[doc = "A more specific scope used to identify the alerts to suppress."]
4201#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4202pub struct ScopeElement {
4203 #[doc = "The alert entity type to suppress by."]
4204 #[serde(default, skip_serializing_if = "Option::is_none")]
4205 pub field: Option<String>,
4206}
4207impl ScopeElement {
4208 pub fn new() -> Self {
4209 Self::default()
4210 }
4211}
4212#[doc = "Calculation result data"]
4213#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4214pub struct ScoreDetails {
4215 #[doc = "Maximum score available"]
4216 #[serde(default, skip_serializing_if = "Option::is_none")]
4217 pub max: Option<i32>,
4218 #[doc = "Current score"]
4219 #[serde(default, skip_serializing_if = "Option::is_none")]
4220 pub current: Option<f64>,
4221 #[doc = "Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point"]
4222 #[serde(default, skip_serializing_if = "Option::is_none")]
4223 pub percentage: Option<f64>,
4224}
4225impl ScoreDetails {
4226 pub fn new() -> Self {
4227 Self::default()
4228 }
4229}
4230#[doc = "Information about the security control."]
4231#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4232pub struct SecureScoreControlDefinitionItem {
4233 #[serde(flatten)]
4234 pub resource: Resource,
4235 #[doc = "Security Control Definition Properties."]
4236 #[serde(default, skip_serializing_if = "Option::is_none")]
4237 pub properties: Option<SecureScoreControlDefinitionItemProperties>,
4238}
4239impl SecureScoreControlDefinitionItem {
4240 pub fn new() -> Self {
4241 Self::default()
4242 }
4243}
4244#[doc = "Security Control Definition Properties."]
4245#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4246pub struct SecureScoreControlDefinitionItemProperties {
4247 #[doc = "User friendly display name of the control"]
4248 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
4249 pub display_name: Option<String>,
4250 #[doc = "User friendly description of the control"]
4251 #[serde(default, skip_serializing_if = "Option::is_none")]
4252 pub description: Option<String>,
4253 #[doc = "Maximum control score (0..10)"]
4254 #[serde(rename = "maxScore", default, skip_serializing_if = "Option::is_none")]
4255 pub max_score: Option<i32>,
4256 #[doc = "The type of the security control (For example, BuiltIn)"]
4257 #[serde(default, skip_serializing_if = "Option::is_none")]
4258 pub source: Option<SecureScoreControlDefinitionSource>,
4259 #[doc = "array of azure resource IDs"]
4260 #[serde(rename = "assessmentDefinitions", default, skip_serializing_if = "Option::is_none")]
4261 pub assessment_definitions: Option<AzureResourceLinks>,
4262}
4263impl SecureScoreControlDefinitionItemProperties {
4264 pub fn new() -> Self {
4265 Self::default()
4266 }
4267}
4268#[doc = "The type of the security control (For example, BuiltIn)"]
4269#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4270pub struct SecureScoreControlDefinitionSource {
4271 #[doc = "The type of security control (for example, BuiltIn)"]
4272 #[serde(rename = "sourceType", default, skip_serializing_if = "Option::is_none")]
4273 pub source_type: Option<secure_score_control_definition_source::SourceType>,
4274}
4275impl SecureScoreControlDefinitionSource {
4276 pub fn new() -> Self {
4277 Self::default()
4278 }
4279}
4280pub mod secure_score_control_definition_source {
4281 use super::*;
4282 #[doc = "The type of security control (for example, BuiltIn)"]
4283 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4284 #[serde(remote = "SourceType")]
4285 pub enum SourceType {
4286 BuiltIn,
4287 Custom,
4288 #[serde(skip_deserializing)]
4289 UnknownValue(String),
4290 }
4291 impl FromStr for SourceType {
4292 type Err = value::Error;
4293 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4294 Self::deserialize(s.into_deserializer())
4295 }
4296 }
4297 impl<'de> Deserialize<'de> for SourceType {
4298 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4299 where
4300 D: Deserializer<'de>,
4301 {
4302 let s = String::deserialize(deserializer)?;
4303 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4304 Ok(deserialized)
4305 }
4306 }
4307 impl Serialize for SourceType {
4308 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4309 where
4310 S: Serializer,
4311 {
4312 match self {
4313 Self::BuiltIn => serializer.serialize_unit_variant("SourceType", 0u32, "BuiltIn"),
4314 Self::Custom => serializer.serialize_unit_variant("SourceType", 1u32, "Custom"),
4315 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4316 }
4317 }
4318 }
4319}
4320#[doc = "Details of the security control, its score, and the health status of the relevant resources."]
4321#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4322pub struct SecureScoreControlDetails {
4323 #[serde(flatten)]
4324 pub resource: Resource,
4325 #[doc = "Calculation result data in control level"]
4326 #[serde(default, skip_serializing_if = "Option::is_none")]
4327 pub properties: Option<SecureScoreControlScoreDetails>,
4328}
4329impl SecureScoreControlDetails {
4330 pub fn new() -> Self {
4331 Self::default()
4332 }
4333}
4334#[doc = "List of security controls"]
4335#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4336pub struct SecureScoreControlList {
4337 #[doc = "Collection of security controls in this page"]
4338 #[serde(
4339 default,
4340 deserialize_with = "azure_core::util::deserialize_null_as_default",
4341 skip_serializing_if = "Vec::is_empty"
4342 )]
4343 pub value: Vec<SecureScoreControlDetails>,
4344 #[doc = "The URI to fetch the next page."]
4345 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4346 pub next_link: Option<String>,
4347}
4348impl azure_core::Continuable for SecureScoreControlList {
4349 type Continuation = String;
4350 fn continuation(&self) -> Option<Self::Continuation> {
4351 self.next_link.clone().filter(|value| !value.is_empty())
4352 }
4353}
4354impl SecureScoreControlList {
4355 pub fn new() -> Self {
4356 Self::default()
4357 }
4358}
4359#[doc = "Calculation result data"]
4360#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4361pub struct SecureScoreControlScore {
4362 #[doc = "Maximum control score (0..10)"]
4363 #[serde(default, skip_serializing_if = "Option::is_none")]
4364 pub max: Option<i32>,
4365 #[doc = "Actual score for the control = (achieved points / total points) * max score. if total points is zeroed, the return number is 0.00"]
4366 #[serde(default, skip_serializing_if = "Option::is_none")]
4367 pub current: Option<f64>,
4368 #[doc = "Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point"]
4369 #[serde(default, skip_serializing_if = "Option::is_none")]
4370 pub percentage: Option<f64>,
4371}
4372impl SecureScoreControlScore {
4373 pub fn new() -> Self {
4374 Self::default()
4375 }
4376}
4377#[doc = "Calculation result data in control level"]
4378#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4379pub struct SecureScoreControlScoreDetails {
4380 #[doc = "User friendly display name of the control"]
4381 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
4382 pub display_name: Option<String>,
4383 #[doc = "Calculation result data"]
4384 #[serde(default, skip_serializing_if = "Option::is_none")]
4385 pub score: Option<ScoreDetails>,
4386 #[doc = "Number of healthy resources in the control"]
4387 #[serde(rename = "healthyResourceCount", default, skip_serializing_if = "Option::is_none")]
4388 pub healthy_resource_count: Option<i32>,
4389 #[doc = "Number of unhealthy resources in the control"]
4390 #[serde(rename = "unhealthyResourceCount", default, skip_serializing_if = "Option::is_none")]
4391 pub unhealthy_resource_count: Option<i32>,
4392 #[doc = "Number of not applicable resources in the control"]
4393 #[serde(rename = "notApplicableResourceCount", default, skip_serializing_if = "Option::is_none")]
4394 pub not_applicable_resource_count: Option<i32>,
4395 #[doc = "The relative weight for this specific control in each of your subscriptions. Used when calculating an aggregated score for this control across all of your subscriptions."]
4396 #[serde(default, skip_serializing_if = "Option::is_none")]
4397 pub weight: Option<i64>,
4398 #[doc = "Information about the security control."]
4399 #[serde(default, skip_serializing_if = "Option::is_none")]
4400 pub definition: Option<SecureScoreControlDefinitionItem>,
4401}
4402impl SecureScoreControlScoreDetails {
4403 pub fn new() -> Self {
4404 Self::default()
4405 }
4406}
4407#[doc = "Secure score item data model"]
4408#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4409pub struct SecureScoreItem {
4410 #[serde(flatten)]
4411 pub resource: Resource,
4412 #[doc = "Describes properties of a calculated secure score."]
4413 #[serde(default, skip_serializing_if = "Option::is_none")]
4414 pub properties: Option<SecureScoreItemProperties>,
4415}
4416impl SecureScoreItem {
4417 pub fn new() -> Self {
4418 Self::default()
4419 }
4420}
4421#[doc = "Describes properties of a calculated secure score."]
4422#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4423pub struct SecureScoreItemProperties {
4424 #[doc = "The initiative’s name"]
4425 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
4426 pub display_name: Option<String>,
4427 #[doc = "Calculation result data"]
4428 #[serde(default, skip_serializing_if = "Option::is_none")]
4429 pub score: Option<ScoreDetails>,
4430 #[doc = "The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions."]
4431 #[serde(default, skip_serializing_if = "Option::is_none")]
4432 pub weight: Option<i64>,
4433}
4434impl SecureScoreItemProperties {
4435 pub fn new() -> Self {
4436 Self::default()
4437 }
4438}
4439#[doc = "List of secure scores"]
4440#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4441pub struct SecureScoresList {
4442 #[doc = "Collection of secure scores in this page"]
4443 #[serde(
4444 default,
4445 deserialize_with = "azure_core::util::deserialize_null_as_default",
4446 skip_serializing_if = "Vec::is_empty"
4447 )]
4448 pub value: Vec<SecureScoreItem>,
4449 #[doc = "The URI to fetch the next page."]
4450 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4451 pub next_link: Option<String>,
4452}
4453impl azure_core::Continuable for SecureScoresList {
4454 type Continuation = String;
4455 fn continuation(&self) -> Option<Self::Continuation> {
4456 self.next_link.clone().filter(|value| !value.is_empty())
4457 }
4458}
4459impl SecureScoresList {
4460 pub fn new() -> Self {
4461 Self::default()
4462 }
4463}
4464#[doc = "The security connector resource."]
4465#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4466pub struct SecurityConnector {
4467 #[serde(flatten)]
4468 pub tracked_resource: TrackedResource,
4469 #[doc = "Metadata pertaining to creation and last modification of the resource."]
4470 #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
4471 pub system_data: Option<SystemData>,
4472 #[doc = "A set of properties that defines the security connector configuration."]
4473 #[serde(default, skip_serializing_if = "Option::is_none")]
4474 pub properties: Option<SecurityConnectorProperties>,
4475}
4476impl SecurityConnector {
4477 pub fn new() -> Self {
4478 Self::default()
4479 }
4480}
4481#[doc = "A set of properties that defines the security connector configuration."]
4482#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4483pub struct SecurityConnectorProperties {
4484 #[doc = "The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector)."]
4485 #[serde(rename = "hierarchyIdentifier", default, skip_serializing_if = "Option::is_none")]
4486 pub hierarchy_identifier: Option<String>,
4487 #[doc = "The date on which the trial period will end, if applicable. Trial period exists for 30 days after upgrading to payed offerings."]
4488 #[serde(rename = "hierarchyIdentifierTrialEndDate", default, with = "azure_core::date::rfc3339::option")]
4489 pub hierarchy_identifier_trial_end_date: Option<::time::OffsetDateTime>,
4490 #[doc = "The multi cloud resource's cloud name."]
4491 #[serde(rename = "environmentName", default, skip_serializing_if = "Option::is_none")]
4492 pub environment_name: Option<security_connector_properties::EnvironmentName>,
4493 #[doc = "A collection of offerings for the security connector."]
4494 #[serde(
4495 default,
4496 deserialize_with = "azure_core::util::deserialize_null_as_default",
4497 skip_serializing_if = "Vec::is_empty"
4498 )]
4499 pub offerings: Vec<CloudOfferingUnion>,
4500 #[doc = "The security connector environment data."]
4501 #[serde(rename = "environmentData", default, skip_serializing_if = "Option::is_none")]
4502 pub environment_data: Option<EnvironmentDataUnion>,
4503}
4504impl SecurityConnectorProperties {
4505 pub fn new() -> Self {
4506 Self::default()
4507 }
4508}
4509pub mod security_connector_properties {
4510 use super::*;
4511 #[doc = "The multi cloud resource's cloud name."]
4512 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4513 #[serde(remote = "EnvironmentName")]
4514 pub enum EnvironmentName {
4515 Azure,
4516 #[serde(rename = "AWS")]
4517 Aws,
4518 #[serde(rename = "GCP")]
4519 Gcp,
4520 Github,
4521 AzureDevOps,
4522 #[serde(skip_deserializing)]
4523 UnknownValue(String),
4524 }
4525 impl FromStr for EnvironmentName {
4526 type Err = value::Error;
4527 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4528 Self::deserialize(s.into_deserializer())
4529 }
4530 }
4531 impl<'de> Deserialize<'de> for EnvironmentName {
4532 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4533 where
4534 D: Deserializer<'de>,
4535 {
4536 let s = String::deserialize(deserializer)?;
4537 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4538 Ok(deserialized)
4539 }
4540 }
4541 impl Serialize for EnvironmentName {
4542 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4543 where
4544 S: Serializer,
4545 {
4546 match self {
4547 Self::Azure => serializer.serialize_unit_variant("EnvironmentName", 0u32, "Azure"),
4548 Self::Aws => serializer.serialize_unit_variant("EnvironmentName", 1u32, "AWS"),
4549 Self::Gcp => serializer.serialize_unit_variant("EnvironmentName", 2u32, "GCP"),
4550 Self::Github => serializer.serialize_unit_variant("EnvironmentName", 3u32, "Github"),
4551 Self::AzureDevOps => serializer.serialize_unit_variant("EnvironmentName", 4u32, "AzureDevOps"),
4552 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4553 }
4554 }
4555 }
4556}
4557#[doc = "List of security connectors response."]
4558#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4559pub struct SecurityConnectorsList {
4560 #[doc = "The list of security connectors under the given scope."]
4561 pub value: Vec<SecurityConnector>,
4562 #[doc = "The URI to fetch the next page."]
4563 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4564 pub next_link: Option<String>,
4565}
4566impl azure_core::Continuable for SecurityConnectorsList {
4567 type Continuation = String;
4568 fn continuation(&self) -> Option<Self::Continuation> {
4569 self.next_link.clone().filter(|value| !value.is_empty())
4570 }
4571}
4572impl SecurityConnectorsList {
4573 pub fn new(value: Vec<SecurityConnector>) -> Self {
4574 Self { value, next_link: None }
4575 }
4576}
4577#[doc = "Contact details and configurations for notifications coming from Microsoft Defender for Cloud."]
4578#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4579pub struct SecurityContact {
4580 #[serde(flatten)]
4581 pub resource: Resource,
4582 #[doc = "Describes security contact properties"]
4583 #[serde(default, skip_serializing_if = "Option::is_none")]
4584 pub properties: Option<SecurityContactProperties>,
4585}
4586impl SecurityContact {
4587 pub fn new() -> Self {
4588 Self::default()
4589 }
4590}
4591#[doc = "List of security contacts response"]
4592#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4593pub struct SecurityContactList {
4594 #[doc = "List of security contacts"]
4595 #[serde(
4596 default,
4597 deserialize_with = "azure_core::util::deserialize_null_as_default",
4598 skip_serializing_if = "Vec::is_empty"
4599 )]
4600 pub value: Vec<SecurityContact>,
4601 #[doc = "The URI to fetch the next page."]
4602 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4603 pub next_link: Option<String>,
4604}
4605impl azure_core::Continuable for SecurityContactList {
4606 type Continuation = String;
4607 fn continuation(&self) -> Option<Self::Continuation> {
4608 self.next_link.clone().filter(|value| !value.is_empty())
4609 }
4610}
4611impl SecurityContactList {
4612 pub fn new() -> Self {
4613 Self::default()
4614 }
4615}
4616#[doc = "Describes security contact properties"]
4617#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4618pub struct SecurityContactProperties {
4619 #[doc = "List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact."]
4620 #[serde(default, skip_serializing_if = "Option::is_none")]
4621 pub emails: Option<String>,
4622 #[doc = "The security contact's phone number"]
4623 #[serde(default, skip_serializing_if = "Option::is_none")]
4624 pub phone: Option<String>,
4625 #[doc = "Defines whether to send email notifications about new security alerts"]
4626 #[serde(rename = "alertNotifications", default, skip_serializing_if = "Option::is_none")]
4627 pub alert_notifications: Option<security_contact_properties::AlertNotifications>,
4628 #[doc = "Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription."]
4629 #[serde(rename = "notificationsByRole", default, skip_serializing_if = "Option::is_none")]
4630 pub notifications_by_role: Option<security_contact_properties::NotificationsByRole>,
4631}
4632impl SecurityContactProperties {
4633 pub fn new() -> Self {
4634 Self::default()
4635 }
4636}
4637pub mod security_contact_properties {
4638 use super::*;
4639 #[doc = "Defines whether to send email notifications about new security alerts"]
4640 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4641 pub struct AlertNotifications {
4642 #[doc = "Defines if email notifications will be sent about new security alerts"]
4643 #[serde(default, skip_serializing_if = "Option::is_none")]
4644 pub state: Option<alert_notifications::State>,
4645 #[doc = "Defines the minimal alert severity which will be sent as email notifications"]
4646 #[serde(rename = "minimalSeverity", default, skip_serializing_if = "Option::is_none")]
4647 pub minimal_severity: Option<alert_notifications::MinimalSeverity>,
4648 }
4649 impl AlertNotifications {
4650 pub fn new() -> Self {
4651 Self::default()
4652 }
4653 }
4654 pub mod alert_notifications {
4655 use super::*;
4656 #[doc = "Defines if email notifications will be sent about new security alerts"]
4657 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4658 #[serde(remote = "State")]
4659 pub enum State {
4660 On,
4661 Off,
4662 #[serde(skip_deserializing)]
4663 UnknownValue(String),
4664 }
4665 impl FromStr for State {
4666 type Err = value::Error;
4667 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4668 Self::deserialize(s.into_deserializer())
4669 }
4670 }
4671 impl<'de> Deserialize<'de> for State {
4672 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4673 where
4674 D: Deserializer<'de>,
4675 {
4676 let s = String::deserialize(deserializer)?;
4677 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4678 Ok(deserialized)
4679 }
4680 }
4681 impl Serialize for State {
4682 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4683 where
4684 S: Serializer,
4685 {
4686 match self {
4687 Self::On => serializer.serialize_unit_variant("State", 0u32, "On"),
4688 Self::Off => serializer.serialize_unit_variant("State", 1u32, "Off"),
4689 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4690 }
4691 }
4692 }
4693 #[doc = "Defines the minimal alert severity which will be sent as email notifications"]
4694 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4695 #[serde(remote = "MinimalSeverity")]
4696 pub enum MinimalSeverity {
4697 High,
4698 Medium,
4699 Low,
4700 #[serde(skip_deserializing)]
4701 UnknownValue(String),
4702 }
4703 impl FromStr for MinimalSeverity {
4704 type Err = value::Error;
4705 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4706 Self::deserialize(s.into_deserializer())
4707 }
4708 }
4709 impl<'de> Deserialize<'de> for MinimalSeverity {
4710 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4711 where
4712 D: Deserializer<'de>,
4713 {
4714 let s = String::deserialize(deserializer)?;
4715 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4716 Ok(deserialized)
4717 }
4718 }
4719 impl Serialize for MinimalSeverity {
4720 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4721 where
4722 S: Serializer,
4723 {
4724 match self {
4725 Self::High => serializer.serialize_unit_variant("MinimalSeverity", 0u32, "High"),
4726 Self::Medium => serializer.serialize_unit_variant("MinimalSeverity", 1u32, "Medium"),
4727 Self::Low => serializer.serialize_unit_variant("MinimalSeverity", 2u32, "Low"),
4728 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4729 }
4730 }
4731 }
4732 }
4733 #[doc = "Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription."]
4734 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4735 pub struct NotificationsByRole {
4736 #[doc = "Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription."]
4737 #[serde(default, skip_serializing_if = "Option::is_none")]
4738 pub state: Option<notifications_by_role::State>,
4739 #[doc = "Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles: "]
4740 #[serde(
4741 default,
4742 deserialize_with = "azure_core::util::deserialize_null_as_default",
4743 skip_serializing_if = "Vec::is_empty"
4744 )]
4745 pub roles: Vec<SecurityContactRole>,
4746 }
4747 impl NotificationsByRole {
4748 pub fn new() -> Self {
4749 Self::default()
4750 }
4751 }
4752 pub mod notifications_by_role {
4753 use super::*;
4754 #[doc = "Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription."]
4755 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4756 #[serde(remote = "State")]
4757 pub enum State {
4758 On,
4759 Off,
4760 #[serde(skip_deserializing)]
4761 UnknownValue(String),
4762 }
4763 impl FromStr for State {
4764 type Err = value::Error;
4765 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4766 Self::deserialize(s.into_deserializer())
4767 }
4768 }
4769 impl<'de> Deserialize<'de> for State {
4770 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4771 where
4772 D: Deserializer<'de>,
4773 {
4774 let s = String::deserialize(deserializer)?;
4775 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4776 Ok(deserialized)
4777 }
4778 }
4779 impl Serialize for State {
4780 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4781 where
4782 S: Serializer,
4783 {
4784 match self {
4785 Self::On => serializer.serialize_unit_variant("State", 0u32, "On"),
4786 Self::Off => serializer.serialize_unit_variant("State", 1u32, "Off"),
4787 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4788 }
4789 }
4790 }
4791 }
4792}
4793#[doc = "A possible role to configure sending security notification alerts to"]
4794#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4795#[serde(remote = "SecurityContactRole")]
4796pub enum SecurityContactRole {
4797 AccountAdmin,
4798 ServiceAdmin,
4799 Owner,
4800 Contributor,
4801 #[serde(skip_deserializing)]
4802 UnknownValue(String),
4803}
4804impl FromStr for SecurityContactRole {
4805 type Err = value::Error;
4806 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
4807 Self::deserialize(s.into_deserializer())
4808 }
4809}
4810impl<'de> Deserialize<'de> for SecurityContactRole {
4811 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4812 where
4813 D: Deserializer<'de>,
4814 {
4815 let s = String::deserialize(deserializer)?;
4816 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
4817 Ok(deserialized)
4818 }
4819}
4820impl Serialize for SecurityContactRole {
4821 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4822 where
4823 S: Serializer,
4824 {
4825 match self {
4826 Self::AccountAdmin => serializer.serialize_unit_variant("SecurityContactRole", 0u32, "AccountAdmin"),
4827 Self::ServiceAdmin => serializer.serialize_unit_variant("SecurityContactRole", 1u32, "ServiceAdmin"),
4828 Self::Owner => serializer.serialize_unit_variant("SecurityContactRole", 2u32, "Owner"),
4829 Self::Contributor => serializer.serialize_unit_variant("SecurityContactRole", 3u32, "Contributor"),
4830 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
4831 }
4832 }
4833}
4834#[doc = "Security sub-assessment on a resource"]
4835#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4836pub struct SecuritySubAssessment {
4837 #[serde(flatten)]
4838 pub resource: Resource,
4839 #[doc = "Describes properties of an sub-assessment."]
4840 #[serde(default, skip_serializing_if = "Option::is_none")]
4841 pub properties: Option<SecuritySubAssessmentProperties>,
4842}
4843impl SecuritySubAssessment {
4844 pub fn new() -> Self {
4845 Self::default()
4846 }
4847}
4848#[doc = "List of security sub-assessments"]
4849#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4850pub struct SecuritySubAssessmentList {
4851 #[serde(
4852 default,
4853 deserialize_with = "azure_core::util::deserialize_null_as_default",
4854 skip_serializing_if = "Vec::is_empty"
4855 )]
4856 pub value: Vec<SecuritySubAssessment>,
4857 #[doc = "The URI to fetch the next page."]
4858 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4859 pub next_link: Option<String>,
4860}
4861impl azure_core::Continuable for SecuritySubAssessmentList {
4862 type Continuation = String;
4863 fn continuation(&self) -> Option<Self::Continuation> {
4864 self.next_link.clone().filter(|value| !value.is_empty())
4865 }
4866}
4867impl SecuritySubAssessmentList {
4868 pub fn new() -> Self {
4869 Self::default()
4870 }
4871}
4872#[doc = "Describes properties of an sub-assessment."]
4873#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4874pub struct SecuritySubAssessmentProperties {
4875 #[doc = "Vulnerability ID"]
4876 #[serde(default, skip_serializing_if = "Option::is_none")]
4877 pub id: Option<String>,
4878 #[doc = "User friendly display name of the sub-assessment"]
4879 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
4880 pub display_name: Option<String>,
4881 #[doc = "Status of the sub-assessment"]
4882 #[serde(default, skip_serializing_if = "Option::is_none")]
4883 pub status: Option<SubAssessmentStatus>,
4884 #[doc = "Information on how to remediate this sub-assessment"]
4885 #[serde(default, skip_serializing_if = "Option::is_none")]
4886 pub remediation: Option<String>,
4887 #[doc = "Description of the impact of this sub-assessment"]
4888 #[serde(default, skip_serializing_if = "Option::is_none")]
4889 pub impact: Option<String>,
4890 #[doc = "Category of the sub-assessment"]
4891 #[serde(default, skip_serializing_if = "Option::is_none")]
4892 pub category: Option<String>,
4893 #[doc = "Human readable description of the assessment status"]
4894 #[serde(default, skip_serializing_if = "Option::is_none")]
4895 pub description: Option<String>,
4896 #[doc = "The date and time the sub-assessment was generated"]
4897 #[serde(rename = "timeGenerated", default, with = "azure_core::date::rfc3339::option")]
4898 pub time_generated: Option<::time::OffsetDateTime>,
4899 #[doc = "Details of the resource that was assessed"]
4900 #[serde(rename = "resourceDetails", default, skip_serializing_if = "Option::is_none")]
4901 pub resource_details: Option<ResourceDetailsUnion>,
4902 #[doc = "Details of the sub-assessment"]
4903 #[serde(rename = "additionalData", default, skip_serializing_if = "Option::is_none")]
4904 pub additional_data: Option<AdditionalDataUnion>,
4905}
4906impl SecuritySubAssessmentProperties {
4907 pub fn new() -> Self {
4908 Self::default()
4909 }
4910}
4911#[doc = "Security task that we recommend to do in order to strengthen security"]
4912#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4913pub struct SecurityTask {
4914 #[serde(flatten)]
4915 pub resource: Resource,
4916 #[doc = "Describes properties of a task."]
4917 #[serde(default, skip_serializing_if = "Option::is_none")]
4918 pub properties: Option<SecurityTaskProperties>,
4919}
4920impl SecurityTask {
4921 pub fn new() -> Self {
4922 Self::default()
4923 }
4924}
4925#[doc = "List of security task recommendations"]
4926#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4927pub struct SecurityTaskList {
4928 #[serde(
4929 default,
4930 deserialize_with = "azure_core::util::deserialize_null_as_default",
4931 skip_serializing_if = "Vec::is_empty"
4932 )]
4933 pub value: Vec<SecurityTask>,
4934 #[doc = "The URI to fetch the next page."]
4935 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
4936 pub next_link: Option<String>,
4937}
4938impl azure_core::Continuable for SecurityTaskList {
4939 type Continuation = String;
4940 fn continuation(&self) -> Option<Self::Continuation> {
4941 self.next_link.clone().filter(|value| !value.is_empty())
4942 }
4943}
4944impl SecurityTaskList {
4945 pub fn new() -> Self {
4946 Self::default()
4947 }
4948}
4949#[doc = "Changing set of properties, depending on the task type that is derived from the name field"]
4950#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4951pub struct SecurityTaskParameters {
4952 #[doc = "Name of the task type"]
4953 #[serde(default, skip_serializing_if = "Option::is_none")]
4954 pub name: Option<String>,
4955}
4956impl SecurityTaskParameters {
4957 pub fn new() -> Self {
4958 Self::default()
4959 }
4960}
4961#[doc = "Describes properties of a task."]
4962#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4963pub struct SecurityTaskProperties {
4964 #[doc = "State of the task (Active, Resolved etc.)"]
4965 #[serde(default, skip_serializing_if = "Option::is_none")]
4966 pub state: Option<String>,
4967 #[doc = "The time this task was discovered in UTC"]
4968 #[serde(rename = "creationTimeUtc", default, with = "azure_core::date::rfc3339::option")]
4969 pub creation_time_utc: Option<::time::OffsetDateTime>,
4970 #[doc = "Changing set of properties, depending on the task type that is derived from the name field"]
4971 #[serde(rename = "securityTaskParameters", default, skip_serializing_if = "Option::is_none")]
4972 pub security_task_parameters: Option<SecurityTaskParameters>,
4973 #[doc = "The time this task's details were last changed in UTC"]
4974 #[serde(rename = "lastStateChangeTimeUtc", default, with = "azure_core::date::rfc3339::option")]
4975 pub last_state_change_time_utc: Option<::time::OffsetDateTime>,
4976 #[doc = "Additional data on the state of the task"]
4977 #[serde(rename = "subState", default, skip_serializing_if = "Option::is_none")]
4978 pub sub_state: Option<String>,
4979}
4980impl SecurityTaskProperties {
4981 pub fn new() -> Self {
4982 Self::default()
4983 }
4984}
4985#[doc = "The sensitivity label."]
4986#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4987pub struct SensitivityLabel {
4988 #[doc = "The name of the sensitivity label."]
4989 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
4990 pub display_name: Option<String>,
4991 #[doc = "The description of the sensitivity label."]
4992 #[serde(default, skip_serializing_if = "Option::is_none")]
4993 pub description: Option<String>,
4994 #[doc = "The rank of the sensitivity label."]
4995 #[serde(default, skip_serializing_if = "Option::is_none")]
4996 pub rank: Option<sensitivity_label::Rank>,
4997 #[doc = "The order of the sensitivity label."]
4998 #[serde(default, skip_serializing_if = "Option::is_none")]
4999 pub order: Option<i32>,
5000 #[doc = "Indicates whether the label is enabled or not."]
5001 #[serde(default, skip_serializing_if = "Option::is_none")]
5002 pub enabled: Option<bool>,
5003}
5004impl SensitivityLabel {
5005 pub fn new() -> Self {
5006 Self::default()
5007 }
5008}
5009pub mod sensitivity_label {
5010 use super::*;
5011 #[doc = "The rank of the sensitivity label."]
5012 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5013 pub enum Rank {
5014 None,
5015 Low,
5016 Medium,
5017 High,
5018 Critical,
5019 }
5020}
5021#[doc = "Additional context fields for server vulnerability assessment"]
5022#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5023pub struct ServerVulnerabilityProperties {
5024 #[doc = "Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered"]
5025 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5026 pub type_: Option<String>,
5027 #[doc = "Dictionary from cvss version to cvss details object"]
5028 #[serde(default, skip_serializing_if = "Option::is_none")]
5029 pub cvss: Option<serde_json::Value>,
5030 #[doc = "Indicates whether a patch is available or not"]
5031 #[serde(default, skip_serializing_if = "Option::is_none")]
5032 pub patchable: Option<bool>,
5033 #[doc = "List of CVEs"]
5034 #[serde(
5035 default,
5036 deserialize_with = "azure_core::util::deserialize_null_as_default",
5037 skip_serializing_if = "Vec::is_empty"
5038 )]
5039 pub cve: Vec<Cve>,
5040 #[doc = "Threat name"]
5041 #[serde(default, skip_serializing_if = "Option::is_none")]
5042 pub threat: Option<String>,
5043 #[doc = "Published time"]
5044 #[serde(rename = "publishedTime", default, with = "azure_core::date::rfc3339::option")]
5045 pub published_time: Option<::time::OffsetDateTime>,
5046 #[serde(
5047 rename = "vendorReferences",
5048 default,
5049 deserialize_with = "azure_core::util::deserialize_null_as_default",
5050 skip_serializing_if = "Vec::is_empty"
5051 )]
5052 pub vendor_references: Vec<VendorReference>,
5053}
5054impl ServerVulnerabilityProperties {
5055 pub fn new() -> Self {
5056 Self {
5057 type_: None,
5058 cvss: None,
5059 patchable: None,
5060 cve: Vec::new(),
5061 threat: None,
5062 published_time: None,
5063 vendor_references: Vec::new(),
5064 }
5065 }
5066}
5067#[doc = "Details of the service principal."]
5068#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5069pub struct ServicePrincipalProperties {
5070 #[doc = "Application ID of service principal."]
5071 #[serde(rename = "applicationId", default, skip_serializing_if = "Option::is_none")]
5072 pub application_id: Option<String>,
5073 #[doc = "A secret string that the application uses to prove its identity, also can be referred to as application password (write only)."]
5074 #[serde(default, skip_serializing_if = "Option::is_none")]
5075 pub secret: Option<String>,
5076}
5077impl ServicePrincipalProperties {
5078 pub fn new() -> Self {
5079 Self::default()
5080 }
5081}
5082#[doc = "The kind of the security setting"]
5083#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5084pub struct Setting {
5085 #[serde(flatten)]
5086 pub resource: Resource,
5087}
5088impl Setting {
5089 pub fn new() -> Self {
5090 Self {
5091 resource: Resource::default(),
5092 }
5093 }
5094}
5095#[doc = "the kind of the settings string (DataExportSetting)"]
5096#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5097#[serde(tag = "kind")]
5098pub enum SettingUnion {
5099 DataExportSetting(DataExportSetting),
5100}
5101#[doc = "Subscription settings list."]
5102#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5103pub struct SettingsList {
5104 #[doc = "The settings list."]
5105 #[serde(
5106 default,
5107 deserialize_with = "azure_core::util::deserialize_null_as_default",
5108 skip_serializing_if = "Vec::is_empty"
5109 )]
5110 pub value: Vec<SettingUnion>,
5111 #[doc = "The URI to fetch the next page."]
5112 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5113 pub next_link: Option<String>,
5114}
5115impl azure_core::Continuable for SettingsList {
5116 type Continuation = String;
5117 fn continuation(&self) -> Option<Self::Continuation> {
5118 self.next_link.clone().filter(|value| !value.is_empty())
5119 }
5120}
5121impl SettingsList {
5122 pub fn new() -> Self {
5123 Self::default()
5124 }
5125}
5126#[doc = "Represents a software data"]
5127#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5128pub struct Software {
5129 #[serde(flatten)]
5130 pub resource: Resource,
5131 #[doc = "Software Inventory resource properties"]
5132 pub properties: SoftwareProperties,
5133}
5134impl Software {
5135 pub fn new(properties: SoftwareProperties) -> Self {
5136 Self {
5137 resource: Resource::default(),
5138 properties,
5139 }
5140 }
5141}
5142#[doc = "Software Inventory resource properties"]
5143#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5144pub struct SoftwareProperties {
5145 #[doc = "Unique identifier for the virtual machine in the service."]
5146 #[serde(rename = "deviceId", default, skip_serializing_if = "Option::is_none")]
5147 pub device_id: Option<String>,
5148 #[doc = "Platform of the operating system running on the device."]
5149 #[serde(rename = "osPlatform", default, skip_serializing_if = "Option::is_none")]
5150 pub os_platform: Option<String>,
5151 #[doc = "Name of the software vendor."]
5152 #[serde(default, skip_serializing_if = "Option::is_none")]
5153 pub vendor: Option<String>,
5154 #[doc = "Name of the software product."]
5155 #[serde(rename = "softwareName", default, skip_serializing_if = "Option::is_none")]
5156 pub software_name: Option<String>,
5157 #[doc = "Version number of the software product."]
5158 #[serde(default, skip_serializing_if = "Option::is_none")]
5159 pub version: Option<String>,
5160 #[doc = "End of support status."]
5161 #[serde(rename = "endOfSupportStatus", default, skip_serializing_if = "Option::is_none")]
5162 pub end_of_support_status: Option<software_properties::EndOfSupportStatus>,
5163 #[doc = "The end of support date in case the product is upcoming end of support."]
5164 #[serde(rename = "endOfSupportDate", default, skip_serializing_if = "Option::is_none")]
5165 pub end_of_support_date: Option<String>,
5166 #[doc = "Number of weaknesses."]
5167 #[serde(rename = "numberOfKnownVulnerabilities", default, skip_serializing_if = "Option::is_none")]
5168 pub number_of_known_vulnerabilities: Option<i32>,
5169 #[doc = "First time that the software was seen in the device."]
5170 #[serde(rename = "firstSeenAt", default, skip_serializing_if = "Option::is_none")]
5171 pub first_seen_at: Option<String>,
5172}
5173impl SoftwareProperties {
5174 pub fn new() -> Self {
5175 Self::default()
5176 }
5177}
5178pub mod software_properties {
5179 use super::*;
5180 #[doc = "End of support status."]
5181 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5182 #[serde(remote = "EndOfSupportStatus")]
5183 pub enum EndOfSupportStatus {
5184 None,
5185 #[serde(rename = "noLongerSupported")]
5186 NoLongerSupported,
5187 #[serde(rename = "versionNoLongerSupported")]
5188 VersionNoLongerSupported,
5189 #[serde(rename = "upcomingNoLongerSupported")]
5190 UpcomingNoLongerSupported,
5191 #[serde(rename = "upcomingVersionNoLongerSupported")]
5192 UpcomingVersionNoLongerSupported,
5193 #[serde(skip_deserializing)]
5194 UnknownValue(String),
5195 }
5196 impl FromStr for EndOfSupportStatus {
5197 type Err = value::Error;
5198 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5199 Self::deserialize(s.into_deserializer())
5200 }
5201 }
5202 impl<'de> Deserialize<'de> for EndOfSupportStatus {
5203 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5204 where
5205 D: Deserializer<'de>,
5206 {
5207 let s = String::deserialize(deserializer)?;
5208 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5209 Ok(deserialized)
5210 }
5211 }
5212 impl Serialize for EndOfSupportStatus {
5213 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5214 where
5215 S: Serializer,
5216 {
5217 match self {
5218 Self::None => serializer.serialize_unit_variant("EndOfSupportStatus", 0u32, "None"),
5219 Self::NoLongerSupported => serializer.serialize_unit_variant("EndOfSupportStatus", 1u32, "noLongerSupported"),
5220 Self::VersionNoLongerSupported => serializer.serialize_unit_variant("EndOfSupportStatus", 2u32, "versionNoLongerSupported"),
5221 Self::UpcomingNoLongerSupported => {
5222 serializer.serialize_unit_variant("EndOfSupportStatus", 3u32, "upcomingNoLongerSupported")
5223 }
5224 Self::UpcomingVersionNoLongerSupported => {
5225 serializer.serialize_unit_variant("EndOfSupportStatus", 4u32, "upcomingVersionNoLongerSupported")
5226 }
5227 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5228 }
5229 }
5230 }
5231}
5232#[doc = "Represents the software inventory of the virtual machine."]
5233#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5234pub struct SoftwaresList {
5235 #[serde(
5236 default,
5237 deserialize_with = "azure_core::util::deserialize_null_as_default",
5238 skip_serializing_if = "Vec::is_empty"
5239 )]
5240 pub value: Vec<Software>,
5241 #[doc = "The URI to fetch the next page."]
5242 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5243 pub next_link: Option<String>,
5244}
5245impl azure_core::Continuable for SoftwaresList {
5246 type Continuation = String;
5247 fn continuation(&self) -> Option<Self::Continuation> {
5248 self.next_link.clone().filter(|value| !value.is_empty())
5249 }
5250}
5251impl SoftwaresList {
5252 pub fn new() -> Self {
5253 Self::default()
5254 }
5255}
5256#[doc = "Details of the resource that was assessed"]
5257#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5258pub struct SqlServerVulnerabilityProperties {
5259 #[doc = "The resource type the sub assessment refers to in its resource details"]
5260 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5261 pub type_: Option<String>,
5262 #[doc = "The T-SQL query that runs on your SQL database to perform the particular check"]
5263 #[serde(default, skip_serializing_if = "Option::is_none")]
5264 pub query: Option<String>,
5265}
5266impl SqlServerVulnerabilityProperties {
5267 pub fn new() -> Self {
5268 Self { type_: None, query: None }
5269 }
5270}
5271#[doc = "Status of the sub-assessment"]
5272#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5273pub struct SubAssessmentStatus {
5274 #[doc = "Programmatic code for the status of the assessment"]
5275 #[serde(default, skip_serializing_if = "Option::is_none")]
5276 pub code: Option<sub_assessment_status::Code>,
5277 #[doc = "Programmatic code for the cause of the assessment status"]
5278 #[serde(default, skip_serializing_if = "Option::is_none")]
5279 pub cause: Option<String>,
5280 #[doc = "Human readable description of the assessment status"]
5281 #[serde(default, skip_serializing_if = "Option::is_none")]
5282 pub description: Option<String>,
5283 #[doc = "The sub-assessment severity level"]
5284 #[serde(default, skip_serializing_if = "Option::is_none")]
5285 pub severity: Option<sub_assessment_status::Severity>,
5286}
5287impl SubAssessmentStatus {
5288 pub fn new() -> Self {
5289 Self::default()
5290 }
5291}
5292pub mod sub_assessment_status {
5293 use super::*;
5294 #[doc = "Programmatic code for the status of the assessment"]
5295 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5296 #[serde(remote = "Code")]
5297 pub enum Code {
5298 Healthy,
5299 Unhealthy,
5300 NotApplicable,
5301 #[serde(skip_deserializing)]
5302 UnknownValue(String),
5303 }
5304 impl FromStr for Code {
5305 type Err = value::Error;
5306 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5307 Self::deserialize(s.into_deserializer())
5308 }
5309 }
5310 impl<'de> Deserialize<'de> for Code {
5311 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5312 where
5313 D: Deserializer<'de>,
5314 {
5315 let s = String::deserialize(deserializer)?;
5316 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5317 Ok(deserialized)
5318 }
5319 }
5320 impl Serialize for Code {
5321 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5322 where
5323 S: Serializer,
5324 {
5325 match self {
5326 Self::Healthy => serializer.serialize_unit_variant("Code", 0u32, "Healthy"),
5327 Self::Unhealthy => serializer.serialize_unit_variant("Code", 1u32, "Unhealthy"),
5328 Self::NotApplicable => serializer.serialize_unit_variant("Code", 2u32, "NotApplicable"),
5329 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5330 }
5331 }
5332 }
5333 #[doc = "The sub-assessment severity level"]
5334 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5335 #[serde(remote = "Severity")]
5336 pub enum Severity {
5337 Low,
5338 Medium,
5339 High,
5340 #[serde(skip_deserializing)]
5341 UnknownValue(String),
5342 }
5343 impl FromStr for Severity {
5344 type Err = value::Error;
5345 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5346 Self::deserialize(s.into_deserializer())
5347 }
5348 }
5349 impl<'de> Deserialize<'de> for Severity {
5350 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5351 where
5352 D: Deserializer<'de>,
5353 {
5354 let s = String::deserialize(deserializer)?;
5355 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5356 Ok(deserialized)
5357 }
5358 }
5359 impl Serialize for Severity {
5360 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5361 where
5362 S: Serializer,
5363 {
5364 match self {
5365 Self::Low => serializer.serialize_unit_variant("Severity", 0u32, "Low"),
5366 Self::Medium => serializer.serialize_unit_variant("Severity", 1u32, "Medium"),
5367 Self::High => serializer.serialize_unit_variant("Severity", 2u32, "High"),
5368 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5369 }
5370 }
5371 }
5372}
5373#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5374pub struct SuppressionAlertsScope {
5375 #[doc = "All the conditions inside need to be true in order to suppress the alert"]
5376 #[serde(rename = "allOf")]
5377 pub all_of: Vec<ScopeElement>,
5378}
5379impl SuppressionAlertsScope {
5380 pub fn new(all_of: Vec<ScopeElement>) -> Self {
5381 Self { all_of }
5382 }
5383}
5384#[doc = "A list of key value pairs that describe the resource."]
5385#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5386pub struct Tags {
5387 #[doc = "A list of key value pairs that describe the resource."]
5388 #[serde(default, skip_serializing_if = "Option::is_none")]
5389 pub tags: Option<serde_json::Value>,
5390}
5391impl Tags {
5392 pub fn new() -> Self {
5393 Self::default()
5394 }
5395}
5396#[doc = "A custom alert rule that checks if a value (depends on the custom alert type) is within the given range."]
5397#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5398pub struct ThresholdCustomAlertRule {
5399 #[serde(flatten)]
5400 pub custom_alert_rule: CustomAlertRule,
5401 #[doc = "The minimum threshold."]
5402 #[serde(rename = "minThreshold")]
5403 pub min_threshold: i64,
5404 #[doc = "The maximum threshold."]
5405 #[serde(rename = "maxThreshold")]
5406 pub max_threshold: i64,
5407}
5408impl ThresholdCustomAlertRule {
5409 pub fn new(custom_alert_rule: CustomAlertRule, min_threshold: i64, max_threshold: i64) -> Self {
5410 Self {
5411 custom_alert_rule,
5412 min_threshold,
5413 max_threshold,
5414 }
5415 }
5416}
5417#[doc = "A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range."]
5418#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5419pub struct TimeWindowCustomAlertRule {
5420 #[serde(flatten)]
5421 pub threshold_custom_alert_rule: ThresholdCustomAlertRule,
5422 #[doc = "The time window size in iso8601 format."]
5423 #[serde(rename = "timeWindowSize")]
5424 pub time_window_size: String,
5425}
5426impl TimeWindowCustomAlertRule {
5427 pub fn new(threshold_custom_alert_rule: ThresholdCustomAlertRule, time_window_size: String) -> Self {
5428 Self {
5429 threshold_custom_alert_rule,
5430 time_window_size,
5431 }
5432 }
5433}
5434#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5435pub struct TopologyList {
5436 #[serde(
5437 default,
5438 deserialize_with = "azure_core::util::deserialize_null_as_default",
5439 skip_serializing_if = "Vec::is_empty"
5440 )]
5441 pub value: Vec<TopologyResource>,
5442 #[doc = "The URI to fetch the next page."]
5443 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5444 pub next_link: Option<String>,
5445}
5446impl azure_core::Continuable for TopologyList {
5447 type Continuation = String;
5448 fn continuation(&self) -> Option<Self::Continuation> {
5449 self.next_link.clone().filter(|value| !value.is_empty())
5450 }
5451}
5452impl TopologyList {
5453 pub fn new() -> Self {
5454 Self::default()
5455 }
5456}
5457#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5458pub struct TopologyResource {
5459 #[serde(flatten)]
5460 pub resource: Resource,
5461 #[serde(flatten)]
5462 pub location: Location,
5463 #[serde(default, skip_serializing_if = "Option::is_none")]
5464 pub properties: Option<TopologyResourceProperties>,
5465}
5466impl TopologyResource {
5467 pub fn new() -> Self {
5468 Self::default()
5469 }
5470}
5471#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5472pub struct TopologyResourceProperties {
5473 #[doc = "The UTC time on which the topology was calculated"]
5474 #[serde(rename = "calculatedDateTime", default, with = "azure_core::date::rfc3339::option")]
5475 pub calculated_date_time: Option<::time::OffsetDateTime>,
5476 #[doc = "Azure resources which are part of this topology resource"]
5477 #[serde(
5478 rename = "topologyResources",
5479 default,
5480 deserialize_with = "azure_core::util::deserialize_null_as_default",
5481 skip_serializing_if = "Vec::is_empty"
5482 )]
5483 pub topology_resources: Vec<TopologySingleResource>,
5484}
5485impl TopologyResourceProperties {
5486 pub fn new() -> Self {
5487 Self::default()
5488 }
5489}
5490#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5491pub struct TopologySingleResource {
5492 #[doc = "Azure resource id"]
5493 #[serde(rename = "resourceId", default, skip_serializing_if = "Option::is_none")]
5494 pub resource_id: Option<String>,
5495 #[doc = "The security severity of the resource"]
5496 #[serde(default, skip_serializing_if = "Option::is_none")]
5497 pub severity: Option<String>,
5498 #[doc = "Indicates if the resource has security recommendations"]
5499 #[serde(rename = "recommendationsExist", default, skip_serializing_if = "Option::is_none")]
5500 pub recommendations_exist: Option<bool>,
5501 #[doc = "Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.)"]
5502 #[serde(rename = "networkZones", default, skip_serializing_if = "Option::is_none")]
5503 pub network_zones: Option<String>,
5504 #[doc = "Score of the resource based on its security severity"]
5505 #[serde(rename = "topologyScore", default, skip_serializing_if = "Option::is_none")]
5506 pub topology_score: Option<i64>,
5507 #[doc = "The location of this resource"]
5508 #[serde(default, skip_serializing_if = "Option::is_none")]
5509 pub location: Option<String>,
5510 #[doc = "Azure resources connected to this resource which are in higher level in the topology view"]
5511 #[serde(
5512 default,
5513 deserialize_with = "azure_core::util::deserialize_null_as_default",
5514 skip_serializing_if = "Vec::is_empty"
5515 )]
5516 pub parents: Vec<TopologySingleResourceParent>,
5517 #[doc = "Azure resources connected to this resource which are in lower level in the topology view"]
5518 #[serde(
5519 default,
5520 deserialize_with = "azure_core::util::deserialize_null_as_default",
5521 skip_serializing_if = "Vec::is_empty"
5522 )]
5523 pub children: Vec<TopologySingleResourceChild>,
5524}
5525impl TopologySingleResource {
5526 pub fn new() -> Self {
5527 Self::default()
5528 }
5529}
5530#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5531pub struct TopologySingleResourceChild {
5532 #[doc = "Azure resource id which serves as child resource in topology view"]
5533 #[serde(rename = "resourceId", default, skip_serializing_if = "Option::is_none")]
5534 pub resource_id: Option<String>,
5535}
5536impl TopologySingleResourceChild {
5537 pub fn new() -> Self {
5538 Self::default()
5539 }
5540}
5541#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5542pub struct TopologySingleResourceParent {
5543 #[doc = "Azure resource id which serves as parent resource in topology view"]
5544 #[serde(rename = "resourceId", default, skip_serializing_if = "Option::is_none")]
5545 pub resource_id: Option<String>,
5546}
5547impl TopologySingleResourceParent {
5548 pub fn new() -> Self {
5549 Self::default()
5550 }
5551}
5552#[doc = "Describes an Azure tracked resource."]
5553#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5554pub struct TrackedResource {
5555 #[serde(flatten)]
5556 pub resource: Resource,
5557 #[serde(flatten)]
5558 pub azure_tracked_resource_location: AzureTrackedResourceLocation,
5559 #[serde(flatten)]
5560 pub kind: Kind,
5561 #[serde(flatten)]
5562 pub e_tag: ETag,
5563 #[serde(flatten)]
5564 pub tags: Tags,
5565}
5566impl TrackedResource {
5567 pub fn new() -> Self {
5568 Self::default()
5569 }
5570}
5571#[doc = "Number of twin updates is not in allowed range."]
5572#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5573pub struct TwinUpdatesNotInAllowedRange {
5574 #[serde(flatten)]
5575 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
5576}
5577impl TwinUpdatesNotInAllowedRange {
5578 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
5579 Self {
5580 time_window_custom_alert_rule,
5581 }
5582 }
5583}
5584#[doc = "Number of unauthorized operations is not in allowed range."]
5585#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5586pub struct UnauthorizedOperationsNotInAllowedRange {
5587 #[serde(flatten)]
5588 pub time_window_custom_alert_rule: TimeWindowCustomAlertRule,
5589}
5590impl UnauthorizedOperationsNotInAllowedRange {
5591 pub fn new(time_window_custom_alert_rule: TimeWindowCustomAlertRule) -> Self {
5592 Self {
5593 time_window_custom_alert_rule,
5594 }
5595 }
5596}
5597#[doc = "vulnerability assessment rule metadata details."]
5598#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5599pub struct VaRule {
5600 #[doc = "The rule Id."]
5601 #[serde(rename = "ruleId", default, skip_serializing_if = "Option::is_none")]
5602 pub rule_id: Option<String>,
5603 #[doc = "The rule severity."]
5604 #[serde(default, skip_serializing_if = "Option::is_none")]
5605 pub severity: Option<RuleSeverity>,
5606 #[doc = "The rule category."]
5607 #[serde(default, skip_serializing_if = "Option::is_none")]
5608 pub category: Option<String>,
5609 #[doc = "The rule type."]
5610 #[serde(rename = "ruleType", default, skip_serializing_if = "Option::is_none")]
5611 pub rule_type: Option<RuleType>,
5612 #[doc = "The rule title."]
5613 #[serde(default, skip_serializing_if = "Option::is_none")]
5614 pub title: Option<String>,
5615 #[doc = "The rule description."]
5616 #[serde(default, skip_serializing_if = "Option::is_none")]
5617 pub description: Option<String>,
5618 #[doc = "The rule rationale."]
5619 #[serde(default, skip_serializing_if = "Option::is_none")]
5620 pub rationale: Option<String>,
5621 #[doc = "The rule query details."]
5622 #[serde(rename = "queryCheck", default, skip_serializing_if = "Option::is_none")]
5623 pub query_check: Option<QueryCheck>,
5624 #[doc = "The benchmark references."]
5625 #[serde(
5626 rename = "benchmarkReferences",
5627 default,
5628 deserialize_with = "azure_core::util::deserialize_null_as_default",
5629 skip_serializing_if = "Vec::is_empty"
5630 )]
5631 pub benchmark_references: Vec<BenchmarkReference>,
5632}
5633impl VaRule {
5634 pub fn new() -> Self {
5635 Self::default()
5636 }
5637}
5638#[doc = "Vendor reference"]
5639#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5640pub struct VendorReference {
5641 #[doc = "Link title"]
5642 #[serde(default, skip_serializing_if = "Option::is_none")]
5643 pub title: Option<String>,
5644 #[doc = "Link url"]
5645 #[serde(default, skip_serializing_if = "Option::is_none")]
5646 pub link: Option<String>,
5647}
5648impl VendorReference {
5649 pub fn new() -> Self {
5650 Self::default()
5651 }
5652}
5653#[doc = "Configures where to store the OMS agent data for workspaces under a scope"]
5654#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5655pub struct WorkspaceSetting {
5656 #[serde(flatten)]
5657 pub resource: Resource,
5658 #[doc = "Workspace setting data"]
5659 #[serde(default, skip_serializing_if = "Option::is_none")]
5660 pub properties: Option<WorkspaceSettingProperties>,
5661}
5662impl WorkspaceSetting {
5663 pub fn new() -> Self {
5664 Self::default()
5665 }
5666}
5667#[doc = "List of workspace settings response"]
5668#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5669pub struct WorkspaceSettingList {
5670 #[doc = "List of workspace settings"]
5671 pub value: Vec<WorkspaceSetting>,
5672 #[doc = "The URI to fetch the next page."]
5673 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
5674 pub next_link: Option<String>,
5675}
5676impl azure_core::Continuable for WorkspaceSettingList {
5677 type Continuation = String;
5678 fn continuation(&self) -> Option<Self::Continuation> {
5679 self.next_link.clone().filter(|value| !value.is_empty())
5680 }
5681}
5682impl WorkspaceSettingList {
5683 pub fn new(value: Vec<WorkspaceSetting>) -> Self {
5684 Self { value, next_link: None }
5685 }
5686}
5687#[doc = "Workspace setting data"]
5688#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5689pub struct WorkspaceSettingProperties {
5690 #[doc = "The full Azure ID of the workspace to save the data in"]
5691 #[serde(rename = "workspaceId")]
5692 pub workspace_id: String,
5693 #[doc = "All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope"]
5694 pub scope: String,
5695}
5696impl WorkspaceSettingProperties {
5697 pub fn new(workspace_id: String, scope: String) -> Self {
5698 Self { workspace_id, scope }
5699 }
5700}
5701#[doc = "The security offering details"]
5702#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5703pub struct CloudOffering {
5704 #[doc = "The offering description."]
5705 #[serde(default, skip_serializing_if = "Option::is_none")]
5706 pub description: Option<String>,
5707}
5708impl CloudOffering {
5709 pub fn new() -> Self {
5710 Self { description: None }
5711 }
5712}
5713#[doc = "The type of the security offering."]
5714#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5715#[serde(tag = "offeringType")]
5716pub enum CloudOfferingUnion {
5717 CspmMonitorAws(CspmMonitorAwsOffering),
5718 CspmMonitorAzureDevOps(CspmMonitorAzureDevOpsOffering),
5719 CspmMonitorGcp(CspmMonitorGcpOffering),
5720 CspmMonitorGithub(CspmMonitorGithubOffering),
5721 DefenderCspmAws(DefenderCspmAwsOffering),
5722 DefenderCspmGcp(DefenderCspmGcpOffering),
5723 DefenderForDatabasesAws(DefenderFoDatabasesAwsOffering),
5724 DefenderForContainersAws(DefenderForContainersAwsOffering),
5725 DefenderForContainersGcp(DefenderForContainersGcpOffering),
5726 DefenderForDatabasesGcp(DefenderForDatabasesGcpOffering),
5727 DefenderForDevOpsAzureDevOps(DefenderForDevOpsAzureDevOpsOffering),
5728 DefenderForDevOpsGithub(DefenderForDevOpsGithubOffering),
5729 DefenderForServersAws(DefenderForServersAwsOffering),
5730 DefenderForServersGcp(DefenderForServersGcpOffering),
5731 InformationProtectionAws(InformationProtectionAwsOffering),
5732}
5733#[doc = "The CSPM monitoring for AWS offering"]
5734#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5735pub struct CspmMonitorAwsOffering {
5736 #[serde(flatten)]
5737 pub cloud_offering: CloudOffering,
5738 #[doc = "The native cloud connection configuration"]
5739 #[serde(rename = "nativeCloudConnection", default, skip_serializing_if = "Option::is_none")]
5740 pub native_cloud_connection: Option<cspm_monitor_aws_offering::NativeCloudConnection>,
5741}
5742impl CspmMonitorAwsOffering {
5743 pub fn new(cloud_offering: CloudOffering) -> Self {
5744 Self {
5745 cloud_offering,
5746 native_cloud_connection: None,
5747 }
5748 }
5749}
5750pub mod cspm_monitor_aws_offering {
5751 use super::*;
5752 #[doc = "The native cloud connection configuration"]
5753 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5754 pub struct NativeCloudConnection {
5755 #[doc = "The cloud role ARN in AWS for this feature"]
5756 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
5757 pub cloud_role_arn: Option<String>,
5758 }
5759 impl NativeCloudConnection {
5760 pub fn new() -> Self {
5761 Self::default()
5762 }
5763 }
5764}
5765#[doc = "The CSPM monitoring for AzureDevOps offering"]
5766#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5767pub struct CspmMonitorAzureDevOpsOffering {
5768 #[serde(flatten)]
5769 pub cloud_offering: CloudOffering,
5770}
5771impl CspmMonitorAzureDevOpsOffering {
5772 pub fn new(cloud_offering: CloudOffering) -> Self {
5773 Self { cloud_offering }
5774 }
5775}
5776#[doc = "The CSPM monitoring for GCP offering"]
5777#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5778pub struct CspmMonitorGcpOffering {
5779 #[serde(flatten)]
5780 pub cloud_offering: CloudOffering,
5781 #[doc = "The native cloud connection configuration"]
5782 #[serde(rename = "nativeCloudConnection", default, skip_serializing_if = "Option::is_none")]
5783 pub native_cloud_connection: Option<cspm_monitor_gcp_offering::NativeCloudConnection>,
5784}
5785impl CspmMonitorGcpOffering {
5786 pub fn new(cloud_offering: CloudOffering) -> Self {
5787 Self {
5788 cloud_offering,
5789 native_cloud_connection: None,
5790 }
5791 }
5792}
5793pub mod cspm_monitor_gcp_offering {
5794 use super::*;
5795 #[doc = "The native cloud connection configuration"]
5796 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5797 pub struct NativeCloudConnection {
5798 #[doc = "The GCP workload identity provider id for the offering"]
5799 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
5800 pub workload_identity_provider_id: Option<String>,
5801 #[doc = "The service account email address in GCP for this offering"]
5802 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
5803 pub service_account_email_address: Option<String>,
5804 }
5805 impl NativeCloudConnection {
5806 pub fn new() -> Self {
5807 Self::default()
5808 }
5809 }
5810}
5811#[doc = "The CSPM monitoring for github offering"]
5812#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5813pub struct CspmMonitorGithubOffering {
5814 #[serde(flatten)]
5815 pub cloud_offering: CloudOffering,
5816}
5817impl CspmMonitorGithubOffering {
5818 pub fn new(cloud_offering: CloudOffering) -> Self {
5819 Self { cloud_offering }
5820 }
5821}
5822#[doc = "Custom Assessment Automation"]
5823#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5824pub struct CustomAssessmentAutomation {
5825 #[serde(flatten)]
5826 pub resource: Resource,
5827 #[doc = "Metadata pertaining to creation and last modification of the resource."]
5828 #[serde(rename = "systemData", default, skip_serializing_if = "Option::is_none")]
5829 pub system_data: Option<SystemData>,
5830 #[doc = "describes the Custom Assessment Automation properties"]
5831 #[serde(default, skip_serializing_if = "Option::is_none")]
5832 pub properties: Option<CustomAssessmentAutomationProperties>,
5833}
5834impl CustomAssessmentAutomation {
5835 pub fn new() -> Self {
5836 Self::default()
5837 }
5838}
5839#[doc = "describes the Custom Assessment Automation properties"]
5840#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5841pub struct CustomAssessmentAutomationProperties {
5842 #[doc = "GZip encoded KQL query representing the assessment automation results required."]
5843 #[serde(rename = "compressedQuery", default, skip_serializing_if = "Option::is_none")]
5844 pub compressed_query: Option<String>,
5845 #[doc = "Relevant cloud for the custom assessment automation."]
5846 #[serde(rename = "supportedCloud", default, skip_serializing_if = "Option::is_none")]
5847 pub supported_cloud: Option<custom_assessment_automation_properties::SupportedCloud>,
5848 #[doc = "The severity to relate to the assessments generated by this assessment automation."]
5849 #[serde(default, skip_serializing_if = "Option::is_none")]
5850 pub severity: Option<custom_assessment_automation_properties::Severity>,
5851 #[doc = "The display name of the assessments generated by this assessment automation."]
5852 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
5853 pub display_name: Option<String>,
5854 #[doc = "The description to relate to the assessments generated by this assessment automation."]
5855 #[serde(default, skip_serializing_if = "Option::is_none")]
5856 pub description: Option<String>,
5857 #[doc = "The remediation description to relate to the assessments generated by this assessment automation."]
5858 #[serde(rename = "remediationDescription", default, skip_serializing_if = "Option::is_none")]
5859 pub remediation_description: Option<String>,
5860 #[doc = "The assessment metadata key used when an assessment is generated for this assessment automation."]
5861 #[serde(rename = "assessmentKey", default, skip_serializing_if = "Option::is_none")]
5862 pub assessment_key: Option<String>,
5863}
5864impl CustomAssessmentAutomationProperties {
5865 pub fn new() -> Self {
5866 Self::default()
5867 }
5868}
5869pub mod custom_assessment_automation_properties {
5870 use super::*;
5871 #[doc = "Relevant cloud for the custom assessment automation."]
5872 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5873 #[serde(remote = "SupportedCloud")]
5874 pub enum SupportedCloud {
5875 #[serde(rename = "AWS")]
5876 Aws,
5877 #[serde(rename = "GCP")]
5878 Gcp,
5879 #[serde(skip_deserializing)]
5880 UnknownValue(String),
5881 }
5882 impl FromStr for SupportedCloud {
5883 type Err = value::Error;
5884 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5885 Self::deserialize(s.into_deserializer())
5886 }
5887 }
5888 impl<'de> Deserialize<'de> for SupportedCloud {
5889 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5890 where
5891 D: Deserializer<'de>,
5892 {
5893 let s = String::deserialize(deserializer)?;
5894 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5895 Ok(deserialized)
5896 }
5897 }
5898 impl Serialize for SupportedCloud {
5899 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5900 where
5901 S: Serializer,
5902 {
5903 match self {
5904 Self::Aws => serializer.serialize_unit_variant("SupportedCloud", 0u32, "AWS"),
5905 Self::Gcp => serializer.serialize_unit_variant("SupportedCloud", 1u32, "GCP"),
5906 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5907 }
5908 }
5909 }
5910 #[doc = "The severity to relate to the assessments generated by this assessment automation."]
5911 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5912 #[serde(remote = "Severity")]
5913 pub enum Severity {
5914 High,
5915 Medium,
5916 Low,
5917 #[serde(skip_deserializing)]
5918 UnknownValue(String),
5919 }
5920 impl FromStr for Severity {
5921 type Err = value::Error;
5922 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
5923 Self::deserialize(s.into_deserializer())
5924 }
5925 }
5926 impl<'de> Deserialize<'de> for Severity {
5927 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5928 where
5929 D: Deserializer<'de>,
5930 {
5931 let s = String::deserialize(deserializer)?;
5932 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
5933 Ok(deserialized)
5934 }
5935 }
5936 impl Serialize for Severity {
5937 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5938 where
5939 S: Serializer,
5940 {
5941 match self {
5942 Self::High => serializer.serialize_unit_variant("Severity", 0u32, "High"),
5943 Self::Medium => serializer.serialize_unit_variant("Severity", 1u32, "Medium"),
5944 Self::Low => serializer.serialize_unit_variant("Severity", 2u32, "Low"),
5945 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
5946 }
5947 }
5948 }
5949}
5950#[doc = "Custom Assessment Automation request"]
5951#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5952pub struct CustomAssessmentAutomationRequest {
5953 #[serde(flatten)]
5954 pub resource: Resource,
5955 #[doc = "describes the Custom Assessment Automation properties"]
5956 #[serde(default, skip_serializing_if = "Option::is_none")]
5957 pub properties: Option<CustomAssessmentAutomationRequestProperties>,
5958}
5959impl CustomAssessmentAutomationRequest {
5960 pub fn new() -> Self {
5961 Self::default()
5962 }
5963}
5964#[doc = "describes the Custom Assessment Automation properties"]
5965#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
5966pub struct CustomAssessmentAutomationRequestProperties {
5967 #[doc = "Base 64 encoded KQL query representing the assessment automation results required."]
5968 #[serde(rename = "compressedQuery", default, skip_serializing_if = "Option::is_none")]
5969 pub compressed_query: Option<String>,
5970 #[doc = "Relevant cloud for the custom assessment automation."]
5971 #[serde(rename = "supportedCloud", default, skip_serializing_if = "Option::is_none")]
5972 pub supported_cloud: Option<custom_assessment_automation_request_properties::SupportedCloud>,
5973 #[doc = "The severity to relate to the assessments generated by this assessment automation."]
5974 #[serde(default, skip_serializing_if = "Option::is_none")]
5975 pub severity: Option<custom_assessment_automation_request_properties::Severity>,
5976 #[doc = "The display name of the assessments generated by this assessment automation."]
5977 #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
5978 pub display_name: Option<String>,
5979 #[doc = "The description to relate to the assessments generated by this assessment automation."]
5980 #[serde(default, skip_serializing_if = "Option::is_none")]
5981 pub description: Option<String>,
5982 #[doc = "The remediation description to relate to the assessments generated by this assessment automation."]
5983 #[serde(rename = "remediationDescription", default, skip_serializing_if = "Option::is_none")]
5984 pub remediation_description: Option<String>,
5985}
5986impl CustomAssessmentAutomationRequestProperties {
5987 pub fn new() -> Self {
5988 Self::default()
5989 }
5990}
5991pub mod custom_assessment_automation_request_properties {
5992 use super::*;
5993 #[doc = "Relevant cloud for the custom assessment automation."]
5994 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
5995 #[serde(remote = "SupportedCloud")]
5996 pub enum SupportedCloud {
5997 #[serde(rename = "AWS")]
5998 Aws,
5999 #[serde(rename = "GCP")]
6000 Gcp,
6001 #[serde(skip_deserializing)]
6002 UnknownValue(String),
6003 }
6004 impl FromStr for SupportedCloud {
6005 type Err = value::Error;
6006 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6007 Self::deserialize(s.into_deserializer())
6008 }
6009 }
6010 impl<'de> Deserialize<'de> for SupportedCloud {
6011 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6012 where
6013 D: Deserializer<'de>,
6014 {
6015 let s = String::deserialize(deserializer)?;
6016 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6017 Ok(deserialized)
6018 }
6019 }
6020 impl Serialize for SupportedCloud {
6021 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6022 where
6023 S: Serializer,
6024 {
6025 match self {
6026 Self::Aws => serializer.serialize_unit_variant("SupportedCloud", 0u32, "AWS"),
6027 Self::Gcp => serializer.serialize_unit_variant("SupportedCloud", 1u32, "GCP"),
6028 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6029 }
6030 }
6031 }
6032 #[doc = "The severity to relate to the assessments generated by this assessment automation."]
6033 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6034 #[serde(remote = "Severity")]
6035 pub enum Severity {
6036 High,
6037 Medium,
6038 Low,
6039 #[serde(skip_deserializing)]
6040 UnknownValue(String),
6041 }
6042 impl FromStr for Severity {
6043 type Err = value::Error;
6044 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6045 Self::deserialize(s.into_deserializer())
6046 }
6047 }
6048 impl<'de> Deserialize<'de> for Severity {
6049 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6050 where
6051 D: Deserializer<'de>,
6052 {
6053 let s = String::deserialize(deserializer)?;
6054 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6055 Ok(deserialized)
6056 }
6057 }
6058 impl Serialize for Severity {
6059 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6060 where
6061 S: Serializer,
6062 {
6063 match self {
6064 Self::High => serializer.serialize_unit_variant("Severity", 0u32, "High"),
6065 Self::Medium => serializer.serialize_unit_variant("Severity", 1u32, "Medium"),
6066 Self::Low => serializer.serialize_unit_variant("Severity", 2u32, "Low"),
6067 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6068 }
6069 }
6070 }
6071}
6072#[doc = "A list of Custom Assessment Automations"]
6073#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6074pub struct CustomAssessmentAutomationsListResult {
6075 #[doc = "Collection of Custom Assessment Automations"]
6076 #[serde(
6077 default,
6078 deserialize_with = "azure_core::util::deserialize_null_as_default",
6079 skip_serializing_if = "Vec::is_empty"
6080 )]
6081 pub value: Vec<CustomAssessmentAutomation>,
6082 #[doc = "The link used to get the next page of operations."]
6083 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
6084 pub next_link: Option<String>,
6085}
6086impl azure_core::Continuable for CustomAssessmentAutomationsListResult {
6087 type Continuation = String;
6088 fn continuation(&self) -> Option<Self::Continuation> {
6089 self.next_link.clone().filter(|value| !value.is_empty())
6090 }
6091}
6092impl CustomAssessmentAutomationsListResult {
6093 pub fn new() -> Self {
6094 Self::default()
6095 }
6096}
6097#[doc = "The CSPM P1 for Aws offering"]
6098#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6099pub struct DefenderCspmAwsOffering {
6100 #[serde(flatten)]
6101 pub cloud_offering: CloudOffering,
6102 #[doc = "The Microsoft Defender for Server VM scanning configuration"]
6103 #[serde(rename = "vmScanners", default, skip_serializing_if = "Option::is_none")]
6104 pub vm_scanners: Option<defender_cspm_aws_offering::VmScanners>,
6105}
6106impl DefenderCspmAwsOffering {
6107 pub fn new(cloud_offering: CloudOffering) -> Self {
6108 Self {
6109 cloud_offering,
6110 vm_scanners: None,
6111 }
6112 }
6113}
6114pub mod defender_cspm_aws_offering {
6115 use super::*;
6116 #[doc = "The Microsoft Defender for Server VM scanning configuration"]
6117 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6118 pub struct VmScanners {
6119 #[doc = "Is Microsoft Defender for Server VM scanning enabled"]
6120 #[serde(default, skip_serializing_if = "Option::is_none")]
6121 pub enabled: Option<bool>,
6122 #[doc = "configuration for Microsoft Defender for Server VM scanning"]
6123 #[serde(default, skip_serializing_if = "Option::is_none")]
6124 pub configuration: Option<vm_scanners::Configuration>,
6125 }
6126 impl VmScanners {
6127 pub fn new() -> Self {
6128 Self::default()
6129 }
6130 }
6131 pub mod vm_scanners {
6132 use super::*;
6133 #[doc = "configuration for Microsoft Defender for Server VM scanning"]
6134 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6135 pub struct Configuration {
6136 #[doc = "The cloud role ARN in AWS for this feature"]
6137 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6138 pub cloud_role_arn: Option<String>,
6139 #[doc = "The scanning mode for the vm scan."]
6140 #[serde(rename = "scanningMode", default, skip_serializing_if = "Option::is_none")]
6141 pub scanning_mode: Option<configuration::ScanningMode>,
6142 #[doc = "VM tags that indicates that VM should not be scanned"]
6143 #[serde(rename = "exclusionTags", default, skip_serializing_if = "Option::is_none")]
6144 pub exclusion_tags: Option<serde_json::Value>,
6145 }
6146 impl Configuration {
6147 pub fn new() -> Self {
6148 Self::default()
6149 }
6150 }
6151 pub mod configuration {
6152 use super::*;
6153 #[doc = "The scanning mode for the vm scan."]
6154 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6155 #[serde(remote = "ScanningMode")]
6156 pub enum ScanningMode {
6157 Default,
6158 #[serde(skip_deserializing)]
6159 UnknownValue(String),
6160 }
6161 impl FromStr for ScanningMode {
6162 type Err = value::Error;
6163 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6164 Self::deserialize(s.into_deserializer())
6165 }
6166 }
6167 impl<'de> Deserialize<'de> for ScanningMode {
6168 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6169 where
6170 D: Deserializer<'de>,
6171 {
6172 let s = String::deserialize(deserializer)?;
6173 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6174 Ok(deserialized)
6175 }
6176 }
6177 impl Serialize for ScanningMode {
6178 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6179 where
6180 S: Serializer,
6181 {
6182 match self {
6183 Self::Default => serializer.serialize_unit_variant("ScanningMode", 0u32, "Default"),
6184 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6185 }
6186 }
6187 }
6188 }
6189 }
6190}
6191#[doc = "The CSPM P1 for GCP offering"]
6192#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6193pub struct DefenderCspmGcpOffering {
6194 #[serde(flatten)]
6195 pub cloud_offering: CloudOffering,
6196}
6197impl DefenderCspmGcpOffering {
6198 pub fn new(cloud_offering: CloudOffering) -> Self {
6199 Self { cloud_offering }
6200 }
6201}
6202#[doc = "The Defender for Databases AWS offering"]
6203#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6204pub struct DefenderFoDatabasesAwsOffering {
6205 #[serde(flatten)]
6206 pub cloud_offering: CloudOffering,
6207 #[doc = "The ARC autoprovisioning configuration"]
6208 #[serde(rename = "arcAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6209 pub arc_auto_provisioning: Option<defender_fo_databases_aws_offering::ArcAutoProvisioning>,
6210 #[doc = "The RDS configuration"]
6211 #[serde(default, skip_serializing_if = "Option::is_none")]
6212 pub rds: Option<defender_fo_databases_aws_offering::Rds>,
6213}
6214impl DefenderFoDatabasesAwsOffering {
6215 pub fn new(cloud_offering: CloudOffering) -> Self {
6216 Self {
6217 cloud_offering,
6218 arc_auto_provisioning: None,
6219 rds: None,
6220 }
6221 }
6222}
6223pub mod defender_fo_databases_aws_offering {
6224 use super::*;
6225 #[doc = "The ARC autoprovisioning configuration"]
6226 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6227 pub struct ArcAutoProvisioning {
6228 #[doc = "Is arc auto provisioning enabled"]
6229 #[serde(default, skip_serializing_if = "Option::is_none")]
6230 pub enabled: Option<bool>,
6231 #[doc = "The cloud role ARN in AWS for this feature"]
6232 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6233 pub cloud_role_arn: Option<String>,
6234 }
6235 impl ArcAutoProvisioning {
6236 pub fn new() -> Self {
6237 Self::default()
6238 }
6239 }
6240 #[doc = "The RDS configuration"]
6241 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6242 pub struct Rds {
6243 #[doc = "Is RDS protection enabled"]
6244 #[serde(default, skip_serializing_if = "Option::is_none")]
6245 pub enabled: Option<bool>,
6246 #[doc = "The cloud role ARN in AWS for this feature"]
6247 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6248 pub cloud_role_arn: Option<String>,
6249 }
6250 impl Rds {
6251 pub fn new() -> Self {
6252 Self::default()
6253 }
6254 }
6255}
6256#[doc = "The Defender for Containers AWS offering"]
6257#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6258pub struct DefenderForContainersAwsOffering {
6259 #[serde(flatten)]
6260 pub cloud_offering: CloudOffering,
6261 #[doc = "The kubernetes service connection configuration"]
6262 #[serde(rename = "kubernetesService", default, skip_serializing_if = "Option::is_none")]
6263 pub kubernetes_service: Option<defender_for_containers_aws_offering::KubernetesService>,
6264 #[doc = "The kubernetes to scuba connection configuration"]
6265 #[serde(rename = "kubernetesScubaReader", default, skip_serializing_if = "Option::is_none")]
6266 pub kubernetes_scuba_reader: Option<defender_for_containers_aws_offering::KubernetesScubaReader>,
6267 #[doc = "The cloudwatch to kinesis connection configuration"]
6268 #[serde(rename = "cloudWatchToKinesis", default, skip_serializing_if = "Option::is_none")]
6269 pub cloud_watch_to_kinesis: Option<defender_for_containers_aws_offering::CloudWatchToKinesis>,
6270 #[doc = "The kinesis to s3 connection configuration"]
6271 #[serde(rename = "kinesisToS3", default, skip_serializing_if = "Option::is_none")]
6272 pub kinesis_to_s3: Option<defender_for_containers_aws_offering::KinesisToS3>,
6273 #[doc = "The container vulnerability assessment configuration"]
6274 #[serde(rename = "containerVulnerabilityAssessment", default, skip_serializing_if = "Option::is_none")]
6275 pub container_vulnerability_assessment: Option<defender_for_containers_aws_offering::ContainerVulnerabilityAssessment>,
6276 #[doc = "The container vulnerability assessment task configuration"]
6277 #[serde(rename = "containerVulnerabilityAssessmentTask", default, skip_serializing_if = "Option::is_none")]
6278 pub container_vulnerability_assessment_task: Option<defender_for_containers_aws_offering::ContainerVulnerabilityAssessmentTask>,
6279 #[doc = "Enable container vulnerability assessment feature"]
6280 #[serde(
6281 rename = "enableContainerVulnerabilityAssessment",
6282 default,
6283 skip_serializing_if = "Option::is_none"
6284 )]
6285 pub enable_container_vulnerability_assessment: Option<bool>,
6286 #[doc = "Is audit logs pipeline auto provisioning enabled"]
6287 #[serde(rename = "autoProvisioning", default, skip_serializing_if = "Option::is_none")]
6288 pub auto_provisioning: Option<bool>,
6289 #[doc = "The retention time in days of kube audit logs set on the CloudWatch log group"]
6290 #[serde(rename = "kubeAuditRetentionTime", default, skip_serializing_if = "Option::is_none")]
6291 pub kube_audit_retention_time: Option<i64>,
6292 #[doc = "The externalId used by the data reader to prevent the confused deputy attack"]
6293 #[serde(rename = "scubaExternalId", default, skip_serializing_if = "Option::is_none")]
6294 pub scuba_external_id: Option<String>,
6295}
6296impl DefenderForContainersAwsOffering {
6297 pub fn new(cloud_offering: CloudOffering) -> Self {
6298 Self {
6299 cloud_offering,
6300 kubernetes_service: None,
6301 kubernetes_scuba_reader: None,
6302 cloud_watch_to_kinesis: None,
6303 kinesis_to_s3: None,
6304 container_vulnerability_assessment: None,
6305 container_vulnerability_assessment_task: None,
6306 enable_container_vulnerability_assessment: None,
6307 auto_provisioning: None,
6308 kube_audit_retention_time: None,
6309 scuba_external_id: None,
6310 }
6311 }
6312}
6313pub mod defender_for_containers_aws_offering {
6314 use super::*;
6315 #[doc = "The kubernetes service connection configuration"]
6316 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6317 pub struct KubernetesService {
6318 #[doc = "The cloud role ARN in AWS for this feature used for provisioning resources"]
6319 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6320 pub cloud_role_arn: Option<String>,
6321 }
6322 impl KubernetesService {
6323 pub fn new() -> Self {
6324 Self::default()
6325 }
6326 }
6327 #[doc = "The kubernetes to scuba connection configuration"]
6328 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6329 pub struct KubernetesScubaReader {
6330 #[doc = "The cloud role ARN in AWS for this feature used for reading data"]
6331 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6332 pub cloud_role_arn: Option<String>,
6333 }
6334 impl KubernetesScubaReader {
6335 pub fn new() -> Self {
6336 Self::default()
6337 }
6338 }
6339 #[doc = "The cloudwatch to kinesis connection configuration"]
6340 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6341 pub struct CloudWatchToKinesis {
6342 #[doc = "The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis"]
6343 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6344 pub cloud_role_arn: Option<String>,
6345 }
6346 impl CloudWatchToKinesis {
6347 pub fn new() -> Self {
6348 Self::default()
6349 }
6350 }
6351 #[doc = "The kinesis to s3 connection configuration"]
6352 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6353 pub struct KinesisToS3 {
6354 #[doc = "The cloud role ARN in AWS used by Kinesis to transfer data into S3"]
6355 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6356 pub cloud_role_arn: Option<String>,
6357 }
6358 impl KinesisToS3 {
6359 pub fn new() -> Self {
6360 Self::default()
6361 }
6362 }
6363 #[doc = "The container vulnerability assessment configuration"]
6364 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6365 pub struct ContainerVulnerabilityAssessment {
6366 #[doc = "The cloud role ARN in AWS for this feature"]
6367 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6368 pub cloud_role_arn: Option<String>,
6369 }
6370 impl ContainerVulnerabilityAssessment {
6371 pub fn new() -> Self {
6372 Self::default()
6373 }
6374 }
6375 #[doc = "The container vulnerability assessment task configuration"]
6376 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6377 pub struct ContainerVulnerabilityAssessmentTask {
6378 #[doc = "The cloud role ARN in AWS for this feature"]
6379 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6380 pub cloud_role_arn: Option<String>,
6381 }
6382 impl ContainerVulnerabilityAssessmentTask {
6383 pub fn new() -> Self {
6384 Self::default()
6385 }
6386 }
6387}
6388#[doc = "The containers GCP offering"]
6389#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6390pub struct DefenderForContainersGcpOffering {
6391 #[serde(flatten)]
6392 pub cloud_offering: CloudOffering,
6393 #[doc = "The native cloud connection configuration"]
6394 #[serde(rename = "nativeCloudConnection", default, skip_serializing_if = "Option::is_none")]
6395 pub native_cloud_connection: Option<defender_for_containers_gcp_offering::NativeCloudConnection>,
6396 #[doc = "The native cloud connection configuration"]
6397 #[serde(rename = "dataPipelineNativeCloudConnection", default, skip_serializing_if = "Option::is_none")]
6398 pub data_pipeline_native_cloud_connection: Option<defender_for_containers_gcp_offering::DataPipelineNativeCloudConnection>,
6399 #[doc = "Is audit logs data collection enabled"]
6400 #[serde(rename = "auditLogsAutoProvisioningFlag", default, skip_serializing_if = "Option::is_none")]
6401 pub audit_logs_auto_provisioning_flag: Option<bool>,
6402 #[doc = "Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled"]
6403 #[serde(rename = "defenderAgentAutoProvisioningFlag", default, skip_serializing_if = "Option::is_none")]
6404 pub defender_agent_auto_provisioning_flag: Option<bool>,
6405 #[doc = "Is Policy Kubernetes agent auto provisioning enabled"]
6406 #[serde(rename = "policyAgentAutoProvisioningFlag", default, skip_serializing_if = "Option::is_none")]
6407 pub policy_agent_auto_provisioning_flag: Option<bool>,
6408}
6409impl DefenderForContainersGcpOffering {
6410 pub fn new(cloud_offering: CloudOffering) -> Self {
6411 Self {
6412 cloud_offering,
6413 native_cloud_connection: None,
6414 data_pipeline_native_cloud_connection: None,
6415 audit_logs_auto_provisioning_flag: None,
6416 defender_agent_auto_provisioning_flag: None,
6417 policy_agent_auto_provisioning_flag: None,
6418 }
6419 }
6420}
6421pub mod defender_for_containers_gcp_offering {
6422 use super::*;
6423 #[doc = "The native cloud connection configuration"]
6424 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6425 pub struct NativeCloudConnection {
6426 #[doc = "The service account email address in GCP for this offering"]
6427 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
6428 pub service_account_email_address: Option<String>,
6429 #[doc = "The GCP workload identity provider id for this offering"]
6430 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
6431 pub workload_identity_provider_id: Option<String>,
6432 }
6433 impl NativeCloudConnection {
6434 pub fn new() -> Self {
6435 Self::default()
6436 }
6437 }
6438 #[doc = "The native cloud connection configuration"]
6439 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6440 pub struct DataPipelineNativeCloudConnection {
6441 #[doc = "The data collection service account email address in GCP for this offering"]
6442 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
6443 pub service_account_email_address: Option<String>,
6444 #[doc = "The data collection GCP workload identity provider id for this offering"]
6445 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
6446 pub workload_identity_provider_id: Option<String>,
6447 }
6448 impl DataPipelineNativeCloudConnection {
6449 pub fn new() -> Self {
6450 Self::default()
6451 }
6452 }
6453}
6454#[doc = "The Defender for Databases GCP offering configurations"]
6455#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6456pub struct DefenderForDatabasesGcpOffering {
6457 #[serde(flatten)]
6458 pub cloud_offering: CloudOffering,
6459 #[doc = "The ARC autoprovisioning configuration"]
6460 #[serde(rename = "arcAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6461 pub arc_auto_provisioning: Option<defender_for_databases_gcp_offering::ArcAutoProvisioning>,
6462 #[doc = "The native cloud connection configuration"]
6463 #[serde(
6464 rename = "defenderForDatabasesArcAutoProvisioning",
6465 default,
6466 skip_serializing_if = "Option::is_none"
6467 )]
6468 pub defender_for_databases_arc_auto_provisioning: Option<defender_for_databases_gcp_offering::DefenderForDatabasesArcAutoProvisioning>,
6469}
6470impl DefenderForDatabasesGcpOffering {
6471 pub fn new(cloud_offering: CloudOffering) -> Self {
6472 Self {
6473 cloud_offering,
6474 arc_auto_provisioning: None,
6475 defender_for_databases_arc_auto_provisioning: None,
6476 }
6477 }
6478}
6479pub mod defender_for_databases_gcp_offering {
6480 use super::*;
6481 #[doc = "The ARC autoprovisioning configuration"]
6482 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6483 pub struct ArcAutoProvisioning {
6484 #[doc = "Is arc auto provisioning enabled"]
6485 #[serde(default, skip_serializing_if = "Option::is_none")]
6486 pub enabled: Option<bool>,
6487 }
6488 impl ArcAutoProvisioning {
6489 pub fn new() -> Self {
6490 Self::default()
6491 }
6492 }
6493 #[doc = "The native cloud connection configuration"]
6494 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6495 pub struct DefenderForDatabasesArcAutoProvisioning {
6496 #[doc = "The service account email address in GCP for this offering"]
6497 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
6498 pub service_account_email_address: Option<String>,
6499 #[doc = "The GCP workload identity provider id for this offering"]
6500 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
6501 pub workload_identity_provider_id: Option<String>,
6502 }
6503 impl DefenderForDatabasesArcAutoProvisioning {
6504 pub fn new() -> Self {
6505 Self::default()
6506 }
6507 }
6508}
6509#[doc = "The Defender for DevOps for Azure DevOps offering"]
6510#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6511pub struct DefenderForDevOpsAzureDevOpsOffering {
6512 #[serde(flatten)]
6513 pub cloud_offering: CloudOffering,
6514}
6515impl DefenderForDevOpsAzureDevOpsOffering {
6516 pub fn new(cloud_offering: CloudOffering) -> Self {
6517 Self { cloud_offering }
6518 }
6519}
6520#[doc = "The Defender for DevOps for Github offering"]
6521#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6522pub struct DefenderForDevOpsGithubOffering {
6523 #[serde(flatten)]
6524 pub cloud_offering: CloudOffering,
6525}
6526impl DefenderForDevOpsGithubOffering {
6527 pub fn new(cloud_offering: CloudOffering) -> Self {
6528 Self { cloud_offering }
6529 }
6530}
6531#[doc = "The Defender for Servers AWS offering"]
6532#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6533pub struct DefenderForServersAwsOffering {
6534 #[serde(flatten)]
6535 pub cloud_offering: CloudOffering,
6536 #[doc = "The Defender for servers connection configuration"]
6537 #[serde(rename = "defenderForServers", default, skip_serializing_if = "Option::is_none")]
6538 pub defender_for_servers: Option<defender_for_servers_aws_offering::DefenderForServers>,
6539 #[doc = "The ARC autoprovisioning configuration"]
6540 #[serde(rename = "arcAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6541 pub arc_auto_provisioning: Option<defender_for_servers_aws_offering::ArcAutoProvisioning>,
6542 #[doc = "The Vulnerability Assessment autoprovisioning configuration"]
6543 #[serde(rename = "vaAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6544 pub va_auto_provisioning: Option<defender_for_servers_aws_offering::VaAutoProvisioning>,
6545 #[doc = "The Microsoft Defender for Endpoint autoprovisioning configuration"]
6546 #[serde(rename = "mdeAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6547 pub mde_auto_provisioning: Option<defender_for_servers_aws_offering::MdeAutoProvisioning>,
6548 #[doc = "configuration for the servers offering subPlan"]
6549 #[serde(rename = "subPlan", default, skip_serializing_if = "Option::is_none")]
6550 pub sub_plan: Option<defender_for_servers_aws_offering::SubPlan>,
6551 #[doc = "The Microsoft Defender for Server VM scanning configuration"]
6552 #[serde(rename = "vmScanners", default, skip_serializing_if = "Option::is_none")]
6553 pub vm_scanners: Option<defender_for_servers_aws_offering::VmScanners>,
6554}
6555impl DefenderForServersAwsOffering {
6556 pub fn new(cloud_offering: CloudOffering) -> Self {
6557 Self {
6558 cloud_offering,
6559 defender_for_servers: None,
6560 arc_auto_provisioning: None,
6561 va_auto_provisioning: None,
6562 mde_auto_provisioning: None,
6563 sub_plan: None,
6564 vm_scanners: None,
6565 }
6566 }
6567}
6568pub mod defender_for_servers_aws_offering {
6569 use super::*;
6570 #[doc = "The Defender for servers connection configuration"]
6571 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6572 pub struct DefenderForServers {
6573 #[doc = "The cloud role ARN in AWS for this feature"]
6574 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6575 pub cloud_role_arn: Option<String>,
6576 }
6577 impl DefenderForServers {
6578 pub fn new() -> Self {
6579 Self::default()
6580 }
6581 }
6582 #[doc = "The ARC autoprovisioning configuration"]
6583 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6584 pub struct ArcAutoProvisioning {
6585 #[doc = "Is arc auto provisioning enabled"]
6586 #[serde(default, skip_serializing_if = "Option::is_none")]
6587 pub enabled: Option<bool>,
6588 #[doc = "The cloud role ARN in AWS for this feature"]
6589 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6590 pub cloud_role_arn: Option<String>,
6591 }
6592 impl ArcAutoProvisioning {
6593 pub fn new() -> Self {
6594 Self::default()
6595 }
6596 }
6597 #[doc = "The Vulnerability Assessment autoprovisioning configuration"]
6598 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6599 pub struct VaAutoProvisioning {
6600 #[doc = "Is Vulnerability Assessment auto provisioning enabled"]
6601 #[serde(default, skip_serializing_if = "Option::is_none")]
6602 pub enabled: Option<bool>,
6603 #[doc = "configuration for Vulnerability Assessment autoprovisioning"]
6604 #[serde(default, skip_serializing_if = "Option::is_none")]
6605 pub configuration: Option<va_auto_provisioning::Configuration>,
6606 }
6607 impl VaAutoProvisioning {
6608 pub fn new() -> Self {
6609 Self::default()
6610 }
6611 }
6612 pub mod va_auto_provisioning {
6613 use super::*;
6614 #[doc = "configuration for Vulnerability Assessment autoprovisioning"]
6615 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6616 pub struct Configuration {
6617 #[doc = "The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'"]
6618 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6619 pub type_: Option<configuration::Type>,
6620 }
6621 impl Configuration {
6622 pub fn new() -> Self {
6623 Self::default()
6624 }
6625 }
6626 pub mod configuration {
6627 use super::*;
6628 #[doc = "The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'"]
6629 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6630 #[serde(remote = "Type")]
6631 pub enum Type {
6632 Qualys,
6633 #[serde(rename = "TVM")]
6634 Tvm,
6635 #[serde(skip_deserializing)]
6636 UnknownValue(String),
6637 }
6638 impl FromStr for Type {
6639 type Err = value::Error;
6640 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6641 Self::deserialize(s.into_deserializer())
6642 }
6643 }
6644 impl<'de> Deserialize<'de> for Type {
6645 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6646 where
6647 D: Deserializer<'de>,
6648 {
6649 let s = String::deserialize(deserializer)?;
6650 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6651 Ok(deserialized)
6652 }
6653 }
6654 impl Serialize for Type {
6655 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6656 where
6657 S: Serializer,
6658 {
6659 match self {
6660 Self::Qualys => serializer.serialize_unit_variant("Type", 0u32, "Qualys"),
6661 Self::Tvm => serializer.serialize_unit_variant("Type", 1u32, "TVM"),
6662 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6663 }
6664 }
6665 }
6666 }
6667 }
6668 #[doc = "The Microsoft Defender for Endpoint autoprovisioning configuration"]
6669 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6670 pub struct MdeAutoProvisioning {
6671 #[doc = "Is Microsoft Defender for Endpoint auto provisioning enabled"]
6672 #[serde(default, skip_serializing_if = "Option::is_none")]
6673 pub enabled: Option<bool>,
6674 #[doc = "configuration for Microsoft Defender for Endpoint autoprovisioning"]
6675 #[serde(default, skip_serializing_if = "Option::is_none")]
6676 pub configuration: Option<serde_json::Value>,
6677 }
6678 impl MdeAutoProvisioning {
6679 pub fn new() -> Self {
6680 Self::default()
6681 }
6682 }
6683 #[doc = "configuration for the servers offering subPlan"]
6684 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6685 pub struct SubPlan {
6686 #[doc = "The available sub plans"]
6687 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6688 pub type_: Option<sub_plan::Type>,
6689 }
6690 impl SubPlan {
6691 pub fn new() -> Self {
6692 Self::default()
6693 }
6694 }
6695 pub mod sub_plan {
6696 use super::*;
6697 #[doc = "The available sub plans"]
6698 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6699 #[serde(remote = "Type")]
6700 pub enum Type {
6701 P1,
6702 P2,
6703 #[serde(skip_deserializing)]
6704 UnknownValue(String),
6705 }
6706 impl FromStr for Type {
6707 type Err = value::Error;
6708 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6709 Self::deserialize(s.into_deserializer())
6710 }
6711 }
6712 impl<'de> Deserialize<'de> for Type {
6713 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6714 where
6715 D: Deserializer<'de>,
6716 {
6717 let s = String::deserialize(deserializer)?;
6718 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6719 Ok(deserialized)
6720 }
6721 }
6722 impl Serialize for Type {
6723 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6724 where
6725 S: Serializer,
6726 {
6727 match self {
6728 Self::P1 => serializer.serialize_unit_variant("Type", 0u32, "P1"),
6729 Self::P2 => serializer.serialize_unit_variant("Type", 1u32, "P2"),
6730 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6731 }
6732 }
6733 }
6734 }
6735 #[doc = "The Microsoft Defender for Server VM scanning configuration"]
6736 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6737 pub struct VmScanners {
6738 #[doc = "Is Microsoft Defender for Server VM scanning enabled"]
6739 #[serde(default, skip_serializing_if = "Option::is_none")]
6740 pub enabled: Option<bool>,
6741 #[doc = "configuration for Microsoft Defender for Server VM scanning"]
6742 #[serde(default, skip_serializing_if = "Option::is_none")]
6743 pub configuration: Option<vm_scanners::Configuration>,
6744 }
6745 impl VmScanners {
6746 pub fn new() -> Self {
6747 Self::default()
6748 }
6749 }
6750 pub mod vm_scanners {
6751 use super::*;
6752 #[doc = "configuration for Microsoft Defender for Server VM scanning"]
6753 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6754 pub struct Configuration {
6755 #[doc = "The cloud role ARN in AWS for this feature"]
6756 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
6757 pub cloud_role_arn: Option<String>,
6758 #[doc = "The scanning mode for the vm scan."]
6759 #[serde(rename = "scanningMode", default, skip_serializing_if = "Option::is_none")]
6760 pub scanning_mode: Option<configuration::ScanningMode>,
6761 #[doc = "VM tags that indicates that VM should not be scanned"]
6762 #[serde(rename = "exclusionTags", default, skip_serializing_if = "Option::is_none")]
6763 pub exclusion_tags: Option<serde_json::Value>,
6764 }
6765 impl Configuration {
6766 pub fn new() -> Self {
6767 Self::default()
6768 }
6769 }
6770 pub mod configuration {
6771 use super::*;
6772 #[doc = "The scanning mode for the vm scan."]
6773 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6774 #[serde(remote = "ScanningMode")]
6775 pub enum ScanningMode {
6776 Default,
6777 #[serde(skip_deserializing)]
6778 UnknownValue(String),
6779 }
6780 impl FromStr for ScanningMode {
6781 type Err = value::Error;
6782 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6783 Self::deserialize(s.into_deserializer())
6784 }
6785 }
6786 impl<'de> Deserialize<'de> for ScanningMode {
6787 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6788 where
6789 D: Deserializer<'de>,
6790 {
6791 let s = String::deserialize(deserializer)?;
6792 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6793 Ok(deserialized)
6794 }
6795 }
6796 impl Serialize for ScanningMode {
6797 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6798 where
6799 S: Serializer,
6800 {
6801 match self {
6802 Self::Default => serializer.serialize_unit_variant("ScanningMode", 0u32, "Default"),
6803 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6804 }
6805 }
6806 }
6807 }
6808 }
6809}
6810#[doc = "The Defender for Servers GCP offering configurations"]
6811#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6812pub struct DefenderForServersGcpOffering {
6813 #[serde(flatten)]
6814 pub cloud_offering: CloudOffering,
6815 #[doc = "The Defender for servers connection configuration"]
6816 #[serde(rename = "defenderForServers", default, skip_serializing_if = "Option::is_none")]
6817 pub defender_for_servers: Option<defender_for_servers_gcp_offering::DefenderForServers>,
6818 #[doc = "The ARC autoprovisioning configuration"]
6819 #[serde(rename = "arcAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6820 pub arc_auto_provisioning: Option<defender_for_servers_gcp_offering::ArcAutoProvisioning>,
6821 #[doc = "The Vulnerability Assessment autoprovisioning configuration"]
6822 #[serde(rename = "vaAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6823 pub va_auto_provisioning: Option<defender_for_servers_gcp_offering::VaAutoProvisioning>,
6824 #[doc = "The Microsoft Defender for Endpoint autoprovisioning configuration"]
6825 #[serde(rename = "mdeAutoProvisioning", default, skip_serializing_if = "Option::is_none")]
6826 pub mde_auto_provisioning: Option<defender_for_servers_gcp_offering::MdeAutoProvisioning>,
6827 #[doc = "configuration for the servers offering subPlan"]
6828 #[serde(rename = "subPlan", default, skip_serializing_if = "Option::is_none")]
6829 pub sub_plan: Option<defender_for_servers_gcp_offering::SubPlan>,
6830}
6831impl DefenderForServersGcpOffering {
6832 pub fn new(cloud_offering: CloudOffering) -> Self {
6833 Self {
6834 cloud_offering,
6835 defender_for_servers: None,
6836 arc_auto_provisioning: None,
6837 va_auto_provisioning: None,
6838 mde_auto_provisioning: None,
6839 sub_plan: None,
6840 }
6841 }
6842}
6843pub mod defender_for_servers_gcp_offering {
6844 use super::*;
6845 #[doc = "The Defender for servers connection configuration"]
6846 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6847 pub struct DefenderForServers {
6848 #[doc = "The workload identity provider id in GCP for this feature"]
6849 #[serde(rename = "workloadIdentityProviderId", default, skip_serializing_if = "Option::is_none")]
6850 pub workload_identity_provider_id: Option<String>,
6851 #[doc = "The service account email address in GCP for this feature"]
6852 #[serde(rename = "serviceAccountEmailAddress", default, skip_serializing_if = "Option::is_none")]
6853 pub service_account_email_address: Option<String>,
6854 }
6855 impl DefenderForServers {
6856 pub fn new() -> Self {
6857 Self::default()
6858 }
6859 }
6860 #[doc = "The ARC autoprovisioning configuration"]
6861 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6862 pub struct ArcAutoProvisioning {
6863 #[doc = "Is arc auto provisioning enabled"]
6864 #[serde(default, skip_serializing_if = "Option::is_none")]
6865 pub enabled: Option<bool>,
6866 }
6867 impl ArcAutoProvisioning {
6868 pub fn new() -> Self {
6869 Self::default()
6870 }
6871 }
6872 #[doc = "The Vulnerability Assessment autoprovisioning configuration"]
6873 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6874 pub struct VaAutoProvisioning {
6875 #[doc = "Is Vulnerability Assessment auto provisioning enabled"]
6876 #[serde(default, skip_serializing_if = "Option::is_none")]
6877 pub enabled: Option<bool>,
6878 #[doc = "configuration for Vulnerability Assessment autoprovisioning"]
6879 #[serde(default, skip_serializing_if = "Option::is_none")]
6880 pub configuration: Option<va_auto_provisioning::Configuration>,
6881 }
6882 impl VaAutoProvisioning {
6883 pub fn new() -> Self {
6884 Self::default()
6885 }
6886 }
6887 pub mod va_auto_provisioning {
6888 use super::*;
6889 #[doc = "configuration for Vulnerability Assessment autoprovisioning"]
6890 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6891 pub struct Configuration {
6892 #[doc = "The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'"]
6893 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6894 pub type_: Option<configuration::Type>,
6895 }
6896 impl Configuration {
6897 pub fn new() -> Self {
6898 Self::default()
6899 }
6900 }
6901 pub mod configuration {
6902 use super::*;
6903 #[doc = "The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'"]
6904 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6905 #[serde(remote = "Type")]
6906 pub enum Type {
6907 Qualys,
6908 #[serde(rename = "TVM")]
6909 Tvm,
6910 #[serde(skip_deserializing)]
6911 UnknownValue(String),
6912 }
6913 impl FromStr for Type {
6914 type Err = value::Error;
6915 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6916 Self::deserialize(s.into_deserializer())
6917 }
6918 }
6919 impl<'de> Deserialize<'de> for Type {
6920 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6921 where
6922 D: Deserializer<'de>,
6923 {
6924 let s = String::deserialize(deserializer)?;
6925 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6926 Ok(deserialized)
6927 }
6928 }
6929 impl Serialize for Type {
6930 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6931 where
6932 S: Serializer,
6933 {
6934 match self {
6935 Self::Qualys => serializer.serialize_unit_variant("Type", 0u32, "Qualys"),
6936 Self::Tvm => serializer.serialize_unit_variant("Type", 1u32, "TVM"),
6937 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
6938 }
6939 }
6940 }
6941 }
6942 }
6943 #[doc = "The Microsoft Defender for Endpoint autoprovisioning configuration"]
6944 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6945 pub struct MdeAutoProvisioning {
6946 #[doc = "Is Microsoft Defender for Endpoint auto provisioning enabled"]
6947 #[serde(default, skip_serializing_if = "Option::is_none")]
6948 pub enabled: Option<bool>,
6949 #[doc = "configuration for Microsoft Defender for Endpoint autoprovisioning"]
6950 #[serde(default, skip_serializing_if = "Option::is_none")]
6951 pub configuration: Option<serde_json::Value>,
6952 }
6953 impl MdeAutoProvisioning {
6954 pub fn new() -> Self {
6955 Self::default()
6956 }
6957 }
6958 #[doc = "configuration for the servers offering subPlan"]
6959 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
6960 pub struct SubPlan {
6961 #[doc = "The available sub plans"]
6962 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6963 pub type_: Option<sub_plan::Type>,
6964 }
6965 impl SubPlan {
6966 pub fn new() -> Self {
6967 Self::default()
6968 }
6969 }
6970 pub mod sub_plan {
6971 use super::*;
6972 #[doc = "The available sub plans"]
6973 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
6974 #[serde(remote = "Type")]
6975 pub enum Type {
6976 P1,
6977 P2,
6978 #[serde(skip_deserializing)]
6979 UnknownValue(String),
6980 }
6981 impl FromStr for Type {
6982 type Err = value::Error;
6983 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
6984 Self::deserialize(s.into_deserializer())
6985 }
6986 }
6987 impl<'de> Deserialize<'de> for Type {
6988 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6989 where
6990 D: Deserializer<'de>,
6991 {
6992 let s = String::deserialize(deserializer)?;
6993 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
6994 Ok(deserialized)
6995 }
6996 }
6997 impl Serialize for Type {
6998 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6999 where
7000 S: Serializer,
7001 {
7002 match self {
7003 Self::P1 => serializer.serialize_unit_variant("Type", 0u32, "P1"),
7004 Self::P2 => serializer.serialize_unit_variant("Type", 1u32, "P2"),
7005 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7006 }
7007 }
7008 }
7009 }
7010}
7011#[doc = "The information protection for AWS offering"]
7012#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7013pub struct InformationProtectionAwsOffering {
7014 #[serde(flatten)]
7015 pub cloud_offering: CloudOffering,
7016 #[doc = "The native cloud connection configuration"]
7017 #[serde(rename = "informationProtection", default, skip_serializing_if = "Option::is_none")]
7018 pub information_protection: Option<information_protection_aws_offering::InformationProtection>,
7019}
7020impl InformationProtectionAwsOffering {
7021 pub fn new(cloud_offering: CloudOffering) -> Self {
7022 Self {
7023 cloud_offering,
7024 information_protection: None,
7025 }
7026 }
7027}
7028pub mod information_protection_aws_offering {
7029 use super::*;
7030 #[doc = "The native cloud connection configuration"]
7031 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7032 pub struct InformationProtection {
7033 #[doc = "The cloud role ARN in AWS for this feature"]
7034 #[serde(rename = "cloudRoleArn", default, skip_serializing_if = "Option::is_none")]
7035 pub cloud_role_arn: Option<String>,
7036 }
7037 impl InformationProtection {
7038 pub fn new() -> Self {
7039 Self::default()
7040 }
7041 }
7042}
7043#[doc = "List of security controls definition"]
7044#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7045pub struct SecureScoreControlDefinitionList {
7046 #[doc = "Collection of security controls definition in this page"]
7047 #[serde(
7048 default,
7049 deserialize_with = "azure_core::util::deserialize_null_as_default",
7050 skip_serializing_if = "Vec::is_empty"
7051 )]
7052 pub value: Vec<SecureScoreControlDefinitionItem>,
7053 #[doc = "The URI to fetch the next page."]
7054 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
7055 pub next_link: Option<String>,
7056}
7057impl azure_core::Continuable for SecureScoreControlDefinitionList {
7058 type Continuation = String;
7059 fn continuation(&self) -> Option<Self::Continuation> {
7060 self.next_link.clone().filter(|value| !value.is_empty())
7061 }
7062}
7063impl SecureScoreControlDefinitionList {
7064 pub fn new() -> Self {
7065 Self::default()
7066 }
7067}
7068#[doc = "Metadata pertaining to creation and last modification of the resource."]
7069#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
7070pub struct SystemData {
7071 #[doc = "The identity that created the resource."]
7072 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
7073 pub created_by: Option<String>,
7074 #[doc = "The type of identity that created the resource."]
7075 #[serde(rename = "createdByType", default, skip_serializing_if = "Option::is_none")]
7076 pub created_by_type: Option<system_data::CreatedByType>,
7077 #[doc = "The timestamp of resource creation (UTC)."]
7078 #[serde(rename = "createdAt", default, with = "azure_core::date::rfc3339::option")]
7079 pub created_at: Option<::time::OffsetDateTime>,
7080 #[doc = "The identity that last modified the resource."]
7081 #[serde(rename = "lastModifiedBy", default, skip_serializing_if = "Option::is_none")]
7082 pub last_modified_by: Option<String>,
7083 #[doc = "The type of identity that last modified the resource."]
7084 #[serde(rename = "lastModifiedByType", default, skip_serializing_if = "Option::is_none")]
7085 pub last_modified_by_type: Option<system_data::LastModifiedByType>,
7086 #[doc = "The timestamp of resource last modification (UTC)"]
7087 #[serde(rename = "lastModifiedAt", default, with = "azure_core::date::rfc3339::option")]
7088 pub last_modified_at: Option<::time::OffsetDateTime>,
7089}
7090impl SystemData {
7091 pub fn new() -> Self {
7092 Self::default()
7093 }
7094}
7095pub mod system_data {
7096 use super::*;
7097 #[doc = "The type of identity that created the resource."]
7098 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7099 #[serde(remote = "CreatedByType")]
7100 pub enum CreatedByType {
7101 User,
7102 Application,
7103 ManagedIdentity,
7104 Key,
7105 #[serde(skip_deserializing)]
7106 UnknownValue(String),
7107 }
7108 impl FromStr for CreatedByType {
7109 type Err = value::Error;
7110 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7111 Self::deserialize(s.into_deserializer())
7112 }
7113 }
7114 impl<'de> Deserialize<'de> for CreatedByType {
7115 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7116 where
7117 D: Deserializer<'de>,
7118 {
7119 let s = String::deserialize(deserializer)?;
7120 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7121 Ok(deserialized)
7122 }
7123 }
7124 impl Serialize for CreatedByType {
7125 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7126 where
7127 S: Serializer,
7128 {
7129 match self {
7130 Self::User => serializer.serialize_unit_variant("CreatedByType", 0u32, "User"),
7131 Self::Application => serializer.serialize_unit_variant("CreatedByType", 1u32, "Application"),
7132 Self::ManagedIdentity => serializer.serialize_unit_variant("CreatedByType", 2u32, "ManagedIdentity"),
7133 Self::Key => serializer.serialize_unit_variant("CreatedByType", 3u32, "Key"),
7134 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7135 }
7136 }
7137 }
7138 #[doc = "The type of identity that last modified the resource."]
7139 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
7140 #[serde(remote = "LastModifiedByType")]
7141 pub enum LastModifiedByType {
7142 User,
7143 Application,
7144 ManagedIdentity,
7145 Key,
7146 #[serde(skip_deserializing)]
7147 UnknownValue(String),
7148 }
7149 impl FromStr for LastModifiedByType {
7150 type Err = value::Error;
7151 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
7152 Self::deserialize(s.into_deserializer())
7153 }
7154 }
7155 impl<'de> Deserialize<'de> for LastModifiedByType {
7156 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7157 where
7158 D: Deserializer<'de>,
7159 {
7160 let s = String::deserialize(deserializer)?;
7161 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
7162 Ok(deserialized)
7163 }
7164 }
7165 impl Serialize for LastModifiedByType {
7166 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7167 where
7168 S: Serializer,
7169 {
7170 match self {
7171 Self::User => serializer.serialize_unit_variant("LastModifiedByType", 0u32, "User"),
7172 Self::Application => serializer.serialize_unit_variant("LastModifiedByType", 1u32, "Application"),
7173 Self::ManagedIdentity => serializer.serialize_unit_variant("LastModifiedByType", 2u32, "ManagedIdentity"),
7174 Self::Key => serializer.serialize_unit_variant("LastModifiedByType", 3u32, "Key"),
7175 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
7176 }
7177 }
7178 }
7179}