vim_rs 0.4.4

Rust Bindings for the VMware by Broadcom vCenter VI JSON API
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
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
use std::sync::Arc;
use crate::core::client::{VimClient, Result};
/// VASA(vStorage APIs for Storage Awareness) provider
/// definition.
#[derive(Clone)]
pub struct VasaProvider {
    client: Arc<dyn VimClient>,
    mo_id: String,
}
impl VasaProvider {
    pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self {
        Self {
            client,
            mo_id: mo_id.to_string(),
        }
    }
    /// Failover the specified device groups.
    /// 
    /// This function will always be called
    /// at the replication target location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### failover_param
    /// Settings for the failover.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if failoverParam is null or contains invalid data.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    pub async fn failover_replication_group_task(&self, failover_param: &dyn crate::types::traits::FailoverParamTrait) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = FailoverReplicationGroupRequestType {failover_param, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "FailoverReplicationGroup_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Prepare to fail over the specified replication groups.
    /// 
    /// This function is always
    /// called at the replication source location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// List of replication group IDs.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if groupId is null or empty.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    pub async fn prepare_failover_replication_group_task(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = PrepareFailoverReplicationGroupRequestType {group_id, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "PrepareFailoverReplicationGroup_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Promotes the replication groups currently *INTEST*
    /// to *FAILEDOVER*.
    /// 
    /// This
    /// function must be called at the replication target location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### promote_param
    /// Specifies an array of replication group IDs whose
    /// in-test devices (*INTEST*) need to be
    /// promoted to failover *FAILEDOVER* state.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if promoteParam is null or contains invalid data.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    pub async fn promote_replication_group_task(&self, promote_param: &crate::types::structs::PromoteParam) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = PromoteReplicationGroupRequestType {promote_param, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "PromoteReplicationGroup_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query for the currently active alarms known to this VASA provider.
    /// 
    /// Provider is expected to return Red and Yellow types of alarms only.
    /// No Green alarms should be included in the result for this API.
    /// 
    /// ***Required privileges:*** StorageViews.View
    ///
    /// ## Parameters:
    ///
    /// ### alarm_filter
    /// Filter criteria for the alarm state.
    ///
    /// ## Returns:
    ///
    /// *AlarmResult* containing all (or requested) active alarm objects owned
    /// by the VASA provider.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if invalid input is provided.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***NotFound***: if the specified entity does not exist.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***QueryExecutionFault***: if an error is encountered while processing the
    /// query request.
    pub async fn query_active_alarm(&self, alarm_filter: Option<&crate::types::structs::AlarmFilter>) -> Result<Option<crate::types::structs::AlarmResult>> {
        let input = QueryActiveAlarmRequestType {alarm_filter, };
        let bytes_opt = self.client.invoke_optional("sms", "VasaProvider", &self.mo_id, "QueryActiveAlarm", Some(&input)).await?;
        match bytes_opt {
            Some(ref b) => Ok(Some(crate::core::client::unmarshal(self.client.transport(), b)?)),
            None => Ok(None),
        }
    }
    /// Query for the point-in-time replicas available at the target location.
    /// 
    /// ***Required privileges:*** StorageViews.View
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// List of replication group IDs.
    ///
    /// ### query_param
    /// Search criteria specification for all the groups.
    ///
    /// ## Returns:
    ///
    /// An array of GroupOperationResult elements.
    /// 
    /// Each of these elements is either *GroupErrorResult* or
    /// *QueryPointInTimeReplicaSuccessResult* or
    /// *QueryPointInTimeReplicaSummaryResult* for CDP capable replicators.
    /// 
    /// The fault in the result entry can be set to:
    /// - *NotFound* if the replication group identifier is not present.
    /// - *DuplicateEntry* if the replication group identifier is duplicate.
    /// - *TooMany* if the number of entries is too large to be returned in one call.
    /// - *QueryExecutionFault* for any other error.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if groupId is null or empty, or queryParam is invalid.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified
    /// replication groups.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***QueryExecutionFault***: if an error is encountered while processing
    /// the query request.
    pub async fn query_point_in_time_replica(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>, query_param: Option<&crate::types::structs::QueryPointInTimeReplicaParam>) -> Result<Option<Vec<Box<dyn crate::types::traits::GroupOperationResultTrait>>>> {
        let input = QueryPointInTimeReplicaRequestType {group_id, query_param, };
        let bytes_opt = self.client.invoke_optional("sms", "VasaProvider", &self.mo_id, "QueryPointInTimeReplica", Some(&input)).await?;
        match bytes_opt {
            Some(ref b) => Ok(Some(crate::core::client::unmarshal_array(self.client.transport(), b)?)),
            None => Ok(None),
        }
    }
    /// Get provider information.
    /// 
    /// ***Required privileges:*** StorageViews.View
    pub async fn query_provider_info(&self) -> Result<Box<dyn crate::types::traits::SmsProviderInfoTrait>> {
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "QueryProviderInfo", None).await?;
        let result: Box<dyn crate::types::traits::SmsProviderInfoTrait> = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Query for the replication group details.
    /// 
    /// ***Required privileges:*** StorageViews.View
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// List of replication group IDs.
    ///
    /// ## Returns:
    ///
    /// An array of *GroupOperationResult* elements.
    /// 
    /// If the input array is null or empty, VASA Provider needs to return all
    /// available replication groups. Depending on the number of replication
    /// groups to be returned, VASA Provider can return either a list of
    /// *GroupOperationResult* or a list of
    /// *QueryReplicationGroupSuccessResult*. However, VASA
    /// Provider should not return a hybrid result.
    /// 
    /// If the input array is not empty, VASA Provider needs to return an array
    /// of results, one for each entry in the input. Each entry in the returned
    /// array is either a *QueryReplicationGroupSuccessResult*
    /// (for success), or a *GroupErrorResult* (for failure).
    /// The length of the result arrays must be the same as the input.
    /// 
    /// The fault in the result entry can be set to:
    /// - *NotFound* if the replication group identifier is not present.
    /// - *DuplicateEntry* if the replication group identifier is duplicate.
    /// - *TooMany* if the number of entries is too large to be returned in one call.
    /// - *QueryExecutionFault* for any other error.
    ///
    /// ## Errors:
    ///
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified
    /// replication groups.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***QueryExecutionFault***: if an error is encountered while processing
    /// the query request.
    pub async fn query_replication_group(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>) -> Result<Option<Vec<Box<dyn crate::types::traits::GroupOperationResultTrait>>>> {
        let input = QueryReplicationGroupRequestType {group_id, };
        let bytes_opt = self.client.invoke_optional("sms", "VasaProvider", &self.mo_id, "QueryReplicationGroup", Some(&input)).await?;
        match bytes_opt {
            Some(ref b) => Ok(Some(crate::core::client::unmarshal_array(self.client.transport(), b)?)),
            None => Ok(None),
        }
    }
    /// Query for the replication peer fault domains.
    /// 
    /// ***Required privileges:*** StorageViews.View
    ///
    /// ## Parameters:
    ///
    /// ### fault_domain_id
    /// An optional list of source fault domain ID.
    ///
    /// ## Returns:
    ///
    /// An array of *QueryReplicationPeerResult*.
    /// 
    /// If the input array is null or empty, VASA provider needs to return
    /// result for all available source FaultDomain(s). If the input array is
    /// not empty, VASA Provider needs to return one entry in result for each
    /// entry in the input. The length of the input and result arrays must be
    /// same in that case.
    /// 
    /// The fault in the result entry can be set to:
    /// - *NotFound* if the fault domain identifier is not present.
    /// - *DuplicateEntry* if the fault domain identifier is duplicate.
    /// - *TooMany* if the number of entries is too large to be returned in one call.
    /// - *QueryExecutionFault* for any other error.
    ///
    /// ## Errors:
    ///
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified
    /// fault domains.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***QueryExecutionFault***: if an error is encountered while processing
    /// the query request.
    pub async fn query_replication_peer(&self, fault_domain_id: Option<&[Box<dyn crate::types::traits::FaultDomainIdTrait>]>) -> Result<Option<Vec<crate::types::structs::QueryReplicationPeerResult>>> {
        let input = QueryReplicationPeerRequestType {fault_domain_id, };
        let bytes_opt = self.client.invoke_optional("sms", "VasaProvider", &self.mo_id, "QueryReplicationPeer", Some(&input)).await?;
        match bytes_opt {
            Some(ref b) => Ok(Some(crate::core::client::unmarshal_array(self.client.transport(), b)?)),
            None => Ok(None),
        }
    }
    /// Reconnect to the provider.
    /// 
    /// This API will be used to reconnect to a provider that
    /// is in "disconnected" state. If reconnecting fails due to InvalidCertificate exception,
    /// that means the current provider certificate is expired or corrupted. Then user has to
    /// recover the provider following these steps:
    /// 1\. Unregister the provider using *SmsStorageManager.UnregisterProvider_Task*
    /// 2\. Provision a new self signed certificate for the provider
    /// 3\. Register the provider using *SmsStorageManager.RegisterProvider_Task*
    /// If the provider is not in "disconnected" state, this operation will be a no-op.
    /// Note: This API works only for providers that support VASA 2.0 and onwards.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidCertificate***: if the provider certificate is invalid
    /// 
    /// ***ProviderConnectionFailed***: if an error is encountered while reconnecting to
    /// the provider.
    pub async fn vasa_provider_reconnect_task(&self) -> Result<crate::types::structs::ManagedObjectReference> {
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "VasaProviderReconnect_Task", None).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Refresh a CA signed certificate for the provider.
    /// 
    /// This API will be used when provider
    /// certificate is about to expire, but still within soft or hard limit window. If the
    /// provider is in "disconnected" state, this operation will be a no-op.
    /// Note: This API works only for providers that support VASA 2.0 and onwards.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***CertificateRefreshFailed***: if an error is encountered while refreshing
    /// CA signed certificate for the provider.
    pub async fn vasa_provider_refresh_certificate_task(&self) -> Result<crate::types::structs::ManagedObjectReference> {
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "VasaProviderRefreshCertificate_Task", None).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Initiate replication in the reverse way, making the currently
    /// *FAILEDOVER* devices as sources.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// Array of replication groups (currently in
    /// *FAILEDOVER* state) that need to be reversed.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if groupId is null or empty.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    pub async fn reverse_replicate_group_task(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = ReverseReplicateGroupRequestType {group_id, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "ReverseReplicateGroup_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Revoke CA signed certificate of the provider.
    /// 
    /// This API will unregister the
    /// provider automatically.
    /// Note: This API works only for providers that support VASA 2.0 and onwards.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***CertificateRevocationFailed***: if an error is encountered while revoking CA signed
    /// certificate of the provider.
    pub async fn vasa_provider_revoke_certificate_task(&self) -> Result<crate::types::structs::ManagedObjectReference> {
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "VasaProviderRevokeCertificate_Task", None).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Issue a sync for the given Storage Array.
    /// 
    /// ***Required privileges:*** StorageViews.View
    ///
    /// ## Parameters:
    ///
    /// ### array_id
    /// -
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if invalid input is provided.
    /// 
    /// ***ProviderSyncFailed***: if an error is encountered while
    /// executing sync operation for the
    /// provider.
    pub async fn vasa_provider_sync_task(&self, array_id: Option<&str>) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = VasaProviderSyncRequestType {array_id, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "VasaProviderSync_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Synchronize the data between source and replica for the specified
    /// replication group.
    /// 
    /// This function will always be called at the replication
    /// target location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// List of replication group IDs.
    ///
    /// ### pit_name
    /// Localized name for the point-in-time snapshot created.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if groupId is null or empty, or pitName is null.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    pub async fn sync_replication_group_task(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>, pit_name: &str) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = SyncReplicationGroupRequestType {group_id, pit_name, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "SyncReplicationGroup_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Start a test failover for the specified replication groups.
    /// 
    /// This
    /// function will always be called at the replication target location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### test_failover_param
    /// Settings for the failover.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if testFailoverParam is null or contains invalid data.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified entity.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    pub async fn test_failover_replication_group_start_task(&self, test_failover_param: &crate::types::structs::TestFailoverParam) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = TestFailoverReplicationGroupStartRequestType {test_failover_param, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "TestFailoverReplicationGroupStart_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
    /// Stop the ongoing test failover.
    /// 
    /// This function will always be called at
    /// the replication target location.
    /// 
    /// ***Required privileges:*** StorageViews.ConfigureService
    ///
    /// ## Parameters:
    ///
    /// ### group_id
    /// Array of replication groups that need to stop test.
    ///
    /// ### force
    /// \- if true, VP should force-unbind all Virtual Volumes
    /// and move the RG from INTEST to TARGET state. If false, VP will report all the
    /// Virtual Volumes which need to be cleaned up before a failover operation
    /// can be triggered. The default value will be false.
    ///
    /// ## Returns:
    ///
    /// Refers instance of *Task*.
    ///
    /// ## Errors:
    ///
    /// ***InvalidArgument***: if groupId is null or empty.
    /// 
    /// ***NotImplemented***: if the provider does not implement this function.
    /// 
    /// ***ProviderUnavailable***: if the provider is temporarily unavailable.
    /// 
    /// ***ProviderOutOfResource***: if it is not possible to perform the operation
    /// due to lack of resources.
    /// 
    /// ***InactiveProvider***: if the provider is inactive for the specified
    /// replication groups.
    /// 
    /// ***TooMany***: Thrown if the Provider is unable to handle the given set of
    /// replication groups in one call. The client needs to call this method based
    /// on the maxBatchSize specified in the TooMany fault. If the maxBatchSize is
    /// not specified, the client is expected to call the function for each group
    /// individually (i.e. maxBatchSize = 1).
    /// 
    /// ***ProviderBusy***: if the provider is busy and cannot process the request.
    /// 
    /// ***SmsReplicationFault***: if an error is encountered while processing the request.
    /// 
    /// ***NotSupportedByProvider***: if the provider does not support force operation.
    pub async fn test_failover_replication_group_stop_task(&self, group_id: Option<&[crate::types::structs::ReplicationGroupId]>, force: bool) -> Result<crate::types::structs::ManagedObjectReference> {
        let input = TestFailoverReplicationGroupStopRequestType {group_id, force, };
        let bytes = self.client.invoke("sms", "VasaProvider", &self.mo_id, "TestFailoverReplicationGroupStop_Task", Some(&input)).await?;
        let result: crate::types::structs::ManagedObjectReference = crate::core::client::unmarshal(self.client.transport(), &bytes)?;
        Ok(result)
    }
}
struct FailoverReplicationGroupRequestType<'a> {
    failover_param: &'a dyn crate::types::traits::FailoverParamTrait,
}

impl<'a> miniserde::Serialize for FailoverReplicationGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(FailoverReplicationGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct FailoverReplicationGroupRequestTypeSer<'b, 'a> {
    data: &'b FailoverReplicationGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for FailoverReplicationGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"FailoverReplicationGroupRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("failoverParam"), &self.data.failover_param as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct PrepareFailoverReplicationGroupRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
}

impl<'a> miniserde::Serialize for PrepareFailoverReplicationGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(PrepareFailoverReplicationGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct PrepareFailoverReplicationGroupRequestTypeSer<'b, 'a> {
    data: &'b PrepareFailoverReplicationGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for PrepareFailoverReplicationGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"PrepareFailoverReplicationGroupRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct PromoteReplicationGroupRequestType<'a> {
    promote_param: &'a crate::types::structs::PromoteParam,
}

impl<'a> miniserde::Serialize for PromoteReplicationGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(PromoteReplicationGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct PromoteReplicationGroupRequestTypeSer<'b, 'a> {
    data: &'b PromoteReplicationGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for PromoteReplicationGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"PromoteReplicationGroupRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("promoteParam"), &self.data.promote_param as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct QueryActiveAlarmRequestType<'a> {
    alarm_filter: Option<&'a crate::types::structs::AlarmFilter>,
}

impl<'a> miniserde::Serialize for QueryActiveAlarmRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(QueryActiveAlarmRequestTypeSer { data: self, seq: 0 }))
    }
}

struct QueryActiveAlarmRequestTypeSer<'b, 'a> {
    data: &'b QueryActiveAlarmRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for QueryActiveAlarmRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"QueryActiveAlarmRequestType")),
                1 => {
                    let Some(ref val) = self.data.alarm_filter else { continue; };
                    return Some((std::borrow::Cow::Borrowed("alarmFilter"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct QueryPointInTimeReplicaRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
    query_param: Option<&'a crate::types::structs::QueryPointInTimeReplicaParam>,
}

impl<'a> miniserde::Serialize for QueryPointInTimeReplicaRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(QueryPointInTimeReplicaRequestTypeSer { data: self, seq: 0 }))
    }
}

struct QueryPointInTimeReplicaRequestTypeSer<'b, 'a> {
    data: &'b QueryPointInTimeReplicaRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for QueryPointInTimeReplicaRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"QueryPointInTimeReplicaRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                2 => {
                    let Some(ref val) = self.data.query_param else { continue; };
                    return Some((std::borrow::Cow::Borrowed("queryParam"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct QueryReplicationGroupRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
}

impl<'a> miniserde::Serialize for QueryReplicationGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(QueryReplicationGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct QueryReplicationGroupRequestTypeSer<'b, 'a> {
    data: &'b QueryReplicationGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for QueryReplicationGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"QueryReplicationGroupRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct QueryReplicationPeerRequestType<'a> {
    fault_domain_id: Option<&'a [Box<dyn crate::types::traits::FaultDomainIdTrait>]>,
}

impl<'a> miniserde::Serialize for QueryReplicationPeerRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(QueryReplicationPeerRequestTypeSer { data: self, seq: 0 }))
    }
}

struct QueryReplicationPeerRequestTypeSer<'b, 'a> {
    data: &'b QueryReplicationPeerRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for QueryReplicationPeerRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"QueryReplicationPeerRequestType")),
                1 => {
                    let Some(ref val) = self.data.fault_domain_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("faultDomainId"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct ReverseReplicateGroupRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
}

impl<'a> miniserde::Serialize for ReverseReplicateGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(ReverseReplicateGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct ReverseReplicateGroupRequestTypeSer<'b, 'a> {
    data: &'b ReverseReplicateGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for ReverseReplicateGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"ReverseReplicateGroupRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct VasaProviderSyncRequestType<'a> {
    array_id: Option<&'a str>,
}

impl<'a> miniserde::Serialize for VasaProviderSyncRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(VasaProviderSyncRequestTypeSer { data: self, seq: 0 }))
    }
}

struct VasaProviderSyncRequestTypeSer<'b, 'a> {
    data: &'b VasaProviderSyncRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for VasaProviderSyncRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"VasaProviderSyncRequestType")),
                1 => {
                    let Some(ref val) = self.data.array_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("arrayId"), val as &dyn miniserde::Serialize));
                }
                _ => return None,
            }
        }
    }
}
struct SyncReplicationGroupRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
    pit_name: &'a str,
}

impl<'a> miniserde::Serialize for SyncReplicationGroupRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(SyncReplicationGroupRequestTypeSer { data: self, seq: 0 }))
    }
}

struct SyncReplicationGroupRequestTypeSer<'b, 'a> {
    data: &'b SyncReplicationGroupRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for SyncReplicationGroupRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"SyncReplicationGroupRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                2 => return Some((std::borrow::Cow::Borrowed("pitName"), &self.data.pit_name as &dyn miniserde::Serialize)),
                _ => return None,
            }
        }
    }
}
struct TestFailoverReplicationGroupStartRequestType<'a> {
    test_failover_param: &'a crate::types::structs::TestFailoverParam,
}

impl<'a> miniserde::Serialize for TestFailoverReplicationGroupStartRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(TestFailoverReplicationGroupStartRequestTypeSer { data: self, seq: 0 }))
    }
}

struct TestFailoverReplicationGroupStartRequestTypeSer<'b, 'a> {
    data: &'b TestFailoverReplicationGroupStartRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for TestFailoverReplicationGroupStartRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        let seq = self.seq;
        self.seq += 1;
        match seq {
            0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"TestFailoverReplicationGroupStartRequestType")),
            1 => return Some((std::borrow::Cow::Borrowed("testFailoverParam"), &self.data.test_failover_param as &dyn miniserde::Serialize)),
            _ => return None,
        }
    }
}
struct TestFailoverReplicationGroupStopRequestType<'a> {
    group_id: Option<&'a [crate::types::structs::ReplicationGroupId]>,
    force: bool,
}

impl<'a> miniserde::Serialize for TestFailoverReplicationGroupStopRequestType<'a> {
    fn begin(&self) -> miniserde::ser::Fragment<'_> {
        miniserde::ser::Fragment::Map(Box::new(TestFailoverReplicationGroupStopRequestTypeSer { data: self, seq: 0 }))
    }
}

struct TestFailoverReplicationGroupStopRequestTypeSer<'b, 'a> {
    data: &'b TestFailoverReplicationGroupStopRequestType<'a>,
    seq: usize,
}

impl<'b, 'a> miniserde::ser::Map for TestFailoverReplicationGroupStopRequestTypeSer<'b, 'a> {
    fn next(&mut self) -> Option<(std::borrow::Cow<'_, str>, &dyn miniserde::Serialize)> {
        loop {
            let seq = self.seq;
            self.seq += 1;
            match seq {
                0 => return Some((std::borrow::Cow::Borrowed("_typeName"), &"TestFailoverReplicationGroupStopRequestType")),
                1 => {
                    let Some(ref val) = self.data.group_id else { continue; };
                    return Some((std::borrow::Cow::Borrowed("groupId"), val as &dyn miniserde::Serialize));
                }
                2 => return Some((std::borrow::Cow::Borrowed("force"), &self.data.force as &dyn miniserde::Serialize)),
                _ => return None,
            }
        }
    }
}