-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ArmRecoveryServicesSiteRecoveryModelFactory.cs
4105 lines (3758 loc) · 408 KB
/
ArmRecoveryServicesSiteRecoveryModelFactory.cs
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using Azure.Core;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.RecoveryServicesSiteRecovery;
namespace Azure.ResourceManager.RecoveryServicesSiteRecovery.Models
{
/// <summary> Model factory for models. </summary>
public static partial class ArmRecoveryServicesSiteRecoveryModelFactory
{
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryAlertData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Alert related data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryAlertData"/> instance for mocking. </returns>
public static SiteRecoveryAlertData SiteRecoveryAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryAlertProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryAlertData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryAlertProperties"/>. </summary>
/// <param name="sendToOwners"> A value indicating whether to send email to subscription administrator. </param>
/// <param name="customEmailAddresses"> The custom email address for sending emails. </param>
/// <param name="locale"> The locale for the email notification. </param>
/// <returns> A new <see cref="Models.SiteRecoveryAlertProperties"/> instance for mocking. </returns>
public static SiteRecoveryAlertProperties SiteRecoveryAlertProperties(string sendToOwners = null, IEnumerable<string> customEmailAddresses = null, string locale = null)
{
customEmailAddresses ??= new List<string>();
return new SiteRecoveryAlertProperties(sendToOwners, customEmailAddresses?.ToList(), locale, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryReplicationAppliance"/>. </summary>
/// <param name="siteRecoveryReplicationApplianceProviderSpecificDetails"> Appliance related data. </param>
/// <returns> A new <see cref="Models.SiteRecoveryReplicationAppliance"/> instance for mocking. </returns>
public static SiteRecoveryReplicationAppliance SiteRecoveryReplicationAppliance(SiteRecoveryApplianceSpecificDetails siteRecoveryReplicationApplianceProviderSpecificDetails = null)
{
return new SiteRecoveryReplicationAppliance(siteRecoveryReplicationApplianceProviderSpecificDetails != null ? new SiteRecoveryReplicationApplianceProperties(siteRecoveryReplicationApplianceProviderSpecificDetails, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.ReplicationEligibilityResultData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Gets properties model for replication eligibility results API. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.ReplicationEligibilityResultData"/> instance for mocking. </returns>
public static ReplicationEligibilityResultData ReplicationEligibilityResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationEligibilityResultProperties properties = null)
{
return new ReplicationEligibilityResultData(id, name, resourceType, systemData, properties, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ReplicationEligibilityResultProperties"/>. </summary>
/// <param name="clientRequestId"> The client request Id. </param>
/// <param name="errors"> The error details. </param>
/// <returns> A new <see cref="Models.ReplicationEligibilityResultProperties"/> instance for mocking. </returns>
public static ReplicationEligibilityResultProperties ReplicationEligibilityResultProperties(string clientRequestId = null, IEnumerable<ReplicationEligibilityResultErrorInfo> errors = null)
{
errors ??= new List<ReplicationEligibilityResultErrorInfo>();
return new ReplicationEligibilityResultProperties(clientRequestId, errors?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ReplicationEligibilityResultErrorInfo"/>. </summary>
/// <param name="code"> The error code. </param>
/// <param name="message"> The error message. </param>
/// <param name="possibleCauses"> The possible causes. </param>
/// <param name="recommendedAction"> The recommended action. </param>
/// <param name="status"> The error status. </param>
/// <returns> A new <see cref="Models.ReplicationEligibilityResultErrorInfo"/> instance for mocking. </returns>
public static ReplicationEligibilityResultErrorInfo ReplicationEligibilityResultErrorInfo(string code = null, string message = null, string possibleCauses = null, string recommendedAction = null, string status = null)
{
return new ReplicationEligibilityResultErrorInfo(code, message, possibleCauses, recommendedAction, status, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryEventData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Event related data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryEventData"/> instance for mocking. </returns>
public static SiteRecoveryEventData SiteRecoveryEventData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryEventProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryEventData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryEventProperties"/>. </summary>
/// <param name="eventCode"> The Id of the monitoring event. </param>
/// <param name="description"> The event name. </param>
/// <param name="eventType"> The type of the event. for example: VM Health, Server Health, Job Failure etc. </param>
/// <param name="affectedObjectFriendlyName"> The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). </param>
/// <param name="affectedObjectCorrelationId"> The affected object correlationId for the event. </param>
/// <param name="severity"> The severity of the event. </param>
/// <param name="occurredOn"> The time of occurrence of the event. </param>
/// <param name="fabricId"> The ARM ID of the fabric. </param>
/// <param name="providerSpecificDetails">
/// The provider specific settings.
/// Please note <see cref="SiteRecoveryEventProviderSpecificDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2AEventDetails"/>, <see cref="Models.HyperVReplica2012EventDetails"/>, <see cref="Models.HyperVReplica2012R2EventDetails"/>, <see cref="Models.HyperVReplicaAzureEventDetails"/>, <see cref="Models.HyperVReplicaBaseEventDetails"/>, <see cref="Models.InMageAzureV2EventDetails"/>, <see cref="Models.InMageRcmEventDetails"/>, <see cref="Models.InMageRcmFailbackEventDetails"/> and <see cref="Models.VMwareCbtEventDetails"/>.
/// </param>
/// <param name="eventSpecificDetails">
/// The event specific settings.
/// Please note <see cref="SiteRecoveryEventSpecificDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.SiteRecoveryJobStatusEventDetails"/>.
/// </param>
/// <param name="healthErrors"> The list of errors / warnings capturing details associated with the issue(s). </param>
/// <returns> A new <see cref="Models.SiteRecoveryEventProperties"/> instance for mocking. </returns>
public static SiteRecoveryEventProperties SiteRecoveryEventProperties(string eventCode = null, string description = null, string eventType = null, string affectedObjectFriendlyName = null, string affectedObjectCorrelationId = null, string severity = null, DateTimeOffset? occurredOn = null, ResourceIdentifier fabricId = null, SiteRecoveryEventProviderSpecificDetails providerSpecificDetails = null, SiteRecoveryEventSpecificDetails eventSpecificDetails = null, IEnumerable<SiteRecoveryHealthError> healthErrors = null)
{
healthErrors ??= new List<SiteRecoveryHealthError>();
return new SiteRecoveryEventProperties(eventCode, description, eventType, affectedObjectFriendlyName, affectedObjectCorrelationId, severity, occurredOn, fabricId, providerSpecificDetails, eventSpecificDetails, healthErrors?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryHealthError"/>. </summary>
/// <param name="innerHealthErrors"> The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. </param>
/// <param name="errorSource"> Source of error. </param>
/// <param name="errorType"> Type of error. </param>
/// <param name="errorLevel"> Level of error. </param>
/// <param name="errorCategory"> Category of error. </param>
/// <param name="errorCode"> Error code. </param>
/// <param name="summaryMessage"> Summary message of the entity. </param>
/// <param name="errorMessage"> Error message. </param>
/// <param name="possibleCauses"> Possible causes of error. </param>
/// <param name="recommendedAction"> Recommended action to resolve error. </param>
/// <param name="creationTimeUtc"> Error creation time (UTC). </param>
/// <param name="recoveryProviderErrorMessage"> DRA error message. </param>
/// <param name="entityId"> ID of the entity. </param>
/// <param name="errorId"> The health error unique id. </param>
/// <param name="customerResolvability"> Value indicating whether the health error is customer resolvable. </param>
/// <returns> A new <see cref="Models.SiteRecoveryHealthError"/> instance for mocking. </returns>
public static SiteRecoveryHealthError SiteRecoveryHealthError(IEnumerable<SiteRecoveryInnerHealthError> innerHealthErrors = null, string errorSource = null, string errorType = null, string errorLevel = null, string errorCategory = null, string errorCode = null, string summaryMessage = null, string errorMessage = null, string possibleCauses = null, string recommendedAction = null, DateTimeOffset? creationTimeUtc = null, string recoveryProviderErrorMessage = null, string entityId = null, string errorId = null, HealthErrorCustomerResolvability? customerResolvability = null)
{
innerHealthErrors ??= new List<SiteRecoveryInnerHealthError>();
return new SiteRecoveryHealthError(innerHealthErrors?.ToList(), errorSource, errorType, errorLevel, errorCategory, errorCode, summaryMessage, errorMessage, possibleCauses, recommendedAction, creationTimeUtc, recoveryProviderErrorMessage, entityId, errorId, customerResolvability, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryInnerHealthError"/>. </summary>
/// <param name="errorSource"> Source of error. </param>
/// <param name="errorType"> Type of error. </param>
/// <param name="errorLevel"> Level of error. </param>
/// <param name="errorCategory"> Category of error. </param>
/// <param name="errorCode"> Error code. </param>
/// <param name="summaryMessage"> Summary message of the entity. </param>
/// <param name="errorMessage"> Error message. </param>
/// <param name="possibleCauses"> Possible causes of error. </param>
/// <param name="recommendedAction"> Recommended action to resolve error. </param>
/// <param name="createdOn"> Error creation time (UTC). </param>
/// <param name="recoveryProviderErrorMessage"> DRA error message. </param>
/// <param name="entityId"> ID of the entity. </param>
/// <param name="errorId"> The health error unique id. </param>
/// <param name="customerResolvability"> Value indicating whether the health error is customer resolvable. </param>
/// <returns> A new <see cref="Models.SiteRecoveryInnerHealthError"/> instance for mocking. </returns>
public static SiteRecoveryInnerHealthError SiteRecoveryInnerHealthError(string errorSource = null, string errorType = null, string errorLevel = null, string errorCategory = null, string errorCode = null, string summaryMessage = null, string errorMessage = null, string possibleCauses = null, string recommendedAction = null, DateTimeOffset? createdOn = null, string recoveryProviderErrorMessage = null, string entityId = null, string errorId = null, HealthErrorCustomerResolvability? customerResolvability = null)
{
return new SiteRecoveryInnerHealthError(errorSource, errorType, errorLevel, errorCategory, errorCode, summaryMessage, errorMessage, possibleCauses, recommendedAction, createdOn, recoveryProviderErrorMessage, entityId, errorId, customerResolvability, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryFabricData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Fabric related data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryFabricData"/> instance for mocking. </returns>
public static SiteRecoveryFabricData SiteRecoveryFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryFabricProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryFabricData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryFabricProperties"/>. </summary>
/// <param name="friendlyName"> Friendly name of the fabric. </param>
/// <param name="encryptionDetails"> Encryption details for the fabric. </param>
/// <param name="rolloverEncryptionDetails"> Rollover encryption details for the fabric. </param>
/// <param name="internalIdentifier"> Dra Registration Id. </param>
/// <param name="bcdrState"> BCDR state of the fabric. </param>
/// <param name="customDetails">
/// Fabric specific settings.
/// Please note <see cref="FabricSpecificDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.SiteRecoveryFabricProviderSpecificDetails"/>, <see cref="Models.HyperVSiteDetails"/>, <see cref="Models.InMageRcmFabricSpecificDetails"/>, <see cref="VmmFabricDetails"/>, <see cref="Models.VMwareDetails"/> and <see cref="Models.VMwareV2FabricSpecificDetails"/>.
/// </param>
/// <param name="healthErrorDetails"> Fabric health error details. </param>
/// <param name="health"> Health of fabric. </param>
/// <returns> A new <see cref="Models.SiteRecoveryFabricProperties"/> instance for mocking. </returns>
public static SiteRecoveryFabricProperties SiteRecoveryFabricProperties(string friendlyName = null, SiteRecoveryEncryptionDetails encryptionDetails = null, SiteRecoveryEncryptionDetails rolloverEncryptionDetails = null, string internalIdentifier = null, string bcdrState = null, FabricSpecificDetails customDetails = null, IEnumerable<SiteRecoveryHealthError> healthErrorDetails = null, string health = null)
{
healthErrorDetails ??= new List<SiteRecoveryHealthError>();
return new SiteRecoveryFabricProperties(friendlyName, encryptionDetails, rolloverEncryptionDetails, internalIdentifier, bcdrState, customDetails, healthErrorDetails?.ToList(), health, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryEncryptionDetails"/>. </summary>
/// <param name="kekState"> The key encryption key state for the Vmm. </param>
/// <param name="kekCertThumbprint"> The key encryption key certificate thumbprint. </param>
/// <param name="kekCertExpireOn"> The key encryption key certificate expiry date. </param>
/// <returns> A new <see cref="Models.SiteRecoveryEncryptionDetails"/> instance for mocking. </returns>
public static SiteRecoveryEncryptionDetails SiteRecoveryEncryptionDetails(string kekState = null, string kekCertThumbprint = null, DateTimeOffset? kekCertExpireOn = null)
{
return new SiteRecoveryEncryptionDetails(kekState, kekCertThumbprint, kekCertExpireOn, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryLogicalNetworkData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The Logical Network Properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryLogicalNetworkData"/> instance for mocking. </returns>
public static SiteRecoveryLogicalNetworkData SiteRecoveryLogicalNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryLogicalNetworkProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryLogicalNetworkData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryLogicalNetworkProperties"/>. </summary>
/// <param name="friendlyName"> The Friendly Name. </param>
/// <param name="networkVirtualizationStatus"> A value indicating whether Network Virtualization is enabled for the logical network. </param>
/// <param name="logicalNetworkUsage"> A value indicating whether logical network is used as private test network by test failover. </param>
/// <param name="logicalNetworkDefinitionsStatus"> A value indicating whether logical network definitions are isolated. </param>
/// <returns> A new <see cref="Models.SiteRecoveryLogicalNetworkProperties"/> instance for mocking. </returns>
public static SiteRecoveryLogicalNetworkProperties SiteRecoveryLogicalNetworkProperties(string friendlyName = null, string networkVirtualizationStatus = null, string logicalNetworkUsage = null, string logicalNetworkDefinitionsStatus = null)
{
return new SiteRecoveryLogicalNetworkProperties(friendlyName, networkVirtualizationStatus, logicalNetworkUsage, logicalNetworkDefinitionsStatus, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryNetworkData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The Network Properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryNetworkData"/> instance for mocking. </returns>
public static SiteRecoveryNetworkData SiteRecoveryNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryNetworkProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryNetworkData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryNetworkProperties"/>. </summary>
/// <param name="fabricType"> The Fabric Type. </param>
/// <param name="subnets"> The List of subnets. </param>
/// <param name="friendlyName"> The Friendly Name. </param>
/// <param name="networkType"> The Network Type. </param>
/// <returns> A new <see cref="Models.SiteRecoveryNetworkProperties"/> instance for mocking. </returns>
public static SiteRecoveryNetworkProperties SiteRecoveryNetworkProperties(string fabricType = null, IEnumerable<SiteRecoverySubnet> subnets = null, string friendlyName = null, string networkType = null)
{
subnets ??= new List<SiteRecoverySubnet>();
return new SiteRecoveryNetworkProperties(fabricType, subnets?.ToList(), friendlyName, networkType, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoverySubnet"/>. </summary>
/// <param name="name"> The subnet name. </param>
/// <param name="friendlyName"> The subnet friendly name. </param>
/// <param name="addressList"> The list of addresses for the subnet. </param>
/// <returns> A new <see cref="Models.SiteRecoverySubnet"/> instance for mocking. </returns>
public static SiteRecoverySubnet SiteRecoverySubnet(string name = null, string friendlyName = null, IEnumerable<string> addressList = null)
{
addressList ??= new List<string>();
return new SiteRecoverySubnet(name, friendlyName, addressList?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryNetworkMappingData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The Network Mapping Properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryNetworkMappingData"/> instance for mocking. </returns>
public static SiteRecoveryNetworkMappingData SiteRecoveryNetworkMappingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryNetworkMappingProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryNetworkMappingData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryNetworkMappingProperties"/>. </summary>
/// <param name="state"> The pairing state for network mapping. </param>
/// <param name="primaryNetworkFriendlyName"> The primary network friendly name. </param>
/// <param name="primaryNetworkId"> The primary network id for network mapping. </param>
/// <param name="primaryFabricFriendlyName"> The primary fabric friendly name. </param>
/// <param name="recoveryNetworkFriendlyName"> The recovery network friendly name. </param>
/// <param name="recoveryNetworkId"> The recovery network id for network mapping. </param>
/// <param name="recoveryFabricArmId"> The recovery fabric ARM id. </param>
/// <param name="recoveryFabricFriendlyName"> The recovery fabric friendly name. </param>
/// <param name="fabricSpecificSettings">
/// The fabric specific settings.
/// Please note <see cref="NetworkMappingFabricSpecificSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2ANetworkMappingSettings"/>, <see cref="VmmToAzureNetworkMappingSettings"/> and <see cref="VmmToVmmNetworkMappingSettings"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryNetworkMappingProperties"/> instance for mocking. </returns>
public static SiteRecoveryNetworkMappingProperties SiteRecoveryNetworkMappingProperties(string state = null, string primaryNetworkFriendlyName = null, ResourceIdentifier primaryNetworkId = null, string primaryFabricFriendlyName = null, string recoveryNetworkFriendlyName = null, ResourceIdentifier recoveryNetworkId = null, ResourceIdentifier recoveryFabricArmId = null, string recoveryFabricFriendlyName = null, NetworkMappingFabricSpecificSettings fabricSpecificSettings = null)
{
return new SiteRecoveryNetworkMappingProperties(state, primaryNetworkFriendlyName, primaryNetworkId, primaryFabricFriendlyName, recoveryNetworkFriendlyName, recoveryNetworkId, recoveryFabricArmId, recoveryFabricFriendlyName, fabricSpecificSettings, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryCreateReplicationNetworkMappingProperties"/>. </summary>
/// <param name="recoveryFabricName"> Recovery fabric Name. </param>
/// <param name="recoveryNetworkId"> Recovery network Id. </param>
/// <param name="fabricSpecificDetails">
/// Fabric specific input properties.
/// Please note <see cref="FabricSpecificCreateNetworkMappingContent"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2ACreateNetworkMappingContent"/>, <see cref="VmmToAzureCreateNetworkMappingContent"/> and <see cref="VmmToVmmCreateNetworkMappingContent"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryCreateReplicationNetworkMappingProperties"/> instance for mocking. </returns>
public static SiteRecoveryCreateReplicationNetworkMappingProperties SiteRecoveryCreateReplicationNetworkMappingProperties(string recoveryFabricName = null, ResourceIdentifier recoveryNetworkId = null, FabricSpecificCreateNetworkMappingContent fabricSpecificDetails = null)
{
return new SiteRecoveryCreateReplicationNetworkMappingProperties(recoveryFabricName, recoveryNetworkId, fabricSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryProtectionContainerData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryProtectionContainerData"/> instance for mocking. </returns>
public static SiteRecoveryProtectionContainerData SiteRecoveryProtectionContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryProtectionContainerProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryProtectionContainerData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryProtectionContainerProperties"/>. </summary>
/// <param name="fabricFriendlyName"> Fabric friendly name. </param>
/// <param name="friendlyName"> The name. </param>
/// <param name="fabricType"> The fabric type. </param>
/// <param name="protectedItemCount"> Number of protected PEs. </param>
/// <param name="pairingStatus"> The pairing status of this cloud. </param>
/// <param name="role"> The role of this cloud. </param>
/// <param name="fabricSpecificDetailsInstanceType"> Fabric specific details. </param>
/// <returns> A new <see cref="Models.SiteRecoveryProtectionContainerProperties"/> instance for mocking. </returns>
public static SiteRecoveryProtectionContainerProperties SiteRecoveryProtectionContainerProperties(string fabricFriendlyName = null, string friendlyName = null, string fabricType = null, int? protectedItemCount = null, string pairingStatus = null, string role = null, string fabricSpecificDetailsInstanceType = null)
{
return new SiteRecoveryProtectionContainerProperties(fabricFriendlyName, friendlyName, fabricType, protectedItemCount, pairingStatus, role, fabricSpecificDetailsInstanceType != null ? new ProtectionContainerFabricSpecificDetails(fabricSpecificDetailsInstanceType, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryMigrationItemData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The migration item properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryMigrationItemData"/> instance for mocking. </returns>
public static SiteRecoveryMigrationItemData SiteRecoveryMigrationItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryMigrationItemProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryMigrationItemData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryMigrationItemProperties"/>. </summary>
/// <param name="machineName"> The on-premise virtual machine name. </param>
/// <param name="policyId"> The ARM Id of policy governing this item. </param>
/// <param name="policyFriendlyName"> The name of policy governing this item. </param>
/// <param name="recoveryServicesProviderId"> The recovery services provider ARM Id. </param>
/// <param name="replicationStatus"> The replication status. </param>
/// <param name="migrationState"> The migration status. </param>
/// <param name="migrationStateDescription"> The migration state description. </param>
/// <param name="lastTestMigrationOn"> The last test migration time. </param>
/// <param name="lastTestMigrationStatus"> The status of the last test migration. </param>
/// <param name="lastMigrationOn"> The last migration time. </param>
/// <param name="lastMigrationStatus"> The status of the last migration. </param>
/// <param name="testMigrateState"> The test migrate state. </param>
/// <param name="testMigrateStateDescription"> The test migrate state description. </param>
/// <param name="health"> The consolidated health. </param>
/// <param name="healthErrors"> The list of health errors. </param>
/// <param name="allowedOperations"> The allowed operations on the migration item based on the current migration state of the item. </param>
/// <param name="currentJob"> The current job details. </param>
/// <param name="criticalJobHistory"> The critical past job details. </param>
/// <param name="eventCorrelationId"> The correlation Id for events associated with this migration item. </param>
/// <param name="providerSpecificDetails">
/// The migration provider custom settings.
/// Please note <see cref="MigrationProviderSpecificSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.VMwareCbtMigrationDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryMigrationItemProperties"/> instance for mocking. </returns>
public static SiteRecoveryMigrationItemProperties SiteRecoveryMigrationItemProperties(string machineName = null, ResourceIdentifier policyId = null, string policyFriendlyName = null, string recoveryServicesProviderId = null, string replicationStatus = null, SiteRecoveryMigrationState? migrationState = null, string migrationStateDescription = null, DateTimeOffset? lastTestMigrationOn = null, string lastTestMigrationStatus = null, DateTimeOffset? lastMigrationOn = null, string lastMigrationStatus = null, TestMigrationState? testMigrateState = null, string testMigrateStateDescription = null, SiteRecoveryProtectionHealth? health = null, IEnumerable<SiteRecoveryHealthError> healthErrors = null, IEnumerable<MigrationItemOperation> allowedOperations = null, CurrentJobDetails currentJob = null, IEnumerable<CriticalJobHistoryDetails> criticalJobHistory = null, string eventCorrelationId = null, MigrationProviderSpecificSettings providerSpecificDetails = null)
{
healthErrors ??= new List<SiteRecoveryHealthError>();
allowedOperations ??= new List<MigrationItemOperation>();
criticalJobHistory ??= new List<CriticalJobHistoryDetails>();
return new SiteRecoveryMigrationItemProperties(machineName, policyId, policyFriendlyName, recoveryServicesProviderId, replicationStatus, migrationState, migrationStateDescription, lastTestMigrationOn, lastTestMigrationStatus, lastMigrationOn, lastMigrationStatus, testMigrateState, testMigrateStateDescription, health, healthErrors?.ToList(), allowedOperations?.ToList(), currentJob, criticalJobHistory?.ToList(), eventCorrelationId, providerSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.CurrentJobDetails"/>. </summary>
/// <param name="jobName"> The job name. </param>
/// <param name="jobId"> The ARM Id of the job being executed. </param>
/// <param name="startOn"> The start time of the job. </param>
/// <returns> A new <see cref="Models.CurrentJobDetails"/> instance for mocking. </returns>
public static CurrentJobDetails CurrentJobDetails(string jobName = null, ResourceIdentifier jobId = null, DateTimeOffset? startOn = null)
{
return new CurrentJobDetails(jobName, jobId, startOn, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.CriticalJobHistoryDetails"/>. </summary>
/// <param name="jobName"> The job name. </param>
/// <param name="jobId"> The ARM Id of the job being executed. </param>
/// <param name="startOn"> The start time of the job. </param>
/// <param name="jobStatus"> The job state. </param>
/// <returns> A new <see cref="Models.CriticalJobHistoryDetails"/> instance for mocking. </returns>
public static CriticalJobHistoryDetails CriticalJobHistoryDetails(string jobName = null, ResourceIdentifier jobId = null, DateTimeOffset? startOn = null, string jobStatus = null)
{
return new CriticalJobHistoryDetails(jobName, jobId, startOn, jobStatus, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.MigrationRecoveryPointData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Recovery point properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.MigrationRecoveryPointData"/> instance for mocking. </returns>
public static MigrationRecoveryPointData MigrationRecoveryPointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MigrationRecoveryPointProperties properties = null, AzureLocation? location = null)
{
return new MigrationRecoveryPointData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.MigrationRecoveryPointProperties"/>. </summary>
/// <param name="recoveryPointOn"> The recovery point time. </param>
/// <param name="recoveryPointType"> The recovery point type. </param>
/// <returns> A new <see cref="Models.MigrationRecoveryPointProperties"/> instance for mocking. </returns>
public static MigrationRecoveryPointProperties MigrationRecoveryPointProperties(DateTimeOffset? recoveryPointOn = null, MigrationRecoveryPointType? recoveryPointType = null)
{
return new MigrationRecoveryPointProperties(recoveryPointOn, recoveryPointType, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryProtectableItemData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryProtectableItemData"/> instance for mocking. </returns>
public static SiteRecoveryProtectableItemData SiteRecoveryProtectableItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryProtectableItemProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryProtectableItemData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryProtectableItemProperties"/>. </summary>
/// <param name="friendlyName"> The name. </param>
/// <param name="protectionStatus"> The protection status. </param>
/// <param name="replicationProtectedItemId"> The ARM resource of protected items. </param>
/// <param name="recoveryServicesProviderId"> The recovery provider ARM Id. </param>
/// <param name="protectionReadinessErrors"> The Current protection readiness errors. </param>
/// <param name="supportedReplicationProviders"> The list of replication providers supported for the protectable item. </param>
/// <param name="customDetails">
/// The Replication provider custom settings.
/// Please note <see cref="SiteRecoveryReplicationProviderSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.HyperVVmDetails"/>, <see cref="ReplicationGroupDetails"/>, <see cref="Models.VMwareVmDetails"/> and <see cref="Models.VmmVmDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryProtectableItemProperties"/> instance for mocking. </returns>
public static SiteRecoveryProtectableItemProperties SiteRecoveryProtectableItemProperties(string friendlyName = null, string protectionStatus = null, ResourceIdentifier replicationProtectedItemId = null, ResourceIdentifier recoveryServicesProviderId = null, IEnumerable<string> protectionReadinessErrors = null, IEnumerable<string> supportedReplicationProviders = null, SiteRecoveryReplicationProviderSettings customDetails = null)
{
protectionReadinessErrors ??= new List<string>();
supportedReplicationProviders ??= new List<string>();
return new SiteRecoveryProtectableItemProperties(friendlyName, protectionStatus, replicationProtectedItemId, recoveryServicesProviderId, protectionReadinessErrors?.ToList(), supportedReplicationProviders?.ToList(), customDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.ReplicationProtectedItemData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.ReplicationProtectedItemData"/> instance for mocking. </returns>
public static ReplicationProtectedItemData ReplicationProtectedItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationProtectedItemProperties properties = null, AzureLocation? location = null)
{
return new ReplicationProtectedItemData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ReplicationProtectedItemProperties"/>. </summary>
/// <param name="friendlyName"> The name. </param>
/// <param name="protectedItemType"> The type of protected item type. </param>
/// <param name="protectableItemId"> The protected item ARM Id. </param>
/// <param name="recoveryServicesProviderId"> The recovery provider ARM Id. </param>
/// <param name="primaryFabricFriendlyName"> The friendly name of the primary fabric. </param>
/// <param name="primaryFabricProvider"> The fabric provider of the primary fabric. </param>
/// <param name="recoveryFabricFriendlyName"> The friendly name of recovery fabric. </param>
/// <param name="recoveryFabricId"> The Arm Id of recovery fabric. </param>
/// <param name="primaryProtectionContainerFriendlyName"> The name of primary protection container friendly name. </param>
/// <param name="recoveryProtectionContainerFriendlyName"> The name of recovery container friendly name. </param>
/// <param name="protectionState"> The protection status. </param>
/// <param name="protectionStateDescription"> The protection state description. </param>
/// <param name="activeLocation"> The Current active location of the PE. </param>
/// <param name="testFailoverState"> The Test failover state. </param>
/// <param name="testFailoverStateDescription"> The Test failover state description. </param>
/// <param name="switchProviderState"> The switch provider state. </param>
/// <param name="switchProviderStateDescription"> The switch provider state description. </param>
/// <param name="allowedOperations"> The allowed operations on the Replication protected item. </param>
/// <param name="replicationHealth"> The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration. </param>
/// <param name="failoverHealth"> The consolidated failover health for the VM. </param>
/// <param name="healthErrors"> List of health errors. </param>
/// <param name="policyId"> The ID of Policy governing this PE. </param>
/// <param name="policyFriendlyName"> The name of Policy governing this PE. </param>
/// <param name="lastSuccessfulFailoverOn"> The Last successful failover time. </param>
/// <param name="lastSuccessfulTestFailoverOn"> The Last successful test failover time. </param>
/// <param name="currentScenario"> The current scenario. </param>
/// <param name="failoverRecoveryPointId"> The recovery point ARM Id to which the Vm was failed over. </param>
/// <param name="providerSpecificDetails">
/// The Replication provider custom settings.
/// Please note <see cref="ReplicationProviderSpecificSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2AReplicationDetails"/>, <see cref="Models.A2ACrossClusterMigrationReplicationDetails"/>, <see cref="Models.HyperVReplicaReplicationDetails"/>, <see cref="Models.HyperVReplicaBlueReplicationDetails"/>, <see cref="Models.HyperVReplicaAzureReplicationDetails"/>, <see cref="Models.HyperVReplicaBaseReplicationDetails"/>, <see cref="Models.InMageReplicationDetails"/>, <see cref="Models.InMageAzureV2ReplicationDetails"/>, <see cref="Models.InMageRcmReplicationDetails"/> and <see cref="Models.InMageRcmFailbackReplicationDetails"/>.
/// </param>
/// <param name="recoveryContainerId"> The recovery container Id. </param>
/// <param name="eventCorrelationId"> The correlation Id for events associated with this protected item. </param>
/// <returns> A new <see cref="Models.ReplicationProtectedItemProperties"/> instance for mocking. </returns>
public static ReplicationProtectedItemProperties ReplicationProtectedItemProperties(string friendlyName = null, string protectedItemType = null, ResourceIdentifier protectableItemId = null, string recoveryServicesProviderId = null, string primaryFabricFriendlyName = null, string primaryFabricProvider = null, string recoveryFabricFriendlyName = null, ResourceIdentifier recoveryFabricId = null, string primaryProtectionContainerFriendlyName = null, string recoveryProtectionContainerFriendlyName = null, string protectionState = null, string protectionStateDescription = null, string activeLocation = null, string testFailoverState = null, string testFailoverStateDescription = null, string switchProviderState = null, string switchProviderStateDescription = null, IEnumerable<string> allowedOperations = null, string replicationHealth = null, string failoverHealth = null, IEnumerable<SiteRecoveryHealthError> healthErrors = null, ResourceIdentifier policyId = null, string policyFriendlyName = null, DateTimeOffset? lastSuccessfulFailoverOn = null, DateTimeOffset? lastSuccessfulTestFailoverOn = null, CurrentScenarioDetails currentScenario = null, ResourceIdentifier failoverRecoveryPointId = null, ReplicationProviderSpecificSettings providerSpecificDetails = null, ResourceIdentifier recoveryContainerId = null, Guid? eventCorrelationId = null)
{
allowedOperations ??= new List<string>();
healthErrors ??= new List<SiteRecoveryHealthError>();
return new ReplicationProtectedItemProperties(friendlyName, protectedItemType, protectableItemId, recoveryServicesProviderId, primaryFabricFriendlyName, primaryFabricProvider, recoveryFabricFriendlyName, recoveryFabricId, primaryProtectionContainerFriendlyName, recoveryProtectionContainerFriendlyName, protectionState, protectionStateDescription, activeLocation, testFailoverState, testFailoverStateDescription, switchProviderState, switchProviderStateDescription, allowedOperations?.ToList(), replicationHealth, failoverHealth, healthErrors?.ToList(), policyId, policyFriendlyName, lastSuccessfulFailoverOn, lastSuccessfulTestFailoverOn, currentScenario, failoverRecoveryPointId, providerSpecificDetails, recoveryContainerId, eventCorrelationId, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.CurrentScenarioDetails"/>. </summary>
/// <param name="scenarioName"> Scenario name. </param>
/// <param name="jobId"> ARM Id of the job being executed. </param>
/// <param name="startOn"> Start time of the workflow. </param>
/// <returns> A new <see cref="Models.CurrentScenarioDetails"/> instance for mocking. </returns>
public static CurrentScenarioDetails CurrentScenarioDetails(string scenarioName = null, ResourceIdentifier jobId = null, DateTimeOffset? startOn = null)
{
return new CurrentScenarioDetails(scenarioName, jobId, startOn, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryApplyRecoveryPointProperties"/>. </summary>
/// <param name="recoveryPointId"> The recovery point Id. </param>
/// <param name="providerSpecificDetails">
/// Provider specific input for applying recovery point.
/// Please note <see cref="SiteRecoveryApplyRecoveryPointProviderSpecificContent"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="A2AApplyRecoveryPointContent"/>, <see cref="A2ACrossClusterMigrationApplyRecoveryPointContent"/>, <see cref="HyperVReplicaAzureApplyRecoveryPointContent"/>, <see cref="InMageAzureV2ApplyRecoveryPointContent"/> and <see cref="Models.InMageRcmApplyRecoveryPointContent"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryApplyRecoveryPointProperties"/> instance for mocking. </returns>
public static SiteRecoveryApplyRecoveryPointProperties SiteRecoveryApplyRecoveryPointProperties(ResourceIdentifier recoveryPointId = null, SiteRecoveryApplyRecoveryPointProviderSpecificContent providerSpecificDetails = null)
{
return new SiteRecoveryApplyRecoveryPointProperties(recoveryPointId, providerSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryPointData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The recovery point properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryPointData"/> instance for mocking. </returns>
public static SiteRecoveryPointData SiteRecoveryPointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryPointProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryPointData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryPointProperties"/>. </summary>
/// <param name="recoveryPointOn"> The recovery point time. </param>
/// <param name="recoveryPointType"> The recovery point type: ApplicationConsistent, CrashConsistent. </param>
/// <param name="providerSpecificDetails">
/// The provider specific details for the recovery point.
/// Please note <see cref="ProviderSpecificRecoveryPointDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2ARecoveryPointDetails"/>, <see cref="Models.InMageAzureV2RecoveryPointDetails"/> and <see cref="Models.InMageRcmRecoveryPointDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryPointProperties"/> instance for mocking. </returns>
public static SiteRecoveryPointProperties SiteRecoveryPointProperties(DateTimeOffset? recoveryPointOn = null, string recoveryPointType = null, ProviderSpecificRecoveryPointDetails providerSpecificDetails = null)
{
return new SiteRecoveryPointProperties(recoveryPointOn, recoveryPointType, providerSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.TargetComputeSize"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <returns> A new <see cref="Models.TargetComputeSize"/> instance for mocking. </returns>
public static TargetComputeSize TargetComputeSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TargetComputeSizeProperties properties = null)
{
return new TargetComputeSize(id, name, resourceType, systemData, properties, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.TargetComputeSizeProperties"/>. </summary>
/// <param name="name"> Target compute size name. </param>
/// <param name="friendlyName"> Target compute size display name. </param>
/// <param name="cpuCoresCount"> The maximum cpu cores count supported by target compute size. </param>
/// <param name="vCpusAvailable"> The Available vCPUs supported by target compute size. </param>
/// <param name="memoryInGB"> The maximum memory in GB supported by target compute size. </param>
/// <param name="maxDataDiskCount"> The maximum data disks count supported by target compute size. </param>
/// <param name="maxNicsCount"> The maximum Nics count supported by target compute size. </param>
/// <param name="errors"> The reasons why the target compute size is not applicable for the protected item. </param>
/// <param name="highIopsSupported"> The value indicating whether the target compute size supports high Iops. </param>
/// <param name="hyperVGenerations"> The supported HyperV Generations. </param>
/// <returns> A new <see cref="Models.TargetComputeSizeProperties"/> instance for mocking. </returns>
public static TargetComputeSizeProperties TargetComputeSizeProperties(string name = null, string friendlyName = null, int? cpuCoresCount = null, int? vCpusAvailable = null, double? memoryInGB = null, int? maxDataDiskCount = null, int? maxNicsCount = null, IEnumerable<SiteRecoveryComputeSizeErrorDetails> errors = null, string highIopsSupported = null, IEnumerable<string> hyperVGenerations = null)
{
errors ??= new List<SiteRecoveryComputeSizeErrorDetails>();
hyperVGenerations ??= new List<string>();
return new TargetComputeSizeProperties(name, friendlyName, cpuCoresCount, vCpusAvailable, memoryInGB, maxDataDiskCount, maxNicsCount, errors?.ToList(), highIopsSupported, hyperVGenerations?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryComputeSizeErrorDetails"/>. </summary>
/// <param name="message"> The error message. </param>
/// <param name="severity"> The severity of the error. </param>
/// <returns> A new <see cref="Models.SiteRecoveryComputeSizeErrorDetails"/> instance for mocking. </returns>
public static SiteRecoveryComputeSizeErrorDetails SiteRecoveryComputeSizeErrorDetails(string message = null, string severity = null)
{
return new SiteRecoveryComputeSizeErrorDetails(message, severity, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.ProtectionContainerMappingData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.ProtectionContainerMappingData"/> instance for mocking. </returns>
public static ProtectionContainerMappingData ProtectionContainerMappingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProtectionContainerMappingProperties properties = null, AzureLocation? location = null)
{
return new ProtectionContainerMappingData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ProtectionContainerMappingProperties"/>. </summary>
/// <param name="targetProtectionContainerId"> Paired protection container ARM ID. </param>
/// <param name="targetProtectionContainerFriendlyName"> Friendly name of paired container. </param>
/// <param name="providerSpecificDetails">
/// Provider specific provider details.
/// Please note <see cref="ProtectionContainerMappingProviderSpecificDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2AProtectionContainerMappingDetails"/>, <see cref="Models.InMageRcmProtectionContainerMappingDetails"/> and <see cref="Models.VMwareCbtProtectionContainerMappingDetails"/>.
/// </param>
/// <param name="health"> Health of pairing. </param>
/// <param name="healthErrorDetails"> Health error. </param>
/// <param name="policyId"> Policy ARM Id. </param>
/// <param name="state"> Association Status. </param>
/// <param name="sourceProtectionContainerFriendlyName"> Friendly name of source protection container. </param>
/// <param name="sourceFabricFriendlyName"> Friendly name of source fabric. </param>
/// <param name="targetFabricFriendlyName"> Friendly name of target fabric. </param>
/// <param name="policyFriendlyName"> Friendly name of replication policy. </param>
/// <returns> A new <see cref="Models.ProtectionContainerMappingProperties"/> instance for mocking. </returns>
public static ProtectionContainerMappingProperties ProtectionContainerMappingProperties(ResourceIdentifier targetProtectionContainerId = null, string targetProtectionContainerFriendlyName = null, ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails = null, string health = null, IEnumerable<SiteRecoveryHealthError> healthErrorDetails = null, ResourceIdentifier policyId = null, string state = null, string sourceProtectionContainerFriendlyName = null, string sourceFabricFriendlyName = null, string targetFabricFriendlyName = null, string policyFriendlyName = null)
{
healthErrorDetails ??= new List<SiteRecoveryHealthError>();
return new ProtectionContainerMappingProperties(targetProtectionContainerId, targetProtectionContainerFriendlyName, providerSpecificDetails, health, healthErrorDetails?.ToList(), policyId, state, sourceProtectionContainerFriendlyName, sourceFabricFriendlyName, targetFabricFriendlyName, policyFriendlyName, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryServicesProviderData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> Provider properties. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryServicesProviderData"/> instance for mocking. </returns>
public static SiteRecoveryServicesProviderData SiteRecoveryServicesProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryServicesProviderProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryServicesProviderData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryServicesProviderProperties"/>. </summary>
/// <param name="fabricType"> Type of the site. </param>
/// <param name="friendlyName"> Friendly name of the DRA. </param>
/// <param name="providerVersion"> The provider version. </param>
/// <param name="serverVersion"> The fabric provider. </param>
/// <param name="providerVersionState"> DRA version status. </param>
/// <param name="providerVersionExpireOn"> Expiry date of the version. </param>
/// <param name="fabricFriendlyName"> The fabric friendly name. </param>
/// <param name="lastHeartbeatReceivedOn"> Time when last heartbeat was sent by the DRA. </param>
/// <param name="connectionStatus"> A value indicating whether DRA is responsive. </param>
/// <param name="protectedItemCount"> Number of protected VMs currently managed by the DRA. </param>
/// <param name="allowedScenarios"> The scenarios allowed on this provider. </param>
/// <param name="healthErrorDetails"> The recovery services provider health error details. </param>
/// <param name="draIdentifier"> The DRA Id. </param>
/// <param name="machineId"> The machine Id. </param>
/// <param name="machineName"> The machine name. </param>
/// <param name="biosId"> The Bios Id. </param>
/// <param name="authenticationIdentityDetails"> The authentication identity details. </param>
/// <param name="resourceAccessIdentityDetails"> The resource access identity details. </param>
/// <param name="dataPlaneAuthenticationIdentityDetails"> The data plane authentication identity details. </param>
/// <param name="providerVersionDetails"> The provider version details. </param>
/// <returns> A new <see cref="Models.SiteRecoveryServicesProviderProperties"/> instance for mocking. </returns>
public static SiteRecoveryServicesProviderProperties SiteRecoveryServicesProviderProperties(string fabricType = null, string friendlyName = null, string providerVersion = null, string serverVersion = null, string providerVersionState = null, DateTimeOffset? providerVersionExpireOn = null, string fabricFriendlyName = null, DateTimeOffset? lastHeartbeatReceivedOn = null, string connectionStatus = null, int? protectedItemCount = null, IEnumerable<string> allowedScenarios = null, IEnumerable<SiteRecoveryHealthError> healthErrorDetails = null, string draIdentifier = null, string machineId = null, string machineName = null, string biosId = null, IdentityProviderDetails authenticationIdentityDetails = null, IdentityProviderDetails resourceAccessIdentityDetails = null, IdentityProviderDetails dataPlaneAuthenticationIdentityDetails = null, SiteRecoveryVersionDetails providerVersionDetails = null)
{
allowedScenarios ??= new List<string>();
healthErrorDetails ??= new List<SiteRecoveryHealthError>();
return new SiteRecoveryServicesProviderProperties(fabricType, friendlyName, providerVersion, serverVersion, providerVersionState, providerVersionExpireOn, fabricFriendlyName, lastHeartbeatReceivedOn, connectionStatus, protectedItemCount, allowedScenarios?.ToList(), healthErrorDetails?.ToList(), draIdentifier, machineId, machineName, biosId, authenticationIdentityDetails, resourceAccessIdentityDetails, dataPlaneAuthenticationIdentityDetails, providerVersionDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.IdentityProviderDetails"/>. </summary>
/// <param name="tenantId"> The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. </param>
/// <param name="applicationId"> The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. </param>
/// <param name="objectId"> The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. </param>
/// <param name="audience"> The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. </param>
/// <param name="aadAuthority"> The base authority for Azure Active Directory authentication. </param>
/// <returns> A new <see cref="Models.IdentityProviderDetails"/> instance for mocking. </returns>
public static IdentityProviderDetails IdentityProviderDetails(Guid? tenantId = null, string applicationId = null, string objectId = null, string audience = null, string aadAuthority = null)
{
return new IdentityProviderDetails(tenantId, applicationId, objectId, audience, aadAuthority, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryVersionDetails"/>. </summary>
/// <param name="version"> The agent version. </param>
/// <param name="expireOn"> Version expiry date. </param>
/// <param name="status"> A value indicating whether security update required. </param>
/// <returns> A new <see cref="Models.SiteRecoveryVersionDetails"/> instance for mocking. </returns>
public static SiteRecoveryVersionDetails SiteRecoveryVersionDetails(string version = null, DateTimeOffset? expireOn = null, SiteRecoveryAgentVersionStatus? status = null)
{
return new SiteRecoveryVersionDetails(version, expireOn, status, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryAddRecoveryServicesProviderProperties"/>. </summary>
/// <param name="machineName"> The name of the machine where the provider is getting added. </param>
/// <param name="machineId"> The Id of the machine where the provider is getting added. </param>
/// <param name="biosId"> The Bios Id of the machine. </param>
/// <param name="authenticationIdentityContent"> The identity provider input for DRA authentication. </param>
/// <param name="resourceAccessIdentityContent"> The identity provider input for resource access. </param>
/// <param name="dataPlaneAuthenticationIdentityContent"> The identity provider input for data plane authentication. </param>
/// <returns> A new <see cref="Models.SiteRecoveryAddRecoveryServicesProviderProperties"/> instance for mocking. </returns>
public static SiteRecoveryAddRecoveryServicesProviderProperties SiteRecoveryAddRecoveryServicesProviderProperties(string machineName = null, string machineId = null, string biosId = null, IdentityProviderContent authenticationIdentityContent = null, IdentityProviderContent resourceAccessIdentityContent = null, IdentityProviderContent dataPlaneAuthenticationIdentityContent = null)
{
return new SiteRecoveryAddRecoveryServicesProviderProperties(machineName, machineId, biosId, authenticationIdentityContent, resourceAccessIdentityContent, dataPlaneAuthenticationIdentityContent, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.StorageClassificationData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="storageClassificationFriendlyName"> Properties of the storage object. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.StorageClassificationData"/> instance for mocking. </returns>
public static StorageClassificationData StorageClassificationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string storageClassificationFriendlyName = null, AzureLocation? location = null)
{
return new StorageClassificationData(id, name, resourceType, systemData, storageClassificationFriendlyName != null ? new StorageClassificationProperties(storageClassificationFriendlyName, serializedAdditionalRawData: null) : null, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.StorageClassificationMappingData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="targetStorageClassificationId"> Properties of the storage mapping object. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.StorageClassificationMappingData"/> instance for mocking. </returns>
public static StorageClassificationMappingData StorageClassificationMappingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier targetStorageClassificationId = null, AzureLocation? location = null)
{
return new StorageClassificationMappingData(id, name, resourceType, systemData, targetStorageClassificationId != null ? new StorageClassificationMappingProperties(targetStorageClassificationId, serializedAdditionalRawData: null) : null, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryVCenterData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> VCenter related data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryVCenterData"/> instance for mocking. </returns>
public static SiteRecoveryVCenterData SiteRecoveryVCenterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryVCenterProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryVCenterData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryVCenterProperties"/>. </summary>
/// <param name="friendlyName"> Friendly name of the vCenter. </param>
/// <param name="internalId"> VCenter internal ID. </param>
/// <param name="lastHeartbeatReceivedOn"> The time when the last heartbeat was received by vCenter. </param>
/// <param name="discoveryStatus"> The VCenter discovery status. </param>
/// <param name="processServerId"> The process server Id. </param>
/// <param name="ipAddress"> The IP address of the vCenter. </param>
/// <param name="infrastructureId"> The infrastructure Id of vCenter. </param>
/// <param name="port"> The port number for discovery. </param>
/// <param name="runAsAccountId"> The account Id which has privileges to discover the vCenter. </param>
/// <param name="fabricArmResourceName"> The ARM resource name of the fabric containing this VCenter. </param>
/// <param name="healthErrors"> The health errors for this VCenter. </param>
/// <returns> A new <see cref="Models.SiteRecoveryVCenterProperties"/> instance for mocking. </returns>
public static SiteRecoveryVCenterProperties SiteRecoveryVCenterProperties(string friendlyName = null, string internalId = null, DateTimeOffset? lastHeartbeatReceivedOn = null, string discoveryStatus = null, Guid? processServerId = null, IPAddress ipAddress = null, string infrastructureId = null, string port = null, string runAsAccountId = null, string fabricArmResourceName = null, IEnumerable<SiteRecoveryHealthError> healthErrors = null)
{
healthErrors ??= new List<SiteRecoveryHealthError>();
return new SiteRecoveryVCenterProperties(friendlyName, internalId, lastHeartbeatReceivedOn, discoveryStatus, processServerId, ipAddress, infrastructureId, port, runAsAccountId, fabricArmResourceName, healthErrors?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryJobData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryJobData"/> instance for mocking. </returns>
public static SiteRecoveryJobData SiteRecoveryJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryJobProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryJobData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryJobProperties"/>. </summary>
/// <param name="activityId"> The activity id. </param>
/// <param name="scenarioName"> The ScenarioName. </param>
/// <param name="friendlyName"> The DisplayName. </param>
/// <param name="state"> The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. </param>
/// <param name="stateDescription"> The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. </param>
/// <param name="tasks"> The tasks. </param>
/// <param name="errors"> The errors. </param>
/// <param name="startOn"> The start time. </param>
/// <param name="endOn"> The end time. </param>
/// <param name="allowedActions"> The Allowed action the job. </param>
/// <param name="targetObjectId"> The affected Object Id. </param>
/// <param name="targetObjectName"> The name of the affected object. </param>
/// <param name="targetInstanceType"> The type of the affected object which is of Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. </param>
/// <param name="customDetails">
/// The custom job details like test failover job details.
/// Please note <see cref="Models.SiteRecoveryJobDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.AsrJobDetails"/>, <see cref="Models.ExportJobDetails"/>, <see cref="Models.FailoverJobDetails"/>, <see cref="Models.SwitchProtectionJobDetails"/> and <see cref="Models.TestFailoverJobDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryJobProperties"/> instance for mocking. </returns>
public static SiteRecoveryJobProperties SiteRecoveryJobProperties(string activityId = null, string scenarioName = null, string friendlyName = null, string state = null, string stateDescription = null, IEnumerable<AsrTask> tasks = null, IEnumerable<SiteRecoveryJobErrorDetails> errors = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable<string> allowedActions = null, string targetObjectId = null, string targetObjectName = null, string targetInstanceType = null, SiteRecoveryJobDetails customDetails = null)
{
tasks ??= new List<AsrTask>();
errors ??= new List<SiteRecoveryJobErrorDetails>();
allowedActions ??= new List<string>();
return new SiteRecoveryJobProperties(activityId, scenarioName, friendlyName, state, stateDescription, tasks?.ToList(), errors?.ToList(), startOn, endOn, allowedActions?.ToList(), targetObjectId, targetObjectName, targetInstanceType, customDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.AsrTask"/>. </summary>
/// <param name="taskId"> The Id. </param>
/// <param name="name"> The unique Task name. </param>
/// <param name="startOn"> The start time. </param>
/// <param name="endOn"> The end time. </param>
/// <param name="allowedActions"> The state/actions applicable on this task. </param>
/// <param name="friendlyName"> The name. </param>
/// <param name="state"> The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. </param>
/// <param name="stateDescription"> The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. </param>
/// <param name="taskType"> The type of task. Details in CustomDetails property depend on this type. </param>
/// <param name="customDetails">
/// The custom task details based on the task type.
/// Please note <see cref="SiteRecoveryTaskTypeDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.AutomationRunbookTaskDetails"/>, <see cref="Models.ConsistencyCheckTaskDetails"/>, <see cref="Models.FabricReplicationGroupTaskDetails"/>, <see cref="Models.SiteRecoveryJobTaskDetails"/>, <see cref="Models.ManualActionTaskDetails"/>, <see cref="Models.ScriptActionTaskDetails"/>, <see cref="Models.SiteRecoveryVmTaskDetails"/> and <see cref="Models.VmNicUpdatesTaskDetails"/>.
/// </param>
/// <param name="groupTaskCustomDetails">
/// The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it.
/// Please note <see cref="Models.SiteRecoveryGroupTaskDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.InlineWorkflowTaskDetails"/>, <see cref="Models.RecoveryPlanGroupTaskDetails"/> and <see cref="Models.RecoveryPlanShutdownGroupTaskDetails"/>.
/// </param>
/// <param name="errors"> The task error details. </param>
/// <returns> A new <see cref="Models.AsrTask"/> instance for mocking. </returns>
public static AsrTask AsrTask(string taskId = null, string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable<string> allowedActions = null, string friendlyName = null, string state = null, string stateDescription = null, string taskType = null, SiteRecoveryTaskTypeDetails customDetails = null, SiteRecoveryGroupTaskDetails groupTaskCustomDetails = null, IEnumerable<SiteRecoveryJobErrorDetails> errors = null)
{
allowedActions ??= new List<string>();
errors ??= new List<SiteRecoveryJobErrorDetails>();
return new AsrTask(taskId, name, startOn, endOn, allowedActions?.ToList(), friendlyName, state, stateDescription, taskType, customDetails, groupTaskCustomDetails, errors?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryGroupTaskDetails"/>. </summary>
/// <param name="instanceType"> The type of task details. </param>
/// <param name="childTasks"> The child tasks. </param>
/// <returns> A new <see cref="Models.SiteRecoveryGroupTaskDetails"/> instance for mocking. </returns>
public static SiteRecoveryGroupTaskDetails SiteRecoveryGroupTaskDetails(string instanceType = null, IEnumerable<AsrTask> childTasks = null)
{
childTasks ??= new List<AsrTask>();
return new UnknownGroupTaskDetails(instanceType, childTasks?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryJobErrorDetails"/>. </summary>
/// <param name="serviceErrorDetails"> The Service error details. </param>
/// <param name="providerErrorDetails"> The Provider error details. </param>
/// <param name="errorLevel"> Error level of error. </param>
/// <param name="createdOn"> The creation time of job error. </param>
/// <param name="taskId"> The Id of the task. </param>
/// <returns> A new <see cref="Models.SiteRecoveryJobErrorDetails"/> instance for mocking. </returns>
public static SiteRecoveryJobErrorDetails SiteRecoveryJobErrorDetails(SiteRecoveryServiceError serviceErrorDetails = null, SiteRecoveryJobProviderError providerErrorDetails = null, string errorLevel = null, DateTimeOffset? createdOn = null, string taskId = null)
{
return new SiteRecoveryJobErrorDetails(serviceErrorDetails, providerErrorDetails, errorLevel, createdOn, taskId, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryServiceError"/>. </summary>
/// <param name="code"> Error code. </param>
/// <param name="message"> Error message. </param>
/// <param name="possibleCauses"> Possible causes of error. </param>
/// <param name="recommendedAction"> Recommended action to resolve error. </param>
/// <param name="activityId"> Activity Id. </param>
/// <returns> A new <see cref="Models.SiteRecoveryServiceError"/> instance for mocking. </returns>
public static SiteRecoveryServiceError SiteRecoveryServiceError(string code = null, string message = null, string possibleCauses = null, string recommendedAction = null, string activityId = null)
{
return new SiteRecoveryServiceError(code, message, possibleCauses, recommendedAction, activityId, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryJobProviderError"/>. </summary>
/// <param name="errorCode"> The Error code. </param>
/// <param name="errorMessage"> The Error message. </param>
/// <param name="errorId"> The Provider error Id. </param>
/// <param name="possibleCauses"> The possible causes for the error. </param>
/// <param name="recommendedAction"> The recommended action to resolve the error. </param>
/// <returns> A new <see cref="Models.SiteRecoveryJobProviderError"/> instance for mocking. </returns>
public static SiteRecoveryJobProviderError SiteRecoveryJobProviderError(int? errorCode = null, string errorMessage = null, string errorId = null, string possibleCauses = null, string recommendedAction = null)
{
return new SiteRecoveryJobProviderError(errorCode, errorMessage, errorId, possibleCauses, recommendedAction, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryJobDetails"/>. </summary>
/// <param name="instanceType"> Gets the type of job details (see JobDetailsTypes enum for possible values). </param>
/// <param name="affectedObjectDetails"> The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. </param>
/// <returns> A new <see cref="Models.SiteRecoveryJobDetails"/> instance for mocking. </returns>
public static SiteRecoveryJobDetails SiteRecoveryJobDetails(string instanceType = null, IReadOnlyDictionary<string, string> affectedObjectDetails = null)
{
affectedObjectDetails ??= new Dictionary<string, string>();
return new UnknownJobDetails(instanceType, affectedObjectDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryPolicyData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryPolicyData"/> instance for mocking. </returns>
public static SiteRecoveryPolicyData SiteRecoveryPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryPolicyProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryPolicyData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.SiteRecoveryPolicyProperties"/>. </summary>
/// <param name="friendlyName"> The FriendlyName. </param>
/// <param name="providerSpecificDetails">
/// The ReplicationChannelSetting.
/// Please note <see cref="PolicyProviderSpecificDetails"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2APolicyDetails"/>, <see cref="Models.HyperVReplicaPolicyDetails"/>, <see cref="Models.HyperVReplicaBluePolicyDetails"/>, <see cref="Models.HyperVReplicaAzurePolicyDetails"/>, <see cref="Models.HyperVReplicaBasePolicyDetails"/>, <see cref="Models.InMagePolicyDetails"/>, <see cref="Models.InMageAzureV2PolicyDetails"/>, <see cref="Models.InMageBasePolicyDetails"/>, <see cref="Models.InMageRcmPolicyDetails"/>, <see cref="Models.InMageRcmFailbackPolicyDetails"/> and <see cref="Models.VMwareCbtPolicyDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.SiteRecoveryPolicyProperties"/> instance for mocking. </returns>
public static SiteRecoveryPolicyProperties SiteRecoveryPolicyProperties(string friendlyName = null, PolicyProviderSpecificDetails providerSpecificDetails = null)
{
return new SiteRecoveryPolicyProperties(friendlyName, providerSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.ReplicationProtectionIntentData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom data. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.ReplicationProtectionIntentData"/> instance for mocking. </returns>
public static ReplicationProtectionIntentData ReplicationProtectionIntentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationProtectionIntentProperties properties = null, AzureLocation? location = null)
{
return new ReplicationProtectionIntentData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ReplicationProtectionIntentProperties"/>. </summary>
/// <param name="friendlyName"> The name. </param>
/// <param name="jobId"> The job Id. </param>
/// <param name="jobState"> The job state. </param>
/// <param name="isActive"> A value indicating whether the intent object is active. </param>
/// <param name="createdOn"> The creation time in UTC. </param>
/// <param name="providerSpecificDetails">
/// The Replication provider custom settings.
/// Please note <see cref="ReplicationProtectionIntentProviderSpecificSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="Models.A2AReplicationIntentDetails"/>.
/// </param>
/// <returns> A new <see cref="Models.ReplicationProtectionIntentProperties"/> instance for mocking. </returns>
public static ReplicationProtectionIntentProperties ReplicationProtectionIntentProperties(string friendlyName = null, ResourceIdentifier jobId = null, string jobState = null, bool? isActive = null, string createdOn = null, ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails = null)
{
return new ReplicationProtectionIntentProperties(friendlyName, jobId, jobState, isActive, createdOn, providerSpecificDetails, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="RecoveryServicesSiteRecovery.SiteRecoveryRecoveryPlanData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="properties"> The custom details. </param>
/// <param name="location"> Resource Location. </param>
/// <returns> A new <see cref="RecoveryServicesSiteRecovery.SiteRecoveryRecoveryPlanData"/> instance for mocking. </returns>
public static SiteRecoveryRecoveryPlanData SiteRecoveryRecoveryPlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteRecoveryRecoveryPlanProperties properties = null, AzureLocation? location = null)
{
return new SiteRecoveryRecoveryPlanData(id, name, resourceType, systemData, properties, location, serializedAdditionalRawData: null);
}