azure_mgmt_deploymentmanager 0.19.0

generated REST API bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::de::{value, Deserializer, IntoDeserializer};
use serde::{Deserialize, Serialize, Serializer};
use std::str::FromStr;
#[doc = "ApiKey authentication gives a name and a value that can be included in either the request header or query parameters."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiKeyAuthentication {
    #[doc = "The key name of the authentication key/value pair."]
    pub name: String,
    #[doc = "The location of the authentication key/value pair in the request."]
    #[serde(rename = "in")]
    pub in_: api_key_authentication::In,
    #[doc = "The value of the authentication key/value pair."]
    pub value: String,
}
impl ApiKeyAuthentication {
    pub fn new(name: String, in_: api_key_authentication::In, value: String) -> Self {
        Self { name, in_, value }
    }
}
pub mod api_key_authentication {
    use super::*;
    #[doc = "The location of the authentication key/value pair in the request."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum In {
        Query,
        Header,
    }
}
#[doc = "The resource that defines the source location where the artifacts are located."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtifactSource {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "The properties that define the artifact source."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<serde_json::Value>,
}
impl ArtifactSource {
    pub fn new(tracked_resource: TrackedResource) -> Self {
        Self {
            tracked_resource,
            properties: None,
        }
    }
}
pub type ArtifactSourceListResult = Vec<ArtifactSource>;
#[doc = "The properties that define the source location where the artifacts are located."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtifactSourceProperties {
    #[doc = "The type of artifact source used."]
    #[serde(rename = "sourceType")]
    pub source_type: String,
    #[doc = "The path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found."]
    #[serde(rename = "artifactRoot", default, skip_serializing_if = "Option::is_none")]
    pub artifact_root: Option<String>,
    #[doc = "Defines the authentication method and properties to access the artifacts."]
    pub authentication: AuthenticationUnion,
}
impl ArtifactSourceProperties {
    pub fn new(source_type: String, authentication: AuthenticationUnion) -> Self {
        Self {
            source_type,
            artifact_root: None,
            authentication,
        }
    }
}
#[doc = "The authentication type"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum AuthenticationUnion {
    Sas(SasAuthentication),
}
#[doc = "The error information object."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CloudError {
    #[doc = "Detailed error information of any failure."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<CloudErrorBody>,
}
impl CloudError {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Detailed error information of any failure."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CloudErrorBody {
    #[doc = "Error code string."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    #[doc = "Descriptive error information."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[doc = "Error target"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub target: Option<String>,
    #[doc = "More detailed error information."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub details: Vec<CloudErrorBody>,
}
impl CloudErrorBody {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The attributes for the health check step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthCheckStepAttributes {
    #[doc = "The duration in ISO 8601 format for which health check waits idly without any checks."]
    #[serde(rename = "waitDuration", default, skip_serializing_if = "Option::is_none")]
    pub wait_duration: Option<String>,
    #[doc = "The duration in ISO 8601 format for which the health check waits for the resource to become healthy. Health check fails if it doesn't. Health check starts to enforce healthyStateDuration once resource becomes healthy."]
    #[serde(rename = "maxElasticDuration", default, skip_serializing_if = "Option::is_none")]
    pub max_elastic_duration: Option<String>,
    #[doc = "The duration in ISO 8601 format for which the resource is expected to be continuously healthy. If maxElasticDuration is specified, healthy state duration is enforced after the detection of first healthy signal."]
    #[serde(rename = "healthyStateDuration")]
    pub healthy_state_duration: String,
}
impl HealthCheckStepAttributes {
    pub fn new(healthy_state_duration: String) -> Self {
        Self {
            wait_duration: None,
            max_elastic_duration: None,
            healthy_state_duration,
        }
    }
}
#[doc = "The type of health check."]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum HealthCheckStepAttributesUnion {
    #[serde(rename = "REST")]
    Rest(RestHealthCheckStepAttributes),
}
#[doc = "Defines the properties of a health check step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthCheckStepProperties {
    #[doc = "The attributes for the health check step."]
    pub attributes: HealthCheckStepAttributesUnion,
}
impl HealthCheckStepProperties {
    pub fn new(attributes: HealthCheckStepAttributesUnion) -> Self {
        Self { attributes }
    }
}
#[doc = "Identity for the resource."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Identity {
    #[doc = "The identity type."]
    #[serde(rename = "type")]
    pub type_: String,
    #[doc = "The list of identities."]
    #[serde(rename = "identityIds")]
    pub identity_ids: Vec<String>,
}
impl Identity {
    pub fn new(type_: String, identity_ids: Vec<String>) -> Self {
        Self { type_, identity_ids }
    }
}
#[doc = "Supplementary contextual messages during a rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Message {
    #[doc = "Time in UTC this message was provided."]
    #[serde(rename = "timeStamp", default, with = "azure_core::date::rfc3339::option")]
    pub time_stamp: Option<time::OffsetDateTime>,
    #[doc = "The actual message text."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}
impl Message {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Represents an operation that can be performed on the service."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Operation {
    #[doc = "The name of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "The detail about an operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub display: Option<OperationDetail>,
    #[doc = "The origin of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub origin: Option<String>,
    #[doc = "The properties of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<serde_json::Value>,
}
impl Operation {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The detail about an operation."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct OperationDetail {
    #[doc = "The name of the provider that supports the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    #[doc = "The resource type on which this operation can be performed."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resource: Option<String>,
    #[doc = "The name of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operation: Option<String>,
    #[doc = "The description of the operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
}
impl OperationDetail {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The operations response."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct OperationsList {
    #[doc = "Represents an operation that can be performed on the service."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<Operation>,
}
impl OperationsList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The properties that define a step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct PrePostStep {
    #[doc = "The resource Id of the step to be run."]
    #[serde(rename = "stepId")]
    pub step_id: String,
}
impl PrePostStep {
    pub fn new(step_id: String) -> Self {
        Self { step_id }
    }
}
#[doc = "Common fields that are returned in the response for all Azure Resource Manager resources"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Resource {
    #[doc = "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "The name of the resource"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\""]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
}
impl Resource {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Individual resource operation information."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ResourceOperation {
    #[doc = "Name of the resource as specified in the artifacts. For ARM resources, this is the name of the resource specified in the template."]
    #[serde(rename = "resourceName", default, skip_serializing_if = "Option::is_none")]
    pub resource_name: Option<String>,
    #[doc = "Unique identifier of the operation. For ARM resources, this is the operationId obtained from ARM service."]
    #[serde(rename = "operationId", default, skip_serializing_if = "Option::is_none")]
    pub operation_id: Option<String>,
    #[doc = "Type of the resource as specified in the artifacts. For ARM resources, this is the type of the resource specified in the template."]
    #[serde(rename = "resourceType", default, skip_serializing_if = "Option::is_none")]
    pub resource_type: Option<String>,
    #[doc = "State of the resource deployment. For ARM resources, this is the current provisioning state of the resource."]
    #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
    pub provisioning_state: Option<String>,
    #[doc = "Descriptive information of the resource operation."]
    #[serde(rename = "statusMessage", default, skip_serializing_if = "Option::is_none")]
    pub status_message: Option<String>,
    #[doc = "Http status code of the operation."]
    #[serde(rename = "statusCode", default, skip_serializing_if = "Option::is_none")]
    pub status_code: Option<String>,
}
impl ResourceOperation {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "A REST based health check"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestHealthCheck {
    #[doc = "A unique name for this check."]
    pub name: String,
    #[doc = "The properties that make up a REST request"]
    pub request: RestRequest,
    #[doc = "The properties that make up the expected REST response"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub response: Option<RestResponse>,
}
impl RestHealthCheck {
    pub fn new(name: String, request: RestRequest) -> Self {
        Self {
            name,
            request,
            response: None,
        }
    }
}
#[doc = "Defines the REST health check step properties."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestHealthCheckStepAttributes {
    #[serde(flatten)]
    pub health_check_step_attributes: HealthCheckStepAttributes,
    #[doc = "The parameters for the REST health check."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<RestParameters>,
}
impl RestHealthCheckStepAttributes {
    pub fn new(health_check_step_attributes: HealthCheckStepAttributes) -> Self {
        Self {
            health_check_step_attributes,
            properties: None,
        }
    }
}
#[doc = "The parameters for the REST health check."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestParameters {
    #[doc = "The list of checks that form the health check step."]
    #[serde(rename = "healthChecks")]
    pub health_checks: Vec<RestHealthCheck>,
}
impl RestParameters {
    pub fn new(health_checks: Vec<RestHealthCheck>) -> Self {
        Self { health_checks }
    }
}
#[doc = "The properties that make up a REST request"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestRequest {
    #[doc = "The HTTP method to use for the request."]
    pub method: rest_request::Method,
    #[doc = "The HTTP URI to use for the request."]
    pub uri: String,
    #[doc = "The authentication information required in the REST health check request to the health provider."]
    pub authentication: RestRequestAuthenticationUnion,
}
impl RestRequest {
    pub fn new(method: rest_request::Method, uri: String, authentication: RestRequestAuthenticationUnion) -> Self {
        Self {
            method,
            uri,
            authentication,
        }
    }
}
pub mod rest_request {
    use super::*;
    #[doc = "The HTTP method to use for the request."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Method {
        #[serde(rename = "GET")]
        Get,
        #[serde(rename = "POST")]
        Post,
    }
}
#[doc = "The authentication type."]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum RestRequestAuthenticationUnion {
    ApiKey(ApiKeyAuthentication),
    RolloutIdentity(RolloutIdentityAuthentication),
}
#[doc = "The properties that make up the expected REST response"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RestResponse {
    #[doc = "The HTTP status codes expected in a successful health check response. The response is expected to match one of the given status codes. If no expected status codes are provided, default expected status code is 200 OK."]
    #[serde(
        rename = "successStatusCodes",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub success_status_codes: Vec<String>,
    #[doc = "The regular expressions to match the response content with."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub regex: Option<rest_response::Regex>,
}
impl RestResponse {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod rest_response {
    use super::*;
    #[doc = "The regular expressions to match the response content with."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
    pub struct Regex {
        #[doc = "The list of regular expressions."]
        #[serde(
            default,
            deserialize_with = "azure_core::util::deserialize_null_as_default",
            skip_serializing_if = "Vec::is_empty"
        )]
        pub matches: Vec<String>,
        #[doc = "Indicates whether any or all of the expressions should match with the response content."]
        #[serde(rename = "matchQuantifier", default, skip_serializing_if = "Option::is_none")]
        pub match_quantifier: Option<regex::MatchQuantifier>,
    }
    impl Regex {
        pub fn new() -> Self {
            Self::default()
        }
    }
    pub mod regex {
        use super::*;
        #[doc = "Indicates whether any or all of the expressions should match with the response content."]
        #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
        pub enum MatchQuantifier {
            All,
            Any,
        }
    }
}
#[doc = "Defines the rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Rollout {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "Identity for the resource."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identity: Option<Identity>,
    #[doc = "The properties that define a rollout."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<serde_json::Value>,
}
impl Rollout {
    pub fn new(tracked_resource: TrackedResource) -> Self {
        Self {
            tracked_resource,
            identity: None,
            properties: None,
        }
    }
}
#[doc = "RolloutIdentity uses the user-assigned managed identity authentication context specified in the Identity property during rollout creation."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RolloutIdentityAuthentication {}
impl RolloutIdentityAuthentication {
    pub fn new() -> Self {
        Self {}
    }
}
pub type RolloutListResult = Vec<Rollout>;
#[doc = "Detailed runtime information of the rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RolloutOperationInfo {
    #[doc = "The ordinal count of the number of retry attempts on a rollout. 0 if no retries of the rollout have been performed. If the rollout is updated with a PUT, this count is reset to 0."]
    #[serde(rename = "retryAttempt", default, skip_serializing_if = "Option::is_none")]
    pub retry_attempt: Option<i32>,
    #[doc = "True, if all steps that succeeded on the previous run/attempt were chosen to be skipped in this retry attempt. False, otherwise."]
    #[serde(rename = "skipSucceededOnRetry", default, skip_serializing_if = "Option::is_none")]
    pub skip_succeeded_on_retry: Option<bool>,
    #[doc = "The start time of the rollout in UTC."]
    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
    pub start_time: Option<time::OffsetDateTime>,
    #[doc = "The start time of the rollout in UTC. This property will not be set if the rollout has not completed yet."]
    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
    pub end_time: Option<time::OffsetDateTime>,
    #[doc = "Detailed error information of any failure."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<CloudErrorBody>,
}
impl RolloutOperationInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Defines the properties of a rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RolloutProperties {
    #[doc = "The current status of the rollout."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[doc = "The cardinal count of total number of retries performed on the rollout at a given time."]
    #[serde(rename = "totalRetryAttempts", default, skip_serializing_if = "Option::is_none")]
    pub total_retry_attempts: Option<i32>,
    #[doc = "Detailed runtime information of the rollout."]
    #[serde(rename = "operationInfo", default, skip_serializing_if = "Option::is_none")]
    pub operation_info: Option<RolloutOperationInfo>,
    #[doc = "The detailed information on the services being deployed."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub services: Vec<Service>,
}
impl RolloutProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Defines the PUT rollout request body."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RolloutRequest {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "Identity for the resource."]
    pub identity: Identity,
    #[doc = "The properties for defining a rollout."]
    pub properties: RolloutRequestProperties,
}
impl RolloutRequest {
    pub fn new(tracked_resource: TrackedResource, identity: Identity, properties: RolloutRequestProperties) -> Self {
        Self {
            tracked_resource,
            identity,
            properties,
        }
    }
}
#[doc = "The properties for defining a rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RolloutRequestProperties {
    #[doc = "The version of the build being deployed."]
    #[serde(rename = "buildVersion")]
    pub build_version: String,
    #[doc = "The reference to the artifact source resource Id where the payload is located."]
    #[serde(rename = "artifactSourceId", default, skip_serializing_if = "Option::is_none")]
    pub artifact_source_id: Option<String>,
    #[doc = "The resource Id of the service topology from which service units are being referenced in step groups to be deployed."]
    #[serde(rename = "targetServiceTopologyId")]
    pub target_service_topology_id: String,
    #[doc = "The list of step groups that define the orchestration."]
    #[serde(rename = "stepGroups")]
    pub step_groups: Vec<StepGroup>,
}
impl RolloutRequestProperties {
    pub fn new(build_version: String, target_service_topology_id: String, step_groups: Vec<StepGroup>) -> Self {
        Self {
            build_version,
            artifact_source_id: None,
            target_service_topology_id,
            step_groups,
        }
    }
}
#[doc = "Defines a specific step on a target service unit."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RolloutStep {
    #[doc = "Name of the step."]
    pub name: String,
    #[doc = "Current state of the step."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[doc = "The step group the current step is part of."]
    #[serde(rename = "stepGroup", default, skip_serializing_if = "Option::is_none")]
    pub step_group: Option<String>,
    #[doc = "Detailed information of a specific step run."]
    #[serde(rename = "operationInfo", default, skip_serializing_if = "Option::is_none")]
    pub operation_info: Option<StepOperationInfo>,
    #[doc = "Set of resource operations that were performed, if any, on an Azure resource."]
    #[serde(
        rename = "resourceOperations",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub resource_operations: Vec<ResourceOperation>,
    #[doc = "Supplementary informative messages during rollout."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub messages: Vec<Message>,
}
impl RolloutStep {
    pub fn new(name: String) -> Self {
        Self {
            name,
            status: None,
            step_group: None,
            operation_info: None,
            resource_operations: Vec::new(),
            messages: Vec::new(),
        }
    }
}
#[doc = "Defines the properties to access the artifacts using an Azure Storage SAS URI."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SasAuthentication {
    #[doc = "The properties that define SAS authentication."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<SasProperties>,
}
impl SasAuthentication {
    pub fn new() -> Self {
        Self { properties: None }
    }
}
#[doc = "The properties that define SAS authentication."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SasProperties {
    #[doc = "The SAS URI to the Azure Storage blob container. Any offset from the root of the container to where the artifacts are located can be defined in the artifactRoot."]
    #[serde(rename = "sasUri")]
    pub sas_uri: String,
}
impl SasProperties {
    pub fn new(sas_uri: String) -> Self {
        Self { sas_uri }
    }
}
#[doc = "Defines a service."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Service {
    #[serde(flatten)]
    pub service_properties: ServiceProperties,
    #[doc = "Name of the service."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "The detailed information about the units that make up the service."]
    #[serde(
        rename = "serviceUnits",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub service_units: Vec<ServiceUnit>,
}
impl Service {
    pub fn new(service_properties: ServiceProperties) -> Self {
        Self {
            service_properties,
            name: None,
            service_units: Vec::new(),
        }
    }
}
pub type ServiceListResult = Vec<ServiceResource>;
#[doc = "The properties of a service."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceProperties {
    #[doc = "The Azure location to which the resources in the service belong to or should be deployed to."]
    #[serde(rename = "targetLocation")]
    pub target_location: String,
    #[doc = "The subscription to which the resources in the service belong to or should be deployed to."]
    #[serde(rename = "targetSubscriptionId")]
    pub target_subscription_id: String,
}
impl ServiceProperties {
    pub fn new(target_location: String, target_subscription_id: String) -> Self {
        Self {
            target_location,
            target_subscription_id,
        }
    }
}
#[doc = "The resource representation of a service in a service topology."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceResource {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "The properties that define a service in a service topology."]
    pub properties: serde_json::Value,
}
impl ServiceResource {
    pub fn new(tracked_resource: TrackedResource, properties: serde_json::Value) -> Self {
        Self {
            tracked_resource,
            properties,
        }
    }
}
pub type ServiceTopologiesListResult = Vec<ServiceTopologyResource>;
#[doc = "The properties of a service topology."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceTopologyProperties {
    #[doc = "The resource Id of the artifact source that contains the artifacts that can be referenced in the service units."]
    #[serde(rename = "artifactSourceId", default, skip_serializing_if = "Option::is_none")]
    pub artifact_source_id: Option<String>,
}
impl ServiceTopologyProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The resource representation of a service topology."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceTopologyResource {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "The properties that define the service topology."]
    pub properties: serde_json::Value,
}
impl ServiceTopologyResource {
    pub fn new(tracked_resource: TrackedResource, properties: serde_json::Value) -> Self {
        Self {
            tracked_resource,
            properties,
        }
    }
}
#[doc = "Defines a service unit."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceUnit {
    #[serde(flatten)]
    pub service_unit_properties: ServiceUnitProperties,
    #[doc = "Name of the service unit."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Detailed step information, if present."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub steps: Vec<RolloutStep>,
}
impl ServiceUnit {
    pub fn new(service_unit_properties: ServiceUnitProperties) -> Self {
        Self {
            service_unit_properties,
            name: None,
            steps: Vec::new(),
        }
    }
}
#[doc = "Defines the artifacts of a service unit."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceUnitArtifacts {
    #[doc = "The full URI of the ARM template file with the SAS token."]
    #[serde(rename = "templateUri", default, skip_serializing_if = "Option::is_none")]
    pub template_uri: Option<String>,
    #[doc = "The full URI of the ARM parameters file with the SAS token."]
    #[serde(rename = "parametersUri", default, skip_serializing_if = "Option::is_none")]
    pub parameters_uri: Option<String>,
    #[doc = "The path to the ARM template file relative to the artifact source."]
    #[serde(rename = "templateArtifactSourceRelativePath", default, skip_serializing_if = "Option::is_none")]
    pub template_artifact_source_relative_path: Option<String>,
    #[doc = "The path to the ARM parameters file relative to the artifact source."]
    #[serde(rename = "parametersArtifactSourceRelativePath", default, skip_serializing_if = "Option::is_none")]
    pub parameters_artifact_source_relative_path: Option<String>,
}
impl ServiceUnitArtifacts {
    pub fn new() -> Self {
        Self::default()
    }
}
pub type ServiceUnitListResult = Vec<ServiceUnitResource>;
#[doc = "Defines the properties of a service unit."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceUnitProperties {
    #[doc = "The Azure Resource Group to which the resources in the service unit belong to or should be deployed to."]
    #[serde(rename = "targetResourceGroup")]
    pub target_resource_group: String,
    #[doc = "Describes the type of ARM deployment to be performed on the resource."]
    #[serde(rename = "deploymentMode")]
    pub deployment_mode: service_unit_properties::DeploymentMode,
    #[doc = "Defines the artifacts of a service unit."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub artifacts: Option<ServiceUnitArtifacts>,
}
impl ServiceUnitProperties {
    pub fn new(target_resource_group: String, deployment_mode: service_unit_properties::DeploymentMode) -> Self {
        Self {
            target_resource_group,
            deployment_mode,
            artifacts: None,
        }
    }
}
pub mod service_unit_properties {
    use super::*;
    #[doc = "Describes the type of ARM deployment to be performed on the resource."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum DeploymentMode {
        Incremental,
        Complete,
    }
}
#[doc = "Represents the response of a service unit resource."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceUnitResource {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "The properties that define the service unit."]
    pub properties: serde_json::Value,
}
impl ServiceUnitResource {
    pub fn new(tracked_resource: TrackedResource, properties: serde_json::Value) -> Self {
        Self {
            tracked_resource,
            properties,
        }
    }
}
#[doc = "The properties that define a Step group in a rollout."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct StepGroup {
    #[doc = "The name of the step group."]
    pub name: String,
    #[doc = "The list of step group names on which this step group depends on."]
    #[serde(
        rename = "dependsOnStepGroups",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub depends_on_step_groups: Vec<String>,
    #[doc = "The list of steps to be run before deploying the target."]
    #[serde(
        rename = "preDeploymentSteps",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub pre_deployment_steps: Vec<PrePostStep>,
    #[doc = "The resource Id of service unit to be deployed. The service unit should be from the service topology referenced in targetServiceTopologyId"]
    #[serde(rename = "deploymentTargetId")]
    pub deployment_target_id: String,
    #[doc = "The list of steps to be run after deploying the target."]
    #[serde(
        rename = "postDeploymentSteps",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub post_deployment_steps: Vec<PrePostStep>,
}
impl StepGroup {
    pub fn new(name: String, deployment_target_id: String) -> Self {
        Self {
            name,
            depends_on_step_groups: Vec::new(),
            pre_deployment_steps: Vec::new(),
            deployment_target_id,
            post_deployment_steps: Vec::new(),
        }
    }
}
#[doc = "Detailed information of a specific step run."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct StepOperationInfo {
    #[doc = "The name of the ARM deployment initiated as part of the step."]
    #[serde(rename = "deploymentName", default, skip_serializing_if = "Option::is_none")]
    pub deployment_name: Option<String>,
    #[doc = "Unique identifier to track the request for ARM-based resources."]
    #[serde(rename = "correlationId", default, skip_serializing_if = "Option::is_none")]
    pub correlation_id: Option<String>,
    #[doc = "Start time of the action in UTC."]
    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
    pub start_time: Option<time::OffsetDateTime>,
    #[doc = "End time of the action in UTC."]
    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
    pub end_time: Option<time::OffsetDateTime>,
    #[doc = "Last time in UTC this operation was updated."]
    #[serde(rename = "lastUpdatedTime", default, with = "azure_core::date::rfc3339::option")]
    pub last_updated_time: Option<time::OffsetDateTime>,
    #[doc = "Detailed error information of any failure."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<CloudErrorBody>,
}
impl StepOperationInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The type of step."]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "stepType")]
pub enum StepPropertiesUnion {
    HealthCheck(HealthCheckStepProperties),
    Wait(WaitStepProperties),
}
#[doc = "The resource representation of a rollout step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct StepResource {
    #[serde(flatten)]
    pub tracked_resource: TrackedResource,
    #[doc = "The properties of a step resource."]
    pub properties: StepPropertiesUnion,
}
impl StepResource {
    pub fn new(tracked_resource: TrackedResource, properties: StepPropertiesUnion) -> Self {
        Self {
            tracked_resource,
            properties,
        }
    }
}
pub type StepResourceListResult = Vec<StepResource>;
#[doc = "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct TrackedResource {
    #[serde(flatten)]
    pub resource: Resource,
    #[doc = "Resource tags."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<serde_json::Value>,
    #[doc = "The geo-location where the resource lives"]
    pub location: String,
}
impl TrackedResource {
    pub fn new(location: String) -> Self {
        Self {
            resource: Resource::default(),
            tags: None,
            location,
        }
    }
}
#[doc = "The parameters for the wait step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct WaitStepAttributes {
    #[doc = "The duration in ISO 8601 format of how long the wait should be."]
    pub duration: String,
}
impl WaitStepAttributes {
    pub fn new(duration: String) -> Self {
        Self { duration }
    }
}
#[doc = "Defines the properties of a Wait step."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct WaitStepProperties {
    #[doc = "The parameters for the wait step."]
    pub attributes: WaitStepAttributes,
}
impl WaitStepProperties {
    pub fn new(attributes: WaitStepAttributes) -> Self {
        Self { attributes }
    }
}