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
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::de::{value, Deserializer, IntoDeserializer};
use serde::{Deserialize, Serialize, Serializer};
use std::str::FromStr;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct BasicAuthentication {
    #[serde(flatten)]
    pub http_authentication: HttpAuthentication,
    #[doc = "Gets or sets the username."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[doc = "Gets or sets the password."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
}
impl BasicAuthentication {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientCertAuthentication {
    #[serde(flatten)]
    pub http_authentication: HttpAuthentication,
    #[doc = "Gets or sets the password."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    #[doc = "Gets or sets the pfx."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pfx: Option<String>,
    #[doc = "Gets or sets the certificate thumbprint."]
    #[serde(rename = "certificateThumbprint", default, skip_serializing_if = "Option::is_none")]
    pub certificate_thumbprint: Option<String>,
    #[doc = "Gets or sets the certificate expiration date."]
    #[serde(rename = "certificateExpirationDate", default, with = "azure_core::date::rfc3339::option")]
    pub certificate_expiration_date: Option<time::OffsetDateTime>,
    #[doc = "Gets or sets the certificate subject name."]
    #[serde(rename = "certificateSubjectName", default, skip_serializing_if = "Option::is_none")]
    pub certificate_subject_name: Option<String>,
}
impl ClientCertAuthentication {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct HttpAuthentication {
    #[doc = "Gets or sets the http authentication type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<http_authentication::Type>,
}
impl HttpAuthentication {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod http_authentication {
    use super::*;
    #[doc = "Gets or sets the http authentication type."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Type {
        NotSpecified,
        ClientCertificate,
        ActiveDirectoryOAuth,
        Basic,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct HttpRequest {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub authentication: Option<HttpAuthentication>,
    #[doc = "Gets or sets the Uri."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub uri: Option<String>,
    #[doc = "Gets or sets the method of the request."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub method: Option<String>,
    #[doc = "Gets or sets the request body."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub body: Option<String>,
    #[doc = "Gets or sets the headers."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub headers: Option<serde_json::Value>,
}
impl HttpRequest {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobAction {
    #[doc = "Gets or sets the job action type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<job_action::Type>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub request: Option<HttpRequest>,
    #[serde(rename = "queueMessage", default, skip_serializing_if = "Option::is_none")]
    pub queue_message: Option<StorageQueueMessage>,
    #[serde(rename = "serviceBusQueueMessage", default, skip_serializing_if = "Option::is_none")]
    pub service_bus_queue_message: Option<ServiceBusQueueMessage>,
    #[serde(rename = "serviceBusTopicMessage", default, skip_serializing_if = "Option::is_none")]
    pub service_bus_topic_message: Option<ServiceBusTopicMessage>,
    #[serde(rename = "retryPolicy", default, skip_serializing_if = "Option::is_none")]
    pub retry_policy: Option<RetryPolicy>,
    #[serde(rename = "errorAction", default, skip_serializing_if = "Option::is_none")]
    pub error_action: Option<JobErrorAction>,
}
impl JobAction {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_action {
    use super::*;
    #[doc = "Gets or sets the job action type."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Type {
        Http,
        Https,
        StorageQueue,
        ServiceBusQueue,
        ServiceBusTopic,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobCollectionDefinition {
    #[doc = "Gets the job collection resource identifier."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Gets the job collection resource type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    #[doc = "Gets or sets the job collection resource name."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[doc = "Gets or sets the storage account location."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    #[doc = "Gets or sets the tags."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<JobCollectionProperties>,
}
impl JobCollectionDefinition {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobCollectionListResult {
    #[doc = "Gets the job collections."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub value: Vec<JobCollectionDefinition>,
    #[doc = "Gets or sets the URL to get the next set of job collections."]
    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
    pub next_link: Option<String>,
}
impl azure_core::Continuable for JobCollectionListResult {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_link.clone()
    }
}
impl JobCollectionListResult {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobCollectionProperties {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sku: Option<Sku>,
    #[doc = "Gets or sets the state."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<job_collection_properties::State>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub quota: Option<JobCollectionQuota>,
}
impl JobCollectionProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_collection_properties {
    use super::*;
    #[doc = "Gets or sets the state."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum State {
        Enabled,
        Disabled,
        Suspended,
        Deleted,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobCollectionQuota {
    #[doc = "Gets or set the maximum job count."]
    #[serde(rename = "maxJobCount", default, skip_serializing_if = "Option::is_none")]
    pub max_job_count: Option<i64>,
    #[doc = "Gets or sets the maximum job occurrence."]
    #[serde(rename = "maxJobOccurrence", default, skip_serializing_if = "Option::is_none")]
    pub max_job_occurrence: Option<i64>,
    #[serde(rename = "maxRecurrence", default, skip_serializing_if = "Option::is_none")]
    pub max_recurrence: Option<JobMaxRecurrence>,
}
impl JobCollectionQuota {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobDefinition {
    #[doc = "Gets the job resource identifier."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Gets the job resource type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    #[doc = "Gets the job resource name."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<JobProperties>,
}
impl JobDefinition {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobErrorAction {
    #[doc = "Gets or sets the job error action type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<job_error_action::Type>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub request: Option<HttpRequest>,
    #[serde(rename = "queueMessage", default, skip_serializing_if = "Option::is_none")]
    pub queue_message: Option<StorageQueueMessage>,
    #[serde(rename = "serviceBusQueueMessage", default, skip_serializing_if = "Option::is_none")]
    pub service_bus_queue_message: Option<ServiceBusQueueMessage>,
    #[serde(rename = "serviceBusTopicMessage", default, skip_serializing_if = "Option::is_none")]
    pub service_bus_topic_message: Option<ServiceBusTopicMessage>,
    #[serde(rename = "retryPolicy", default, skip_serializing_if = "Option::is_none")]
    pub retry_policy: Option<RetryPolicy>,
}
impl JobErrorAction {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_error_action {
    use super::*;
    #[doc = "Gets or sets the job error action type."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Type {
        Http,
        Https,
        StorageQueue,
        ServiceBusQueue,
        ServiceBusTopic,
    }
}
#[doc = "Gets the job execution status."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum JobExecutionStatus {
    Completed,
    Failed,
    Postponed,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobHistoryDefinition {
    #[doc = "Gets the job history identifier."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "Gets the job history resource type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    #[doc = "Gets the job history name."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<JobHistoryDefinitionProperties>,
}
impl JobHistoryDefinition {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobHistoryDefinitionProperties {
    #[doc = "Gets the start time for this job."]
    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
    pub start_time: Option<time::OffsetDateTime>,
    #[doc = "Gets the end time for this job."]
    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
    pub end_time: Option<time::OffsetDateTime>,
    #[doc = "Gets the expected execution time for this job."]
    #[serde(rename = "expectedExecutionTime", default, with = "azure_core::date::rfc3339::option")]
    pub expected_execution_time: Option<time::OffsetDateTime>,
    #[doc = "Gets the job history action name."]
    #[serde(rename = "actionName", default, skip_serializing_if = "Option::is_none")]
    pub action_name: Option<job_history_definition_properties::ActionName>,
    #[doc = "Gets the job execution status."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<JobExecutionStatus>,
    #[doc = "Gets the message for the job history."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[doc = "Gets the retry count for job."]
    #[serde(rename = "retryCount", default, skip_serializing_if = "Option::is_none")]
    pub retry_count: Option<i64>,
    #[doc = "Gets the repeat count for the job."]
    #[serde(rename = "repeatCount", default, skip_serializing_if = "Option::is_none")]
    pub repeat_count: Option<i64>,
}
impl JobHistoryDefinitionProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_history_definition_properties {
    use super::*;
    #[doc = "Gets the job history action name."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ActionName {
        MainAction,
        ErrorAction,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobHistoryFilter {
    #[doc = "Gets the job execution status."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<JobExecutionStatus>,
}
impl JobHistoryFilter {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobHistoryListResult {
    #[doc = "Gets or sets the job histories under job."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub value: Vec<JobHistoryDefinition>,
    #[doc = "Gets or sets the URL to get the next set of job histories."]
    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
    pub next_link: Option<String>,
}
impl azure_core::Continuable for JobHistoryListResult {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_link.clone()
    }
}
impl JobHistoryListResult {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobListResult {
    #[doc = "Gets or sets all jobs under job collection."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub value: Vec<JobDefinition>,
    #[doc = "Gets or sets the URL to get the next set of jobs."]
    #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
    pub next_link: Option<String>,
}
impl azure_core::Continuable for JobListResult {
    type Continuation = String;
    fn continuation(&self) -> Option<Self::Continuation> {
        self.next_link.clone()
    }
}
impl JobListResult {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobMaxRecurrence {
    #[doc = "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub frequency: Option<job_max_recurrence::Frequency>,
    #[doc = "Gets or sets the interval between retries."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub interval: Option<i64>,
}
impl JobMaxRecurrence {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_max_recurrence {
    use super::*;
    #[doc = "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Frequency {
        Minute,
        Hour,
        Day,
        Week,
        Month,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobProperties {
    #[doc = "Gets or sets the job start time."]
    #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
    pub start_time: Option<time::OffsetDateTime>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub action: Option<JobAction>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub recurrence: Option<JobRecurrence>,
    #[doc = "Gets or set the job state."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<JobState>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<JobStatus>,
}
impl JobProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobRecurrence {
    #[doc = "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub frequency: Option<job_recurrence::Frequency>,
    #[doc = "Gets or sets the interval between retries."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub interval: Option<i64>,
    #[doc = "Gets or sets the maximum number of times that the job should run."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i64>,
    #[doc = "Gets or sets the time at which the job will complete."]
    #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
    pub end_time: Option<time::OffsetDateTime>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub schedule: Option<JobRecurrenceSchedule>,
}
impl JobRecurrence {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_recurrence {
    use super::*;
    #[doc = "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Frequency {
        Minute,
        Hour,
        Day,
        Week,
        Month,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobRecurrenceSchedule {
    #[doc = "Gets or sets the days of the week that the job should execute on."]
    #[serde(
        rename = "weekDays",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub week_days: Vec<String>,
    #[doc = "Gets or sets the hours of the day that the job should execute at."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub hours: Vec<i64>,
    #[doc = "Gets or sets the minutes of the hour that the job should execute at."]
    #[serde(
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub minutes: Vec<i64>,
    #[doc = "Gets or sets the days of the month that the job should execute on. Must be between 1 and 31."]
    #[serde(
        rename = "monthDays",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub month_days: Vec<i64>,
    #[doc = "Gets or sets the occurrences of days within a month."]
    #[serde(
        rename = "monthlyOccurrences",
        default,
        deserialize_with = "azure_core::util::deserialize_null_as_default",
        skip_serializing_if = "Vec::is_empty"
    )]
    pub monthly_occurrences: Vec<JobRecurrenceScheduleMonthlyOccurrence>,
}
impl JobRecurrenceSchedule {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobRecurrenceScheduleMonthlyOccurrence {
    #[doc = "Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub day: Option<job_recurrence_schedule_monthly_occurrence::Day>,
    #[doc = "Gets or sets the occurrence. Must be between -5 and 5."]
    #[serde(rename = "Occurrence", default, skip_serializing_if = "Option::is_none")]
    pub occurrence: Option<i64>,
}
impl JobRecurrenceScheduleMonthlyOccurrence {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod job_recurrence_schedule_monthly_occurrence {
    use super::*;
    #[doc = "Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Day {
        Monday,
        Tuesday,
        Wednesday,
        Thursday,
        Friday,
        Saturday,
        Sunday,
    }
}
#[doc = "Gets or set the job state."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum JobState {
    Enabled,
    Disabled,
    Faulted,
    Completed,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobStateFilter {
    #[doc = "Gets or set the job state."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<JobState>,
}
impl JobStateFilter {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JobStatus {
    #[doc = "Gets the number of times this job has executed."]
    #[serde(rename = "executionCount", default, skip_serializing_if = "Option::is_none")]
    pub execution_count: Option<i64>,
    #[doc = "Gets the number of times this job has failed."]
    #[serde(rename = "failureCount", default, skip_serializing_if = "Option::is_none")]
    pub failure_count: Option<i64>,
    #[doc = "Gets the number of faulted occurrences (occurrences that were retried and failed as many times as the retry policy states)."]
    #[serde(rename = "faultedCount", default, skip_serializing_if = "Option::is_none")]
    pub faulted_count: Option<i64>,
    #[doc = "Gets the time the last occurrence executed in ISO-8601 format.  Could be empty if job has not run yet."]
    #[serde(rename = "lastExecutionTime", default, with = "azure_core::date::rfc3339::option")]
    pub last_execution_time: Option<time::OffsetDateTime>,
    #[doc = "Gets the time of the next occurrence in ISO-8601 format. Could be empty if the job is completed."]
    #[serde(rename = "nextExecutionTime", default, with = "azure_core::date::rfc3339::option")]
    pub next_execution_time: Option<time::OffsetDateTime>,
}
impl JobStatus {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct OAuthAuthentication {
    #[serde(flatten)]
    pub http_authentication: HttpAuthentication,
    #[doc = "Gets or sets the secret."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<String>,
    #[doc = "Gets or sets the tenant."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tenant: Option<String>,
    #[doc = "Gets or sets the audience."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub audience: Option<String>,
    #[doc = "Gets or sets the client identifier."]
    #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")]
    pub client_id: Option<String>,
}
impl OAuthAuthentication {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Gets or sets the frequency of recurrence (minute, hour, day, week, month)."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum RecurrenceFrequency {
    Minute,
    Hour,
    Day,
    Week,
    Month,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RetryPolicy {
    #[doc = "Gets or sets the retry strategy to be used."]
    #[serde(rename = "retryType", default, skip_serializing_if = "Option::is_none")]
    pub retry_type: Option<retry_policy::RetryType>,
    #[doc = "Gets or sets the retry interval between retries."]
    #[serde(rename = "retryInterval", default, skip_serializing_if = "Option::is_none")]
    pub retry_interval: Option<String>,
    #[doc = "Gets or sets the number of times a retry should be attempted."]
    #[serde(rename = "retryCount", default, skip_serializing_if = "Option::is_none")]
    pub retry_count: Option<i64>,
}
impl RetryPolicy {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod retry_policy {
    use super::*;
    #[doc = "Gets or sets the retry strategy to be used."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum RetryType {
        None,
        Fixed,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceBusAuthentication {
    #[doc = "Gets or sets the SAS key."]
    #[serde(rename = "sasKey", default, skip_serializing_if = "Option::is_none")]
    pub sas_key: Option<String>,
    #[doc = "Gets or sets the SAS key name."]
    #[serde(rename = "sasKeyName", default, skip_serializing_if = "Option::is_none")]
    pub sas_key_name: Option<String>,
    #[doc = "Gets or sets the authentication type."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<service_bus_authentication::Type>,
}
impl ServiceBusAuthentication {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod service_bus_authentication {
    use super::*;
    #[doc = "Gets or sets the authentication type."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Type {
        NotSpecified,
        SharedAccessKey,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceBusBrokeredMessageProperties {
    #[doc = "Gets or sets the content type."]
    #[serde(rename = "contentType", default, skip_serializing_if = "Option::is_none")]
    pub content_type: Option<String>,
    #[doc = "Gets or sets the correlation id."]
    #[serde(rename = "correlationId", default, skip_serializing_if = "Option::is_none")]
    pub correlation_id: Option<String>,
    #[doc = "Gets or sets the force persistence."]
    #[serde(rename = "forcePersistence", default, skip_serializing_if = "Option::is_none")]
    pub force_persistence: Option<bool>,
    #[doc = "Gets or sets the label."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[doc = "Gets or sets the message id."]
    #[serde(rename = "messageId", default, skip_serializing_if = "Option::is_none")]
    pub message_id: Option<String>,
    #[doc = "Gets or sets the partition key."]
    #[serde(rename = "partitionKey", default, skip_serializing_if = "Option::is_none")]
    pub partition_key: Option<String>,
    #[doc = "Gets or sets the reply to."]
    #[serde(rename = "replyTo", default, skip_serializing_if = "Option::is_none")]
    pub reply_to: Option<String>,
    #[doc = "Gets or sets the reply to session id."]
    #[serde(rename = "replyToSessionId", default, skip_serializing_if = "Option::is_none")]
    pub reply_to_session_id: Option<String>,
    #[doc = "Gets or sets the scheduled enqueue time UTC."]
    #[serde(rename = "scheduledEnqueueTimeUtc", default, with = "azure_core::date::rfc3339::option")]
    pub scheduled_enqueue_time_utc: Option<time::OffsetDateTime>,
    #[doc = "Gets or sets the session id."]
    #[serde(rename = "sessionId", default, skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    #[doc = "Gets or sets the time to live."]
    #[serde(rename = "timeToLive", default, with = "azure_core::date::rfc3339::option")]
    pub time_to_live: Option<time::OffsetDateTime>,
    #[doc = "Gets or sets the to."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub to: Option<String>,
    #[doc = "Gets or sets the via partition key."]
    #[serde(rename = "viaPartitionKey", default, skip_serializing_if = "Option::is_none")]
    pub via_partition_key: Option<String>,
}
impl ServiceBusBrokeredMessageProperties {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceBusMessage {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub authentication: Option<ServiceBusAuthentication>,
    #[serde(rename = "brokeredMessageProperties", default, skip_serializing_if = "Option::is_none")]
    pub brokered_message_properties: Option<ServiceBusBrokeredMessageProperties>,
    #[doc = "Gets or sets the custom message properties."]
    #[serde(rename = "customMessageProperties", default, skip_serializing_if = "Option::is_none")]
    pub custom_message_properties: Option<serde_json::Value>,
    #[doc = "Gets or sets the message."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[doc = "Gets or sets the namespace."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
    #[doc = "Gets or sets the transport type."]
    #[serde(rename = "transportType", default, skip_serializing_if = "Option::is_none")]
    pub transport_type: Option<service_bus_message::TransportType>,
}
impl ServiceBusMessage {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod service_bus_message {
    use super::*;
    #[doc = "Gets or sets the transport type."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum TransportType {
        NotSpecified,
        NetMessaging,
        #[serde(rename = "AMQP")]
        Amqp,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceBusQueueMessage {
    #[serde(flatten)]
    pub service_bus_message: ServiceBusMessage,
    #[doc = "Gets or sets the queue name."]
    #[serde(rename = "queueName", default, skip_serializing_if = "Option::is_none")]
    pub queue_name: Option<String>,
}
impl ServiceBusQueueMessage {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceBusTopicMessage {
    #[serde(flatten)]
    pub service_bus_message: ServiceBusMessage,
    #[doc = "Gets or sets the topic path."]
    #[serde(rename = "topicPath", default, skip_serializing_if = "Option::is_none")]
    pub topic_path: Option<String>,
}
impl ServiceBusTopicMessage {
    pub fn new() -> Self {
        Self::default()
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Sku {
    #[doc = "Gets or set the SKU."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<sku::Name>,
}
impl Sku {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod sku {
    use super::*;
    #[doc = "Gets or set the SKU."]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Name {
        Standard,
        Free,
        Premium,
    }
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct StorageQueueMessage {
    #[doc = "Gets or sets the storage account name."]
    #[serde(rename = "storageAccount", default, skip_serializing_if = "Option::is_none")]
    pub storage_account: Option<String>,
    #[doc = "Gets or sets the queue name."]
    #[serde(rename = "queueName", default, skip_serializing_if = "Option::is_none")]
    pub queue_name: Option<String>,
    #[doc = "Gets or sets the SAS key."]
    #[serde(rename = "sasToken", default, skip_serializing_if = "Option::is_none")]
    pub sas_token: Option<String>,
    #[doc = "Gets or sets the message."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}
impl StorageQueueMessage {
    pub fn new() -> Self {
        Self::default()
    }
}