1package backup
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2021-01-01/backup"
22
23// AADProperties ...
24type AADProperties struct {
25	ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
26	TenantID                 *string `json:"tenantId,omitempty"`
27	Authority                *string `json:"authority,omitempty"`
28	Audience                 *string `json:"audience,omitempty"`
29	ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"`
30}
31
32// AADPropertiesResource ...
33type AADPropertiesResource struct {
34	autorest.Response `json:"-"`
35	// Properties - AADPropertiesResource properties
36	Properties *AADProperties `json:"properties,omitempty"`
37	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
38	ID *string `json:"id,omitempty"`
39	// Name - READ-ONLY; Resource name associated with the resource.
40	Name *string `json:"name,omitempty"`
41	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
42	Type *string `json:"type,omitempty"`
43	// Location - Resource location.
44	Location *string `json:"location,omitempty"`
45	// Tags - Resource tags.
46	Tags map[string]*string `json:"tags"`
47	// ETag - Optional ETag.
48	ETag *string `json:"eTag,omitempty"`
49}
50
51// MarshalJSON is the custom marshaler for AADPropertiesResource.
52func (apr AADPropertiesResource) MarshalJSON() ([]byte, error) {
53	objectMap := make(map[string]interface{})
54	if apr.Properties != nil {
55		objectMap["properties"] = apr.Properties
56	}
57	if apr.Location != nil {
58		objectMap["location"] = apr.Location
59	}
60	if apr.Tags != nil {
61		objectMap["tags"] = apr.Tags
62	}
63	if apr.ETag != nil {
64		objectMap["eTag"] = apr.ETag
65	}
66	return json.Marshal(objectMap)
67}
68
69// AzureBackupGoalFeatureSupportRequest azure backup goal feature specific request.
70type AzureBackupGoalFeatureSupportRequest struct {
71	// FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup'
72	FeatureType FeatureType `json:"featureType,omitempty"`
73}
74
75// MarshalJSON is the custom marshaler for AzureBackupGoalFeatureSupportRequest.
76func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) {
77	abgfsr.FeatureType = FeatureTypeAzureBackupGoals
78	objectMap := make(map[string]interface{})
79	if abgfsr.FeatureType != "" {
80		objectMap["featureType"] = abgfsr.FeatureType
81	}
82	return json.Marshal(objectMap)
83}
84
85// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest.
86func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
87	return &abgfsr, true
88}
89
90// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest.
91func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
92	return nil, false
93}
94
95// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest.
96func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
97	return nil, false
98}
99
100// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest.
101func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
102	return &abgfsr, true
103}
104
105// AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container.
106type AzureBackupServerContainer struct {
107	// CanReRegister - Specifies whether the container is re-registrable.
108	CanReRegister *bool `json:"canReRegister,omitempty"`
109	// ContainerID - ID of container.
110	ContainerID *string `json:"containerId,omitempty"`
111	// ProtectedItemCount - Number of protected items in the BackupEngine
112	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
113	// DpmAgentVersion - Backup engine Agent version
114	DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
115	// DpmServers - List of BackupEngines protecting the container
116	DpmServers *[]string `json:"dpmServers,omitempty"`
117	// UpgradeAvailable - To check if upgrade available
118	UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
119	// ProtectionStatus - Protection status of the container.
120	ProtectionStatus *string `json:"protectionStatus,omitempty"`
121	// ExtendedInfo - Extended Info of the container.
122	ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
123	// FriendlyName - Friendly name of the container.
124	FriendlyName *string `json:"friendlyName,omitempty"`
125	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
126	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
127	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
128	RegistrationStatus *string `json:"registrationStatus,omitempty"`
129	// HealthStatus - Status of health of the container.
130	HealthStatus *string `json:"healthStatus,omitempty"`
131	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
132	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
133}
134
135// MarshalJSON is the custom marshaler for AzureBackupServerContainer.
136func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) {
137	absc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer
138	objectMap := make(map[string]interface{})
139	if absc.CanReRegister != nil {
140		objectMap["canReRegister"] = absc.CanReRegister
141	}
142	if absc.ContainerID != nil {
143		objectMap["containerId"] = absc.ContainerID
144	}
145	if absc.ProtectedItemCount != nil {
146		objectMap["protectedItemCount"] = absc.ProtectedItemCount
147	}
148	if absc.DpmAgentVersion != nil {
149		objectMap["dpmAgentVersion"] = absc.DpmAgentVersion
150	}
151	if absc.DpmServers != nil {
152		objectMap["dpmServers"] = absc.DpmServers
153	}
154	if absc.UpgradeAvailable != nil {
155		objectMap["upgradeAvailable"] = absc.UpgradeAvailable
156	}
157	if absc.ProtectionStatus != nil {
158		objectMap["protectionStatus"] = absc.ProtectionStatus
159	}
160	if absc.ExtendedInfo != nil {
161		objectMap["extendedInfo"] = absc.ExtendedInfo
162	}
163	if absc.FriendlyName != nil {
164		objectMap["friendlyName"] = absc.FriendlyName
165	}
166	if absc.BackupManagementType != "" {
167		objectMap["backupManagementType"] = absc.BackupManagementType
168	}
169	if absc.RegistrationStatus != nil {
170		objectMap["registrationStatus"] = absc.RegistrationStatus
171	}
172	if absc.HealthStatus != nil {
173		objectMap["healthStatus"] = absc.HealthStatus
174	}
175	if absc.ContainerType != "" {
176		objectMap["containerType"] = absc.ContainerType
177	}
178	return json.Marshal(objectMap)
179}
180
181// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
182func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
183	return &absc, true
184}
185
186// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
187func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
188	return nil, false
189}
190
191// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
192func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
193	return nil, false
194}
195
196// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
197func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
198	return nil, false
199}
200
201// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
202func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
203	return nil, false
204}
205
206// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
207func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
208	return nil, false
209}
210
211// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
212func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
213	return nil, false
214}
215
216// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
217func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
218	return nil, false
219}
220
221// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
222func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
223	return nil, false
224}
225
226// AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
227func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) {
228	return nil, false
229}
230
231// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
232func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
233	return &absc, true
234}
235
236// AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
237func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) {
238	return nil, false
239}
240
241// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
242func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
243	return nil, false
244}
245
246// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
247func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
248	return nil, false
249}
250
251// AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
252func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) {
253	return nil, false
254}
255
256// AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
257func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
258	return nil, false
259}
260
261// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer.
262func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
263	return &absc, true
264}
265
266// AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups.
267type AzureBackupServerEngine struct {
268	// FriendlyName - Friendly name of the backup engine.
269	FriendlyName *string `json:"friendlyName,omitempty"`
270	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
271	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
272	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
273	RegistrationStatus *string `json:"registrationStatus,omitempty"`
274	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
275	BackupEngineState *string `json:"backupEngineState,omitempty"`
276	// HealthStatus - Backup status of the backup engine.
277	HealthStatus *string `json:"healthStatus,omitempty"`
278	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
279	CanReRegister *bool `json:"canReRegister,omitempty"`
280	// BackupEngineID - ID of the backup engine.
281	BackupEngineID *string `json:"backupEngineId,omitempty"`
282	// DpmVersion - Backup engine version
283	DpmVersion *string `json:"dpmVersion,omitempty"`
284	// AzureBackupAgentVersion - Backup agent version
285	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
286	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
287	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
288	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
289	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
290	// ExtendedInfo - Extended info of the backupengine
291	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
292	// BackupEngineType - Possible values include: 'EngineTypeBackupEngineTypeBackupEngineBase', 'EngineTypeBackupEngineTypeAzureBackupServerEngine', 'EngineTypeBackupEngineTypeDpmBackupEngine'
293	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
294}
295
296// MarshalJSON is the custom marshaler for AzureBackupServerEngine.
297func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
298	abse.BackupEngineType = EngineTypeBackupEngineTypeAzureBackupServerEngine
299	objectMap := make(map[string]interface{})
300	if abse.FriendlyName != nil {
301		objectMap["friendlyName"] = abse.FriendlyName
302	}
303	if abse.BackupManagementType != "" {
304		objectMap["backupManagementType"] = abse.BackupManagementType
305	}
306	if abse.RegistrationStatus != nil {
307		objectMap["registrationStatus"] = abse.RegistrationStatus
308	}
309	if abse.BackupEngineState != nil {
310		objectMap["backupEngineState"] = abse.BackupEngineState
311	}
312	if abse.HealthStatus != nil {
313		objectMap["healthStatus"] = abse.HealthStatus
314	}
315	if abse.CanReRegister != nil {
316		objectMap["canReRegister"] = abse.CanReRegister
317	}
318	if abse.BackupEngineID != nil {
319		objectMap["backupEngineId"] = abse.BackupEngineID
320	}
321	if abse.DpmVersion != nil {
322		objectMap["dpmVersion"] = abse.DpmVersion
323	}
324	if abse.AzureBackupAgentVersion != nil {
325		objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion
326	}
327	if abse.IsAzureBackupAgentUpgradeAvailable != nil {
328		objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable
329	}
330	if abse.IsDpmUpgradeAvailable != nil {
331		objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable
332	}
333	if abse.ExtendedInfo != nil {
334		objectMap["extendedInfo"] = abse.ExtendedInfo
335	}
336	if abse.BackupEngineType != "" {
337		objectMap["backupEngineType"] = abse.BackupEngineType
338	}
339	return json.Marshal(objectMap)
340}
341
342// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
343func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
344	return &abse, true
345}
346
347// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine.
348func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
349	return nil, false
350}
351
352// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
353func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
354	return nil, false
355}
356
357// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine.
358func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
359	return &abse, true
360}
361
362// AzureFileShareBackupRequest azureFileShare workload-specific backup request.
363type AzureFileShareBackupRequest struct {
364	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
365	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
366	// ObjectType - Possible values include: 'ObjectTypeBasicRequestObjectTypeBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest'
367	ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
368}
369
370// MarshalJSON is the custom marshaler for AzureFileShareBackupRequest.
371func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) {
372	afsbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest
373	objectMap := make(map[string]interface{})
374	if afsbr.RecoveryPointExpiryTimeInUTC != nil {
375		objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC
376	}
377	if afsbr.ObjectType != "" {
378		objectMap["objectType"] = afsbr.ObjectType
379	}
380	return json.Marshal(objectMap)
381}
382
383// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
384func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
385	return &afsbr, true
386}
387
388// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
389func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
390	return nil, false
391}
392
393// AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
394func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
395	return nil, false
396}
397
398// AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
399func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) {
400	return nil, false
401}
402
403// AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest.
404func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) {
405	return &afsbr, true
406}
407
408// AzureFileShareProtectableItem protectable item for Azure Fileshare workloads.
409type AzureFileShareProtectableItem struct {
410	// ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID.
411	ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"`
412	// ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs.
413	ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"`
414	// AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'AzureFileShareTypeInvalid', 'AzureFileShareTypeXSMB', 'AzureFileShareTypeXSync'
415	AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"`
416	// BackupManagementType - Type of backup management to backup an item.
417	BackupManagementType *string `json:"backupManagementType,omitempty"`
418	// WorkloadType - Type of workload for the backup management
419	WorkloadType *string `json:"workloadType,omitempty"`
420	// FriendlyName - Friendly name of the backup item.
421	FriendlyName *string `json:"friendlyName,omitempty"`
422	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
423	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
424	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
425	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
426}
427
428// MarshalJSON is the custom marshaler for AzureFileShareProtectableItem.
429func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) {
430	afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare
431	objectMap := make(map[string]interface{})
432	if afspi.ParentContainerFabricID != nil {
433		objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID
434	}
435	if afspi.ParentContainerFriendlyName != nil {
436		objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName
437	}
438	if afspi.AzureFileShareType != "" {
439		objectMap["azureFileShareType"] = afspi.AzureFileShareType
440	}
441	if afspi.BackupManagementType != nil {
442		objectMap["backupManagementType"] = afspi.BackupManagementType
443	}
444	if afspi.WorkloadType != nil {
445		objectMap["workloadType"] = afspi.WorkloadType
446	}
447	if afspi.FriendlyName != nil {
448		objectMap["friendlyName"] = afspi.FriendlyName
449	}
450	if afspi.ProtectionState != "" {
451		objectMap["protectionState"] = afspi.ProtectionState
452	}
453	if afspi.ProtectableItemType != "" {
454		objectMap["protectableItemType"] = afspi.ProtectableItemType
455	}
456	return json.Marshal(objectMap)
457}
458
459// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
460func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
461	return &afspi, true
462}
463
464// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
465func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
466	return nil, false
467}
468
469// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
470func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
471	return nil, false
472}
473
474// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
475func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
476	return nil, false
477}
478
479// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
480func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
481	return nil, false
482}
483
484// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
485func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
486	return nil, false
487}
488
489// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
490func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
491	return nil, false
492}
493
494// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
495func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
496	return nil, false
497}
498
499// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
500func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
501	return nil, false
502}
503
504// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
505func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
506	return nil, false
507}
508
509// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
510func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
511	return nil, false
512}
513
514// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
515func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
516	return nil, false
517}
518
519// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
520func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
521	return nil, false
522}
523
524// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
525func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
526	return nil, false
527}
528
529// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem.
530func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
531	return &afspi, true
532}
533
534// AzureFileshareProtectedItem azure File Share workload-specific backup item.
535type AzureFileshareProtectedItem struct {
536	// FriendlyName - Friendly name of the fileshare represented by this backup item.
537	FriendlyName *string `json:"friendlyName,omitempty"`
538	// ProtectionStatus - Backup status of this backup item.
539	ProtectionStatus *string `json:"protectionStatus,omitempty"`
540	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
541	ProtectionState ProtectionState `json:"protectionState,omitempty"`
542	// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy.
543	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
544	// LastBackupTime - Timestamp of the last backup operation on this backup item.
545	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
546	// KpisHealths - Health details of different KPIs
547	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
548	// ExtendedInfo - Additional information with this backup item.
549	ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
550	// HealthStatus - backups running status for this backup item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid'
551	HealthStatus HealthStatus `json:"healthStatus,omitempty"`
552	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
553	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
554	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
555	WorkloadType DataSourceType `json:"workloadType,omitempty"`
556	// ContainerName - Unique name of container
557	ContainerName *string `json:"containerName,omitempty"`
558	// SourceResourceID - ARM ID of the resource to be backed up.
559	SourceResourceID *string `json:"sourceResourceId,omitempty"`
560	// PolicyID - ID of the backup policy with which this item is backed up.
561	PolicyID *string `json:"policyId,omitempty"`
562	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
563	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
564	// BackupSetName - Name of the backup set the backup item belongs to
565	BackupSetName *string `json:"backupSetName,omitempty"`
566	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
567	CreateMode CreateMode `json:"createMode,omitempty"`
568	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
569	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
570	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
571	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
572	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
573	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
574	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
575	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
576	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
577	IsRehydrate *bool `json:"isRehydrate,omitempty"`
578	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
579	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
580}
581
582// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem.
583func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) {
584	afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem
585	objectMap := make(map[string]interface{})
586	if afpi.FriendlyName != nil {
587		objectMap["friendlyName"] = afpi.FriendlyName
588	}
589	if afpi.ProtectionStatus != nil {
590		objectMap["protectionStatus"] = afpi.ProtectionStatus
591	}
592	if afpi.ProtectionState != "" {
593		objectMap["protectionState"] = afpi.ProtectionState
594	}
595	if afpi.LastBackupStatus != nil {
596		objectMap["lastBackupStatus"] = afpi.LastBackupStatus
597	}
598	if afpi.LastBackupTime != nil {
599		objectMap["lastBackupTime"] = afpi.LastBackupTime
600	}
601	if afpi.KpisHealths != nil {
602		objectMap["kpisHealths"] = afpi.KpisHealths
603	}
604	if afpi.ExtendedInfo != nil {
605		objectMap["extendedInfo"] = afpi.ExtendedInfo
606	}
607	if afpi.HealthStatus != "" {
608		objectMap["healthStatus"] = afpi.HealthStatus
609	}
610	if afpi.BackupManagementType != "" {
611		objectMap["backupManagementType"] = afpi.BackupManagementType
612	}
613	if afpi.WorkloadType != "" {
614		objectMap["workloadType"] = afpi.WorkloadType
615	}
616	if afpi.ContainerName != nil {
617		objectMap["containerName"] = afpi.ContainerName
618	}
619	if afpi.SourceResourceID != nil {
620		objectMap["sourceResourceId"] = afpi.SourceResourceID
621	}
622	if afpi.PolicyID != nil {
623		objectMap["policyId"] = afpi.PolicyID
624	}
625	if afpi.LastRecoveryPoint != nil {
626		objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint
627	}
628	if afpi.BackupSetName != nil {
629		objectMap["backupSetName"] = afpi.BackupSetName
630	}
631	if afpi.CreateMode != "" {
632		objectMap["createMode"] = afpi.CreateMode
633	}
634	if afpi.DeferredDeleteTimeInUTC != nil {
635		objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC
636	}
637	if afpi.IsScheduledForDeferredDelete != nil {
638		objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete
639	}
640	if afpi.DeferredDeleteTimeRemaining != nil {
641		objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining
642	}
643	if afpi.IsDeferredDeleteScheduleUpcoming != nil {
644		objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming
645	}
646	if afpi.IsRehydrate != nil {
647		objectMap["isRehydrate"] = afpi.IsRehydrate
648	}
649	if afpi.ProtectedItemType != "" {
650		objectMap["protectedItemType"] = afpi.ProtectedItemType
651	}
652	return json.Marshal(objectMap)
653}
654
655// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
656func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
657	return &afpi, true
658}
659
660// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
661func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
662	return nil, false
663}
664
665// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
666func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
667	return nil, false
668}
669
670// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
671func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
672	return nil, false
673}
674
675// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
676func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
677	return nil, false
678}
679
680// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
681func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
682	return nil, false
683}
684
685// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
686func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
687	return nil, false
688}
689
690// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
691func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
692	return nil, false
693}
694
695// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
696func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
697	return nil, false
698}
699
700// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
701func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
702	return nil, false
703}
704
705// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
706func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
707	return nil, false
708}
709
710// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
711func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
712	return nil, false
713}
714
715// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
716func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
717	return nil, false
718}
719
720// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
721func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
722	return nil, false
723}
724
725// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
726func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
727	return nil, false
728}
729
730// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem.
731func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
732	return &afpi, true
733}
734
735// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item.
736type AzureFileshareProtectedItemExtendedInfo struct {
737	// OldestRecoveryPoint - The oldest backup copy available for this item in the service.
738	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
739	// RecoveryPointCount - Number of available backup copies associated with this backup item.
740	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
741	// PolicyState - Indicates consistency of policy object and policy applied to this backup item.
742	PolicyState *string `json:"policyState,omitempty"`
743	// ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}
744	ResourceState *string `json:"resourceState,omitempty"`
745	// ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item.
746	ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"`
747}
748
749// MarshalJSON is the custom marshaler for AzureFileshareProtectedItemExtendedInfo.
750func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
751	objectMap := make(map[string]interface{})
752	if afpiei.OldestRecoveryPoint != nil {
753		objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint
754	}
755	if afpiei.RecoveryPointCount != nil {
756		objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount
757	}
758	if afpiei.PolicyState != nil {
759		objectMap["policyState"] = afpiei.PolicyState
760	}
761	return json.Marshal(objectMap)
762}
763
764// AzureFileShareProtectionPolicy azureStorage backup policy.
765type AzureFileShareProtectionPolicy struct {
766	// WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
767	WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
768	// SchedulePolicy - Backup schedule specified as part of backup policy.
769	SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
770	// RetentionPolicy - Retention policy with the details on backup copy retention ranges.
771	RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
772	// TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
773	TimeZone *string `json:"timeZone,omitempty"`
774	// ProtectedItemsCount - Number of items associated with this policy.
775	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
776	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
777	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
778}
779
780// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy.
781func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) {
782	afspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage
783	objectMap := make(map[string]interface{})
784	if afspp.WorkLoadType != "" {
785		objectMap["workLoadType"] = afspp.WorkLoadType
786	}
787	objectMap["schedulePolicy"] = afspp.SchedulePolicy
788	objectMap["retentionPolicy"] = afspp.RetentionPolicy
789	if afspp.TimeZone != nil {
790		objectMap["timeZone"] = afspp.TimeZone
791	}
792	if afspp.ProtectedItemsCount != nil {
793		objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount
794	}
795	if afspp.BackupManagementType != "" {
796		objectMap["backupManagementType"] = afspp.BackupManagementType
797	}
798	return json.Marshal(objectMap)
799}
800
801// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
802func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
803	return nil, false
804}
805
806// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
807func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
808	return &afspp, true
809}
810
811// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
812func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
813	return nil, false
814}
815
816// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
817func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
818	return nil, false
819}
820
821// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
822func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
823	return nil, false
824}
825
826// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
827func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
828	return nil, false
829}
830
831// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
832func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
833	return nil, false
834}
835
836// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy.
837func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
838	return &afspp, true
839}
840
841// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct.
842func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error {
843	var m map[string]*json.RawMessage
844	err := json.Unmarshal(body, &m)
845	if err != nil {
846		return err
847	}
848	for k, v := range m {
849		switch k {
850		case "workLoadType":
851			if v != nil {
852				var workLoadType WorkloadType
853				err = json.Unmarshal(*v, &workLoadType)
854				if err != nil {
855					return err
856				}
857				afspp.WorkLoadType = workLoadType
858			}
859		case "schedulePolicy":
860			if v != nil {
861				schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
862				if err != nil {
863					return err
864				}
865				afspp.SchedulePolicy = schedulePolicy
866			}
867		case "retentionPolicy":
868			if v != nil {
869				retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
870				if err != nil {
871					return err
872				}
873				afspp.RetentionPolicy = retentionPolicy
874			}
875		case "timeZone":
876			if v != nil {
877				var timeZone string
878				err = json.Unmarshal(*v, &timeZone)
879				if err != nil {
880					return err
881				}
882				afspp.TimeZone = &timeZone
883			}
884		case "protectedItemsCount":
885			if v != nil {
886				var protectedItemsCount int32
887				err = json.Unmarshal(*v, &protectedItemsCount)
888				if err != nil {
889					return err
890				}
891				afspp.ProtectedItemsCount = &protectedItemsCount
892			}
893		case "backupManagementType":
894			if v != nil {
895				var backupManagementType ManagementTypeBasicProtectionPolicy
896				err = json.Unmarshal(*v, &backupManagementType)
897				if err != nil {
898					return err
899				}
900				afspp.BackupManagementType = backupManagementType
901			}
902		}
903	}
904
905	return nil
906}
907
908// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure
909// file share.
910type AzureFileShareProvisionILRRequest struct {
911	// RecoveryPointID - Recovery point ID.
912	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
913	// SourceResourceID - Source Storage account ARM Id
914	SourceResourceID *string `json:"sourceResourceId,omitempty"`
915	// ObjectType - Possible values include: 'ObjectTypeBasicILRRequestObjectTypeILRRequest', 'ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest'
916	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
917}
918
919// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest.
920func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
921	afspir.ObjectType = ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest
922	objectMap := make(map[string]interface{})
923	if afspir.RecoveryPointID != nil {
924		objectMap["recoveryPointId"] = afspir.RecoveryPointID
925	}
926	if afspir.SourceResourceID != nil {
927		objectMap["sourceResourceId"] = afspir.SourceResourceID
928	}
929	if afspir.ObjectType != "" {
930		objectMap["objectType"] = afspir.ObjectType
931	}
932	return json.Marshal(objectMap)
933}
934
935// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
936func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
937	return &afspir, true
938}
939
940// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
941func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
942	return nil, false
943}
944
945// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
946func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
947	return nil, false
948}
949
950// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest.
951func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
952	return &afspir, true
953}
954
955// AzureFileShareRecoveryPoint azure File Share workload specific backup copy.
956type AzureFileShareRecoveryPoint struct {
957	// RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent.
958	RecoveryPointType *string `json:"recoveryPointType,omitempty"`
959	// RecoveryPointTime - READ-ONLY; Time at which this backup copy was created.
960	RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
961	// FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable
962	FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"`
963	// RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size
964	RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"`
965	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
966	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
967}
968
969// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint.
970func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) {
971	afsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint
972	objectMap := make(map[string]interface{})
973	if afsrp.ObjectType != "" {
974		objectMap["objectType"] = afsrp.ObjectType
975	}
976	return json.Marshal(objectMap)
977}
978
979// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
980func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
981	return &afsrp, true
982}
983
984// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
985func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
986	return nil, false
987}
988
989// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
990func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
991	return nil, false
992}
993
994// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
995func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
996	return nil, false
997}
998
999// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1000func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
1001	return nil, false
1002}
1003
1004// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1005func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
1006	return nil, false
1007}
1008
1009// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1010func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
1011	return nil, false
1012}
1013
1014// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1015func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
1016	return nil, false
1017}
1018
1019// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1020func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
1021	return nil, false
1022}
1023
1024// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1025func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
1026	return nil, false
1027}
1028
1029// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1030func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
1031	return nil, false
1032}
1033
1034// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1035func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
1036	return nil, false
1037}
1038
1039// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1040func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
1041	return nil, false
1042}
1043
1044// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint.
1045func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
1046	return &afsrp, true
1047}
1048
1049// AzureFileShareRestoreRequest azureFileShare Restore Request
1050type AzureFileShareRestoreRequest struct {
1051	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
1052	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
1053	// SourceResourceID - Source storage account ARM Id
1054	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1055	// CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict'
1056	CopyOptions CopyOptions `json:"copyOptions,omitempty"`
1057	// RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore'
1058	RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"`
1059	// RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details
1060	RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"`
1061	// TargetDetails - Target File Share Details
1062	TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"`
1063	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
1064	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
1065}
1066
1067// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest.
1068func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) {
1069	afsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest
1070	objectMap := make(map[string]interface{})
1071	if afsrr.RecoveryType != "" {
1072		objectMap["recoveryType"] = afsrr.RecoveryType
1073	}
1074	if afsrr.SourceResourceID != nil {
1075		objectMap["sourceResourceId"] = afsrr.SourceResourceID
1076	}
1077	if afsrr.CopyOptions != "" {
1078		objectMap["copyOptions"] = afsrr.CopyOptions
1079	}
1080	if afsrr.RestoreRequestType != "" {
1081		objectMap["restoreRequestType"] = afsrr.RestoreRequestType
1082	}
1083	if afsrr.RestoreFileSpecs != nil {
1084		objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs
1085	}
1086	if afsrr.TargetDetails != nil {
1087		objectMap["targetDetails"] = afsrr.TargetDetails
1088	}
1089	if afsrr.ObjectType != "" {
1090		objectMap["objectType"] = afsrr.ObjectType
1091	}
1092	return json.Marshal(objectMap)
1093}
1094
1095// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1096func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
1097	return &afsrr, true
1098}
1099
1100// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1101func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
1102	return nil, false
1103}
1104
1105// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1106func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
1107	return nil, false
1108}
1109
1110// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1111func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
1112	return nil, false
1113}
1114
1115// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1116func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1117	return nil, false
1118}
1119
1120// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1121func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1122	return nil, false
1123}
1124
1125// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1126func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
1127	return nil, false
1128}
1129
1130// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1131func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
1132	return nil, false
1133}
1134
1135// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1136func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1137	return nil, false
1138}
1139
1140// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1141func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1142	return nil, false
1143}
1144
1145// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1146func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
1147	return nil, false
1148}
1149
1150// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1151func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
1152	return nil, false
1153}
1154
1155// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1156func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
1157	return nil, false
1158}
1159
1160// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1161func (afsrr AzureFileShareRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
1162	return nil, false
1163}
1164
1165// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1166func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
1167	return nil, false
1168}
1169
1170// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1171func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
1172	return nil, false
1173}
1174
1175// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1176func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
1177	return nil, false
1178}
1179
1180// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1181func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
1182	return nil, false
1183}
1184
1185// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1186func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
1187	return nil, false
1188}
1189
1190// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1191func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
1192	return nil, false
1193}
1194
1195// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest.
1196func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
1197	return &afsrr, true
1198}
1199
1200// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual
1201// machine.
1202type AzureIaaSClassicComputeVMContainer struct {
1203	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
1204	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1205	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
1206	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1207	// ResourceGroup - Resource group name of Recovery Services Vault.
1208	ResourceGroup *string `json:"resourceGroup,omitempty"`
1209	// FriendlyName - Friendly name of the container.
1210	FriendlyName *string `json:"friendlyName,omitempty"`
1211	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
1212	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1213	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
1214	RegistrationStatus *string `json:"registrationStatus,omitempty"`
1215	// HealthStatus - Status of health of the container.
1216	HealthStatus *string `json:"healthStatus,omitempty"`
1217	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
1218	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1219}
1220
1221// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer.
1222func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
1223	aisccvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines
1224	objectMap := make(map[string]interface{})
1225	if aisccvc.VirtualMachineID != nil {
1226		objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
1227	}
1228	if aisccvc.VirtualMachineVersion != nil {
1229		objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
1230	}
1231	if aisccvc.ResourceGroup != nil {
1232		objectMap["resourceGroup"] = aisccvc.ResourceGroup
1233	}
1234	if aisccvc.FriendlyName != nil {
1235		objectMap["friendlyName"] = aisccvc.FriendlyName
1236	}
1237	if aisccvc.BackupManagementType != "" {
1238		objectMap["backupManagementType"] = aisccvc.BackupManagementType
1239	}
1240	if aisccvc.RegistrationStatus != nil {
1241		objectMap["registrationStatus"] = aisccvc.RegistrationStatus
1242	}
1243	if aisccvc.HealthStatus != nil {
1244		objectMap["healthStatus"] = aisccvc.HealthStatus
1245	}
1246	if aisccvc.ContainerType != "" {
1247		objectMap["containerType"] = aisccvc.ContainerType
1248	}
1249	return json.Marshal(objectMap)
1250}
1251
1252// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1253func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1254	return nil, false
1255}
1256
1257// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1258func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1259	return &aisccvc, true
1260}
1261
1262// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1263func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1264	return nil, false
1265}
1266
1267// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1268func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1269	return nil, false
1270}
1271
1272// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1273func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1274	return nil, false
1275}
1276
1277// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1278func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1279	return nil, false
1280}
1281
1282// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1283func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1284	return nil, false
1285}
1286
1287// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1288func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1289	return nil, false
1290}
1291
1292// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1293func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1294	return nil, false
1295}
1296
1297// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1298func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1299	return nil, false
1300}
1301
1302// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1303func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1304	return nil, false
1305}
1306
1307// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1308func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1309	return nil, false
1310}
1311
1312// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1313func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1314	return nil, false
1315}
1316
1317// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1318func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1319	return &aisccvc, true
1320}
1321
1322// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1323func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1324	return nil, false
1325}
1326
1327// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1328func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1329	return nil, false
1330}
1331
1332// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer.
1333func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1334	return &aisccvc, true
1335}
1336
1337// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic
1338// Compute VM.
1339type AzureIaaSClassicComputeVMProtectableItem struct {
1340	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
1341	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1342	// BackupManagementType - Type of backup management to backup an item.
1343	BackupManagementType *string `json:"backupManagementType,omitempty"`
1344	// WorkloadType - Type of workload for the backup management
1345	WorkloadType *string `json:"workloadType,omitempty"`
1346	// FriendlyName - Friendly name of the backup item.
1347	FriendlyName *string `json:"friendlyName,omitempty"`
1348	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
1349	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1350	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
1351	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1352}
1353
1354// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem.
1355func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1356	aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
1357	objectMap := make(map[string]interface{})
1358	if aisccvpi.VirtualMachineID != nil {
1359		objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1360	}
1361	if aisccvpi.BackupManagementType != nil {
1362		objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1363	}
1364	if aisccvpi.WorkloadType != nil {
1365		objectMap["workloadType"] = aisccvpi.WorkloadType
1366	}
1367	if aisccvpi.FriendlyName != nil {
1368		objectMap["friendlyName"] = aisccvpi.FriendlyName
1369	}
1370	if aisccvpi.ProtectionState != "" {
1371		objectMap["protectionState"] = aisccvpi.ProtectionState
1372	}
1373	if aisccvpi.ProtectableItemType != "" {
1374		objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
1375	}
1376	return json.Marshal(objectMap)
1377}
1378
1379// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1380func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1381	return nil, false
1382}
1383
1384// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1385func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1386	return &aisccvpi, true
1387}
1388
1389// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1390func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1391	return nil, false
1392}
1393
1394// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1395func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1396	return nil, false
1397}
1398
1399// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1400func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1401	return nil, false
1402}
1403
1404// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1405func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1406	return nil, false
1407}
1408
1409// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1410func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1411	return nil, false
1412}
1413
1414// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1415func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1416	return nil, false
1417}
1418
1419// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1420func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1421	return nil, false
1422}
1423
1424// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1425func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1426	return nil, false
1427}
1428
1429// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1430func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1431	return nil, false
1432}
1433
1434// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1435func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1436	return nil, false
1437}
1438
1439// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1440func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1441	return &aisccvpi, true
1442}
1443
1444// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1445func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1446	return nil, false
1447}
1448
1449// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem.
1450func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1451	return &aisccvpi, true
1452}
1453
1454// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic
1455// Compute VM.
1456type AzureIaaSClassicComputeVMProtectedItem struct {
1457	// FriendlyName - Friendly name of the VM represented by this backup item.
1458	FriendlyName *string `json:"friendlyName,omitempty"`
1459	// VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item.
1460	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1461	// ProtectionStatus - Backup status of this backup item.
1462	ProtectionStatus *string `json:"protectionStatus,omitempty"`
1463	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
1464	ProtectionState ProtectionState `json:"protectionState,omitempty"`
1465	// HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid'
1466	HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1467	// HealthDetails - Health details on this backup item.
1468	HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1469	// KpisHealths - Health details of different KPIs
1470	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1471	// LastBackupStatus - Last backup operation status.
1472	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1473	// LastBackupTime - Timestamp of the last backup operation on this backup item.
1474	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1475	// ProtectedItemDataID - Data ID of the protected item.
1476	ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1477	// ExtendedInfo - Additional information for this backup item.
1478	ExtendedInfo       *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1479	ExtendedProperties *ExtendedProperties                   `json:"extendedProperties,omitempty"`
1480	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
1481	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1482	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
1483	WorkloadType DataSourceType `json:"workloadType,omitempty"`
1484	// ContainerName - Unique name of container
1485	ContainerName *string `json:"containerName,omitempty"`
1486	// SourceResourceID - ARM ID of the resource to be backed up.
1487	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1488	// PolicyID - ID of the backup policy with which this item is backed up.
1489	PolicyID *string `json:"policyId,omitempty"`
1490	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
1491	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1492	// BackupSetName - Name of the backup set the backup item belongs to
1493	BackupSetName *string `json:"backupSetName,omitempty"`
1494	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
1495	CreateMode CreateMode `json:"createMode,omitempty"`
1496	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
1497	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1498	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
1499	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1500	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
1501	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1502	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
1503	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1504	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
1505	IsRehydrate *bool `json:"isRehydrate,omitempty"`
1506	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
1507	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1508}
1509
1510// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem.
1511func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1512	aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1513	objectMap := make(map[string]interface{})
1514	if aisccvpi.FriendlyName != nil {
1515		objectMap["friendlyName"] = aisccvpi.FriendlyName
1516	}
1517	if aisccvpi.VirtualMachineID != nil {
1518		objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1519	}
1520	if aisccvpi.ProtectionStatus != nil {
1521		objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1522	}
1523	if aisccvpi.ProtectionState != "" {
1524		objectMap["protectionState"] = aisccvpi.ProtectionState
1525	}
1526	if aisccvpi.HealthStatus != "" {
1527		objectMap["healthStatus"] = aisccvpi.HealthStatus
1528	}
1529	if aisccvpi.HealthDetails != nil {
1530		objectMap["healthDetails"] = aisccvpi.HealthDetails
1531	}
1532	if aisccvpi.KpisHealths != nil {
1533		objectMap["kpisHealths"] = aisccvpi.KpisHealths
1534	}
1535	if aisccvpi.LastBackupStatus != nil {
1536		objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1537	}
1538	if aisccvpi.LastBackupTime != nil {
1539		objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1540	}
1541	if aisccvpi.ProtectedItemDataID != nil {
1542		objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1543	}
1544	if aisccvpi.ExtendedInfo != nil {
1545		objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1546	}
1547	if aisccvpi.ExtendedProperties != nil {
1548		objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1549	}
1550	if aisccvpi.BackupManagementType != "" {
1551		objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1552	}
1553	if aisccvpi.WorkloadType != "" {
1554		objectMap["workloadType"] = aisccvpi.WorkloadType
1555	}
1556	if aisccvpi.ContainerName != nil {
1557		objectMap["containerName"] = aisccvpi.ContainerName
1558	}
1559	if aisccvpi.SourceResourceID != nil {
1560		objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1561	}
1562	if aisccvpi.PolicyID != nil {
1563		objectMap["policyId"] = aisccvpi.PolicyID
1564	}
1565	if aisccvpi.LastRecoveryPoint != nil {
1566		objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1567	}
1568	if aisccvpi.BackupSetName != nil {
1569		objectMap["backupSetName"] = aisccvpi.BackupSetName
1570	}
1571	if aisccvpi.CreateMode != "" {
1572		objectMap["createMode"] = aisccvpi.CreateMode
1573	}
1574	if aisccvpi.DeferredDeleteTimeInUTC != nil {
1575		objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1576	}
1577	if aisccvpi.IsScheduledForDeferredDelete != nil {
1578		objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1579	}
1580	if aisccvpi.DeferredDeleteTimeRemaining != nil {
1581		objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1582	}
1583	if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1584		objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1585	}
1586	if aisccvpi.IsRehydrate != nil {
1587		objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1588	}
1589	if aisccvpi.ProtectedItemType != "" {
1590		objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1591	}
1592	return json.Marshal(objectMap)
1593}
1594
1595// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1596func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1597	return nil, false
1598}
1599
1600// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1601func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1602	return &aisccvpi, true
1603}
1604
1605// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1606func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1607	return nil, false
1608}
1609
1610// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1611func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1612	return nil, false
1613}
1614
1615// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1616func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1617	return &aisccvpi, true
1618}
1619
1620// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1621func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1622	return nil, false
1623}
1624
1625// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1626func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1627	return nil, false
1628}
1629
1630// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1631func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1632	return nil, false
1633}
1634
1635// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1636func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1637	return nil, false
1638}
1639
1640// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1641func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1642	return nil, false
1643}
1644
1645// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1646func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1647	return nil, false
1648}
1649
1650// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1651func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1652	return nil, false
1653}
1654
1655// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1656func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1657	return nil, false
1658}
1659
1660// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1661func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1662	return nil, false
1663}
1664
1665// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1666func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1667	return nil, false
1668}
1669
1670// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem.
1671func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1672	return &aisccvpi, true
1673}
1674
1675// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager
1676// virtual machine.
1677type AzureIaaSComputeVMContainer struct {
1678	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
1679	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1680	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
1681	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1682	// ResourceGroup - Resource group name of Recovery Services Vault.
1683	ResourceGroup *string `json:"resourceGroup,omitempty"`
1684	// FriendlyName - Friendly name of the container.
1685	FriendlyName *string `json:"friendlyName,omitempty"`
1686	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
1687	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1688	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
1689	RegistrationStatus *string `json:"registrationStatus,omitempty"`
1690	// HealthStatus - Status of health of the container.
1691	HealthStatus *string `json:"healthStatus,omitempty"`
1692	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
1693	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1694}
1695
1696// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer.
1697func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1698	aiscvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines
1699	objectMap := make(map[string]interface{})
1700	if aiscvc.VirtualMachineID != nil {
1701		objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1702	}
1703	if aiscvc.VirtualMachineVersion != nil {
1704		objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1705	}
1706	if aiscvc.ResourceGroup != nil {
1707		objectMap["resourceGroup"] = aiscvc.ResourceGroup
1708	}
1709	if aiscvc.FriendlyName != nil {
1710		objectMap["friendlyName"] = aiscvc.FriendlyName
1711	}
1712	if aiscvc.BackupManagementType != "" {
1713		objectMap["backupManagementType"] = aiscvc.BackupManagementType
1714	}
1715	if aiscvc.RegistrationStatus != nil {
1716		objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1717	}
1718	if aiscvc.HealthStatus != nil {
1719		objectMap["healthStatus"] = aiscvc.HealthStatus
1720	}
1721	if aiscvc.ContainerType != "" {
1722		objectMap["containerType"] = aiscvc.ContainerType
1723	}
1724	return json.Marshal(objectMap)
1725}
1726
1727// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1728func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1729	return nil, false
1730}
1731
1732// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1733func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1734	return nil, false
1735}
1736
1737// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1738func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1739	return &aiscvc, true
1740}
1741
1742// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1743func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1744	return nil, false
1745}
1746
1747// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1748func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1749	return nil, false
1750}
1751
1752// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1753func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1754	return nil, false
1755}
1756
1757// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1758func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1759	return nil, false
1760}
1761
1762// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1763func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1764	return nil, false
1765}
1766
1767// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1768func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1769	return nil, false
1770}
1771
1772// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1773func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1774	return nil, false
1775}
1776
1777// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1778func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1779	return nil, false
1780}
1781
1782// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1783func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1784	return nil, false
1785}
1786
1787// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1788func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1789	return nil, false
1790}
1791
1792// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1793func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1794	return &aiscvc, true
1795}
1796
1797// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1798func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1799	return nil, false
1800}
1801
1802// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1803func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1804	return nil, false
1805}
1806
1807// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer.
1808func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1809	return &aiscvc, true
1810}
1811
1812// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource
1813// Manager VM.
1814type AzureIaaSComputeVMProtectableItem struct {
1815	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
1816	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1817	// BackupManagementType - Type of backup management to backup an item.
1818	BackupManagementType *string `json:"backupManagementType,omitempty"`
1819	// WorkloadType - Type of workload for the backup management
1820	WorkloadType *string `json:"workloadType,omitempty"`
1821	// FriendlyName - Friendly name of the backup item.
1822	FriendlyName *string `json:"friendlyName,omitempty"`
1823	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
1824	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1825	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
1826	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1827}
1828
1829// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem.
1830func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1831	aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1832	objectMap := make(map[string]interface{})
1833	if aiscvpi.VirtualMachineID != nil {
1834		objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1835	}
1836	if aiscvpi.BackupManagementType != nil {
1837		objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1838	}
1839	if aiscvpi.WorkloadType != nil {
1840		objectMap["workloadType"] = aiscvpi.WorkloadType
1841	}
1842	if aiscvpi.FriendlyName != nil {
1843		objectMap["friendlyName"] = aiscvpi.FriendlyName
1844	}
1845	if aiscvpi.ProtectionState != "" {
1846		objectMap["protectionState"] = aiscvpi.ProtectionState
1847	}
1848	if aiscvpi.ProtectableItemType != "" {
1849		objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1850	}
1851	return json.Marshal(objectMap)
1852}
1853
1854// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1855func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1856	return nil, false
1857}
1858
1859// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1860func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1861	return nil, false
1862}
1863
1864// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1865func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1866	return &aiscvpi, true
1867}
1868
1869// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1870func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1871	return nil, false
1872}
1873
1874// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1875func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1876	return nil, false
1877}
1878
1879// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1880func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1881	return nil, false
1882}
1883
1884// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1885func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1886	return nil, false
1887}
1888
1889// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1890func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1891	return nil, false
1892}
1893
1894// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1895func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1896	return nil, false
1897}
1898
1899// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1900func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1901	return nil, false
1902}
1903
1904// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1905func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1906	return nil, false
1907}
1908
1909// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1910func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1911	return nil, false
1912}
1913
1914// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1915func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1916	return &aiscvpi, true
1917}
1918
1919// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1920func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1921	return nil, false
1922}
1923
1924// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem.
1925func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1926	return &aiscvpi, true
1927}
1928
1929// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource
1930// Manager VM.
1931type AzureIaaSComputeVMProtectedItem struct {
1932	// FriendlyName - Friendly name of the VM represented by this backup item.
1933	FriendlyName *string `json:"friendlyName,omitempty"`
1934	// VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item.
1935	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1936	// ProtectionStatus - Backup status of this backup item.
1937	ProtectionStatus *string `json:"protectionStatus,omitempty"`
1938	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
1939	ProtectionState ProtectionState `json:"protectionState,omitempty"`
1940	// HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid'
1941	HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1942	// HealthDetails - Health details on this backup item.
1943	HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1944	// KpisHealths - Health details of different KPIs
1945	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1946	// LastBackupStatus - Last backup operation status.
1947	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1948	// LastBackupTime - Timestamp of the last backup operation on this backup item.
1949	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1950	// ProtectedItemDataID - Data ID of the protected item.
1951	ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1952	// ExtendedInfo - Additional information for this backup item.
1953	ExtendedInfo       *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1954	ExtendedProperties *ExtendedProperties                   `json:"extendedProperties,omitempty"`
1955	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
1956	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1957	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
1958	WorkloadType DataSourceType `json:"workloadType,omitempty"`
1959	// ContainerName - Unique name of container
1960	ContainerName *string `json:"containerName,omitempty"`
1961	// SourceResourceID - ARM ID of the resource to be backed up.
1962	SourceResourceID *string `json:"sourceResourceId,omitempty"`
1963	// PolicyID - ID of the backup policy with which this item is backed up.
1964	PolicyID *string `json:"policyId,omitempty"`
1965	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
1966	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1967	// BackupSetName - Name of the backup set the backup item belongs to
1968	BackupSetName *string `json:"backupSetName,omitempty"`
1969	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
1970	CreateMode CreateMode `json:"createMode,omitempty"`
1971	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
1972	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1973	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
1974	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1975	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
1976	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1977	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
1978	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1979	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
1980	IsRehydrate *bool `json:"isRehydrate,omitempty"`
1981	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
1982	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1983}
1984
1985// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem.
1986func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1987	aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
1988	objectMap := make(map[string]interface{})
1989	if aiscvpi.FriendlyName != nil {
1990		objectMap["friendlyName"] = aiscvpi.FriendlyName
1991	}
1992	if aiscvpi.VirtualMachineID != nil {
1993		objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1994	}
1995	if aiscvpi.ProtectionStatus != nil {
1996		objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
1997	}
1998	if aiscvpi.ProtectionState != "" {
1999		objectMap["protectionState"] = aiscvpi.ProtectionState
2000	}
2001	if aiscvpi.HealthStatus != "" {
2002		objectMap["healthStatus"] = aiscvpi.HealthStatus
2003	}
2004	if aiscvpi.HealthDetails != nil {
2005		objectMap["healthDetails"] = aiscvpi.HealthDetails
2006	}
2007	if aiscvpi.KpisHealths != nil {
2008		objectMap["kpisHealths"] = aiscvpi.KpisHealths
2009	}
2010	if aiscvpi.LastBackupStatus != nil {
2011		objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
2012	}
2013	if aiscvpi.LastBackupTime != nil {
2014		objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
2015	}
2016	if aiscvpi.ProtectedItemDataID != nil {
2017		objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
2018	}
2019	if aiscvpi.ExtendedInfo != nil {
2020		objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
2021	}
2022	if aiscvpi.ExtendedProperties != nil {
2023		objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
2024	}
2025	if aiscvpi.BackupManagementType != "" {
2026		objectMap["backupManagementType"] = aiscvpi.BackupManagementType
2027	}
2028	if aiscvpi.WorkloadType != "" {
2029		objectMap["workloadType"] = aiscvpi.WorkloadType
2030	}
2031	if aiscvpi.ContainerName != nil {
2032		objectMap["containerName"] = aiscvpi.ContainerName
2033	}
2034	if aiscvpi.SourceResourceID != nil {
2035		objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
2036	}
2037	if aiscvpi.PolicyID != nil {
2038		objectMap["policyId"] = aiscvpi.PolicyID
2039	}
2040	if aiscvpi.LastRecoveryPoint != nil {
2041		objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
2042	}
2043	if aiscvpi.BackupSetName != nil {
2044		objectMap["backupSetName"] = aiscvpi.BackupSetName
2045	}
2046	if aiscvpi.CreateMode != "" {
2047		objectMap["createMode"] = aiscvpi.CreateMode
2048	}
2049	if aiscvpi.DeferredDeleteTimeInUTC != nil {
2050		objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
2051	}
2052	if aiscvpi.IsScheduledForDeferredDelete != nil {
2053		objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
2054	}
2055	if aiscvpi.DeferredDeleteTimeRemaining != nil {
2056		objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
2057	}
2058	if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
2059		objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
2060	}
2061	if aiscvpi.IsRehydrate != nil {
2062		objectMap["isRehydrate"] = aiscvpi.IsRehydrate
2063	}
2064	if aiscvpi.ProtectedItemType != "" {
2065		objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
2066	}
2067	return json.Marshal(objectMap)
2068}
2069
2070// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2071func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2072	return nil, false
2073}
2074
2075// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2076func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2077	return nil, false
2078}
2079
2080// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2081func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2082	return &aiscvpi, true
2083}
2084
2085// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2086func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2087	return nil, false
2088}
2089
2090// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2091func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2092	return &aiscvpi, true
2093}
2094
2095// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2096func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2097	return nil, false
2098}
2099
2100// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2101func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2102	return nil, false
2103}
2104
2105// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2106func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2107	return nil, false
2108}
2109
2110// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2111func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2112	return nil, false
2113}
2114
2115// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2116func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2117	return nil, false
2118}
2119
2120// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2121func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2122	return nil, false
2123}
2124
2125// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2126func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2127	return nil, false
2128}
2129
2130// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2131func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2132	return nil, false
2133}
2134
2135// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2136func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2137	return nil, false
2138}
2139
2140// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2141func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2142	return nil, false
2143}
2144
2145// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem.
2146func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2147	return &aiscvpi, true
2148}
2149
2150// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information.
2151type AzureIaaSVMErrorInfo struct {
2152	// ErrorCode - READ-ONLY; Error code.
2153	ErrorCode *int32 `json:"errorCode,omitempty"`
2154	// ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to.
2155	ErrorTitle *string `json:"errorTitle,omitempty"`
2156	// ErrorString - READ-ONLY; Localized error string.
2157	ErrorString *string `json:"errorString,omitempty"`
2158	// Recommendations - READ-ONLY; List of localized recommendations for above error code.
2159	Recommendations *[]string `json:"recommendations,omitempty"`
2160}
2161
2162// MarshalJSON is the custom marshaler for AzureIaaSVMErrorInfo.
2163func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2164	objectMap := make(map[string]interface{})
2165	return json.Marshal(objectMap)
2166}
2167
2168// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details.
2169type AzureIaaSVMHealthDetails struct {
2170	// Code - READ-ONLY; Health Code
2171	Code *int32 `json:"code,omitempty"`
2172	// Title - READ-ONLY; Health Title
2173	Title *string `json:"title,omitempty"`
2174	// Message - READ-ONLY; Health Message
2175	Message *string `json:"message,omitempty"`
2176	// Recommendations - READ-ONLY; Health Recommended Actions
2177	Recommendations *[]string `json:"recommendations,omitempty"`
2178}
2179
2180// MarshalJSON is the custom marshaler for AzureIaaSVMHealthDetails.
2181func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2182	objectMap := make(map[string]interface{})
2183	return json.Marshal(objectMap)
2184}
2185
2186// AzureIaaSVMJob azure IaaS VM workload-specific job object.
2187type AzureIaaSVMJob struct {
2188	// Duration - Time elapsed during the execution of this job.
2189	Duration *string `json:"duration,omitempty"`
2190	// ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry.
2191	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2192	// ErrorDetails - Error details on execution of this job.
2193	ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2194	// VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM.
2195	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2196	// ExtendedInfo - Additional information for this job.
2197	ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2198	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
2199	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2200	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
2201	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2202	// Operation - The operation name.
2203	Operation *string `json:"operation,omitempty"`
2204	// Status - Job status.
2205	Status *string `json:"status,omitempty"`
2206	// StartTime - The start time.
2207	StartTime *date.Time `json:"startTime,omitempty"`
2208	// EndTime - The end time.
2209	EndTime *date.Time `json:"endTime,omitempty"`
2210	// ActivityID - ActivityId of job.
2211	ActivityID *string `json:"activityId,omitempty"`
2212	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
2213	JobType JobType `json:"jobType,omitempty"`
2214}
2215
2216// MarshalJSON is the custom marshaler for AzureIaaSVMJob.
2217func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2218	aisj.JobType = JobTypeAzureIaaSVMJob
2219	objectMap := make(map[string]interface{})
2220	if aisj.Duration != nil {
2221		objectMap["duration"] = aisj.Duration
2222	}
2223	if aisj.ActionsInfo != nil {
2224		objectMap["actionsInfo"] = aisj.ActionsInfo
2225	}
2226	if aisj.ErrorDetails != nil {
2227		objectMap["errorDetails"] = aisj.ErrorDetails
2228	}
2229	if aisj.VirtualMachineVersion != nil {
2230		objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2231	}
2232	if aisj.ExtendedInfo != nil {
2233		objectMap["extendedInfo"] = aisj.ExtendedInfo
2234	}
2235	if aisj.EntityFriendlyName != nil {
2236		objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2237	}
2238	if aisj.BackupManagementType != "" {
2239		objectMap["backupManagementType"] = aisj.BackupManagementType
2240	}
2241	if aisj.Operation != nil {
2242		objectMap["operation"] = aisj.Operation
2243	}
2244	if aisj.Status != nil {
2245		objectMap["status"] = aisj.Status
2246	}
2247	if aisj.StartTime != nil {
2248		objectMap["startTime"] = aisj.StartTime
2249	}
2250	if aisj.EndTime != nil {
2251		objectMap["endTime"] = aisj.EndTime
2252	}
2253	if aisj.ActivityID != nil {
2254		objectMap["activityId"] = aisj.ActivityID
2255	}
2256	if aisj.JobType != "" {
2257		objectMap["jobType"] = aisj.JobType
2258	}
2259	return json.Marshal(objectMap)
2260}
2261
2262// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob.
2263func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2264	return &aisj, true
2265}
2266
2267// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob.
2268func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2269	return nil, false
2270}
2271
2272// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob.
2273func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2274	return nil, false
2275}
2276
2277// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob.
2278func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2279	return nil, false
2280}
2281
2282// AsMabJob is the BasicJob implementation for AzureIaaSVMJob.
2283func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2284	return nil, false
2285}
2286
2287// AsVaultJob is the BasicJob implementation for AzureIaaSVMJob.
2288func (aisj AzureIaaSVMJob) AsVaultJob() (*VaultJob, bool) {
2289	return nil, false
2290}
2291
2292// AsJob is the BasicJob implementation for AzureIaaSVMJob.
2293func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2294	return nil, false
2295}
2296
2297// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob.
2298func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2299	return &aisj, true
2300}
2301
2302// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job.
2303type AzureIaaSVMJobExtendedInfo struct {
2304	// TasksList - List of tasks associated with this job.
2305	TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2306	// PropertyBag - Job properties.
2307	PropertyBag map[string]*string `json:"propertyBag"`
2308	// InternalPropertyBag - Job internal properties.
2309	InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2310	// ProgressPercentage - Indicates progress of the job. Null if it has not started or completed.
2311	ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2312	// EstimatedRemainingDuration - Time remaining for execution of this job.
2313	EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2314	// DynamicErrorMessage - Non localized error message on job execution.
2315	DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2316}
2317
2318// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo.
2319func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2320	objectMap := make(map[string]interface{})
2321	if aisjei.TasksList != nil {
2322		objectMap["tasksList"] = aisjei.TasksList
2323	}
2324	if aisjei.PropertyBag != nil {
2325		objectMap["propertyBag"] = aisjei.PropertyBag
2326	}
2327	if aisjei.InternalPropertyBag != nil {
2328		objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2329	}
2330	if aisjei.ProgressPercentage != nil {
2331		objectMap["progressPercentage"] = aisjei.ProgressPercentage
2332	}
2333	if aisjei.EstimatedRemainingDuration != nil {
2334		objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2335	}
2336	if aisjei.DynamicErrorMessage != nil {
2337		objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2338	}
2339	return json.Marshal(objectMap)
2340}
2341
2342// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details.
2343type AzureIaaSVMJobTaskDetails struct {
2344	// TaskID - The task display name.
2345	TaskID *string `json:"taskId,omitempty"`
2346	// StartTime - The start time.
2347	StartTime *date.Time `json:"startTime,omitempty"`
2348	// EndTime - The end time.
2349	EndTime *date.Time `json:"endTime,omitempty"`
2350	// InstanceID - The instanceId.
2351	InstanceID *string `json:"instanceId,omitempty"`
2352	// Duration - Time elapsed for task.
2353	Duration *string `json:"duration,omitempty"`
2354	// Status - The status.
2355	Status *string `json:"status,omitempty"`
2356	// ProgressPercentage - Progress of the task.
2357	ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2358	// TaskExecutionDetails - Details about execution of the task.
2359	// eg: number of bytes transferred etc
2360	TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2361}
2362
2363// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item.
2364type BasicAzureIaaSVMProtectedItem interface {
2365	AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2366	AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2367	AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2368}
2369
2370// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item.
2371type AzureIaaSVMProtectedItem struct {
2372	// FriendlyName - Friendly name of the VM represented by this backup item.
2373	FriendlyName *string `json:"friendlyName,omitempty"`
2374	// VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item.
2375	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2376	// ProtectionStatus - Backup status of this backup item.
2377	ProtectionStatus *string `json:"protectionStatus,omitempty"`
2378	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
2379	ProtectionState ProtectionState `json:"protectionState,omitempty"`
2380	// HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid'
2381	HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2382	// HealthDetails - Health details on this backup item.
2383	HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2384	// KpisHealths - Health details of different KPIs
2385	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
2386	// LastBackupStatus - Last backup operation status.
2387	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2388	// LastBackupTime - Timestamp of the last backup operation on this backup item.
2389	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2390	// ProtectedItemDataID - Data ID of the protected item.
2391	ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2392	// ExtendedInfo - Additional information for this backup item.
2393	ExtendedInfo       *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2394	ExtendedProperties *ExtendedProperties                   `json:"extendedProperties,omitempty"`
2395	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
2396	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2397	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
2398	WorkloadType DataSourceType `json:"workloadType,omitempty"`
2399	// ContainerName - Unique name of container
2400	ContainerName *string `json:"containerName,omitempty"`
2401	// SourceResourceID - ARM ID of the resource to be backed up.
2402	SourceResourceID *string `json:"sourceResourceId,omitempty"`
2403	// PolicyID - ID of the backup policy with which this item is backed up.
2404	PolicyID *string `json:"policyId,omitempty"`
2405	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
2406	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2407	// BackupSetName - Name of the backup set the backup item belongs to
2408	BackupSetName *string `json:"backupSetName,omitempty"`
2409	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
2410	CreateMode CreateMode `json:"createMode,omitempty"`
2411	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
2412	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2413	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
2414	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2415	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
2416	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2417	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
2418	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2419	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
2420	IsRehydrate *bool `json:"isRehydrate,omitempty"`
2421	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
2422	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2423}
2424
2425func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2426	var m map[string]interface{}
2427	err := json.Unmarshal(body, &m)
2428	if err != nil {
2429		return nil, err
2430	}
2431
2432	switch m["protectedItemType"] {
2433	case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2434		var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2435		err := json.Unmarshal(body, &aisccvpi)
2436		return aisccvpi, err
2437	case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2438		var aiscvpi AzureIaaSComputeVMProtectedItem
2439		err := json.Unmarshal(body, &aiscvpi)
2440		return aiscvpi, err
2441	default:
2442		var aispi AzureIaaSVMProtectedItem
2443		err := json.Unmarshal(body, &aispi)
2444		return aispi, err
2445	}
2446}
2447func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2448	var rawMessages []*json.RawMessage
2449	err := json.Unmarshal(body, &rawMessages)
2450	if err != nil {
2451		return nil, err
2452	}
2453
2454	aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2455
2456	for index, rawMessage := range rawMessages {
2457		aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2458		if err != nil {
2459			return nil, err
2460		}
2461		aispiArray[index] = aispi
2462	}
2463	return aispiArray, nil
2464}
2465
2466// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem.
2467func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2468	aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2469	objectMap := make(map[string]interface{})
2470	if aispi.FriendlyName != nil {
2471		objectMap["friendlyName"] = aispi.FriendlyName
2472	}
2473	if aispi.VirtualMachineID != nil {
2474		objectMap["virtualMachineId"] = aispi.VirtualMachineID
2475	}
2476	if aispi.ProtectionStatus != nil {
2477		objectMap["protectionStatus"] = aispi.ProtectionStatus
2478	}
2479	if aispi.ProtectionState != "" {
2480		objectMap["protectionState"] = aispi.ProtectionState
2481	}
2482	if aispi.HealthStatus != "" {
2483		objectMap["healthStatus"] = aispi.HealthStatus
2484	}
2485	if aispi.HealthDetails != nil {
2486		objectMap["healthDetails"] = aispi.HealthDetails
2487	}
2488	if aispi.KpisHealths != nil {
2489		objectMap["kpisHealths"] = aispi.KpisHealths
2490	}
2491	if aispi.LastBackupStatus != nil {
2492		objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2493	}
2494	if aispi.LastBackupTime != nil {
2495		objectMap["lastBackupTime"] = aispi.LastBackupTime
2496	}
2497	if aispi.ProtectedItemDataID != nil {
2498		objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2499	}
2500	if aispi.ExtendedInfo != nil {
2501		objectMap["extendedInfo"] = aispi.ExtendedInfo
2502	}
2503	if aispi.ExtendedProperties != nil {
2504		objectMap["extendedProperties"] = aispi.ExtendedProperties
2505	}
2506	if aispi.BackupManagementType != "" {
2507		objectMap["backupManagementType"] = aispi.BackupManagementType
2508	}
2509	if aispi.WorkloadType != "" {
2510		objectMap["workloadType"] = aispi.WorkloadType
2511	}
2512	if aispi.ContainerName != nil {
2513		objectMap["containerName"] = aispi.ContainerName
2514	}
2515	if aispi.SourceResourceID != nil {
2516		objectMap["sourceResourceId"] = aispi.SourceResourceID
2517	}
2518	if aispi.PolicyID != nil {
2519		objectMap["policyId"] = aispi.PolicyID
2520	}
2521	if aispi.LastRecoveryPoint != nil {
2522		objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2523	}
2524	if aispi.BackupSetName != nil {
2525		objectMap["backupSetName"] = aispi.BackupSetName
2526	}
2527	if aispi.CreateMode != "" {
2528		objectMap["createMode"] = aispi.CreateMode
2529	}
2530	if aispi.DeferredDeleteTimeInUTC != nil {
2531		objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2532	}
2533	if aispi.IsScheduledForDeferredDelete != nil {
2534		objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2535	}
2536	if aispi.DeferredDeleteTimeRemaining != nil {
2537		objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2538	}
2539	if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2540		objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2541	}
2542	if aispi.IsRehydrate != nil {
2543		objectMap["isRehydrate"] = aispi.IsRehydrate
2544	}
2545	if aispi.ProtectedItemType != "" {
2546		objectMap["protectedItemType"] = aispi.ProtectedItemType
2547	}
2548	return json.Marshal(objectMap)
2549}
2550
2551// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2552func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2553	return nil, false
2554}
2555
2556// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2557func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2558	return nil, false
2559}
2560
2561// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2562func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2563	return nil, false
2564}
2565
2566// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2567func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2568	return &aispi, true
2569}
2570
2571// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2572func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2573	return &aispi, true
2574}
2575
2576// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2577func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2578	return nil, false
2579}
2580
2581// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2582func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2583	return nil, false
2584}
2585
2586// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2587func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2588	return nil, false
2589}
2590
2591// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2592func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2593	return nil, false
2594}
2595
2596// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2597func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2598	return nil, false
2599}
2600
2601// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2602func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2603	return nil, false
2604}
2605
2606// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2607func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2608	return nil, false
2609}
2610
2611// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2612func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2613	return nil, false
2614}
2615
2616// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2617func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2618	return nil, false
2619}
2620
2621// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2622func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2623	return nil, false
2624}
2625
2626// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem.
2627func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2628	return &aispi, true
2629}
2630
2631// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item.
2632type AzureIaaSVMProtectedItemExtendedInfo struct {
2633	// OldestRecoveryPoint - The oldest backup copy available for this backup item.
2634	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2635	// RecoveryPointCount - Number of backup copies available for this backup item.
2636	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2637	// PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent.
2638	PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2639}
2640
2641// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy.
2642type AzureIaaSVMProtectionPolicy struct {
2643	InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2644	// SchedulePolicy - Backup schedule specified as part of backup policy.
2645	SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2646	// RetentionPolicy - Retention policy with the details on backup copy retention ranges.
2647	RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2648	// InstantRpRetentionRangeInDays - Instant RP retention policy range in days
2649	InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2650	// TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
2651	TimeZone *string `json:"timeZone,omitempty"`
2652	// ProtectedItemsCount - Number of items associated with this policy.
2653	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2654	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
2655	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2656}
2657
2658// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy.
2659func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2660	aispp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM
2661	objectMap := make(map[string]interface{})
2662	if aispp.InstantRPDetails != nil {
2663		objectMap["instantRPDetails"] = aispp.InstantRPDetails
2664	}
2665	objectMap["schedulePolicy"] = aispp.SchedulePolicy
2666	objectMap["retentionPolicy"] = aispp.RetentionPolicy
2667	if aispp.InstantRpRetentionRangeInDays != nil {
2668		objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2669	}
2670	if aispp.TimeZone != nil {
2671		objectMap["timeZone"] = aispp.TimeZone
2672	}
2673	if aispp.ProtectedItemsCount != nil {
2674		objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2675	}
2676	if aispp.BackupManagementType != "" {
2677		objectMap["backupManagementType"] = aispp.BackupManagementType
2678	}
2679	return json.Marshal(objectMap)
2680}
2681
2682// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2683func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2684	return nil, false
2685}
2686
2687// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2688func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2689	return nil, false
2690}
2691
2692// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2693func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2694	return &aispp, true
2695}
2696
2697// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2698func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2699	return nil, false
2700}
2701
2702// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2703func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2704	return nil, false
2705}
2706
2707// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2708func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2709	return nil, false
2710}
2711
2712// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2713func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2714	return nil, false
2715}
2716
2717// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy.
2718func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2719	return &aispp, true
2720}
2721
2722// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct.
2723func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2724	var m map[string]*json.RawMessage
2725	err := json.Unmarshal(body, &m)
2726	if err != nil {
2727		return err
2728	}
2729	for k, v := range m {
2730		switch k {
2731		case "instantRPDetails":
2732			if v != nil {
2733				var instantRPDetails InstantRPAdditionalDetails
2734				err = json.Unmarshal(*v, &instantRPDetails)
2735				if err != nil {
2736					return err
2737				}
2738				aispp.InstantRPDetails = &instantRPDetails
2739			}
2740		case "schedulePolicy":
2741			if v != nil {
2742				schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2743				if err != nil {
2744					return err
2745				}
2746				aispp.SchedulePolicy = schedulePolicy
2747			}
2748		case "retentionPolicy":
2749			if v != nil {
2750				retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2751				if err != nil {
2752					return err
2753				}
2754				aispp.RetentionPolicy = retentionPolicy
2755			}
2756		case "instantRpRetentionRangeInDays":
2757			if v != nil {
2758				var instantRpRetentionRangeInDays int32
2759				err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2760				if err != nil {
2761					return err
2762				}
2763				aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2764			}
2765		case "timeZone":
2766			if v != nil {
2767				var timeZone string
2768				err = json.Unmarshal(*v, &timeZone)
2769				if err != nil {
2770					return err
2771				}
2772				aispp.TimeZone = &timeZone
2773			}
2774		case "protectedItemsCount":
2775			if v != nil {
2776				var protectedItemsCount int32
2777				err = json.Unmarshal(*v, &protectedItemsCount)
2778				if err != nil {
2779					return err
2780				}
2781				aispp.ProtectedItemsCount = &protectedItemsCount
2782			}
2783		case "backupManagementType":
2784			if v != nil {
2785				var backupManagementType ManagementTypeBasicProtectionPolicy
2786				err = json.Unmarshal(*v, &backupManagementType)
2787				if err != nil {
2788					return err
2789				}
2790				aispp.BackupManagementType = backupManagementType
2791			}
2792		}
2793	}
2794
2795	return nil
2796}
2797
2798// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item.
2799type BasicAzureRecoveryServiceVaultProtectionIntent interface {
2800	AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
2801	AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
2802	AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
2803	AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
2804}
2805
2806// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item.
2807type AzureRecoveryServiceVaultProtectionIntent struct {
2808	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
2809	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2810	// SourceResourceID - ARM ID of the resource to be backed up.
2811	SourceResourceID *string `json:"sourceResourceId,omitempty"`
2812	// ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId
2813	ItemID *string `json:"itemId,omitempty"`
2814	// PolicyID - ID of the backup policy with which this item is backed up.
2815	PolicyID *string `json:"policyId,omitempty"`
2816	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
2817	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2818	// ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent'
2819	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2820}
2821
2822func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2823	var m map[string]interface{}
2824	err := json.Unmarshal(body, &m)
2825	if err != nil {
2826		return nil, err
2827	}
2828
2829	switch m["protectionIntentItemType"] {
2830	case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
2831		var awapi AzureWorkloadAutoProtectionIntent
2832		err := json.Unmarshal(body, &awapi)
2833		return awapi, err
2834	case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
2835		var awsapi AzureWorkloadSQLAutoProtectionIntent
2836		err := json.Unmarshal(body, &awsapi)
2837		return awsapi, err
2838	default:
2839		var arsvpi AzureRecoveryServiceVaultProtectionIntent
2840		err := json.Unmarshal(body, &arsvpi)
2841		return arsvpi, err
2842	}
2843}
2844func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2845	var rawMessages []*json.RawMessage
2846	err := json.Unmarshal(body, &rawMessages)
2847	if err != nil {
2848		return nil, err
2849	}
2850
2851	arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
2852
2853	for index, rawMessage := range rawMessages {
2854		arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
2855		if err != nil {
2856			return nil, err
2857		}
2858		arsvpiArray[index] = arsvpi
2859	}
2860	return arsvpiArray, nil
2861}
2862
2863// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent.
2864func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
2865	arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
2866	objectMap := make(map[string]interface{})
2867	if arsvpi.BackupManagementType != "" {
2868		objectMap["backupManagementType"] = arsvpi.BackupManagementType
2869	}
2870	if arsvpi.SourceResourceID != nil {
2871		objectMap["sourceResourceId"] = arsvpi.SourceResourceID
2872	}
2873	if arsvpi.ItemID != nil {
2874		objectMap["itemId"] = arsvpi.ItemID
2875	}
2876	if arsvpi.PolicyID != nil {
2877		objectMap["policyId"] = arsvpi.PolicyID
2878	}
2879	if arsvpi.ProtectionState != "" {
2880		objectMap["protectionState"] = arsvpi.ProtectionState
2881	}
2882	if arsvpi.ProtectionIntentItemType != "" {
2883		objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
2884	}
2885	return json.Marshal(objectMap)
2886}
2887
2888// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2889func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2890	return &arsvpi, true
2891}
2892
2893// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2894func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2895	return &arsvpi, true
2896}
2897
2898// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2899func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2900	return nil, false
2901}
2902
2903// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2904func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2905	return nil, false
2906}
2907
2908// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2909func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2910	return nil, false
2911}
2912
2913// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2914func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2915	return nil, false
2916}
2917
2918// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2919func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2920	return nil, false
2921}
2922
2923// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent.
2924func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2925	return &arsvpi, true
2926}
2927
2928// AzureResourceProtectionIntent iaaS VM specific backup protection intent item.
2929type AzureResourceProtectionIntent struct {
2930	// FriendlyName - Friendly name of the VM represented by this backup item.
2931	FriendlyName *string `json:"friendlyName,omitempty"`
2932	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
2933	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2934	// SourceResourceID - ARM ID of the resource to be backed up.
2935	SourceResourceID *string `json:"sourceResourceId,omitempty"`
2936	// ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId
2937	ItemID *string `json:"itemId,omitempty"`
2938	// PolicyID - ID of the backup policy with which this item is backed up.
2939	PolicyID *string `json:"policyId,omitempty"`
2940	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
2941	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2942	// ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent'
2943	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2944}
2945
2946// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent.
2947func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
2948	arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
2949	objectMap := make(map[string]interface{})
2950	if arpi.FriendlyName != nil {
2951		objectMap["friendlyName"] = arpi.FriendlyName
2952	}
2953	if arpi.BackupManagementType != "" {
2954		objectMap["backupManagementType"] = arpi.BackupManagementType
2955	}
2956	if arpi.SourceResourceID != nil {
2957		objectMap["sourceResourceId"] = arpi.SourceResourceID
2958	}
2959	if arpi.ItemID != nil {
2960		objectMap["itemId"] = arpi.ItemID
2961	}
2962	if arpi.PolicyID != nil {
2963		objectMap["policyId"] = arpi.PolicyID
2964	}
2965	if arpi.ProtectionState != "" {
2966		objectMap["protectionState"] = arpi.ProtectionState
2967	}
2968	if arpi.ProtectionIntentItemType != "" {
2969		objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
2970	}
2971	return json.Marshal(objectMap)
2972}
2973
2974// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
2975func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2976	return nil, false
2977}
2978
2979// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
2980func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2981	return nil, false
2982}
2983
2984// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
2985func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2986	return &arpi, true
2987}
2988
2989// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
2990func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2991	return nil, false
2992}
2993
2994// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
2995func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2996	return nil, false
2997}
2998
2999// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
3000func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3001	return nil, false
3002}
3003
3004// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
3005func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3006	return nil, false
3007}
3008
3009// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent.
3010func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3011	return &arpi, true
3012}
3013
3014// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group.
3015type AzureSQLAGWorkloadContainerProtectionContainer struct {
3016	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
3017	SourceResourceID *string `json:"sourceResourceId,omitempty"`
3018	// LastUpdatedTime - Time stamp when this container was updated.
3019	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3020	// ExtendedInfo - Additional details of a workload container.
3021	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3022	// WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
3023	WorkloadType WorkloadType `json:"workloadType,omitempty"`
3024	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
3025	OperationType OperationType `json:"operationType,omitempty"`
3026	// FriendlyName - Friendly name of the container.
3027	FriendlyName *string `json:"friendlyName,omitempty"`
3028	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3029	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3030	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
3031	RegistrationStatus *string `json:"registrationStatus,omitempty"`
3032	// HealthStatus - Status of health of the container.
3033	HealthStatus *string `json:"healthStatus,omitempty"`
3034	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
3035	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3036}
3037
3038// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer.
3039func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3040	aswcpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer
3041	objectMap := make(map[string]interface{})
3042	if aswcpc.SourceResourceID != nil {
3043		objectMap["sourceResourceId"] = aswcpc.SourceResourceID
3044	}
3045	if aswcpc.LastUpdatedTime != nil {
3046		objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
3047	}
3048	if aswcpc.ExtendedInfo != nil {
3049		objectMap["extendedInfo"] = aswcpc.ExtendedInfo
3050	}
3051	if aswcpc.WorkloadType != "" {
3052		objectMap["workloadType"] = aswcpc.WorkloadType
3053	}
3054	if aswcpc.OperationType != "" {
3055		objectMap["operationType"] = aswcpc.OperationType
3056	}
3057	if aswcpc.FriendlyName != nil {
3058		objectMap["friendlyName"] = aswcpc.FriendlyName
3059	}
3060	if aswcpc.BackupManagementType != "" {
3061		objectMap["backupManagementType"] = aswcpc.BackupManagementType
3062	}
3063	if aswcpc.RegistrationStatus != nil {
3064		objectMap["registrationStatus"] = aswcpc.RegistrationStatus
3065	}
3066	if aswcpc.HealthStatus != nil {
3067		objectMap["healthStatus"] = aswcpc.HealthStatus
3068	}
3069	if aswcpc.ContainerType != "" {
3070		objectMap["containerType"] = aswcpc.ContainerType
3071	}
3072	return json.Marshal(objectMap)
3073}
3074
3075// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3076func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3077	return nil, false
3078}
3079
3080// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3081func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3082	return nil, false
3083}
3084
3085// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3086func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3087	return nil, false
3088}
3089
3090// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3091func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3092	return &aswcpc, true
3093}
3094
3095// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3096func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3097	return nil, false
3098}
3099
3100// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3101func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3102	return nil, false
3103}
3104
3105// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3106func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3107	return nil, false
3108}
3109
3110// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3111func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3112	return nil, false
3113}
3114
3115// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3116func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3117	return &aswcpc, true
3118}
3119
3120// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3121func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3122	return nil, false
3123}
3124
3125// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3126func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3127	return nil, false
3128}
3129
3130// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3131func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3132	return nil, false
3133}
3134
3135// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3136func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3137	return nil, false
3138}
3139
3140// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3141func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3142	return nil, false
3143}
3144
3145// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3146func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3147	return nil, false
3148}
3149
3150// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3151func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3152	return nil, false
3153}
3154
3155// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer.
3156func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3157	return &aswcpc, true
3158}
3159
3160// AzureSQLContainer azure Sql workload-specific container.
3161type AzureSQLContainer struct {
3162	// FriendlyName - Friendly name of the container.
3163	FriendlyName *string `json:"friendlyName,omitempty"`
3164	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3165	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3166	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
3167	RegistrationStatus *string `json:"registrationStatus,omitempty"`
3168	// HealthStatus - Status of health of the container.
3169	HealthStatus *string `json:"healthStatus,omitempty"`
3170	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
3171	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3172}
3173
3174// MarshalJSON is the custom marshaler for AzureSQLContainer.
3175func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3176	asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer
3177	objectMap := make(map[string]interface{})
3178	if asc.FriendlyName != nil {
3179		objectMap["friendlyName"] = asc.FriendlyName
3180	}
3181	if asc.BackupManagementType != "" {
3182		objectMap["backupManagementType"] = asc.BackupManagementType
3183	}
3184	if asc.RegistrationStatus != nil {
3185		objectMap["registrationStatus"] = asc.RegistrationStatus
3186	}
3187	if asc.HealthStatus != nil {
3188		objectMap["healthStatus"] = asc.HealthStatus
3189	}
3190	if asc.ContainerType != "" {
3191		objectMap["containerType"] = asc.ContainerType
3192	}
3193	return json.Marshal(objectMap)
3194}
3195
3196// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3197func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3198	return nil, false
3199}
3200
3201// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3202func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3203	return nil, false
3204}
3205
3206// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3207func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3208	return nil, false
3209}
3210
3211// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3212func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3213	return nil, false
3214}
3215
3216// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3217func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3218	return &asc, true
3219}
3220
3221// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3222func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3223	return nil, false
3224}
3225
3226// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3227func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3228	return nil, false
3229}
3230
3231// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3232func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3233	return nil, false
3234}
3235
3236// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3237func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3238	return nil, false
3239}
3240
3241// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3242func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3243	return nil, false
3244}
3245
3246// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3247func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3248	return nil, false
3249}
3250
3251// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3252func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3253	return nil, false
3254}
3255
3256// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3257func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3258	return nil, false
3259}
3260
3261// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3262func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3263	return nil, false
3264}
3265
3266// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3267func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3268	return nil, false
3269}
3270
3271// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3272func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3273	return nil, false
3274}
3275
3276// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer.
3277func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3278	return &asc, true
3279}
3280
3281// AzureSQLProtectedItem azure SQL workload-specific backup item.
3282type AzureSQLProtectedItem struct {
3283	// ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services.
3284	ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3285	// ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused'
3286	ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3287	// ExtendedInfo - Additional information for this backup item.
3288	ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3289	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3290	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3291	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
3292	WorkloadType DataSourceType `json:"workloadType,omitempty"`
3293	// ContainerName - Unique name of container
3294	ContainerName *string `json:"containerName,omitempty"`
3295	// SourceResourceID - ARM ID of the resource to be backed up.
3296	SourceResourceID *string `json:"sourceResourceId,omitempty"`
3297	// PolicyID - ID of the backup policy with which this item is backed up.
3298	PolicyID *string `json:"policyId,omitempty"`
3299	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
3300	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3301	// BackupSetName - Name of the backup set the backup item belongs to
3302	BackupSetName *string `json:"backupSetName,omitempty"`
3303	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
3304	CreateMode CreateMode `json:"createMode,omitempty"`
3305	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
3306	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3307	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
3308	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3309	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
3310	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3311	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
3312	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3313	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
3314	IsRehydrate *bool `json:"isRehydrate,omitempty"`
3315	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
3316	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3317}
3318
3319// MarshalJSON is the custom marshaler for AzureSQLProtectedItem.
3320func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3321	aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3322	objectMap := make(map[string]interface{})
3323	if aspi.ProtectedItemDataID != nil {
3324		objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3325	}
3326	if aspi.ProtectionState != "" {
3327		objectMap["protectionState"] = aspi.ProtectionState
3328	}
3329	if aspi.ExtendedInfo != nil {
3330		objectMap["extendedInfo"] = aspi.ExtendedInfo
3331	}
3332	if aspi.BackupManagementType != "" {
3333		objectMap["backupManagementType"] = aspi.BackupManagementType
3334	}
3335	if aspi.WorkloadType != "" {
3336		objectMap["workloadType"] = aspi.WorkloadType
3337	}
3338	if aspi.ContainerName != nil {
3339		objectMap["containerName"] = aspi.ContainerName
3340	}
3341	if aspi.SourceResourceID != nil {
3342		objectMap["sourceResourceId"] = aspi.SourceResourceID
3343	}
3344	if aspi.PolicyID != nil {
3345		objectMap["policyId"] = aspi.PolicyID
3346	}
3347	if aspi.LastRecoveryPoint != nil {
3348		objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3349	}
3350	if aspi.BackupSetName != nil {
3351		objectMap["backupSetName"] = aspi.BackupSetName
3352	}
3353	if aspi.CreateMode != "" {
3354		objectMap["createMode"] = aspi.CreateMode
3355	}
3356	if aspi.DeferredDeleteTimeInUTC != nil {
3357		objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3358	}
3359	if aspi.IsScheduledForDeferredDelete != nil {
3360		objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3361	}
3362	if aspi.DeferredDeleteTimeRemaining != nil {
3363		objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3364	}
3365	if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3366		objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3367	}
3368	if aspi.IsRehydrate != nil {
3369		objectMap["isRehydrate"] = aspi.IsRehydrate
3370	}
3371	if aspi.ProtectedItemType != "" {
3372		objectMap["protectedItemType"] = aspi.ProtectedItemType
3373	}
3374	return json.Marshal(objectMap)
3375}
3376
3377// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3378func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3379	return nil, false
3380}
3381
3382// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3383func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3384	return nil, false
3385}
3386
3387// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3388func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3389	return nil, false
3390}
3391
3392// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3393func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3394	return nil, false
3395}
3396
3397// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3398func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3399	return nil, false
3400}
3401
3402// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3403func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3404	return &aspi, true
3405}
3406
3407// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3408func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3409	return nil, false
3410}
3411
3412// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3413func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3414	return nil, false
3415}
3416
3417// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3418func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3419	return nil, false
3420}
3421
3422// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3423func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3424	return nil, false
3425}
3426
3427// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3428func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3429	return nil, false
3430}
3431
3432// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3433func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3434	return nil, false
3435}
3436
3437// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3438func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3439	return nil, false
3440}
3441
3442// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3443func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3444	return nil, false
3445}
3446
3447// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3448func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3449	return nil, false
3450}
3451
3452// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem.
3453func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3454	return &aspi, true
3455}
3456
3457// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item.
3458type AzureSQLProtectedItemExtendedInfo struct {
3459	// OldestRecoveryPoint - The oldest backup copy available for this item in the service.
3460	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3461	// RecoveryPointCount - Number of available backup copies associated with this backup item.
3462	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3463	// PolicyState - State of the backup policy associated with this backup item.
3464	PolicyState *string `json:"policyState,omitempty"`
3465}
3466
3467// AzureSQLProtectionPolicy azure SQL workload-specific backup policy.
3468type AzureSQLProtectionPolicy struct {
3469	// RetentionPolicy - Retention policy details.
3470	RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3471	// ProtectedItemsCount - Number of items associated with this policy.
3472	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3473	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
3474	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3475}
3476
3477// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy.
3478func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3479	aspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL
3480	objectMap := make(map[string]interface{})
3481	objectMap["retentionPolicy"] = aspp.RetentionPolicy
3482	if aspp.ProtectedItemsCount != nil {
3483		objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3484	}
3485	if aspp.BackupManagementType != "" {
3486		objectMap["backupManagementType"] = aspp.BackupManagementType
3487	}
3488	return json.Marshal(objectMap)
3489}
3490
3491// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3492func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3493	return nil, false
3494}
3495
3496// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3497func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3498	return nil, false
3499}
3500
3501// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3502func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3503	return nil, false
3504}
3505
3506// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3507func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3508	return &aspp, true
3509}
3510
3511// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3512func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3513	return nil, false
3514}
3515
3516// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3517func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3518	return nil, false
3519}
3520
3521// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3522func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3523	return nil, false
3524}
3525
3526// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy.
3527func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3528	return &aspp, true
3529}
3530
3531// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct.
3532func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3533	var m map[string]*json.RawMessage
3534	err := json.Unmarshal(body, &m)
3535	if err != nil {
3536		return err
3537	}
3538	for k, v := range m {
3539		switch k {
3540		case "retentionPolicy":
3541			if v != nil {
3542				retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3543				if err != nil {
3544					return err
3545				}
3546				aspp.RetentionPolicy = retentionPolicy
3547			}
3548		case "protectedItemsCount":
3549			if v != nil {
3550				var protectedItemsCount int32
3551				err = json.Unmarshal(*v, &protectedItemsCount)
3552				if err != nil {
3553					return err
3554				}
3555				aspp.ProtectedItemsCount = &protectedItemsCount
3556			}
3557		case "backupManagementType":
3558			if v != nil {
3559				var backupManagementType ManagementTypeBasicProtectionPolicy
3560				err = json.Unmarshal(*v, &backupManagementType)
3561				if err != nil {
3562					return err
3563				}
3564				aspp.BackupManagementType = backupManagementType
3565			}
3566		}
3567	}
3568
3569	return nil
3570}
3571
3572// AzureStorageContainer azure Storage Account workload-specific container.
3573type AzureStorageContainer struct {
3574	// SourceResourceID - Fully qualified ARM url.
3575	SourceResourceID *string `json:"sourceResourceId,omitempty"`
3576	// StorageAccountVersion - Storage account version.
3577	StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3578	// ResourceGroup - Resource group name of Recovery Services Vault.
3579	ResourceGroup *string `json:"resourceGroup,omitempty"`
3580	// ProtectedItemCount - Number of items backed up in this container.
3581	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3582	// FriendlyName - Friendly name of the container.
3583	FriendlyName *string `json:"friendlyName,omitempty"`
3584	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3585	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3586	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
3587	RegistrationStatus *string `json:"registrationStatus,omitempty"`
3588	// HealthStatus - Status of health of the container.
3589	HealthStatus *string `json:"healthStatus,omitempty"`
3590	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
3591	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3592}
3593
3594// MarshalJSON is the custom marshaler for AzureStorageContainer.
3595func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3596	asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeStorageContainer
3597	objectMap := make(map[string]interface{})
3598	if asc.SourceResourceID != nil {
3599		objectMap["sourceResourceId"] = asc.SourceResourceID
3600	}
3601	if asc.StorageAccountVersion != nil {
3602		objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3603	}
3604	if asc.ResourceGroup != nil {
3605		objectMap["resourceGroup"] = asc.ResourceGroup
3606	}
3607	if asc.ProtectedItemCount != nil {
3608		objectMap["protectedItemCount"] = asc.ProtectedItemCount
3609	}
3610	if asc.FriendlyName != nil {
3611		objectMap["friendlyName"] = asc.FriendlyName
3612	}
3613	if asc.BackupManagementType != "" {
3614		objectMap["backupManagementType"] = asc.BackupManagementType
3615	}
3616	if asc.RegistrationStatus != nil {
3617		objectMap["registrationStatus"] = asc.RegistrationStatus
3618	}
3619	if asc.HealthStatus != nil {
3620		objectMap["healthStatus"] = asc.HealthStatus
3621	}
3622	if asc.ContainerType != "" {
3623		objectMap["containerType"] = asc.ContainerType
3624	}
3625	return json.Marshal(objectMap)
3626}
3627
3628// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3629func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3630	return nil, false
3631}
3632
3633// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3634func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3635	return nil, false
3636}
3637
3638// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3639func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3640	return nil, false
3641}
3642
3643// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3644func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3645	return nil, false
3646}
3647
3648// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3649func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3650	return nil, false
3651}
3652
3653// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3654func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3655	return &asc, true
3656}
3657
3658// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3659func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3660	return nil, false
3661}
3662
3663// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3664func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3665	return nil, false
3666}
3667
3668// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3669func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3670	return nil, false
3671}
3672
3673// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3674func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3675	return nil, false
3676}
3677
3678// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3679func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3680	return nil, false
3681}
3682
3683// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3684func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3685	return nil, false
3686}
3687
3688// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3689func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3690	return nil, false
3691}
3692
3693// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3694func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3695	return nil, false
3696}
3697
3698// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3699func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3700	return nil, false
3701}
3702
3703// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3704func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3705	return nil, false
3706}
3707
3708// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer.
3709func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3710	return &asc, true
3711}
3712
3713// AzureStorageErrorInfo azure storage specific error information
3714type AzureStorageErrorInfo struct {
3715	// ErrorCode - Error code.
3716	ErrorCode *int32 `json:"errorCode,omitempty"`
3717	// ErrorString - Localized error string.
3718	ErrorString *string `json:"errorString,omitempty"`
3719	// Recommendations - List of localized recommendations for above error code.
3720	Recommendations *[]string `json:"recommendations,omitempty"`
3721}
3722
3723// AzureStorageJob azure storage specific job.
3724type AzureStorageJob struct {
3725	// Duration - Time elapsed during the execution of this job.
3726	Duration *string `json:"duration,omitempty"`
3727	// ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry.
3728	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
3729	// ErrorDetails - Error details on execution of this job.
3730	ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
3731	// StorageAccountName - Specifies friendly name of the storage account.
3732	StorageAccountName *string `json:"storageAccountName,omitempty"`
3733	// StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account.
3734	StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3735	// ExtendedInfo - Additional information about the job.
3736	ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
3737	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
3738	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
3739	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3740	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3741	// Operation - The operation name.
3742	Operation *string `json:"operation,omitempty"`
3743	// Status - Job status.
3744	Status *string `json:"status,omitempty"`
3745	// StartTime - The start time.
3746	StartTime *date.Time `json:"startTime,omitempty"`
3747	// EndTime - The end time.
3748	EndTime *date.Time `json:"endTime,omitempty"`
3749	// ActivityID - ActivityId of job.
3750	ActivityID *string `json:"activityId,omitempty"`
3751	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
3752	JobType JobType `json:"jobType,omitempty"`
3753}
3754
3755// MarshalJSON is the custom marshaler for AzureStorageJob.
3756func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
3757	asj.JobType = JobTypeAzureStorageJob
3758	objectMap := make(map[string]interface{})
3759	if asj.Duration != nil {
3760		objectMap["duration"] = asj.Duration
3761	}
3762	if asj.ActionsInfo != nil {
3763		objectMap["actionsInfo"] = asj.ActionsInfo
3764	}
3765	if asj.ErrorDetails != nil {
3766		objectMap["errorDetails"] = asj.ErrorDetails
3767	}
3768	if asj.StorageAccountName != nil {
3769		objectMap["storageAccountName"] = asj.StorageAccountName
3770	}
3771	if asj.StorageAccountVersion != nil {
3772		objectMap["storageAccountVersion"] = asj.StorageAccountVersion
3773	}
3774	if asj.ExtendedInfo != nil {
3775		objectMap["extendedInfo"] = asj.ExtendedInfo
3776	}
3777	if asj.EntityFriendlyName != nil {
3778		objectMap["entityFriendlyName"] = asj.EntityFriendlyName
3779	}
3780	if asj.BackupManagementType != "" {
3781		objectMap["backupManagementType"] = asj.BackupManagementType
3782	}
3783	if asj.Operation != nil {
3784		objectMap["operation"] = asj.Operation
3785	}
3786	if asj.Status != nil {
3787		objectMap["status"] = asj.Status
3788	}
3789	if asj.StartTime != nil {
3790		objectMap["startTime"] = asj.StartTime
3791	}
3792	if asj.EndTime != nil {
3793		objectMap["endTime"] = asj.EndTime
3794	}
3795	if asj.ActivityID != nil {
3796		objectMap["activityId"] = asj.ActivityID
3797	}
3798	if asj.JobType != "" {
3799		objectMap["jobType"] = asj.JobType
3800	}
3801	return json.Marshal(objectMap)
3802}
3803
3804// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob.
3805func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
3806	return nil, false
3807}
3808
3809// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob.
3810func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
3811	return &asj, true
3812}
3813
3814// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob.
3815func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
3816	return nil, false
3817}
3818
3819// AsDpmJob is the BasicJob implementation for AzureStorageJob.
3820func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
3821	return nil, false
3822}
3823
3824// AsMabJob is the BasicJob implementation for AzureStorageJob.
3825func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
3826	return nil, false
3827}
3828
3829// AsVaultJob is the BasicJob implementation for AzureStorageJob.
3830func (asj AzureStorageJob) AsVaultJob() (*VaultJob, bool) {
3831	return nil, false
3832}
3833
3834// AsJob is the BasicJob implementation for AzureStorageJob.
3835func (asj AzureStorageJob) AsJob() (*Job, bool) {
3836	return nil, false
3837}
3838
3839// AsBasicJob is the BasicJob implementation for AzureStorageJob.
3840func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
3841	return &asj, true
3842}
3843
3844// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job.
3845type AzureStorageJobExtendedInfo struct {
3846	// TasksList - List of tasks for this job
3847	TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
3848	// PropertyBag - Job properties.
3849	PropertyBag map[string]*string `json:"propertyBag"`
3850	// DynamicErrorMessage - Non localized error message on job execution.
3851	DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
3852}
3853
3854// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo.
3855func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
3856	objectMap := make(map[string]interface{})
3857	if asjei.TasksList != nil {
3858		objectMap["tasksList"] = asjei.TasksList
3859	}
3860	if asjei.PropertyBag != nil {
3861		objectMap["propertyBag"] = asjei.PropertyBag
3862	}
3863	if asjei.DynamicErrorMessage != nil {
3864		objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
3865	}
3866	return json.Marshal(objectMap)
3867}
3868
3869// AzureStorageJobTaskDetails azure storage workload specific job task details.
3870type AzureStorageJobTaskDetails struct {
3871	// TaskID - The task display name.
3872	TaskID *string `json:"taskId,omitempty"`
3873	// Status - The status.
3874	Status *string `json:"status,omitempty"`
3875}
3876
3877// AzureStorageProtectableContainer azure Storage-specific protectable containers
3878type AzureStorageProtectableContainer struct {
3879	// FriendlyName - Friendly name of the container.
3880	FriendlyName *string `json:"friendlyName,omitempty"`
3881	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3882	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3883	// HealthStatus - Status of health of the container.
3884	HealthStatus *string `json:"healthStatus,omitempty"`
3885	// ContainerID - Fabric Id of the container such as ARM Id.
3886	ContainerID *string `json:"containerId,omitempty"`
3887	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
3888	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3889}
3890
3891// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer.
3892func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
3893	aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
3894	objectMap := make(map[string]interface{})
3895	if aspc.FriendlyName != nil {
3896		objectMap["friendlyName"] = aspc.FriendlyName
3897	}
3898	if aspc.BackupManagementType != "" {
3899		objectMap["backupManagementType"] = aspc.BackupManagementType
3900	}
3901	if aspc.HealthStatus != nil {
3902		objectMap["healthStatus"] = aspc.HealthStatus
3903	}
3904	if aspc.ContainerID != nil {
3905		objectMap["containerId"] = aspc.ContainerID
3906	}
3907	if aspc.ProtectableContainerType != "" {
3908		objectMap["protectableContainerType"] = aspc.ProtectableContainerType
3909	}
3910	return json.Marshal(objectMap)
3911}
3912
3913// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
3914func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3915	return &aspc, true
3916}
3917
3918// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
3919func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3920	return nil, false
3921}
3922
3923// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
3924func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3925	return nil, false
3926}
3927
3928// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer.
3929func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3930	return &aspc, true
3931}
3932
3933// AzureVMAppContainerProtectableContainer azure workload-specific container
3934type AzureVMAppContainerProtectableContainer struct {
3935	// FriendlyName - Friendly name of the container.
3936	FriendlyName *string `json:"friendlyName,omitempty"`
3937	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
3938	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3939	// HealthStatus - Status of health of the container.
3940	HealthStatus *string `json:"healthStatus,omitempty"`
3941	// ContainerID - Fabric Id of the container such as ARM Id.
3942	ContainerID *string `json:"containerId,omitempty"`
3943	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
3944	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3945}
3946
3947// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer.
3948func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
3949	avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
3950	objectMap := make(map[string]interface{})
3951	if avacpc.FriendlyName != nil {
3952		objectMap["friendlyName"] = avacpc.FriendlyName
3953	}
3954	if avacpc.BackupManagementType != "" {
3955		objectMap["backupManagementType"] = avacpc.BackupManagementType
3956	}
3957	if avacpc.HealthStatus != nil {
3958		objectMap["healthStatus"] = avacpc.HealthStatus
3959	}
3960	if avacpc.ContainerID != nil {
3961		objectMap["containerId"] = avacpc.ContainerID
3962	}
3963	if avacpc.ProtectableContainerType != "" {
3964		objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
3965	}
3966	return json.Marshal(objectMap)
3967}
3968
3969// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
3970func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3971	return nil, false
3972}
3973
3974// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
3975func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3976	return &avacpc, true
3977}
3978
3979// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
3980func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3981	return nil, false
3982}
3983
3984// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer.
3985func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3986	return &avacpc, true
3987}
3988
3989// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines.
3990type AzureVMAppContainerProtectionContainer struct {
3991	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
3992	SourceResourceID *string `json:"sourceResourceId,omitempty"`
3993	// LastUpdatedTime - Time stamp when this container was updated.
3994	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3995	// ExtendedInfo - Additional details of a workload container.
3996	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3997	// WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
3998	WorkloadType WorkloadType `json:"workloadType,omitempty"`
3999	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
4000	OperationType OperationType `json:"operationType,omitempty"`
4001	// FriendlyName - Friendly name of the container.
4002	FriendlyName *string `json:"friendlyName,omitempty"`
4003	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
4004	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4005	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
4006	RegistrationStatus *string `json:"registrationStatus,omitempty"`
4007	// HealthStatus - Status of health of the container.
4008	HealthStatus *string `json:"healthStatus,omitempty"`
4009	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
4010	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
4011}
4012
4013// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer.
4014func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
4015	avacpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer
4016	objectMap := make(map[string]interface{})
4017	if avacpc.SourceResourceID != nil {
4018		objectMap["sourceResourceId"] = avacpc.SourceResourceID
4019	}
4020	if avacpc.LastUpdatedTime != nil {
4021		objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
4022	}
4023	if avacpc.ExtendedInfo != nil {
4024		objectMap["extendedInfo"] = avacpc.ExtendedInfo
4025	}
4026	if avacpc.WorkloadType != "" {
4027		objectMap["workloadType"] = avacpc.WorkloadType
4028	}
4029	if avacpc.OperationType != "" {
4030		objectMap["operationType"] = avacpc.OperationType
4031	}
4032	if avacpc.FriendlyName != nil {
4033		objectMap["friendlyName"] = avacpc.FriendlyName
4034	}
4035	if avacpc.BackupManagementType != "" {
4036		objectMap["backupManagementType"] = avacpc.BackupManagementType
4037	}
4038	if avacpc.RegistrationStatus != nil {
4039		objectMap["registrationStatus"] = avacpc.RegistrationStatus
4040	}
4041	if avacpc.HealthStatus != nil {
4042		objectMap["healthStatus"] = avacpc.HealthStatus
4043	}
4044	if avacpc.ContainerType != "" {
4045		objectMap["containerType"] = avacpc.ContainerType
4046	}
4047	return json.Marshal(objectMap)
4048}
4049
4050// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4051func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
4052	return nil, false
4053}
4054
4055// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4056func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
4057	return nil, false
4058}
4059
4060// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4061func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
4062	return nil, false
4063}
4064
4065// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4066func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
4067	return nil, false
4068}
4069
4070// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4071func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
4072	return nil, false
4073}
4074
4075// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4076func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
4077	return nil, false
4078}
4079
4080// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4081func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
4082	return &avacpc, true
4083}
4084
4085// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4086func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
4087	return nil, false
4088}
4089
4090// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4091func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
4092	return &avacpc, true
4093}
4094
4095// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4096func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
4097	return nil, false
4098}
4099
4100// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4101func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4102	return nil, false
4103}
4104
4105// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4106func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4107	return nil, false
4108}
4109
4110// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4111func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4112	return nil, false
4113}
4114
4115// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4116func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4117	return nil, false
4118}
4119
4120// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4121func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4122	return nil, false
4123}
4124
4125// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4126func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4127	return nil, false
4128}
4129
4130// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer.
4131func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4132	return &avacpc, true
4133}
4134
4135// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request
4136type AzureVMResourceFeatureSupportRequest struct {
4137	// VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM
4138	VMSize *string `json:"vmSize,omitempty"`
4139	// VMSku - SKUs (Premium/Managed etc) in case of IaasVM
4140	VMSku *string `json:"vmSku,omitempty"`
4141	// FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup'
4142	FeatureType FeatureType `json:"featureType,omitempty"`
4143}
4144
4145// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest.
4146func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4147	avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4148	objectMap := make(map[string]interface{})
4149	if avrfsr.VMSize != nil {
4150		objectMap["vmSize"] = avrfsr.VMSize
4151	}
4152	if avrfsr.VMSku != nil {
4153		objectMap["vmSku"] = avrfsr.VMSku
4154	}
4155	if avrfsr.FeatureType != "" {
4156		objectMap["featureType"] = avrfsr.FeatureType
4157	}
4158	return json.Marshal(objectMap)
4159}
4160
4161// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest.
4162func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4163	return nil, false
4164}
4165
4166// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest.
4167func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4168	return &avrfsr, true
4169}
4170
4171// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest.
4172func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4173	return nil, false
4174}
4175
4176// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest.
4177func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4178	return &avrfsr, true
4179}
4180
4181// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm
4182type AzureVMResourceFeatureSupportResponse struct {
4183	autorest.Response `json:"-"`
4184	// SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported'
4185	SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4186}
4187
4188// BasicAzureVMWorkloadItem azure VM workload-specific workload item.
4189type BasicAzureVMWorkloadItem interface {
4190	AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4191	AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4192	AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4193	AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4194	AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4195	AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4196	AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4197}
4198
4199// AzureVMWorkloadItem azure VM workload-specific workload item.
4200type AzureVMWorkloadItem struct {
4201	// ParentName - Name for instance or AG
4202	ParentName *string `json:"parentName,omitempty"`
4203	// ServerName - Host/Cluster Name for instance or AG
4204	ServerName *string `json:"serverName,omitempty"`
4205	// IsAutoProtectable - Indicates if workload item is auto-protectable
4206	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4207	// Subinquireditemcount - For instance or AG, indicates number of DB's present
4208	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4209	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
4210	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4211	// BackupManagementType - Type of backup management to backup an item.
4212	BackupManagementType *string `json:"backupManagementType,omitempty"`
4213	// WorkloadType - Type of workload for the backup management
4214	WorkloadType *string `json:"workloadType,omitempty"`
4215	// FriendlyName - Friendly name of the backup item.
4216	FriendlyName *string `json:"friendlyName,omitempty"`
4217	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
4218	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4219	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
4220	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4221}
4222
4223func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4224	var m map[string]interface{}
4225	err := json.Unmarshal(body, &m)
4226	if err != nil {
4227		return nil, err
4228	}
4229
4230	switch m["workloadItemType"] {
4231	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
4232		var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4233		err := json.Unmarshal(body, &avwsadwi)
4234		return avwsadwi, err
4235	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
4236		var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4237		err := json.Unmarshal(body, &avwsaswi)
4238		return avwsaswi, err
4239	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
4240		var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4241		err := json.Unmarshal(body, &avwshdwi)
4242		return avwshdwi, err
4243	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
4244		var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4245		err := json.Unmarshal(body, &avwshswi)
4246		return avwshswi, err
4247	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
4248		var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4249		err := json.Unmarshal(body, &avwsdwi)
4250		return avwsdwi, err
4251	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
4252		var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4253		err := json.Unmarshal(body, &avwsiwi)
4254		return avwsiwi, err
4255	default:
4256		var avwi AzureVMWorkloadItem
4257		err := json.Unmarshal(body, &avwi)
4258		return avwi, err
4259	}
4260}
4261func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4262	var rawMessages []*json.RawMessage
4263	err := json.Unmarshal(body, &rawMessages)
4264	if err != nil {
4265		return nil, err
4266	}
4267
4268	avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4269
4270	for index, rawMessage := range rawMessages {
4271		avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4272		if err != nil {
4273			return nil, err
4274		}
4275		avwiArray[index] = avwi
4276	}
4277	return avwiArray, nil
4278}
4279
4280// MarshalJSON is the custom marshaler for AzureVMWorkloadItem.
4281func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4282	avwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem
4283	objectMap := make(map[string]interface{})
4284	if avwi.ParentName != nil {
4285		objectMap["parentName"] = avwi.ParentName
4286	}
4287	if avwi.ServerName != nil {
4288		objectMap["serverName"] = avwi.ServerName
4289	}
4290	if avwi.IsAutoProtectable != nil {
4291		objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4292	}
4293	if avwi.Subinquireditemcount != nil {
4294		objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4295	}
4296	if avwi.SubWorkloadItemCount != nil {
4297		objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4298	}
4299	if avwi.BackupManagementType != nil {
4300		objectMap["backupManagementType"] = avwi.BackupManagementType
4301	}
4302	if avwi.WorkloadType != nil {
4303		objectMap["workloadType"] = avwi.WorkloadType
4304	}
4305	if avwi.FriendlyName != nil {
4306		objectMap["friendlyName"] = avwi.FriendlyName
4307	}
4308	if avwi.ProtectionState != "" {
4309		objectMap["protectionState"] = avwi.ProtectionState
4310	}
4311	if avwi.WorkloadItemType != "" {
4312		objectMap["workloadItemType"] = avwi.WorkloadItemType
4313	}
4314	return json.Marshal(objectMap)
4315}
4316
4317// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4318func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4319	return &avwi, true
4320}
4321
4322// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4323func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4324	return &avwi, true
4325}
4326
4327// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4328func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4329	return nil, false
4330}
4331
4332// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4333func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4334	return nil, false
4335}
4336
4337// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4338func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4339	return nil, false
4340}
4341
4342// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4343func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4344	return nil, false
4345}
4346
4347// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4348func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4349	return nil, false
4350}
4351
4352// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4353func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4354	return nil, false
4355}
4356
4357// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4358func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4359	return nil, false
4360}
4361
4362// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem.
4363func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4364	return &avwi, true
4365}
4366
4367// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item.
4368type BasicAzureVMWorkloadProtectableItem interface {
4369	AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4370	AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4371	AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4372	AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4373	AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4374	AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4375	AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4376}
4377
4378// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item.
4379type AzureVMWorkloadProtectableItem struct {
4380	// ParentName - Name for instance or AG
4381	ParentName *string `json:"parentName,omitempty"`
4382	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
4383	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
4384	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4385	// ServerName - Host/Cluster Name for instance or AG
4386	ServerName *string `json:"serverName,omitempty"`
4387	// IsAutoProtectable - Indicates if protectable item is auto-protectable
4388	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4389	// IsAutoProtected - Indicates if protectable item is auto-protected
4390	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4391	// Subinquireditemcount - For instance or AG, indicates number of DB's present
4392	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4393	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
4394	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4395	// Prebackupvalidation - Pre-backup validation for protectable objects
4396	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4397	// BackupManagementType - Type of backup management to backup an item.
4398	BackupManagementType *string `json:"backupManagementType,omitempty"`
4399	// WorkloadType - Type of workload for the backup management
4400	WorkloadType *string `json:"workloadType,omitempty"`
4401	// FriendlyName - Friendly name of the backup item.
4402	FriendlyName *string `json:"friendlyName,omitempty"`
4403	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
4404	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4405	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
4406	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4407}
4408
4409func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4410	var m map[string]interface{}
4411	err := json.Unmarshal(body, &m)
4412	if err != nil {
4413		return nil, err
4414	}
4415
4416	switch m["protectableItemType"] {
4417	case string(ProtectableItemTypeSAPAseSystem):
4418		var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4419		err := json.Unmarshal(body, &avwsaspi)
4420		return avwsaspi, err
4421	case string(ProtectableItemTypeSAPHanaDatabase):
4422		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4423		err := json.Unmarshal(body, &avwshdpi)
4424		return avwshdpi, err
4425	case string(ProtectableItemTypeSAPHanaSystem):
4426		var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4427		err := json.Unmarshal(body, &avwshspi)
4428		return avwshspi, err
4429	case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4430		var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4431		err := json.Unmarshal(body, &avwsagpi)
4432		return avwsagpi, err
4433	case string(ProtectableItemTypeSQLDataBase):
4434		var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4435		err := json.Unmarshal(body, &avwsdpi)
4436		return avwsdpi, err
4437	case string(ProtectableItemTypeSQLInstance):
4438		var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4439		err := json.Unmarshal(body, &avwsipi)
4440		return avwsipi, err
4441	default:
4442		var avwpi AzureVMWorkloadProtectableItem
4443		err := json.Unmarshal(body, &avwpi)
4444		return avwpi, err
4445	}
4446}
4447func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4448	var rawMessages []*json.RawMessage
4449	err := json.Unmarshal(body, &rawMessages)
4450	if err != nil {
4451		return nil, err
4452	}
4453
4454	avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4455
4456	for index, rawMessage := range rawMessages {
4457		avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4458		if err != nil {
4459			return nil, err
4460		}
4461		avwpiArray[index] = avwpi
4462	}
4463	return avwpiArray, nil
4464}
4465
4466// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem.
4467func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4468	avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4469	objectMap := make(map[string]interface{})
4470	if avwpi.ParentName != nil {
4471		objectMap["parentName"] = avwpi.ParentName
4472	}
4473	if avwpi.ParentUniqueName != nil {
4474		objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4475	}
4476	if avwpi.ServerName != nil {
4477		objectMap["serverName"] = avwpi.ServerName
4478	}
4479	if avwpi.IsAutoProtectable != nil {
4480		objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4481	}
4482	if avwpi.IsAutoProtected != nil {
4483		objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4484	}
4485	if avwpi.Subinquireditemcount != nil {
4486		objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4487	}
4488	if avwpi.Subprotectableitemcount != nil {
4489		objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4490	}
4491	if avwpi.Prebackupvalidation != nil {
4492		objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4493	}
4494	if avwpi.BackupManagementType != nil {
4495		objectMap["backupManagementType"] = avwpi.BackupManagementType
4496	}
4497	if avwpi.WorkloadType != nil {
4498		objectMap["workloadType"] = avwpi.WorkloadType
4499	}
4500	if avwpi.FriendlyName != nil {
4501		objectMap["friendlyName"] = avwpi.FriendlyName
4502	}
4503	if avwpi.ProtectionState != "" {
4504		objectMap["protectionState"] = avwpi.ProtectionState
4505	}
4506	if avwpi.ProtectableItemType != "" {
4507		objectMap["protectableItemType"] = avwpi.ProtectableItemType
4508	}
4509	return json.Marshal(objectMap)
4510}
4511
4512// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4513func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4514	return nil, false
4515}
4516
4517// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4518func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4519	return nil, false
4520}
4521
4522// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4523func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4524	return nil, false
4525}
4526
4527// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4528func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4529	return &avwpi, true
4530}
4531
4532// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4533func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4534	return &avwpi, true
4535}
4536
4537// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4538func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4539	return nil, false
4540}
4541
4542// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4543func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4544	return nil, false
4545}
4546
4547// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4548func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4549	return nil, false
4550}
4551
4552// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4553func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4554	return nil, false
4555}
4556
4557// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4558func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4559	return nil, false
4560}
4561
4562// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4563func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4564	return nil, false
4565}
4566
4567// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4568func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4569	return nil, false
4570}
4571
4572// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4573func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4574	return nil, false
4575}
4576
4577// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4578func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4579	return nil, false
4580}
4581
4582// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem.
4583func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4584	return &avwpi, true
4585}
4586
4587// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item.
4588type BasicAzureVMWorkloadProtectedItem interface {
4589	AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4590	AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4591	AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4592	AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4593}
4594
4595// AzureVMWorkloadProtectedItem azure VM workload-specific protected item.
4596type AzureVMWorkloadProtectedItem struct {
4597	// FriendlyName - Friendly name of the DB represented by this backup item.
4598	FriendlyName *string `json:"friendlyName,omitempty"`
4599	// ServerName - Host/Cluster Name for instance or AG
4600	ServerName *string `json:"serverName,omitempty"`
4601	// ParentName - Parent name of the DB such as Instance or Availability Group.
4602	ParentName *string `json:"parentName,omitempty"`
4603	// ParentType - Parent type of protected item, example: for a DB, standalone server or distributed
4604	ParentType *string `json:"parentType,omitempty"`
4605	// ProtectionStatus - Backup status of this backup item.
4606	ProtectionStatus *string `json:"protectionStatus,omitempty"`
4607	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
4608	ProtectionState ProtectionState `json:"protectionState,omitempty"`
4609	// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending'
4610	LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4611	// LastBackupTime - Timestamp of the last backup operation on this backup item.
4612	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4613	// LastBackupErrorDetail - Error details in last backup
4614	LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4615	// ProtectedItemDataSourceID - Data ID of the protected item.
4616	ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4617	// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending'
4618	ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4619	// ExtendedInfo - Additional information for this backup item.
4620	ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4621	// KpisHealths - Health details of different KPIs
4622	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4623	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
4624	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4625	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
4626	WorkloadType DataSourceType `json:"workloadType,omitempty"`
4627	// ContainerName - Unique name of container
4628	ContainerName *string `json:"containerName,omitempty"`
4629	// SourceResourceID - ARM ID of the resource to be backed up.
4630	SourceResourceID *string `json:"sourceResourceId,omitempty"`
4631	// PolicyID - ID of the backup policy with which this item is backed up.
4632	PolicyID *string `json:"policyId,omitempty"`
4633	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
4634	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4635	// BackupSetName - Name of the backup set the backup item belongs to
4636	BackupSetName *string `json:"backupSetName,omitempty"`
4637	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
4638	CreateMode CreateMode `json:"createMode,omitempty"`
4639	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
4640	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4641	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
4642	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4643	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
4644	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4645	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
4646	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4647	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
4648	IsRehydrate *bool `json:"isRehydrate,omitempty"`
4649	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
4650	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4651}
4652
4653func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4654	var m map[string]interface{}
4655	err := json.Unmarshal(body, &m)
4656	if err != nil {
4657		return nil, err
4658	}
4659
4660	switch m["protectedItemType"] {
4661	case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4662		var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4663		err := json.Unmarshal(body, &avwsadpi)
4664		return avwsadpi, err
4665	case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4666		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4667		err := json.Unmarshal(body, &avwshdpi)
4668		return avwshdpi, err
4669	case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4670		var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4671		err := json.Unmarshal(body, &avwsdpi)
4672		return avwsdpi, err
4673	default:
4674		var avwpi AzureVMWorkloadProtectedItem
4675		err := json.Unmarshal(body, &avwpi)
4676		return avwpi, err
4677	}
4678}
4679func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4680	var rawMessages []*json.RawMessage
4681	err := json.Unmarshal(body, &rawMessages)
4682	if err != nil {
4683		return nil, err
4684	}
4685
4686	avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
4687
4688	for index, rawMessage := range rawMessages {
4689		avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
4690		if err != nil {
4691			return nil, err
4692		}
4693		avwpiArray[index] = avwpi
4694	}
4695	return avwpiArray, nil
4696}
4697
4698// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem.
4699func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
4700	avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
4701	objectMap := make(map[string]interface{})
4702	if avwpi.FriendlyName != nil {
4703		objectMap["friendlyName"] = avwpi.FriendlyName
4704	}
4705	if avwpi.ServerName != nil {
4706		objectMap["serverName"] = avwpi.ServerName
4707	}
4708	if avwpi.ParentName != nil {
4709		objectMap["parentName"] = avwpi.ParentName
4710	}
4711	if avwpi.ParentType != nil {
4712		objectMap["parentType"] = avwpi.ParentType
4713	}
4714	if avwpi.ProtectionStatus != nil {
4715		objectMap["protectionStatus"] = avwpi.ProtectionStatus
4716	}
4717	if avwpi.ProtectionState != "" {
4718		objectMap["protectionState"] = avwpi.ProtectionState
4719	}
4720	if avwpi.LastBackupStatus != "" {
4721		objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
4722	}
4723	if avwpi.LastBackupTime != nil {
4724		objectMap["lastBackupTime"] = avwpi.LastBackupTime
4725	}
4726	if avwpi.LastBackupErrorDetail != nil {
4727		objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
4728	}
4729	if avwpi.ProtectedItemDataSourceID != nil {
4730		objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
4731	}
4732	if avwpi.ProtectedItemHealthStatus != "" {
4733		objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
4734	}
4735	if avwpi.ExtendedInfo != nil {
4736		objectMap["extendedInfo"] = avwpi.ExtendedInfo
4737	}
4738	if avwpi.KpisHealths != nil {
4739		objectMap["kpisHealths"] = avwpi.KpisHealths
4740	}
4741	if avwpi.BackupManagementType != "" {
4742		objectMap["backupManagementType"] = avwpi.BackupManagementType
4743	}
4744	if avwpi.WorkloadType != "" {
4745		objectMap["workloadType"] = avwpi.WorkloadType
4746	}
4747	if avwpi.ContainerName != nil {
4748		objectMap["containerName"] = avwpi.ContainerName
4749	}
4750	if avwpi.SourceResourceID != nil {
4751		objectMap["sourceResourceId"] = avwpi.SourceResourceID
4752	}
4753	if avwpi.PolicyID != nil {
4754		objectMap["policyId"] = avwpi.PolicyID
4755	}
4756	if avwpi.LastRecoveryPoint != nil {
4757		objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
4758	}
4759	if avwpi.BackupSetName != nil {
4760		objectMap["backupSetName"] = avwpi.BackupSetName
4761	}
4762	if avwpi.CreateMode != "" {
4763		objectMap["createMode"] = avwpi.CreateMode
4764	}
4765	if avwpi.DeferredDeleteTimeInUTC != nil {
4766		objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
4767	}
4768	if avwpi.IsScheduledForDeferredDelete != nil {
4769		objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
4770	}
4771	if avwpi.DeferredDeleteTimeRemaining != nil {
4772		objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
4773	}
4774	if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
4775		objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
4776	}
4777	if avwpi.IsRehydrate != nil {
4778		objectMap["isRehydrate"] = avwpi.IsRehydrate
4779	}
4780	if avwpi.ProtectedItemType != "" {
4781		objectMap["protectedItemType"] = avwpi.ProtectedItemType
4782	}
4783	return json.Marshal(objectMap)
4784}
4785
4786// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4787func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4788	return nil, false
4789}
4790
4791// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4792func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4793	return nil, false
4794}
4795
4796// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4797func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4798	return nil, false
4799}
4800
4801// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4802func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4803	return nil, false
4804}
4805
4806// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4807func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4808	return nil, false
4809}
4810
4811// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4812func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4813	return nil, false
4814}
4815
4816// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4817func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4818	return &avwpi, true
4819}
4820
4821// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4822func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
4823	return &avwpi, true
4824}
4825
4826// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4827func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
4828	return nil, false
4829}
4830
4831// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4832func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
4833	return nil, false
4834}
4835
4836// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4837func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
4838	return nil, false
4839}
4840
4841// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4842func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
4843	return nil, false
4844}
4845
4846// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4847func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
4848	return nil, false
4849}
4850
4851// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4852func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
4853	return nil, false
4854}
4855
4856// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4857func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
4858	return nil, false
4859}
4860
4861// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem.
4862func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
4863	return &avwpi, true
4864}
4865
4866// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific
4867// backup item.
4868type AzureVMWorkloadProtectedItemExtendedInfo struct {
4869	// OldestRecoveryPoint - The oldest backup copy available for this backup item.
4870	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
4871	// RecoveryPointCount - Number of backup copies available for this backup item.
4872	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
4873	// PolicyState - Indicates consistency of policy object and policy applied to this backup item.
4874	PolicyState *string `json:"policyState,omitempty"`
4875}
4876
4877// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy.
4878type AzureVMWorkloadProtectionPolicy struct {
4879	// WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
4880	WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
4881	// Settings - Common settings for the backup management
4882	Settings *Settings `json:"settings,omitempty"`
4883	// SubProtectionPolicy - List of sub-protection policies which includes schedule and retention
4884	SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
4885	// MakePolicyConsistent - Fix the policy inconsistency
4886	MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
4887	// ProtectedItemsCount - Number of items associated with this policy.
4888	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
4889	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
4890	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
4891}
4892
4893// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy.
4894func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
4895	avwpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload
4896	objectMap := make(map[string]interface{})
4897	if avwpp.WorkLoadType != "" {
4898		objectMap["workLoadType"] = avwpp.WorkLoadType
4899	}
4900	if avwpp.Settings != nil {
4901		objectMap["settings"] = avwpp.Settings
4902	}
4903	if avwpp.SubProtectionPolicy != nil {
4904		objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
4905	}
4906	if avwpp.MakePolicyConsistent != nil {
4907		objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
4908	}
4909	if avwpp.ProtectedItemsCount != nil {
4910		objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
4911	}
4912	if avwpp.BackupManagementType != "" {
4913		objectMap["backupManagementType"] = avwpp.BackupManagementType
4914	}
4915	return json.Marshal(objectMap)
4916}
4917
4918// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4919func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
4920	return &avwpp, true
4921}
4922
4923// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4924func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
4925	return nil, false
4926}
4927
4928// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4929func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
4930	return nil, false
4931}
4932
4933// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4934func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
4935	return nil, false
4936}
4937
4938// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4939func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
4940	return nil, false
4941}
4942
4943// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4944func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
4945	return nil, false
4946}
4947
4948// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4949func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
4950	return nil, false
4951}
4952
4953// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy.
4954func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
4955	return &avwpp, true
4956}
4957
4958// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP
4959// ASE Database.
4960type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
4961	// FriendlyName - Friendly name of the DB represented by this backup item.
4962	FriendlyName *string `json:"friendlyName,omitempty"`
4963	// ServerName - Host/Cluster Name for instance or AG
4964	ServerName *string `json:"serverName,omitempty"`
4965	// ParentName - Parent name of the DB such as Instance or Availability Group.
4966	ParentName *string `json:"parentName,omitempty"`
4967	// ParentType - Parent type of protected item, example: for a DB, standalone server or distributed
4968	ParentType *string `json:"parentType,omitempty"`
4969	// ProtectionStatus - Backup status of this backup item.
4970	ProtectionStatus *string `json:"protectionStatus,omitempty"`
4971	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
4972	ProtectionState ProtectionState `json:"protectionState,omitempty"`
4973	// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending'
4974	LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4975	// LastBackupTime - Timestamp of the last backup operation on this backup item.
4976	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4977	// LastBackupErrorDetail - Error details in last backup
4978	LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4979	// ProtectedItemDataSourceID - Data ID of the protected item.
4980	ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4981	// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending'
4982	ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4983	// ExtendedInfo - Additional information for this backup item.
4984	ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4985	// KpisHealths - Health details of different KPIs
4986	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4987	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
4988	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4989	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
4990	WorkloadType DataSourceType `json:"workloadType,omitempty"`
4991	// ContainerName - Unique name of container
4992	ContainerName *string `json:"containerName,omitempty"`
4993	// SourceResourceID - ARM ID of the resource to be backed up.
4994	SourceResourceID *string `json:"sourceResourceId,omitempty"`
4995	// PolicyID - ID of the backup policy with which this item is backed up.
4996	PolicyID *string `json:"policyId,omitempty"`
4997	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
4998	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4999	// BackupSetName - Name of the backup set the backup item belongs to
5000	BackupSetName *string `json:"backupSetName,omitempty"`
5001	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
5002	CreateMode CreateMode `json:"createMode,omitempty"`
5003	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
5004	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5005	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
5006	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5007	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
5008	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5009	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
5010	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5011	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
5012	IsRehydrate *bool `json:"isRehydrate,omitempty"`
5013	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
5014	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5015}
5016
5017// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5018func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5019	avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
5020	objectMap := make(map[string]interface{})
5021	if avwsadpi.FriendlyName != nil {
5022		objectMap["friendlyName"] = avwsadpi.FriendlyName
5023	}
5024	if avwsadpi.ServerName != nil {
5025		objectMap["serverName"] = avwsadpi.ServerName
5026	}
5027	if avwsadpi.ParentName != nil {
5028		objectMap["parentName"] = avwsadpi.ParentName
5029	}
5030	if avwsadpi.ParentType != nil {
5031		objectMap["parentType"] = avwsadpi.ParentType
5032	}
5033	if avwsadpi.ProtectionStatus != nil {
5034		objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
5035	}
5036	if avwsadpi.ProtectionState != "" {
5037		objectMap["protectionState"] = avwsadpi.ProtectionState
5038	}
5039	if avwsadpi.LastBackupStatus != "" {
5040		objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
5041	}
5042	if avwsadpi.LastBackupTime != nil {
5043		objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
5044	}
5045	if avwsadpi.LastBackupErrorDetail != nil {
5046		objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
5047	}
5048	if avwsadpi.ProtectedItemDataSourceID != nil {
5049		objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
5050	}
5051	if avwsadpi.ProtectedItemHealthStatus != "" {
5052		objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
5053	}
5054	if avwsadpi.ExtendedInfo != nil {
5055		objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
5056	}
5057	if avwsadpi.KpisHealths != nil {
5058		objectMap["kpisHealths"] = avwsadpi.KpisHealths
5059	}
5060	if avwsadpi.BackupManagementType != "" {
5061		objectMap["backupManagementType"] = avwsadpi.BackupManagementType
5062	}
5063	if avwsadpi.WorkloadType != "" {
5064		objectMap["workloadType"] = avwsadpi.WorkloadType
5065	}
5066	if avwsadpi.ContainerName != nil {
5067		objectMap["containerName"] = avwsadpi.ContainerName
5068	}
5069	if avwsadpi.SourceResourceID != nil {
5070		objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
5071	}
5072	if avwsadpi.PolicyID != nil {
5073		objectMap["policyId"] = avwsadpi.PolicyID
5074	}
5075	if avwsadpi.LastRecoveryPoint != nil {
5076		objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
5077	}
5078	if avwsadpi.BackupSetName != nil {
5079		objectMap["backupSetName"] = avwsadpi.BackupSetName
5080	}
5081	if avwsadpi.CreateMode != "" {
5082		objectMap["createMode"] = avwsadpi.CreateMode
5083	}
5084	if avwsadpi.DeferredDeleteTimeInUTC != nil {
5085		objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
5086	}
5087	if avwsadpi.IsScheduledForDeferredDelete != nil {
5088		objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
5089	}
5090	if avwsadpi.DeferredDeleteTimeRemaining != nil {
5091		objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
5092	}
5093	if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
5094		objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
5095	}
5096	if avwsadpi.IsRehydrate != nil {
5097		objectMap["isRehydrate"] = avwsadpi.IsRehydrate
5098	}
5099	if avwsadpi.ProtectedItemType != "" {
5100		objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
5101	}
5102	return json.Marshal(objectMap)
5103}
5104
5105// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5106func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5107	return nil, false
5108}
5109
5110// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5111func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5112	return nil, false
5113}
5114
5115// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5116func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5117	return nil, false
5118}
5119
5120// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5121func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5122	return nil, false
5123}
5124
5125// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5126func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5127	return nil, false
5128}
5129
5130// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5131func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5132	return nil, false
5133}
5134
5135// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5136func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5137	return nil, false
5138}
5139
5140// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5141func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5142	return &avwsadpi, true
5143}
5144
5145// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5146func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5147	return &avwsadpi, true
5148}
5149
5150// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5151func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5152	return nil, false
5153}
5154
5155// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5156func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5157	return nil, false
5158}
5159
5160// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5161func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5162	return nil, false
5163}
5164
5165// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5166func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5167	return nil, false
5168}
5169
5170// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5171func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5172	return nil, false
5173}
5174
5175// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5176func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5177	return nil, false
5178}
5179
5180// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem.
5181func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5182	return &avwsadpi, true
5183}
5184
5185// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE
5186// Database.
5187type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5188	// ParentName - Name for instance or AG
5189	ParentName *string `json:"parentName,omitempty"`
5190	// ServerName - Host/Cluster Name for instance or AG
5191	ServerName *string `json:"serverName,omitempty"`
5192	// IsAutoProtectable - Indicates if workload item is auto-protectable
5193	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5194	// Subinquireditemcount - For instance or AG, indicates number of DB's present
5195	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5196	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
5197	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5198	// BackupManagementType - Type of backup management to backup an item.
5199	BackupManagementType *string `json:"backupManagementType,omitempty"`
5200	// WorkloadType - Type of workload for the backup management
5201	WorkloadType *string `json:"workloadType,omitempty"`
5202	// FriendlyName - Friendly name of the backup item.
5203	FriendlyName *string `json:"friendlyName,omitempty"`
5204	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
5205	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5206	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
5207	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5208}
5209
5210// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5211func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5212	avwsadwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase
5213	objectMap := make(map[string]interface{})
5214	if avwsadwi.ParentName != nil {
5215		objectMap["parentName"] = avwsadwi.ParentName
5216	}
5217	if avwsadwi.ServerName != nil {
5218		objectMap["serverName"] = avwsadwi.ServerName
5219	}
5220	if avwsadwi.IsAutoProtectable != nil {
5221		objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5222	}
5223	if avwsadwi.Subinquireditemcount != nil {
5224		objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5225	}
5226	if avwsadwi.SubWorkloadItemCount != nil {
5227		objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5228	}
5229	if avwsadwi.BackupManagementType != nil {
5230		objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5231	}
5232	if avwsadwi.WorkloadType != nil {
5233		objectMap["workloadType"] = avwsadwi.WorkloadType
5234	}
5235	if avwsadwi.FriendlyName != nil {
5236		objectMap["friendlyName"] = avwsadwi.FriendlyName
5237	}
5238	if avwsadwi.ProtectionState != "" {
5239		objectMap["protectionState"] = avwsadwi.ProtectionState
5240	}
5241	if avwsadwi.WorkloadItemType != "" {
5242		objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5243	}
5244	return json.Marshal(objectMap)
5245}
5246
5247// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5248func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5249	return nil, false
5250}
5251
5252// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5253func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5254	return &avwsadwi, true
5255}
5256
5257// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5258func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5259	return &avwsadwi, true
5260}
5261
5262// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5263func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5264	return nil, false
5265}
5266
5267// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5268func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5269	return nil, false
5270}
5271
5272// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5273func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5274	return nil, false
5275}
5276
5277// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5278func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5279	return nil, false
5280}
5281
5282// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5283func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5284	return nil, false
5285}
5286
5287// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5288func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5289	return nil, false
5290}
5291
5292// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem.
5293func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5294	return &avwsadwi, true
5295}
5296
5297// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP
5298// ASE System.
5299type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5300	// ParentName - Name for instance or AG
5301	ParentName *string `json:"parentName,omitempty"`
5302	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
5303	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
5304	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5305	// ServerName - Host/Cluster Name for instance or AG
5306	ServerName *string `json:"serverName,omitempty"`
5307	// IsAutoProtectable - Indicates if protectable item is auto-protectable
5308	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5309	// IsAutoProtected - Indicates if protectable item is auto-protected
5310	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5311	// Subinquireditemcount - For instance or AG, indicates number of DB's present
5312	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5313	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
5314	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5315	// Prebackupvalidation - Pre-backup validation for protectable objects
5316	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5317	// BackupManagementType - Type of backup management to backup an item.
5318	BackupManagementType *string `json:"backupManagementType,omitempty"`
5319	// WorkloadType - Type of workload for the backup management
5320	WorkloadType *string `json:"workloadType,omitempty"`
5321	// FriendlyName - Friendly name of the backup item.
5322	FriendlyName *string `json:"friendlyName,omitempty"`
5323	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
5324	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5325	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
5326	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5327}
5328
5329// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem.
5330func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5331	avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5332	objectMap := make(map[string]interface{})
5333	if avwsaspi.ParentName != nil {
5334		objectMap["parentName"] = avwsaspi.ParentName
5335	}
5336	if avwsaspi.ParentUniqueName != nil {
5337		objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5338	}
5339	if avwsaspi.ServerName != nil {
5340		objectMap["serverName"] = avwsaspi.ServerName
5341	}
5342	if avwsaspi.IsAutoProtectable != nil {
5343		objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5344	}
5345	if avwsaspi.IsAutoProtected != nil {
5346		objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5347	}
5348	if avwsaspi.Subinquireditemcount != nil {
5349		objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5350	}
5351	if avwsaspi.Subprotectableitemcount != nil {
5352		objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5353	}
5354	if avwsaspi.Prebackupvalidation != nil {
5355		objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5356	}
5357	if avwsaspi.BackupManagementType != nil {
5358		objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5359	}
5360	if avwsaspi.WorkloadType != nil {
5361		objectMap["workloadType"] = avwsaspi.WorkloadType
5362	}
5363	if avwsaspi.FriendlyName != nil {
5364		objectMap["friendlyName"] = avwsaspi.FriendlyName
5365	}
5366	if avwsaspi.ProtectionState != "" {
5367		objectMap["protectionState"] = avwsaspi.ProtectionState
5368	}
5369	if avwsaspi.ProtectableItemType != "" {
5370		objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5371	}
5372	return json.Marshal(objectMap)
5373}
5374
5375// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5376func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5377	return nil, false
5378}
5379
5380// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5381func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5382	return nil, false
5383}
5384
5385// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5386func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5387	return nil, false
5388}
5389
5390// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5391func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5392	return nil, false
5393}
5394
5395// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5396func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5397	return &avwsaspi, true
5398}
5399
5400// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5401func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5402	return &avwsaspi, true
5403}
5404
5405// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5406func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5407	return nil, false
5408}
5409
5410// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5411func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5412	return nil, false
5413}
5414
5415// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5416func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5417	return nil, false
5418}
5419
5420// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5421func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5422	return nil, false
5423}
5424
5425// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5426func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5427	return nil, false
5428}
5429
5430// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5431func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5432	return nil, false
5433}
5434
5435// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5436func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5437	return nil, false
5438}
5439
5440// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5441func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5442	return nil, false
5443}
5444
5445// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem.
5446func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5447	return &avwsaspi, true
5448}
5449
5450// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE
5451// System.
5452type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5453	// ParentName - Name for instance or AG
5454	ParentName *string `json:"parentName,omitempty"`
5455	// ServerName - Host/Cluster Name for instance or AG
5456	ServerName *string `json:"serverName,omitempty"`
5457	// IsAutoProtectable - Indicates if workload item is auto-protectable
5458	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5459	// Subinquireditemcount - For instance or AG, indicates number of DB's present
5460	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5461	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
5462	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5463	// BackupManagementType - Type of backup management to backup an item.
5464	BackupManagementType *string `json:"backupManagementType,omitempty"`
5465	// WorkloadType - Type of workload for the backup management
5466	WorkloadType *string `json:"workloadType,omitempty"`
5467	// FriendlyName - Friendly name of the backup item.
5468	FriendlyName *string `json:"friendlyName,omitempty"`
5469	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
5470	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5471	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
5472	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5473}
5474
5475// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem.
5476func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5477	avwsaswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem
5478	objectMap := make(map[string]interface{})
5479	if avwsaswi.ParentName != nil {
5480		objectMap["parentName"] = avwsaswi.ParentName
5481	}
5482	if avwsaswi.ServerName != nil {
5483		objectMap["serverName"] = avwsaswi.ServerName
5484	}
5485	if avwsaswi.IsAutoProtectable != nil {
5486		objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5487	}
5488	if avwsaswi.Subinquireditemcount != nil {
5489		objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5490	}
5491	if avwsaswi.SubWorkloadItemCount != nil {
5492		objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5493	}
5494	if avwsaswi.BackupManagementType != nil {
5495		objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5496	}
5497	if avwsaswi.WorkloadType != nil {
5498		objectMap["workloadType"] = avwsaswi.WorkloadType
5499	}
5500	if avwsaswi.FriendlyName != nil {
5501		objectMap["friendlyName"] = avwsaswi.FriendlyName
5502	}
5503	if avwsaswi.ProtectionState != "" {
5504		objectMap["protectionState"] = avwsaswi.ProtectionState
5505	}
5506	if avwsaswi.WorkloadItemType != "" {
5507		objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5508	}
5509	return json.Marshal(objectMap)
5510}
5511
5512// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5513func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5514	return nil, false
5515}
5516
5517// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5518func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5519	return &avwsaswi, true
5520}
5521
5522// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5523func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5524	return nil, false
5525}
5526
5527// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5528func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5529	return &avwsaswi, true
5530}
5531
5532// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5533func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5534	return nil, false
5535}
5536
5537// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5538func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5539	return nil, false
5540}
5541
5542// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5543func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5544	return nil, false
5545}
5546
5547// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5548func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5549	return nil, false
5550}
5551
5552// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5553func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5554	return nil, false
5555}
5556
5557// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem.
5558func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5559	return &avwsaswi, true
5560}
5561
5562// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing
5563// SAP HANA Database.
5564type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5565	// ParentName - Name for instance or AG
5566	ParentName *string `json:"parentName,omitempty"`
5567	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
5568	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
5569	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5570	// ServerName - Host/Cluster Name for instance or AG
5571	ServerName *string `json:"serverName,omitempty"`
5572	// IsAutoProtectable - Indicates if protectable item is auto-protectable
5573	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5574	// IsAutoProtected - Indicates if protectable item is auto-protected
5575	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5576	// Subinquireditemcount - For instance or AG, indicates number of DB's present
5577	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5578	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
5579	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5580	// Prebackupvalidation - Pre-backup validation for protectable objects
5581	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5582	// BackupManagementType - Type of backup management to backup an item.
5583	BackupManagementType *string `json:"backupManagementType,omitempty"`
5584	// WorkloadType - Type of workload for the backup management
5585	WorkloadType *string `json:"workloadType,omitempty"`
5586	// FriendlyName - Friendly name of the backup item.
5587	FriendlyName *string `json:"friendlyName,omitempty"`
5588	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
5589	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5590	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
5591	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5592}
5593
5594// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5595func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5596	avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5597	objectMap := make(map[string]interface{})
5598	if avwshdpi.ParentName != nil {
5599		objectMap["parentName"] = avwshdpi.ParentName
5600	}
5601	if avwshdpi.ParentUniqueName != nil {
5602		objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5603	}
5604	if avwshdpi.ServerName != nil {
5605		objectMap["serverName"] = avwshdpi.ServerName
5606	}
5607	if avwshdpi.IsAutoProtectable != nil {
5608		objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5609	}
5610	if avwshdpi.IsAutoProtected != nil {
5611		objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5612	}
5613	if avwshdpi.Subinquireditemcount != nil {
5614		objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5615	}
5616	if avwshdpi.Subprotectableitemcount != nil {
5617		objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5618	}
5619	if avwshdpi.Prebackupvalidation != nil {
5620		objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5621	}
5622	if avwshdpi.BackupManagementType != nil {
5623		objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5624	}
5625	if avwshdpi.WorkloadType != nil {
5626		objectMap["workloadType"] = avwshdpi.WorkloadType
5627	}
5628	if avwshdpi.FriendlyName != nil {
5629		objectMap["friendlyName"] = avwshdpi.FriendlyName
5630	}
5631	if avwshdpi.ProtectionState != "" {
5632		objectMap["protectionState"] = avwshdpi.ProtectionState
5633	}
5634	if avwshdpi.ProtectableItemType != "" {
5635		objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5636	}
5637	return json.Marshal(objectMap)
5638}
5639
5640// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5641func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5642	return nil, false
5643}
5644
5645// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5646func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5647	return nil, false
5648}
5649
5650// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5651func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5652	return nil, false
5653}
5654
5655// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5656func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5657	return nil, false
5658}
5659
5660// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5661func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5662	return &avwshdpi, true
5663}
5664
5665// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5666func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5667	return nil, false
5668}
5669
5670// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5671func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5672	return &avwshdpi, true
5673}
5674
5675// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5676func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5677	return nil, false
5678}
5679
5680// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5681func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5682	return nil, false
5683}
5684
5685// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5686func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5687	return nil, false
5688}
5689
5690// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5691func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5692	return nil, false
5693}
5694
5695// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5696func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5697	return nil, false
5698}
5699
5700// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5701func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5702	return nil, false
5703}
5704
5705// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5706func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5707	return nil, false
5708}
5709
5710// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem.
5711func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5712	return &avwshdpi, true
5713}
5714
5715// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP
5716// HANA Database.
5717type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
5718	// FriendlyName - Friendly name of the DB represented by this backup item.
5719	FriendlyName *string `json:"friendlyName,omitempty"`
5720	// ServerName - Host/Cluster Name for instance or AG
5721	ServerName *string `json:"serverName,omitempty"`
5722	// ParentName - Parent name of the DB such as Instance or Availability Group.
5723	ParentName *string `json:"parentName,omitempty"`
5724	// ParentType - Parent type of protected item, example: for a DB, standalone server or distributed
5725	ParentType *string `json:"parentType,omitempty"`
5726	// ProtectionStatus - Backup status of this backup item.
5727	ProtectionStatus *string `json:"protectionStatus,omitempty"`
5728	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
5729	ProtectionState ProtectionState `json:"protectionState,omitempty"`
5730	// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending'
5731	LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5732	// LastBackupTime - Timestamp of the last backup operation on this backup item.
5733	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5734	// LastBackupErrorDetail - Error details in last backup
5735	LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5736	// ProtectedItemDataSourceID - Data ID of the protected item.
5737	ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5738	// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending'
5739	ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5740	// ExtendedInfo - Additional information for this backup item.
5741	ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5742	// KpisHealths - Health details of different KPIs
5743	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5744	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
5745	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5746	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
5747	WorkloadType DataSourceType `json:"workloadType,omitempty"`
5748	// ContainerName - Unique name of container
5749	ContainerName *string `json:"containerName,omitempty"`
5750	// SourceResourceID - ARM ID of the resource to be backed up.
5751	SourceResourceID *string `json:"sourceResourceId,omitempty"`
5752	// PolicyID - ID of the backup policy with which this item is backed up.
5753	PolicyID *string `json:"policyId,omitempty"`
5754	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
5755	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5756	// BackupSetName - Name of the backup set the backup item belongs to
5757	BackupSetName *string `json:"backupSetName,omitempty"`
5758	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
5759	CreateMode CreateMode `json:"createMode,omitempty"`
5760	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
5761	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5762	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
5763	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5764	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
5765	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5766	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
5767	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5768	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
5769	IsRehydrate *bool `json:"isRehydrate,omitempty"`
5770	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
5771	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5772}
5773
5774// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5775func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5776	avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
5777	objectMap := make(map[string]interface{})
5778	if avwshdpi.FriendlyName != nil {
5779		objectMap["friendlyName"] = avwshdpi.FriendlyName
5780	}
5781	if avwshdpi.ServerName != nil {
5782		objectMap["serverName"] = avwshdpi.ServerName
5783	}
5784	if avwshdpi.ParentName != nil {
5785		objectMap["parentName"] = avwshdpi.ParentName
5786	}
5787	if avwshdpi.ParentType != nil {
5788		objectMap["parentType"] = avwshdpi.ParentType
5789	}
5790	if avwshdpi.ProtectionStatus != nil {
5791		objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
5792	}
5793	if avwshdpi.ProtectionState != "" {
5794		objectMap["protectionState"] = avwshdpi.ProtectionState
5795	}
5796	if avwshdpi.LastBackupStatus != "" {
5797		objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
5798	}
5799	if avwshdpi.LastBackupTime != nil {
5800		objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
5801	}
5802	if avwshdpi.LastBackupErrorDetail != nil {
5803		objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
5804	}
5805	if avwshdpi.ProtectedItemDataSourceID != nil {
5806		objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
5807	}
5808	if avwshdpi.ProtectedItemHealthStatus != "" {
5809		objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
5810	}
5811	if avwshdpi.ExtendedInfo != nil {
5812		objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
5813	}
5814	if avwshdpi.KpisHealths != nil {
5815		objectMap["kpisHealths"] = avwshdpi.KpisHealths
5816	}
5817	if avwshdpi.BackupManagementType != "" {
5818		objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5819	}
5820	if avwshdpi.WorkloadType != "" {
5821		objectMap["workloadType"] = avwshdpi.WorkloadType
5822	}
5823	if avwshdpi.ContainerName != nil {
5824		objectMap["containerName"] = avwshdpi.ContainerName
5825	}
5826	if avwshdpi.SourceResourceID != nil {
5827		objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
5828	}
5829	if avwshdpi.PolicyID != nil {
5830		objectMap["policyId"] = avwshdpi.PolicyID
5831	}
5832	if avwshdpi.LastRecoveryPoint != nil {
5833		objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
5834	}
5835	if avwshdpi.BackupSetName != nil {
5836		objectMap["backupSetName"] = avwshdpi.BackupSetName
5837	}
5838	if avwshdpi.CreateMode != "" {
5839		objectMap["createMode"] = avwshdpi.CreateMode
5840	}
5841	if avwshdpi.DeferredDeleteTimeInUTC != nil {
5842		objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
5843	}
5844	if avwshdpi.IsScheduledForDeferredDelete != nil {
5845		objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
5846	}
5847	if avwshdpi.DeferredDeleteTimeRemaining != nil {
5848		objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
5849	}
5850	if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
5851		objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
5852	}
5853	if avwshdpi.IsRehydrate != nil {
5854		objectMap["isRehydrate"] = avwshdpi.IsRehydrate
5855	}
5856	if avwshdpi.ProtectedItemType != "" {
5857		objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
5858	}
5859	return json.Marshal(objectMap)
5860}
5861
5862// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5863func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5864	return nil, false
5865}
5866
5867// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5868func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5869	return nil, false
5870}
5871
5872// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5873func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5874	return nil, false
5875}
5876
5877// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5878func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5879	return nil, false
5880}
5881
5882// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5883func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5884	return nil, false
5885}
5886
5887// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5888func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5889	return nil, false
5890}
5891
5892// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5893func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5894	return nil, false
5895}
5896
5897// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5898func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5899	return &avwshdpi, true
5900}
5901
5902// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5903func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5904	return nil, false
5905}
5906
5907// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5908func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5909	return &avwshdpi, true
5910}
5911
5912// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5913func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5914	return nil, false
5915}
5916
5917// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5918func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5919	return nil, false
5920}
5921
5922// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5923func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5924	return nil, false
5925}
5926
5927// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5928func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5929	return nil, false
5930}
5931
5932// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5933func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5934	return nil, false
5935}
5936
5937// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem.
5938func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5939	return &avwshdpi, true
5940}
5941
5942// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP
5943// HANA Database.
5944type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
5945	// ParentName - Name for instance or AG
5946	ParentName *string `json:"parentName,omitempty"`
5947	// ServerName - Host/Cluster Name for instance or AG
5948	ServerName *string `json:"serverName,omitempty"`
5949	// IsAutoProtectable - Indicates if workload item is auto-protectable
5950	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5951	// Subinquireditemcount - For instance or AG, indicates number of DB's present
5952	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5953	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
5954	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5955	// BackupManagementType - Type of backup management to backup an item.
5956	BackupManagementType *string `json:"backupManagementType,omitempty"`
5957	// WorkloadType - Type of workload for the backup management
5958	WorkloadType *string `json:"workloadType,omitempty"`
5959	// FriendlyName - Friendly name of the backup item.
5960	FriendlyName *string `json:"friendlyName,omitempty"`
5961	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
5962	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5963	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
5964	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5965}
5966
5967// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
5968func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5969	avwshdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase
5970	objectMap := make(map[string]interface{})
5971	if avwshdwi.ParentName != nil {
5972		objectMap["parentName"] = avwshdwi.ParentName
5973	}
5974	if avwshdwi.ServerName != nil {
5975		objectMap["serverName"] = avwshdwi.ServerName
5976	}
5977	if avwshdwi.IsAutoProtectable != nil {
5978		objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
5979	}
5980	if avwshdwi.Subinquireditemcount != nil {
5981		objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
5982	}
5983	if avwshdwi.SubWorkloadItemCount != nil {
5984		objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
5985	}
5986	if avwshdwi.BackupManagementType != nil {
5987		objectMap["backupManagementType"] = avwshdwi.BackupManagementType
5988	}
5989	if avwshdwi.WorkloadType != nil {
5990		objectMap["workloadType"] = avwshdwi.WorkloadType
5991	}
5992	if avwshdwi.FriendlyName != nil {
5993		objectMap["friendlyName"] = avwshdwi.FriendlyName
5994	}
5995	if avwshdwi.ProtectionState != "" {
5996		objectMap["protectionState"] = avwshdwi.ProtectionState
5997	}
5998	if avwshdwi.WorkloadItemType != "" {
5999		objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
6000	}
6001	return json.Marshal(objectMap)
6002}
6003
6004// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6005func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6006	return nil, false
6007}
6008
6009// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6010func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6011	return &avwshdwi, true
6012}
6013
6014// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6015func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6016	return nil, false
6017}
6018
6019// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6020func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6021	return nil, false
6022}
6023
6024// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6025func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6026	return &avwshdwi, true
6027}
6028
6029// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6030func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6031	return nil, false
6032}
6033
6034// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6035func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6036	return nil, false
6037}
6038
6039// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6040func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6041	return nil, false
6042}
6043
6044// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6045func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6046	return nil, false
6047}
6048
6049// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem.
6050func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6051	return &avwshdwi, true
6052}
6053
6054// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP
6055// HANA System.
6056type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
6057	// ParentName - Name for instance or AG
6058	ParentName *string `json:"parentName,omitempty"`
6059	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
6060	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
6061	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6062	// ServerName - Host/Cluster Name for instance or AG
6063	ServerName *string `json:"serverName,omitempty"`
6064	// IsAutoProtectable - Indicates if protectable item is auto-protectable
6065	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6066	// IsAutoProtected - Indicates if protectable item is auto-protected
6067	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6068	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6069	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6070	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
6071	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6072	// Prebackupvalidation - Pre-backup validation for protectable objects
6073	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6074	// BackupManagementType - Type of backup management to backup an item.
6075	BackupManagementType *string `json:"backupManagementType,omitempty"`
6076	// WorkloadType - Type of workload for the backup management
6077	WorkloadType *string `json:"workloadType,omitempty"`
6078	// FriendlyName - Friendly name of the backup item.
6079	FriendlyName *string `json:"friendlyName,omitempty"`
6080	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6081	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6082	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
6083	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6084}
6085
6086// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem.
6087func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
6088	avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
6089	objectMap := make(map[string]interface{})
6090	if avwshspi.ParentName != nil {
6091		objectMap["parentName"] = avwshspi.ParentName
6092	}
6093	if avwshspi.ParentUniqueName != nil {
6094		objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
6095	}
6096	if avwshspi.ServerName != nil {
6097		objectMap["serverName"] = avwshspi.ServerName
6098	}
6099	if avwshspi.IsAutoProtectable != nil {
6100		objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
6101	}
6102	if avwshspi.IsAutoProtected != nil {
6103		objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6104	}
6105	if avwshspi.Subinquireditemcount != nil {
6106		objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6107	}
6108	if avwshspi.Subprotectableitemcount != nil {
6109		objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6110	}
6111	if avwshspi.Prebackupvalidation != nil {
6112		objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6113	}
6114	if avwshspi.BackupManagementType != nil {
6115		objectMap["backupManagementType"] = avwshspi.BackupManagementType
6116	}
6117	if avwshspi.WorkloadType != nil {
6118		objectMap["workloadType"] = avwshspi.WorkloadType
6119	}
6120	if avwshspi.FriendlyName != nil {
6121		objectMap["friendlyName"] = avwshspi.FriendlyName
6122	}
6123	if avwshspi.ProtectionState != "" {
6124		objectMap["protectionState"] = avwshspi.ProtectionState
6125	}
6126	if avwshspi.ProtectableItemType != "" {
6127		objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6128	}
6129	return json.Marshal(objectMap)
6130}
6131
6132// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6133func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6134	return nil, false
6135}
6136
6137// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6138func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6139	return nil, false
6140}
6141
6142// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6143func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6144	return nil, false
6145}
6146
6147// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6148func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6149	return nil, false
6150}
6151
6152// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6153func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6154	return &avwshspi, true
6155}
6156
6157// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6158func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6159	return nil, false
6160}
6161
6162// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6163func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6164	return nil, false
6165}
6166
6167// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6168func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6169	return &avwshspi, true
6170}
6171
6172// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6173func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6174	return nil, false
6175}
6176
6177// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6178func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6179	return nil, false
6180}
6181
6182// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6183func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6184	return nil, false
6185}
6186
6187// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6188func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6189	return nil, false
6190}
6191
6192// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6193func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6194	return nil, false
6195}
6196
6197// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6198func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6199	return nil, false
6200}
6201
6202// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem.
6203func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6204	return &avwshspi, true
6205}
6206
6207// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA
6208// System.
6209type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6210	// ParentName - Name for instance or AG
6211	ParentName *string `json:"parentName,omitempty"`
6212	// ServerName - Host/Cluster Name for instance or AG
6213	ServerName *string `json:"serverName,omitempty"`
6214	// IsAutoProtectable - Indicates if workload item is auto-protectable
6215	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6216	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6217	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6218	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
6219	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6220	// BackupManagementType - Type of backup management to backup an item.
6221	BackupManagementType *string `json:"backupManagementType,omitempty"`
6222	// WorkloadType - Type of workload for the backup management
6223	WorkloadType *string `json:"workloadType,omitempty"`
6224	// FriendlyName - Friendly name of the backup item.
6225	FriendlyName *string `json:"friendlyName,omitempty"`
6226	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6227	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6228	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
6229	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6230}
6231
6232// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6233func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6234	avwshswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem
6235	objectMap := make(map[string]interface{})
6236	if avwshswi.ParentName != nil {
6237		objectMap["parentName"] = avwshswi.ParentName
6238	}
6239	if avwshswi.ServerName != nil {
6240		objectMap["serverName"] = avwshswi.ServerName
6241	}
6242	if avwshswi.IsAutoProtectable != nil {
6243		objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6244	}
6245	if avwshswi.Subinquireditemcount != nil {
6246		objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6247	}
6248	if avwshswi.SubWorkloadItemCount != nil {
6249		objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6250	}
6251	if avwshswi.BackupManagementType != nil {
6252		objectMap["backupManagementType"] = avwshswi.BackupManagementType
6253	}
6254	if avwshswi.WorkloadType != nil {
6255		objectMap["workloadType"] = avwshswi.WorkloadType
6256	}
6257	if avwshswi.FriendlyName != nil {
6258		objectMap["friendlyName"] = avwshswi.FriendlyName
6259	}
6260	if avwshswi.ProtectionState != "" {
6261		objectMap["protectionState"] = avwshswi.ProtectionState
6262	}
6263	if avwshswi.WorkloadItemType != "" {
6264		objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6265	}
6266	return json.Marshal(objectMap)
6267}
6268
6269// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6270func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6271	return nil, false
6272}
6273
6274// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6275func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6276	return &avwshswi, true
6277}
6278
6279// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6280func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6281	return nil, false
6282}
6283
6284// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6285func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6286	return nil, false
6287}
6288
6289// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6290func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6291	return nil, false
6292}
6293
6294// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6295func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6296	return &avwshswi, true
6297}
6298
6299// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6300func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6301	return nil, false
6302}
6303
6304// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6305func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6306	return nil, false
6307}
6308
6309// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6310func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6311	return nil, false
6312}
6313
6314// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem.
6315func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6316	return &avwshswi, true
6317}
6318
6319// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item
6320// representing SQL Availability Group.
6321type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6322	// ParentName - Name for instance or AG
6323	ParentName *string `json:"parentName,omitempty"`
6324	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
6325	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
6326	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6327	// ServerName - Host/Cluster Name for instance or AG
6328	ServerName *string `json:"serverName,omitempty"`
6329	// IsAutoProtectable - Indicates if protectable item is auto-protectable
6330	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6331	// IsAutoProtected - Indicates if protectable item is auto-protected
6332	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6333	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6334	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6335	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
6336	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6337	// Prebackupvalidation - Pre-backup validation for protectable objects
6338	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6339	// BackupManagementType - Type of backup management to backup an item.
6340	BackupManagementType *string `json:"backupManagementType,omitempty"`
6341	// WorkloadType - Type of workload for the backup management
6342	WorkloadType *string `json:"workloadType,omitempty"`
6343	// FriendlyName - Friendly name of the backup item.
6344	FriendlyName *string `json:"friendlyName,omitempty"`
6345	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6346	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6347	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
6348	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6349}
6350
6351// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6352func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6353	avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6354	objectMap := make(map[string]interface{})
6355	if avwsagpi.ParentName != nil {
6356		objectMap["parentName"] = avwsagpi.ParentName
6357	}
6358	if avwsagpi.ParentUniqueName != nil {
6359		objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6360	}
6361	if avwsagpi.ServerName != nil {
6362		objectMap["serverName"] = avwsagpi.ServerName
6363	}
6364	if avwsagpi.IsAutoProtectable != nil {
6365		objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6366	}
6367	if avwsagpi.IsAutoProtected != nil {
6368		objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6369	}
6370	if avwsagpi.Subinquireditemcount != nil {
6371		objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6372	}
6373	if avwsagpi.Subprotectableitemcount != nil {
6374		objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6375	}
6376	if avwsagpi.Prebackupvalidation != nil {
6377		objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6378	}
6379	if avwsagpi.BackupManagementType != nil {
6380		objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6381	}
6382	if avwsagpi.WorkloadType != nil {
6383		objectMap["workloadType"] = avwsagpi.WorkloadType
6384	}
6385	if avwsagpi.FriendlyName != nil {
6386		objectMap["friendlyName"] = avwsagpi.FriendlyName
6387	}
6388	if avwsagpi.ProtectionState != "" {
6389		objectMap["protectionState"] = avwsagpi.ProtectionState
6390	}
6391	if avwsagpi.ProtectableItemType != "" {
6392		objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6393	}
6394	return json.Marshal(objectMap)
6395}
6396
6397// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6398func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6399	return nil, false
6400}
6401
6402// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6403func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6404	return nil, false
6405}
6406
6407// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6408func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6409	return nil, false
6410}
6411
6412// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6413func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6414	return nil, false
6415}
6416
6417// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6418func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6419	return &avwsagpi, true
6420}
6421
6422// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6423func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6424	return nil, false
6425}
6426
6427// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6428func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6429	return nil, false
6430}
6431
6432// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6433func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6434	return nil, false
6435}
6436
6437// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6438func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6439	return &avwsagpi, true
6440}
6441
6442// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6443func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6444	return nil, false
6445}
6446
6447// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6448func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6449	return nil, false
6450}
6451
6452// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6453func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6454	return nil, false
6455}
6456
6457// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6458func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6459	return nil, false
6460}
6461
6462// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6463func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6464	return nil, false
6465}
6466
6467// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem.
6468func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6469	return &avwsagpi, true
6470}
6471
6472// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL
6473// Database.
6474type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6475	// ParentName - Name for instance or AG
6476	ParentName *string `json:"parentName,omitempty"`
6477	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
6478	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
6479	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6480	// ServerName - Host/Cluster Name for instance or AG
6481	ServerName *string `json:"serverName,omitempty"`
6482	// IsAutoProtectable - Indicates if protectable item is auto-protectable
6483	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6484	// IsAutoProtected - Indicates if protectable item is auto-protected
6485	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6486	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6487	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6488	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
6489	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6490	// Prebackupvalidation - Pre-backup validation for protectable objects
6491	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6492	// BackupManagementType - Type of backup management to backup an item.
6493	BackupManagementType *string `json:"backupManagementType,omitempty"`
6494	// WorkloadType - Type of workload for the backup management
6495	WorkloadType *string `json:"workloadType,omitempty"`
6496	// FriendlyName - Friendly name of the backup item.
6497	FriendlyName *string `json:"friendlyName,omitempty"`
6498	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6499	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6500	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
6501	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6502}
6503
6504// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem.
6505func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6506	avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6507	objectMap := make(map[string]interface{})
6508	if avwsdpi.ParentName != nil {
6509		objectMap["parentName"] = avwsdpi.ParentName
6510	}
6511	if avwsdpi.ParentUniqueName != nil {
6512		objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6513	}
6514	if avwsdpi.ServerName != nil {
6515		objectMap["serverName"] = avwsdpi.ServerName
6516	}
6517	if avwsdpi.IsAutoProtectable != nil {
6518		objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6519	}
6520	if avwsdpi.IsAutoProtected != nil {
6521		objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6522	}
6523	if avwsdpi.Subinquireditemcount != nil {
6524		objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6525	}
6526	if avwsdpi.Subprotectableitemcount != nil {
6527		objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6528	}
6529	if avwsdpi.Prebackupvalidation != nil {
6530		objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6531	}
6532	if avwsdpi.BackupManagementType != nil {
6533		objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6534	}
6535	if avwsdpi.WorkloadType != nil {
6536		objectMap["workloadType"] = avwsdpi.WorkloadType
6537	}
6538	if avwsdpi.FriendlyName != nil {
6539		objectMap["friendlyName"] = avwsdpi.FriendlyName
6540	}
6541	if avwsdpi.ProtectionState != "" {
6542		objectMap["protectionState"] = avwsdpi.ProtectionState
6543	}
6544	if avwsdpi.ProtectableItemType != "" {
6545		objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6546	}
6547	return json.Marshal(objectMap)
6548}
6549
6550// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6551func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6552	return nil, false
6553}
6554
6555// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6556func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6557	return nil, false
6558}
6559
6560// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6561func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6562	return nil, false
6563}
6564
6565// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6566func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6567	return nil, false
6568}
6569
6570// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6571func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6572	return &avwsdpi, true
6573}
6574
6575// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6576func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6577	return nil, false
6578}
6579
6580// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6581func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6582	return nil, false
6583}
6584
6585// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6586func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6587	return nil, false
6588}
6589
6590// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6591func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6592	return nil, false
6593}
6594
6595// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6596func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6597	return &avwsdpi, true
6598}
6599
6600// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6601func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6602	return nil, false
6603}
6604
6605// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6606func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6607	return nil, false
6608}
6609
6610// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6611func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6612	return nil, false
6613}
6614
6615// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6616func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6617	return nil, false
6618}
6619
6620// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem.
6621func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6622	return &avwsdpi, true
6623}
6624
6625// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL
6626// Database.
6627type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6628	// FriendlyName - Friendly name of the DB represented by this backup item.
6629	FriendlyName *string `json:"friendlyName,omitempty"`
6630	// ServerName - Host/Cluster Name for instance or AG
6631	ServerName *string `json:"serverName,omitempty"`
6632	// ParentName - Parent name of the DB such as Instance or Availability Group.
6633	ParentName *string `json:"parentName,omitempty"`
6634	// ParentType - Parent type of protected item, example: for a DB, standalone server or distributed
6635	ParentType *string `json:"parentType,omitempty"`
6636	// ProtectionStatus - Backup status of this backup item.
6637	ProtectionStatus *string `json:"protectionStatus,omitempty"`
6638	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
6639	ProtectionState ProtectionState `json:"protectionState,omitempty"`
6640	// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending'
6641	LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6642	// LastBackupTime - Timestamp of the last backup operation on this backup item.
6643	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6644	// LastBackupErrorDetail - Error details in last backup
6645	LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6646	// ProtectedItemDataSourceID - Data ID of the protected item.
6647	ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6648	// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending'
6649	ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6650	// ExtendedInfo - Additional information for this backup item.
6651	ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6652	// KpisHealths - Health details of different KPIs
6653	KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6654	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
6655	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6656	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
6657	WorkloadType DataSourceType `json:"workloadType,omitempty"`
6658	// ContainerName - Unique name of container
6659	ContainerName *string `json:"containerName,omitempty"`
6660	// SourceResourceID - ARM ID of the resource to be backed up.
6661	SourceResourceID *string `json:"sourceResourceId,omitempty"`
6662	// PolicyID - ID of the backup policy with which this item is backed up.
6663	PolicyID *string `json:"policyId,omitempty"`
6664	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
6665	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6666	// BackupSetName - Name of the backup set the backup item belongs to
6667	BackupSetName *string `json:"backupSetName,omitempty"`
6668	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
6669	CreateMode CreateMode `json:"createMode,omitempty"`
6670	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
6671	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6672	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
6673	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6674	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
6675	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6676	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
6677	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6678	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
6679	IsRehydrate *bool `json:"isRehydrate,omitempty"`
6680	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
6681	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6682}
6683
6684// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem.
6685func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6686	avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
6687	objectMap := make(map[string]interface{})
6688	if avwsdpi.FriendlyName != nil {
6689		objectMap["friendlyName"] = avwsdpi.FriendlyName
6690	}
6691	if avwsdpi.ServerName != nil {
6692		objectMap["serverName"] = avwsdpi.ServerName
6693	}
6694	if avwsdpi.ParentName != nil {
6695		objectMap["parentName"] = avwsdpi.ParentName
6696	}
6697	if avwsdpi.ParentType != nil {
6698		objectMap["parentType"] = avwsdpi.ParentType
6699	}
6700	if avwsdpi.ProtectionStatus != nil {
6701		objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
6702	}
6703	if avwsdpi.ProtectionState != "" {
6704		objectMap["protectionState"] = avwsdpi.ProtectionState
6705	}
6706	if avwsdpi.LastBackupStatus != "" {
6707		objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
6708	}
6709	if avwsdpi.LastBackupTime != nil {
6710		objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
6711	}
6712	if avwsdpi.LastBackupErrorDetail != nil {
6713		objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
6714	}
6715	if avwsdpi.ProtectedItemDataSourceID != nil {
6716		objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
6717	}
6718	if avwsdpi.ProtectedItemHealthStatus != "" {
6719		objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
6720	}
6721	if avwsdpi.ExtendedInfo != nil {
6722		objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
6723	}
6724	if avwsdpi.KpisHealths != nil {
6725		objectMap["kpisHealths"] = avwsdpi.KpisHealths
6726	}
6727	if avwsdpi.BackupManagementType != "" {
6728		objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6729	}
6730	if avwsdpi.WorkloadType != "" {
6731		objectMap["workloadType"] = avwsdpi.WorkloadType
6732	}
6733	if avwsdpi.ContainerName != nil {
6734		objectMap["containerName"] = avwsdpi.ContainerName
6735	}
6736	if avwsdpi.SourceResourceID != nil {
6737		objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
6738	}
6739	if avwsdpi.PolicyID != nil {
6740		objectMap["policyId"] = avwsdpi.PolicyID
6741	}
6742	if avwsdpi.LastRecoveryPoint != nil {
6743		objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
6744	}
6745	if avwsdpi.BackupSetName != nil {
6746		objectMap["backupSetName"] = avwsdpi.BackupSetName
6747	}
6748	if avwsdpi.CreateMode != "" {
6749		objectMap["createMode"] = avwsdpi.CreateMode
6750	}
6751	if avwsdpi.DeferredDeleteTimeInUTC != nil {
6752		objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
6753	}
6754	if avwsdpi.IsScheduledForDeferredDelete != nil {
6755		objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
6756	}
6757	if avwsdpi.DeferredDeleteTimeRemaining != nil {
6758		objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
6759	}
6760	if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
6761		objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
6762	}
6763	if avwsdpi.IsRehydrate != nil {
6764		objectMap["isRehydrate"] = avwsdpi.IsRehydrate
6765	}
6766	if avwsdpi.ProtectedItemType != "" {
6767		objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
6768	}
6769	return json.Marshal(objectMap)
6770}
6771
6772// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6773func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6774	return nil, false
6775}
6776
6777// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6778func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6779	return nil, false
6780}
6781
6782// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6783func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6784	return nil, false
6785}
6786
6787// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6788func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6789	return nil, false
6790}
6791
6792// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6793func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6794	return nil, false
6795}
6796
6797// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6798func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6799	return nil, false
6800}
6801
6802// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6803func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6804	return nil, false
6805}
6806
6807// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6808func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6809	return &avwsdpi, true
6810}
6811
6812// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6813func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6814	return nil, false
6815}
6816
6817// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6818func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6819	return nil, false
6820}
6821
6822// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6823func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6824	return &avwsdpi, true
6825}
6826
6827// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6828func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6829	return nil, false
6830}
6831
6832// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6833func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6834	return nil, false
6835}
6836
6837// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6838func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6839	return nil, false
6840}
6841
6842// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6843func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6844	return nil, false
6845}
6846
6847// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem.
6848func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6849	return &avwsdpi, true
6850}
6851
6852// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL
6853// Database.
6854type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
6855	// ParentName - Name for instance or AG
6856	ParentName *string `json:"parentName,omitempty"`
6857	// ServerName - Host/Cluster Name for instance or AG
6858	ServerName *string `json:"serverName,omitempty"`
6859	// IsAutoProtectable - Indicates if workload item is auto-protectable
6860	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6861	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6862	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6863	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
6864	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6865	// BackupManagementType - Type of backup management to backup an item.
6866	BackupManagementType *string `json:"backupManagementType,omitempty"`
6867	// WorkloadType - Type of workload for the backup management
6868	WorkloadType *string `json:"workloadType,omitempty"`
6869	// FriendlyName - Friendly name of the backup item.
6870	FriendlyName *string `json:"friendlyName,omitempty"`
6871	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6872	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6873	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
6874	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6875}
6876
6877// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem.
6878func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6879	avwsdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase
6880	objectMap := make(map[string]interface{})
6881	if avwsdwi.ParentName != nil {
6882		objectMap["parentName"] = avwsdwi.ParentName
6883	}
6884	if avwsdwi.ServerName != nil {
6885		objectMap["serverName"] = avwsdwi.ServerName
6886	}
6887	if avwsdwi.IsAutoProtectable != nil {
6888		objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
6889	}
6890	if avwsdwi.Subinquireditemcount != nil {
6891		objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
6892	}
6893	if avwsdwi.SubWorkloadItemCount != nil {
6894		objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
6895	}
6896	if avwsdwi.BackupManagementType != nil {
6897		objectMap["backupManagementType"] = avwsdwi.BackupManagementType
6898	}
6899	if avwsdwi.WorkloadType != nil {
6900		objectMap["workloadType"] = avwsdwi.WorkloadType
6901	}
6902	if avwsdwi.FriendlyName != nil {
6903		objectMap["friendlyName"] = avwsdwi.FriendlyName
6904	}
6905	if avwsdwi.ProtectionState != "" {
6906		objectMap["protectionState"] = avwsdwi.ProtectionState
6907	}
6908	if avwsdwi.WorkloadItemType != "" {
6909		objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
6910	}
6911	return json.Marshal(objectMap)
6912}
6913
6914// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6915func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6916	return nil, false
6917}
6918
6919// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6920func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6921	return &avwsdwi, true
6922}
6923
6924// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6925func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6926	return nil, false
6927}
6928
6929// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6930func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6931	return nil, false
6932}
6933
6934// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6935func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6936	return nil, false
6937}
6938
6939// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6940func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6941	return nil, false
6942}
6943
6944// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6945func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6946	return &avwsdwi, true
6947}
6948
6949// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6950func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6951	return nil, false
6952}
6953
6954// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6955func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6956	return nil, false
6957}
6958
6959// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem.
6960func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6961	return &avwsdwi, true
6962}
6963
6964// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL
6965// Instance.
6966type AzureVMWorkloadSQLInstanceProtectableItem struct {
6967	// ParentName - Name for instance or AG
6968	ParentName *string `json:"parentName,omitempty"`
6969	// ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent
6970	// Only Applicable for data bases where the parent would be either Instance or a SQL AG.
6971	ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6972	// ServerName - Host/Cluster Name for instance or AG
6973	ServerName *string `json:"serverName,omitempty"`
6974	// IsAutoProtectable - Indicates if protectable item is auto-protectable
6975	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6976	// IsAutoProtected - Indicates if protectable item is auto-protected
6977	IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6978	// Subinquireditemcount - For instance or AG, indicates number of DB's present
6979	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6980	// Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected
6981	Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6982	// Prebackupvalidation - Pre-backup validation for protectable objects
6983	Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6984	// BackupManagementType - Type of backup management to backup an item.
6985	BackupManagementType *string `json:"backupManagementType,omitempty"`
6986	// WorkloadType - Type of workload for the backup management
6987	WorkloadType *string `json:"workloadType,omitempty"`
6988	// FriendlyName - Friendly name of the backup item.
6989	FriendlyName *string `json:"friendlyName,omitempty"`
6990	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
6991	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6992	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
6993	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6994}
6995
6996// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem.
6997func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
6998	avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
6999	objectMap := make(map[string]interface{})
7000	if avwsipi.ParentName != nil {
7001		objectMap["parentName"] = avwsipi.ParentName
7002	}
7003	if avwsipi.ParentUniqueName != nil {
7004		objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
7005	}
7006	if avwsipi.ServerName != nil {
7007		objectMap["serverName"] = avwsipi.ServerName
7008	}
7009	if avwsipi.IsAutoProtectable != nil {
7010		objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
7011	}
7012	if avwsipi.IsAutoProtected != nil {
7013		objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
7014	}
7015	if avwsipi.Subinquireditemcount != nil {
7016		objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
7017	}
7018	if avwsipi.Subprotectableitemcount != nil {
7019		objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
7020	}
7021	if avwsipi.Prebackupvalidation != nil {
7022		objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
7023	}
7024	if avwsipi.BackupManagementType != nil {
7025		objectMap["backupManagementType"] = avwsipi.BackupManagementType
7026	}
7027	if avwsipi.WorkloadType != nil {
7028		objectMap["workloadType"] = avwsipi.WorkloadType
7029	}
7030	if avwsipi.FriendlyName != nil {
7031		objectMap["friendlyName"] = avwsipi.FriendlyName
7032	}
7033	if avwsipi.ProtectionState != "" {
7034		objectMap["protectionState"] = avwsipi.ProtectionState
7035	}
7036	if avwsipi.ProtectableItemType != "" {
7037		objectMap["protectableItemType"] = avwsipi.ProtectableItemType
7038	}
7039	return json.Marshal(objectMap)
7040}
7041
7042// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7043func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
7044	return nil, false
7045}
7046
7047// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7048func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
7049	return nil, false
7050}
7051
7052// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7053func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
7054	return nil, false
7055}
7056
7057// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7058func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
7059	return nil, false
7060}
7061
7062// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7063func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
7064	return &avwsipi, true
7065}
7066
7067// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7068func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
7069	return nil, false
7070}
7071
7072// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7073func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
7074	return nil, false
7075}
7076
7077// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7078func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
7079	return nil, false
7080}
7081
7082// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7083func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
7084	return nil, false
7085}
7086
7087// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7088func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
7089	return nil, false
7090}
7091
7092// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7093func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
7094	return &avwsipi, true
7095}
7096
7097// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7098func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7099	return nil, false
7100}
7101
7102// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7103func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7104	return nil, false
7105}
7106
7107// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7108func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7109	return nil, false
7110}
7111
7112// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem.
7113func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7114	return &avwsipi, true
7115}
7116
7117// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL
7118// Instance.
7119type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7120	// DataDirectoryPaths - Data Directory Paths for default directories
7121	DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7122	// ParentName - Name for instance or AG
7123	ParentName *string `json:"parentName,omitempty"`
7124	// ServerName - Host/Cluster Name for instance or AG
7125	ServerName *string `json:"serverName,omitempty"`
7126	// IsAutoProtectable - Indicates if workload item is auto-protectable
7127	IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7128	// Subinquireditemcount - For instance or AG, indicates number of DB's present
7129	Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7130	// SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected
7131	SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7132	// BackupManagementType - Type of backup management to backup an item.
7133	BackupManagementType *string `json:"backupManagementType,omitempty"`
7134	// WorkloadType - Type of workload for the backup management
7135	WorkloadType *string `json:"workloadType,omitempty"`
7136	// FriendlyName - Friendly name of the backup item.
7137	FriendlyName *string `json:"friendlyName,omitempty"`
7138	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
7139	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7140	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
7141	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7142}
7143
7144// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem.
7145func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7146	avwsiwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance
7147	objectMap := make(map[string]interface{})
7148	if avwsiwi.DataDirectoryPaths != nil {
7149		objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7150	}
7151	if avwsiwi.ParentName != nil {
7152		objectMap["parentName"] = avwsiwi.ParentName
7153	}
7154	if avwsiwi.ServerName != nil {
7155		objectMap["serverName"] = avwsiwi.ServerName
7156	}
7157	if avwsiwi.IsAutoProtectable != nil {
7158		objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7159	}
7160	if avwsiwi.Subinquireditemcount != nil {
7161		objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7162	}
7163	if avwsiwi.SubWorkloadItemCount != nil {
7164		objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7165	}
7166	if avwsiwi.BackupManagementType != nil {
7167		objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7168	}
7169	if avwsiwi.WorkloadType != nil {
7170		objectMap["workloadType"] = avwsiwi.WorkloadType
7171	}
7172	if avwsiwi.FriendlyName != nil {
7173		objectMap["friendlyName"] = avwsiwi.FriendlyName
7174	}
7175	if avwsiwi.ProtectionState != "" {
7176		objectMap["protectionState"] = avwsiwi.ProtectionState
7177	}
7178	if avwsiwi.WorkloadItemType != "" {
7179		objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7180	}
7181	return json.Marshal(objectMap)
7182}
7183
7184// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7185func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7186	return nil, false
7187}
7188
7189// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7190func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7191	return &avwsiwi, true
7192}
7193
7194// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7195func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7196	return nil, false
7197}
7198
7199// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7200func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7201	return nil, false
7202}
7203
7204// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7205func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7206	return nil, false
7207}
7208
7209// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7210func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7211	return nil, false
7212}
7213
7214// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7215func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7216	return nil, false
7217}
7218
7219// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7220func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7221	return &avwsiwi, true
7222}
7223
7224// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7225func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7226	return nil, false
7227}
7228
7229// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem.
7230func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7231	return &avwsiwi, true
7232}
7233
7234// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item.
7235type BasicAzureWorkloadAutoProtectionIntent interface {
7236	AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7237	AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7238}
7239
7240// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item.
7241type AzureWorkloadAutoProtectionIntent struct {
7242	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
7243	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7244	// SourceResourceID - ARM ID of the resource to be backed up.
7245	SourceResourceID *string `json:"sourceResourceId,omitempty"`
7246	// ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId
7247	ItemID *string `json:"itemId,omitempty"`
7248	// PolicyID - ID of the backup policy with which this item is backed up.
7249	PolicyID *string `json:"policyId,omitempty"`
7250	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
7251	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7252	// ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent'
7253	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7254}
7255
7256func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7257	var m map[string]interface{}
7258	err := json.Unmarshal(body, &m)
7259	if err != nil {
7260		return nil, err
7261	}
7262
7263	switch m["protectionIntentItemType"] {
7264	case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7265		var awsapi AzureWorkloadSQLAutoProtectionIntent
7266		err := json.Unmarshal(body, &awsapi)
7267		return awsapi, err
7268	default:
7269		var awapi AzureWorkloadAutoProtectionIntent
7270		err := json.Unmarshal(body, &awapi)
7271		return awapi, err
7272	}
7273}
7274func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7275	var rawMessages []*json.RawMessage
7276	err := json.Unmarshal(body, &rawMessages)
7277	if err != nil {
7278		return nil, err
7279	}
7280
7281	awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7282
7283	for index, rawMessage := range rawMessages {
7284		awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7285		if err != nil {
7286			return nil, err
7287		}
7288		awapiArray[index] = awapi
7289	}
7290	return awapiArray, nil
7291}
7292
7293// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent.
7294func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7295	awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7296	objectMap := make(map[string]interface{})
7297	if awapi.BackupManagementType != "" {
7298		objectMap["backupManagementType"] = awapi.BackupManagementType
7299	}
7300	if awapi.SourceResourceID != nil {
7301		objectMap["sourceResourceId"] = awapi.SourceResourceID
7302	}
7303	if awapi.ItemID != nil {
7304		objectMap["itemId"] = awapi.ItemID
7305	}
7306	if awapi.PolicyID != nil {
7307		objectMap["policyId"] = awapi.PolicyID
7308	}
7309	if awapi.ProtectionState != "" {
7310		objectMap["protectionState"] = awapi.ProtectionState
7311	}
7312	if awapi.ProtectionIntentItemType != "" {
7313		objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7314	}
7315	return json.Marshal(objectMap)
7316}
7317
7318// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7319func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7320	return nil, false
7321}
7322
7323// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7324func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7325	return &awapi, true
7326}
7327
7328// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7329func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7330	return nil, false
7331}
7332
7333// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7334func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7335	return &awapi, true
7336}
7337
7338// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7339func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7340	return &awapi, true
7341}
7342
7343// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7344func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7345	return nil, false
7346}
7347
7348// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7349func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7350	return nil, false
7351}
7352
7353// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent.
7354func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7355	return &awapi, true
7356}
7357
7358// AzureWorkloadBackupRequest azureWorkload workload-specific backup request.
7359type AzureWorkloadBackupRequest struct {
7360	// BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull', 'TypeEnumIncremental'
7361	BackupType TypeEnum `json:"backupType,omitempty"`
7362	// EnableCompression - Bool for Compression setting
7363	EnableCompression *bool `json:"enableCompression,omitempty"`
7364	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
7365	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7366	// ObjectType - Possible values include: 'ObjectTypeBasicRequestObjectTypeBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest'
7367	ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7368}
7369
7370// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest.
7371func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7372	awbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest
7373	objectMap := make(map[string]interface{})
7374	if awbr.BackupType != "" {
7375		objectMap["backupType"] = awbr.BackupType
7376	}
7377	if awbr.EnableCompression != nil {
7378		objectMap["enableCompression"] = awbr.EnableCompression
7379	}
7380	if awbr.RecoveryPointExpiryTimeInUTC != nil {
7381		objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7382	}
7383	if awbr.ObjectType != "" {
7384		objectMap["objectType"] = awbr.ObjectType
7385	}
7386	return json.Marshal(objectMap)
7387}
7388
7389// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
7390func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7391	return nil, false
7392}
7393
7394// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
7395func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7396	return &awbr, true
7397}
7398
7399// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
7400func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7401	return nil, false
7402}
7403
7404// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
7405func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7406	return nil, false
7407}
7408
7409// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest.
7410func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7411	return &awbr, true
7412}
7413
7414// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute.
7415type BasicAzureWorkloadContainer interface {
7416	AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7417	AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7418	AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7419}
7420
7421// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute.
7422type AzureWorkloadContainer struct {
7423	// SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container
7424	SourceResourceID *string `json:"sourceResourceId,omitempty"`
7425	// LastUpdatedTime - Time stamp when this container was updated.
7426	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7427	// ExtendedInfo - Additional details of a workload container.
7428	ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7429	// WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
7430	WorkloadType WorkloadType `json:"workloadType,omitempty"`
7431	// OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister'
7432	OperationType OperationType `json:"operationType,omitempty"`
7433	// FriendlyName - Friendly name of the container.
7434	FriendlyName *string `json:"friendlyName,omitempty"`
7435	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
7436	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7437	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
7438	RegistrationStatus *string `json:"registrationStatus,omitempty"`
7439	// HealthStatus - Status of health of the container.
7440	HealthStatus *string `json:"healthStatus,omitempty"`
7441	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
7442	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7443}
7444
7445func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7446	var m map[string]interface{}
7447	err := json.Unmarshal(body, &m)
7448	if err != nil {
7449		return nil, err
7450	}
7451
7452	switch m["containerType"] {
7453	case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
7454		var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7455		err := json.Unmarshal(body, &aswcpc)
7456		return aswcpc, err
7457	case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
7458		var avacpc AzureVMAppContainerProtectionContainer
7459		err := json.Unmarshal(body, &avacpc)
7460		return avacpc, err
7461	default:
7462		var awc AzureWorkloadContainer
7463		err := json.Unmarshal(body, &awc)
7464		return awc, err
7465	}
7466}
7467func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7468	var rawMessages []*json.RawMessage
7469	err := json.Unmarshal(body, &rawMessages)
7470	if err != nil {
7471		return nil, err
7472	}
7473
7474	awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7475
7476	for index, rawMessage := range rawMessages {
7477		awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7478		if err != nil {
7479			return nil, err
7480		}
7481		awcArray[index] = awc
7482	}
7483	return awcArray, nil
7484}
7485
7486// MarshalJSON is the custom marshaler for AzureWorkloadContainer.
7487func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7488	awc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer
7489	objectMap := make(map[string]interface{})
7490	if awc.SourceResourceID != nil {
7491		objectMap["sourceResourceId"] = awc.SourceResourceID
7492	}
7493	if awc.LastUpdatedTime != nil {
7494		objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7495	}
7496	if awc.ExtendedInfo != nil {
7497		objectMap["extendedInfo"] = awc.ExtendedInfo
7498	}
7499	if awc.WorkloadType != "" {
7500		objectMap["workloadType"] = awc.WorkloadType
7501	}
7502	if awc.OperationType != "" {
7503		objectMap["operationType"] = awc.OperationType
7504	}
7505	if awc.FriendlyName != nil {
7506		objectMap["friendlyName"] = awc.FriendlyName
7507	}
7508	if awc.BackupManagementType != "" {
7509		objectMap["backupManagementType"] = awc.BackupManagementType
7510	}
7511	if awc.RegistrationStatus != nil {
7512		objectMap["registrationStatus"] = awc.RegistrationStatus
7513	}
7514	if awc.HealthStatus != nil {
7515		objectMap["healthStatus"] = awc.HealthStatus
7516	}
7517	if awc.ContainerType != "" {
7518		objectMap["containerType"] = awc.ContainerType
7519	}
7520	return json.Marshal(objectMap)
7521}
7522
7523// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7524func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7525	return nil, false
7526}
7527
7528// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7529func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7530	return nil, false
7531}
7532
7533// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7534func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7535	return nil, false
7536}
7537
7538// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7539func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7540	return nil, false
7541}
7542
7543// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7544func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7545	return nil, false
7546}
7547
7548// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7549func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7550	return nil, false
7551}
7552
7553// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7554func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7555	return nil, false
7556}
7557
7558// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7559func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7560	return &awc, true
7561}
7562
7563// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7564func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7565	return &awc, true
7566}
7567
7568// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7569func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7570	return nil, false
7571}
7572
7573// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7574func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7575	return nil, false
7576}
7577
7578// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7579func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7580	return nil, false
7581}
7582
7583// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7584func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7585	return nil, false
7586}
7587
7588// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7589func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7590	return nil, false
7591}
7592
7593// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7594func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7595	return nil, false
7596}
7597
7598// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7599func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7600	return nil, false
7601}
7602
7603// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer.
7604func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7605	return &awc, true
7606}
7607
7608// AzureWorkloadContainerExtendedInfo extended information of the container.
7609type AzureWorkloadContainerExtendedInfo struct {
7610	// HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container.
7611	HostServerName *string `json:"hostServerName,omitempty"`
7612	// InquiryInfo - Inquiry Status for the container.
7613	InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
7614	// NodesList - List of the nodes in case of distributed container.
7615	NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
7616}
7617
7618// AzureWorkloadErrorInfo azure storage specific error information
7619type AzureWorkloadErrorInfo struct {
7620	// ErrorCode - Error code.
7621	ErrorCode *int32 `json:"errorCode,omitempty"`
7622	// ErrorString - Localized error string.
7623	ErrorString *string `json:"errorString,omitempty"`
7624	// ErrorTitle - Title: Typically, the entity that the error pertains to.
7625	ErrorTitle *string `json:"errorTitle,omitempty"`
7626	// Recommendations - List of localized recommendations for above error code.
7627	Recommendations *[]string `json:"recommendations,omitempty"`
7628	// AdditionalDetails - Additional details for above error code.
7629	AdditionalDetails *string `json:"additionalDetails,omitempty"`
7630}
7631
7632// AzureWorkloadJob azure storage specific job.
7633type AzureWorkloadJob struct {
7634	// WorkloadType - Workload type of the job
7635	WorkloadType *string `json:"workloadType,omitempty"`
7636	// Duration - Time elapsed during the execution of this job.
7637	Duration *string `json:"duration,omitempty"`
7638	// ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry.
7639	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
7640	// ErrorDetails - Error details on execution of this job.
7641	ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
7642	// ExtendedInfo - Additional information about the job.
7643	ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
7644	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
7645	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
7646	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
7647	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7648	// Operation - The operation name.
7649	Operation *string `json:"operation,omitempty"`
7650	// Status - Job status.
7651	Status *string `json:"status,omitempty"`
7652	// StartTime - The start time.
7653	StartTime *date.Time `json:"startTime,omitempty"`
7654	// EndTime - The end time.
7655	EndTime *date.Time `json:"endTime,omitempty"`
7656	// ActivityID - ActivityId of job.
7657	ActivityID *string `json:"activityId,omitempty"`
7658	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
7659	JobType JobType `json:"jobType,omitempty"`
7660}
7661
7662// MarshalJSON is the custom marshaler for AzureWorkloadJob.
7663func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
7664	awj.JobType = JobTypeAzureWorkloadJob
7665	objectMap := make(map[string]interface{})
7666	if awj.WorkloadType != nil {
7667		objectMap["workloadType"] = awj.WorkloadType
7668	}
7669	if awj.Duration != nil {
7670		objectMap["duration"] = awj.Duration
7671	}
7672	if awj.ActionsInfo != nil {
7673		objectMap["actionsInfo"] = awj.ActionsInfo
7674	}
7675	if awj.ErrorDetails != nil {
7676		objectMap["errorDetails"] = awj.ErrorDetails
7677	}
7678	if awj.ExtendedInfo != nil {
7679		objectMap["extendedInfo"] = awj.ExtendedInfo
7680	}
7681	if awj.EntityFriendlyName != nil {
7682		objectMap["entityFriendlyName"] = awj.EntityFriendlyName
7683	}
7684	if awj.BackupManagementType != "" {
7685		objectMap["backupManagementType"] = awj.BackupManagementType
7686	}
7687	if awj.Operation != nil {
7688		objectMap["operation"] = awj.Operation
7689	}
7690	if awj.Status != nil {
7691		objectMap["status"] = awj.Status
7692	}
7693	if awj.StartTime != nil {
7694		objectMap["startTime"] = awj.StartTime
7695	}
7696	if awj.EndTime != nil {
7697		objectMap["endTime"] = awj.EndTime
7698	}
7699	if awj.ActivityID != nil {
7700		objectMap["activityId"] = awj.ActivityID
7701	}
7702	if awj.JobType != "" {
7703		objectMap["jobType"] = awj.JobType
7704	}
7705	return json.Marshal(objectMap)
7706}
7707
7708// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob.
7709func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
7710	return nil, false
7711}
7712
7713// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob.
7714func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
7715	return nil, false
7716}
7717
7718// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob.
7719func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
7720	return &awj, true
7721}
7722
7723// AsDpmJob is the BasicJob implementation for AzureWorkloadJob.
7724func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
7725	return nil, false
7726}
7727
7728// AsMabJob is the BasicJob implementation for AzureWorkloadJob.
7729func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
7730	return nil, false
7731}
7732
7733// AsVaultJob is the BasicJob implementation for AzureWorkloadJob.
7734func (awj AzureWorkloadJob) AsVaultJob() (*VaultJob, bool) {
7735	return nil, false
7736}
7737
7738// AsJob is the BasicJob implementation for AzureWorkloadJob.
7739func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
7740	return nil, false
7741}
7742
7743// AsBasicJob is the BasicJob implementation for AzureWorkloadJob.
7744func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
7745	return &awj, true
7746}
7747
7748// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job.
7749type AzureWorkloadJobExtendedInfo struct {
7750	// TasksList - List of tasks for this job
7751	TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
7752	// PropertyBag - Job properties.
7753	PropertyBag map[string]*string `json:"propertyBag"`
7754	// DynamicErrorMessage - Non localized error message on job execution.
7755	DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
7756}
7757
7758// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo.
7759func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
7760	objectMap := make(map[string]interface{})
7761	if awjei.TasksList != nil {
7762		objectMap["tasksList"] = awjei.TasksList
7763	}
7764	if awjei.PropertyBag != nil {
7765		objectMap["propertyBag"] = awjei.PropertyBag
7766	}
7767	if awjei.DynamicErrorMessage != nil {
7768		objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
7769	}
7770	return json.Marshal(objectMap)
7771}
7772
7773// AzureWorkloadJobTaskDetails azure VM workload specific job task details.
7774type AzureWorkloadJobTaskDetails struct {
7775	// TaskID - The task display name.
7776	TaskID *string `json:"taskId,omitempty"`
7777	// Status - The status.
7778	Status *string `json:"status,omitempty"`
7779}
7780
7781// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime
7782type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
7783	AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7784	AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7785}
7786
7787// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime
7788type AzureWorkloadPointInTimeRecoveryPoint struct {
7789	// TimeRanges - List of log ranges
7790	TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
7791	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
7792	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7793	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
7794	Type RestorePointType `json:"type,omitempty"`
7795	// RecoveryPointTierDetails - Recovery point tier information.
7796	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
7797	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
7798	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
7799	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
7800	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7801}
7802
7803func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7804	var m map[string]interface{}
7805	err := json.Unmarshal(body, &m)
7806	if err != nil {
7807		return nil, err
7808	}
7809
7810	switch m["objectType"] {
7811	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7812		var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7813		err := json.Unmarshal(body, &awshpitrp)
7814		return awshpitrp, err
7815	default:
7816		var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7817		err := json.Unmarshal(body, &awpitrp)
7818		return awpitrp, err
7819	}
7820}
7821func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7822	var rawMessages []*json.RawMessage
7823	err := json.Unmarshal(body, &rawMessages)
7824	if err != nil {
7825		return nil, err
7826	}
7827
7828	awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
7829
7830	for index, rawMessage := range rawMessages {
7831		awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
7832		if err != nil {
7833			return nil, err
7834		}
7835		awpitrpArray[index] = awpitrp
7836	}
7837	return awpitrpArray, nil
7838}
7839
7840// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint.
7841func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
7842	awpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint
7843	objectMap := make(map[string]interface{})
7844	if awpitrp.TimeRanges != nil {
7845		objectMap["timeRanges"] = awpitrp.TimeRanges
7846	}
7847	if awpitrp.RecoveryPointTierDetails != nil {
7848		objectMap["recoveryPointTierDetails"] = awpitrp.RecoveryPointTierDetails
7849	}
7850	if awpitrp.RecoveryPointMoveReadinessInfo != nil {
7851		objectMap["recoveryPointMoveReadinessInfo"] = awpitrp.RecoveryPointMoveReadinessInfo
7852	}
7853	if awpitrp.ObjectType != "" {
7854		objectMap["objectType"] = awpitrp.ObjectType
7855	}
7856	return json.Marshal(objectMap)
7857}
7858
7859// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7860func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7861	return nil, false
7862}
7863
7864// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7865func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7866	return &awpitrp, true
7867}
7868
7869// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7870func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7871	return &awpitrp, true
7872}
7873
7874// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7875func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7876	return nil, false
7877}
7878
7879// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7880func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7881	return &awpitrp, true
7882}
7883
7884// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7885func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7886	return nil, false
7887}
7888
7889// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7890func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7891	return nil, false
7892}
7893
7894// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7895func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7896	return nil, false
7897}
7898
7899// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7900func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
7901	return nil, false
7902}
7903
7904// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7905func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
7906	return nil, false
7907}
7908
7909// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7910func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
7911	return nil, false
7912}
7913
7914// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7915func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
7916	return nil, false
7917}
7918
7919// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7920func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
7921	return nil, false
7922}
7923
7924// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint.
7925func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
7926	return &awpitrp, true
7927}
7928
7929// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for
7930// PointInTime/Log restore
7931type AzureWorkloadPointInTimeRestoreRequest struct {
7932	// PointInTime - PointInTime value
7933	PointInTime *date.Time `json:"pointInTime,omitempty"`
7934	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
7935	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
7936	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
7937	SourceResourceID *string `json:"sourceResourceId,omitempty"`
7938	// PropertyBag - Workload specific property bag.
7939	PropertyBag map[string]*string `json:"propertyBag"`
7940	// TargetInfo - Details of target database
7941	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
7942	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
7943	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
7944	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
7945	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
7946	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
7947	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
7948	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
7949}
7950
7951// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest.
7952func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
7953	awpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest
7954	objectMap := make(map[string]interface{})
7955	if awpitrr.PointInTime != nil {
7956		objectMap["pointInTime"] = awpitrr.PointInTime
7957	}
7958	if awpitrr.RecoveryType != "" {
7959		objectMap["recoveryType"] = awpitrr.RecoveryType
7960	}
7961	if awpitrr.SourceResourceID != nil {
7962		objectMap["sourceResourceId"] = awpitrr.SourceResourceID
7963	}
7964	if awpitrr.PropertyBag != nil {
7965		objectMap["propertyBag"] = awpitrr.PropertyBag
7966	}
7967	if awpitrr.TargetInfo != nil {
7968		objectMap["targetInfo"] = awpitrr.TargetInfo
7969	}
7970	if awpitrr.RecoveryMode != "" {
7971		objectMap["recoveryMode"] = awpitrr.RecoveryMode
7972	}
7973	if awpitrr.TargetVirtualMachineID != nil {
7974		objectMap["targetVirtualMachineId"] = awpitrr.TargetVirtualMachineID
7975	}
7976	if awpitrr.ObjectType != "" {
7977		objectMap["objectType"] = awpitrr.ObjectType
7978	}
7979	return json.Marshal(objectMap)
7980}
7981
7982// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
7983func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
7984	return nil, false
7985}
7986
7987// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
7988func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
7989	return &awpitrr, true
7990}
7991
7992// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
7993func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
7994	return nil, false
7995}
7996
7997// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
7998func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
7999	return &awpitrr, true
8000}
8001
8002// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8003func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8004	return nil, false
8005}
8006
8007// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8008func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8009	return nil, false
8010}
8011
8012// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8013func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8014	return nil, false
8015}
8016
8017// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8018func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8019	return nil, false
8020}
8021
8022// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8023func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8024	return nil, false
8025}
8026
8027// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8028func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8029	return nil, false
8030}
8031
8032// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8033func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8034	return nil, false
8035}
8036
8037// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8038func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8039	return nil, false
8040}
8041
8042// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8043func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8044	return nil, false
8045}
8046
8047// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8048func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8049	return nil, false
8050}
8051
8052// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8053func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8054	return nil, false
8055}
8056
8057// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8058func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8059	return nil, false
8060}
8061
8062// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8063func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8064	return nil, false
8065}
8066
8067// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8068func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8069	return nil, false
8070}
8071
8072// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8073func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8074	return nil, false
8075}
8076
8077// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8078func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8079	return nil, false
8080}
8081
8082// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest.
8083func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8084	return &awpitrr, true
8085}
8086
8087// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point
8088type BasicAzureWorkloadRecoveryPoint interface {
8089	AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8090	AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
8091	AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8092	AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
8093	AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8094	AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8095	AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
8096	AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
8097}
8098
8099// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery
8100// point
8101type AzureWorkloadRecoveryPoint struct {
8102	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
8103	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8104	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
8105	Type RestorePointType `json:"type,omitempty"`
8106	// RecoveryPointTierDetails - Recovery point tier information.
8107	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8108	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
8109	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8110	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
8111	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8112}
8113
8114func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
8115	var m map[string]interface{}
8116	err := json.Unmarshal(body, &m)
8117	if err != nil {
8118		return nil, err
8119	}
8120
8121	switch m["objectType"] {
8122	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
8123		var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8124		err := json.Unmarshal(body, &awpitrp)
8125		return awpitrp, err
8126	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8127		var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8128		err := json.Unmarshal(body, &awshpitrp)
8129		return awshpitrp, err
8130	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
8131		var awshrp AzureWorkloadSAPHanaRecoveryPoint
8132		err := json.Unmarshal(body, &awshrp)
8133		return awshrp, err
8134	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8135		var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8136		err := json.Unmarshal(body, &awspitrp)
8137		return awspitrp, err
8138	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
8139		var awsrp AzureWorkloadSQLRecoveryPoint
8140		err := json.Unmarshal(body, &awsrp)
8141		return awsrp, err
8142	default:
8143		var awrp AzureWorkloadRecoveryPoint
8144		err := json.Unmarshal(body, &awrp)
8145		return awrp, err
8146	}
8147}
8148func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
8149	var rawMessages []*json.RawMessage
8150	err := json.Unmarshal(body, &rawMessages)
8151	if err != nil {
8152		return nil, err
8153	}
8154
8155	awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
8156
8157	for index, rawMessage := range rawMessages {
8158		awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
8159		if err != nil {
8160			return nil, err
8161		}
8162		awrpArray[index] = awrp
8163	}
8164	return awrpArray, nil
8165}
8166
8167// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint.
8168func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8169	awrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint
8170	objectMap := make(map[string]interface{})
8171	if awrp.RecoveryPointTierDetails != nil {
8172		objectMap["recoveryPointTierDetails"] = awrp.RecoveryPointTierDetails
8173	}
8174	if awrp.RecoveryPointMoveReadinessInfo != nil {
8175		objectMap["recoveryPointMoveReadinessInfo"] = awrp.RecoveryPointMoveReadinessInfo
8176	}
8177	if awrp.ObjectType != "" {
8178		objectMap["objectType"] = awrp.ObjectType
8179	}
8180	return json.Marshal(objectMap)
8181}
8182
8183// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8184func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8185	return nil, false
8186}
8187
8188// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8189func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8190	return nil, false
8191}
8192
8193// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8194func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8195	return nil, false
8196}
8197
8198// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8199func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8200	return &awrp, true
8201}
8202
8203// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8204func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8205	return &awrp, true
8206}
8207
8208// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8209func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8210	return nil, false
8211}
8212
8213// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8214func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8215	return nil, false
8216}
8217
8218// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8219func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8220	return nil, false
8221}
8222
8223// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8224func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8225	return nil, false
8226}
8227
8228// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8229func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8230	return nil, false
8231}
8232
8233// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8234func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8235	return nil, false
8236}
8237
8238// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8239func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8240	return nil, false
8241}
8242
8243// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8244func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8245	return nil, false
8246}
8247
8248// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint.
8249func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8250	return &awrp, true
8251}
8252
8253// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore.
8254type BasicAzureWorkloadRestoreRequest interface {
8255	AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8256	AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8257	AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8258	AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8259	AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8260	AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8261	AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
8262	AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8263	AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8264	AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8265	AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
8266	AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
8267	AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
8268	AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8269}
8270
8271// AzureWorkloadRestoreRequest azureWorkload-specific restore.
8272type AzureWorkloadRestoreRequest struct {
8273	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
8274	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8275	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
8276	SourceResourceID *string `json:"sourceResourceId,omitempty"`
8277	// PropertyBag - Workload specific property bag.
8278	PropertyBag map[string]*string `json:"propertyBag"`
8279	// TargetInfo - Details of target database
8280	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8281	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
8282	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8283	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
8284	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
8285	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8286	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
8287	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8288}
8289
8290func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8291	var m map[string]interface{}
8292	err := json.Unmarshal(body, &m)
8293	if err != nil {
8294		return nil, err
8295	}
8296
8297	switch m["objectType"] {
8298	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8299		var awpitrr AzureWorkloadPointInTimeRestoreRequest
8300		err := json.Unmarshal(body, &awpitrr)
8301		return awpitrr, err
8302	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8303		var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8304		err := json.Unmarshal(body, &awshpitrr)
8305		return awshpitrr, err
8306	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8307		var awshrr AzureWorkloadSAPHanaRestoreRequest
8308		err := json.Unmarshal(body, &awshrr)
8309		return awshrr, err
8310	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8311		var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8312		err := json.Unmarshal(body, &awspitrr)
8313		return awspitrr, err
8314	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
8315		var awsrr AzureWorkloadSQLRestoreRequest
8316		err := json.Unmarshal(body, &awsrr)
8317		return awsrr, err
8318	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8319		var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8320		err := json.Unmarshal(body, &awshpitrwrr)
8321		return awshpitrwrr, err
8322	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
8323		var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
8324		err := json.Unmarshal(body, &awshrwrr)
8325		return awshrwrr, err
8326	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
8327		var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
8328		err := json.Unmarshal(body, &awspitrwrr)
8329		return awspitrwrr, err
8330	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
8331		var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
8332		err := json.Unmarshal(body, &awsrwrr)
8333		return awsrwrr, err
8334	default:
8335		var awrr AzureWorkloadRestoreRequest
8336		err := json.Unmarshal(body, &awrr)
8337		return awrr, err
8338	}
8339}
8340func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8341	var rawMessages []*json.RawMessage
8342	err := json.Unmarshal(body, &rawMessages)
8343	if err != nil {
8344		return nil, err
8345	}
8346
8347	awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8348
8349	for index, rawMessage := range rawMessages {
8350		awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8351		if err != nil {
8352			return nil, err
8353		}
8354		awrrArray[index] = awrr
8355	}
8356	return awrrArray, nil
8357}
8358
8359// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest.
8360func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8361	awrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest
8362	objectMap := make(map[string]interface{})
8363	if awrr.RecoveryType != "" {
8364		objectMap["recoveryType"] = awrr.RecoveryType
8365	}
8366	if awrr.SourceResourceID != nil {
8367		objectMap["sourceResourceId"] = awrr.SourceResourceID
8368	}
8369	if awrr.PropertyBag != nil {
8370		objectMap["propertyBag"] = awrr.PropertyBag
8371	}
8372	if awrr.TargetInfo != nil {
8373		objectMap["targetInfo"] = awrr.TargetInfo
8374	}
8375	if awrr.RecoveryMode != "" {
8376		objectMap["recoveryMode"] = awrr.RecoveryMode
8377	}
8378	if awrr.TargetVirtualMachineID != nil {
8379		objectMap["targetVirtualMachineId"] = awrr.TargetVirtualMachineID
8380	}
8381	if awrr.ObjectType != "" {
8382		objectMap["objectType"] = awrr.ObjectType
8383	}
8384	return json.Marshal(objectMap)
8385}
8386
8387// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8388func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8389	return nil, false
8390}
8391
8392// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8393func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8394	return nil, false
8395}
8396
8397// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8398func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8399	return &awrr, true
8400}
8401
8402// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8403func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8404	return &awrr, true
8405}
8406
8407// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8408func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8409	return nil, false
8410}
8411
8412// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8413func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8414	return nil, false
8415}
8416
8417// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8418func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8419	return nil, false
8420}
8421
8422// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8423func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8424	return nil, false
8425}
8426
8427// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8428func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8429	return nil, false
8430}
8431
8432// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8433func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8434	return nil, false
8435}
8436
8437// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8438func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8439	return nil, false
8440}
8441
8442// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8443func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8444	return nil, false
8445}
8446
8447// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8448func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8449	return nil, false
8450}
8451
8452// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8453func (awrr AzureWorkloadRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8454	return nil, false
8455}
8456
8457// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8458func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8459	return nil, false
8460}
8461
8462// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8463func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8464	return nil, false
8465}
8466
8467// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8468func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8469	return nil, false
8470}
8471
8472// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8473func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8474	return nil, false
8475}
8476
8477// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8478func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8479	return nil, false
8480}
8481
8482// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8483func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8484	return nil, false
8485}
8486
8487// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest.
8488func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8489	return &awrr, true
8490}
8491
8492// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana
8493type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8494	// TimeRanges - List of log ranges
8495	TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8496	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
8497	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8498	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
8499	Type RestorePointType `json:"type,omitempty"`
8500	// RecoveryPointTierDetails - Recovery point tier information.
8501	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8502	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
8503	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8504	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
8505	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8506}
8507
8508// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8509func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8510	awshpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
8511	objectMap := make(map[string]interface{})
8512	if awshpitrp.TimeRanges != nil {
8513		objectMap["timeRanges"] = awshpitrp.TimeRanges
8514	}
8515	if awshpitrp.RecoveryPointTierDetails != nil {
8516		objectMap["recoveryPointTierDetails"] = awshpitrp.RecoveryPointTierDetails
8517	}
8518	if awshpitrp.RecoveryPointMoveReadinessInfo != nil {
8519		objectMap["recoveryPointMoveReadinessInfo"] = awshpitrp.RecoveryPointMoveReadinessInfo
8520	}
8521	if awshpitrp.ObjectType != "" {
8522		objectMap["objectType"] = awshpitrp.ObjectType
8523	}
8524	return json.Marshal(objectMap)
8525}
8526
8527// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8528func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8529	return nil, false
8530}
8531
8532// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8533func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8534	return nil, false
8535}
8536
8537// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8538func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8539	return &awshpitrp, true
8540}
8541
8542// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8543func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8544	return nil, false
8545}
8546
8547// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8548func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8549	return &awshpitrp, true
8550}
8551
8552// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8553func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8554	return &awshpitrp, true
8555}
8556
8557// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8558func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8559	return nil, false
8560}
8561
8562// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8563func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8564	return nil, false
8565}
8566
8567// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8568func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8569	return nil, false
8570}
8571
8572// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8573func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8574	return nil, false
8575}
8576
8577// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8578func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8579	return nil, false
8580}
8581
8582// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8583func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8584	return nil, false
8585}
8586
8587// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8588func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8589	return nil, false
8590}
8591
8592// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint.
8593func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8594	return &awshpitrp, true
8595}
8596
8597// BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for
8598// PointInTime/Log restore
8599type BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest interface {
8600	AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8601	AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8602}
8603
8604// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for
8605// PointInTime/Log restore
8606type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
8607	// PointInTime - PointInTime value
8608	PointInTime *date.Time `json:"pointInTime,omitempty"`
8609	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
8610	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8611	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
8612	SourceResourceID *string `json:"sourceResourceId,omitempty"`
8613	// PropertyBag - Workload specific property bag.
8614	PropertyBag map[string]*string `json:"propertyBag"`
8615	// TargetInfo - Details of target database
8616	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8617	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
8618	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8619	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
8620	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
8621	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8622	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
8623	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8624}
8625
8626func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8627	var m map[string]interface{}
8628	err := json.Unmarshal(body, &m)
8629	if err != nil {
8630		return nil, err
8631	}
8632
8633	switch m["objectType"] {
8634	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8635		var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8636		err := json.Unmarshal(body, &awshpitrwrr)
8637		return awshpitrwrr, err
8638	default:
8639		var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8640		err := json.Unmarshal(body, &awshpitrr)
8641		return awshpitrr, err
8642	}
8643}
8644func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8645	var rawMessages []*json.RawMessage
8646	err := json.Unmarshal(body, &rawMessages)
8647	if err != nil {
8648		return nil, err
8649	}
8650
8651	awshpitrrArray := make([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, len(rawMessages))
8652
8653	for index, rawMessage := range rawMessages {
8654		awshpitrr, err := unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(*rawMessage)
8655		if err != nil {
8656			return nil, err
8657		}
8658		awshpitrrArray[index] = awshpitrr
8659	}
8660	return awshpitrrArray, nil
8661}
8662
8663// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8664func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8665	awshpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
8666	objectMap := make(map[string]interface{})
8667	if awshpitrr.PointInTime != nil {
8668		objectMap["pointInTime"] = awshpitrr.PointInTime
8669	}
8670	if awshpitrr.RecoveryType != "" {
8671		objectMap["recoveryType"] = awshpitrr.RecoveryType
8672	}
8673	if awshpitrr.SourceResourceID != nil {
8674		objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
8675	}
8676	if awshpitrr.PropertyBag != nil {
8677		objectMap["propertyBag"] = awshpitrr.PropertyBag
8678	}
8679	if awshpitrr.TargetInfo != nil {
8680		objectMap["targetInfo"] = awshpitrr.TargetInfo
8681	}
8682	if awshpitrr.RecoveryMode != "" {
8683		objectMap["recoveryMode"] = awshpitrr.RecoveryMode
8684	}
8685	if awshpitrr.TargetVirtualMachineID != nil {
8686		objectMap["targetVirtualMachineId"] = awshpitrr.TargetVirtualMachineID
8687	}
8688	if awshpitrr.ObjectType != "" {
8689		objectMap["objectType"] = awshpitrr.ObjectType
8690	}
8691	return json.Marshal(objectMap)
8692}
8693
8694// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8695func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8696	return nil, false
8697}
8698
8699// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8700func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8701	return nil, false
8702}
8703
8704// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8705func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8706	return nil, false
8707}
8708
8709// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8710func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8711	return &awshpitrr, true
8712}
8713
8714// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8715func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8716	return &awshpitrr, true
8717}
8718
8719// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8720func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8721	return &awshpitrr, true
8722}
8723
8724// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8725func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8726	return nil, false
8727}
8728
8729// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8730func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8731	return &awshpitrr, true
8732}
8733
8734// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8735func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8736	return nil, false
8737}
8738
8739// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8740func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8741	return nil, false
8742}
8743
8744// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8745func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8746	return nil, false
8747}
8748
8749// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8750func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8751	return nil, false
8752}
8753
8754// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8755func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8756	return nil, false
8757}
8758
8759// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8760func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8761	return nil, false
8762}
8763
8764// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8765func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8766	return nil, false
8767}
8768
8769// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8770func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8771	return nil, false
8772}
8773
8774// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8775func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8776	return nil, false
8777}
8778
8779// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8780func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8781	return nil, false
8782}
8783
8784// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8785func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8786	return nil, false
8787}
8788
8789// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8790func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8791	return nil, false
8792}
8793
8794// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest.
8795func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8796	return &awshpitrr, true
8797}
8798
8799// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest azureWorkload SAP Hana-specific restore with
8800// integrated rehydration of recovery point.
8801type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct {
8802	// RecoveryPointRehydrationInfo - RP Rehydration Info
8803	RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
8804	// PointInTime - PointInTime value
8805	PointInTime *date.Time `json:"pointInTime,omitempty"`
8806	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
8807	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8808	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
8809	SourceResourceID *string `json:"sourceResourceId,omitempty"`
8810	// PropertyBag - Workload specific property bag.
8811	PropertyBag map[string]*string `json:"propertyBag"`
8812	// TargetInfo - Details of target database
8813	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8814	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
8815	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8816	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
8817	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
8818	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8819	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
8820	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8821}
8822
8823// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8824func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
8825	awshpitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8826	objectMap := make(map[string]interface{})
8827	if awshpitrwrr.RecoveryPointRehydrationInfo != nil {
8828		objectMap["recoveryPointRehydrationInfo"] = awshpitrwrr.RecoveryPointRehydrationInfo
8829	}
8830	if awshpitrwrr.PointInTime != nil {
8831		objectMap["pointInTime"] = awshpitrwrr.PointInTime
8832	}
8833	if awshpitrwrr.RecoveryType != "" {
8834		objectMap["recoveryType"] = awshpitrwrr.RecoveryType
8835	}
8836	if awshpitrwrr.SourceResourceID != nil {
8837		objectMap["sourceResourceId"] = awshpitrwrr.SourceResourceID
8838	}
8839	if awshpitrwrr.PropertyBag != nil {
8840		objectMap["propertyBag"] = awshpitrwrr.PropertyBag
8841	}
8842	if awshpitrwrr.TargetInfo != nil {
8843		objectMap["targetInfo"] = awshpitrwrr.TargetInfo
8844	}
8845	if awshpitrwrr.RecoveryMode != "" {
8846		objectMap["recoveryMode"] = awshpitrwrr.RecoveryMode
8847	}
8848	if awshpitrwrr.TargetVirtualMachineID != nil {
8849		objectMap["targetVirtualMachineId"] = awshpitrwrr.TargetVirtualMachineID
8850	}
8851	if awshpitrwrr.ObjectType != "" {
8852		objectMap["objectType"] = awshpitrwrr.ObjectType
8853	}
8854	return json.Marshal(objectMap)
8855}
8856
8857// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8858func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8859	return nil, false
8860}
8861
8862// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8863func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8864	return nil, false
8865}
8866
8867// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8868func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8869	return nil, false
8870}
8871
8872// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8873func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8874	return &awshpitrwrr, true
8875}
8876
8877// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8878func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8879	return nil, false
8880}
8881
8882// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8883func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8884	return &awshpitrwrr, true
8885}
8886
8887// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8888func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8889	return nil, false
8890}
8891
8892// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8893func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8894	return &awshpitrwrr, true
8895}
8896
8897// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8898func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8899	return nil, false
8900}
8901
8902// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8903func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8904	return nil, false
8905}
8906
8907// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8908func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8909	return nil, false
8910}
8911
8912// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8913func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8914	return nil, false
8915}
8916
8917// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8918func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8919	return nil, false
8920}
8921
8922// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8923func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8924	return nil, false
8925}
8926
8927// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8928func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8929	return &awshpitrwrr, true
8930}
8931
8932// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8933func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8934	return nil, false
8935}
8936
8937// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8938func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8939	return nil, false
8940}
8941
8942// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8943func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8944	return nil, false
8945}
8946
8947// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8948func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8949	return nil, false
8950}
8951
8952// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8953func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8954	return nil, false
8955}
8956
8957// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.
8958func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8959	return &awshpitrwrr, true
8960}
8961
8962// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff
8963// recoverypoints
8964type AzureWorkloadSAPHanaRecoveryPoint struct {
8965	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
8966	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8967	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
8968	Type RestorePointType `json:"type,omitempty"`
8969	// RecoveryPointTierDetails - Recovery point tier information.
8970	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8971	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
8972	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8973	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
8974	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8975}
8976
8977// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint.
8978func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
8979	awshrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint
8980	objectMap := make(map[string]interface{})
8981	if awshrp.RecoveryPointTierDetails != nil {
8982		objectMap["recoveryPointTierDetails"] = awshrp.RecoveryPointTierDetails
8983	}
8984	if awshrp.RecoveryPointMoveReadinessInfo != nil {
8985		objectMap["recoveryPointMoveReadinessInfo"] = awshrp.RecoveryPointMoveReadinessInfo
8986	}
8987	if awshrp.ObjectType != "" {
8988		objectMap["objectType"] = awshrp.ObjectType
8989	}
8990	return json.Marshal(objectMap)
8991}
8992
8993// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
8994func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8995	return nil, false
8996}
8997
8998// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
8999func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9000	return nil, false
9001}
9002
9003// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9004func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9005	return nil, false
9006}
9007
9008// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9009func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9010	return nil, false
9011}
9012
9013// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9014func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9015	return &awshrp, true
9016}
9017
9018// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9019func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9020	return nil, false
9021}
9022
9023// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9024func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9025	return &awshrp, true
9026}
9027
9028// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9029func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9030	return nil, false
9031}
9032
9033// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9034func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9035	return nil, false
9036}
9037
9038// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9039func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9040	return nil, false
9041}
9042
9043// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9044func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9045	return nil, false
9046}
9047
9048// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9049func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9050	return nil, false
9051}
9052
9053// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9054func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9055	return nil, false
9056}
9057
9058// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint.
9059func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9060	return &awshrp, true
9061}
9062
9063// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore.
9064type BasicAzureWorkloadSAPHanaRestoreRequest interface {
9065	AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9066	AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9067	AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9068	AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
9069	AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
9070}
9071
9072// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore.
9073type AzureWorkloadSAPHanaRestoreRequest struct {
9074	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
9075	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9076	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
9077	SourceResourceID *string `json:"sourceResourceId,omitempty"`
9078	// PropertyBag - Workload specific property bag.
9079	PropertyBag map[string]*string `json:"propertyBag"`
9080	// TargetInfo - Details of target database
9081	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9082	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
9083	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9084	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
9085	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
9086	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9087	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
9088	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9089}
9090
9091func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9092	var m map[string]interface{}
9093	err := json.Unmarshal(body, &m)
9094	if err != nil {
9095		return nil, err
9096	}
9097
9098	switch m["objectType"] {
9099	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
9100		var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9101		err := json.Unmarshal(body, &awshpitrr)
9102		return awshpitrr, err
9103	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9104		var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9105		err := json.Unmarshal(body, &awshpitrwrr)
9106		return awshpitrwrr, err
9107	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
9108		var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
9109		err := json.Unmarshal(body, &awshrwrr)
9110		return awshrwrr, err
9111	default:
9112		var awshrr AzureWorkloadSAPHanaRestoreRequest
9113		err := json.Unmarshal(body, &awshrr)
9114		return awshrr, err
9115	}
9116}
9117func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9118	var rawMessages []*json.RawMessage
9119	err := json.Unmarshal(body, &rawMessages)
9120	if err != nil {
9121		return nil, err
9122	}
9123
9124	awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
9125
9126	for index, rawMessage := range rawMessages {
9127		awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
9128		if err != nil {
9129			return nil, err
9130		}
9131		awshrrArray[index] = awshrr
9132	}
9133	return awshrrArray, nil
9134}
9135
9136// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest.
9137func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
9138	awshrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest
9139	objectMap := make(map[string]interface{})
9140	if awshrr.RecoveryType != "" {
9141		objectMap["recoveryType"] = awshrr.RecoveryType
9142	}
9143	if awshrr.SourceResourceID != nil {
9144		objectMap["sourceResourceId"] = awshrr.SourceResourceID
9145	}
9146	if awshrr.PropertyBag != nil {
9147		objectMap["propertyBag"] = awshrr.PropertyBag
9148	}
9149	if awshrr.TargetInfo != nil {
9150		objectMap["targetInfo"] = awshrr.TargetInfo
9151	}
9152	if awshrr.RecoveryMode != "" {
9153		objectMap["recoveryMode"] = awshrr.RecoveryMode
9154	}
9155	if awshrr.TargetVirtualMachineID != nil {
9156		objectMap["targetVirtualMachineId"] = awshrr.TargetVirtualMachineID
9157	}
9158	if awshrr.ObjectType != "" {
9159		objectMap["objectType"] = awshrr.ObjectType
9160	}
9161	return json.Marshal(objectMap)
9162}
9163
9164// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9165func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9166	return nil, false
9167}
9168
9169// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9170func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9171	return nil, false
9172}
9173
9174// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9175func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9176	return nil, false
9177}
9178
9179// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9180func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9181	return &awshrr, true
9182}
9183
9184// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9185func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9186	return nil, false
9187}
9188
9189// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9190func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9191	return nil, false
9192}
9193
9194// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9195func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9196	return &awshrr, true
9197}
9198
9199// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9200func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9201	return &awshrr, true
9202}
9203
9204// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9205func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9206	return nil, false
9207}
9208
9209// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9210func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9211	return nil, false
9212}
9213
9214// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9215func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9216	return nil, false
9217}
9218
9219// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9220func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9221	return nil, false
9222}
9223
9224// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9225func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9226	return nil, false
9227}
9228
9229// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9230func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9231	return nil, false
9232}
9233
9234// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9235func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9236	return nil, false
9237}
9238
9239// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9240func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9241	return nil, false
9242}
9243
9244// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9245func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9246	return nil, false
9247}
9248
9249// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9250func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9251	return nil, false
9252}
9253
9254// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9255func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9256	return nil, false
9257}
9258
9259// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9260func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9261	return nil, false
9262}
9263
9264// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest.
9265func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9266	return &awshrr, true
9267}
9268
9269// AzureWorkloadSAPHanaRestoreWithRehydrateRequest azureWorkload SAP Hana-specific restore with integrated
9270// rehydration of recovery point.
9271type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct {
9272	// RecoveryPointRehydrationInfo - RP Rehydration Info
9273	RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9274	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
9275	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9276	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
9277	SourceResourceID *string `json:"sourceResourceId,omitempty"`
9278	// PropertyBag - Workload specific property bag.
9279	PropertyBag map[string]*string `json:"propertyBag"`
9280	// TargetInfo - Details of target database
9281	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9282	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
9283	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9284	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
9285	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
9286	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9287	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
9288	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9289}
9290
9291// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9292func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9293	awshrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest
9294	objectMap := make(map[string]interface{})
9295	if awshrwrr.RecoveryPointRehydrationInfo != nil {
9296		objectMap["recoveryPointRehydrationInfo"] = awshrwrr.RecoveryPointRehydrationInfo
9297	}
9298	if awshrwrr.RecoveryType != "" {
9299		objectMap["recoveryType"] = awshrwrr.RecoveryType
9300	}
9301	if awshrwrr.SourceResourceID != nil {
9302		objectMap["sourceResourceId"] = awshrwrr.SourceResourceID
9303	}
9304	if awshrwrr.PropertyBag != nil {
9305		objectMap["propertyBag"] = awshrwrr.PropertyBag
9306	}
9307	if awshrwrr.TargetInfo != nil {
9308		objectMap["targetInfo"] = awshrwrr.TargetInfo
9309	}
9310	if awshrwrr.RecoveryMode != "" {
9311		objectMap["recoveryMode"] = awshrwrr.RecoveryMode
9312	}
9313	if awshrwrr.TargetVirtualMachineID != nil {
9314		objectMap["targetVirtualMachineId"] = awshrwrr.TargetVirtualMachineID
9315	}
9316	if awshrwrr.ObjectType != "" {
9317		objectMap["objectType"] = awshrwrr.ObjectType
9318	}
9319	return json.Marshal(objectMap)
9320}
9321
9322// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9323func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9324	return nil, false
9325}
9326
9327// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9328func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9329	return nil, false
9330}
9331
9332// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9333func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9334	return nil, false
9335}
9336
9337// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9338func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9339	return &awshrwrr, true
9340}
9341
9342// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9343func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9344	return nil, false
9345}
9346
9347// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9348func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9349	return nil, false
9350}
9351
9352// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9353func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9354	return nil, false
9355}
9356
9357// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9358func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9359	return &awshrwrr, true
9360}
9361
9362// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9363func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9364	return nil, false
9365}
9366
9367// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9368func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9369	return nil, false
9370}
9371
9372// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9373func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9374	return nil, false
9375}
9376
9377// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9378func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9379	return nil, false
9380}
9381
9382// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9383func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9384	return nil, false
9385}
9386
9387// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9388func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9389	return nil, false
9390}
9391
9392// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9393func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9394	return nil, false
9395}
9396
9397// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9398func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9399	return &awshrwrr, true
9400}
9401
9402// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9403func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9404	return nil, false
9405}
9406
9407// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9408func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9409	return nil, false
9410}
9411
9412// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9413func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9414	return nil, false
9415}
9416
9417// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9418func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9419	return nil, false
9420}
9421
9422// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreWithRehydrateRequest.
9423func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9424	return &awshrwrr, true
9425}
9426
9427// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item.
9428type AzureWorkloadSQLAutoProtectionIntent struct {
9429	// WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase'
9430	WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9431	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
9432	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9433	// SourceResourceID - ARM ID of the resource to be backed up.
9434	SourceResourceID *string `json:"sourceResourceId,omitempty"`
9435	// ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId
9436	ItemID *string `json:"itemId,omitempty"`
9437	// PolicyID - ID of the backup policy with which this item is backed up.
9438	PolicyID *string `json:"policyId,omitempty"`
9439	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
9440	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
9441	// ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent'
9442	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
9443}
9444
9445// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent.
9446func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
9447	awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
9448	objectMap := make(map[string]interface{})
9449	if awsapi.WorkloadItemType != "" {
9450		objectMap["workloadItemType"] = awsapi.WorkloadItemType
9451	}
9452	if awsapi.BackupManagementType != "" {
9453		objectMap["backupManagementType"] = awsapi.BackupManagementType
9454	}
9455	if awsapi.SourceResourceID != nil {
9456		objectMap["sourceResourceId"] = awsapi.SourceResourceID
9457	}
9458	if awsapi.ItemID != nil {
9459		objectMap["itemId"] = awsapi.ItemID
9460	}
9461	if awsapi.PolicyID != nil {
9462		objectMap["policyId"] = awsapi.PolicyID
9463	}
9464	if awsapi.ProtectionState != "" {
9465		objectMap["protectionState"] = awsapi.ProtectionState
9466	}
9467	if awsapi.ProtectionIntentItemType != "" {
9468		objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
9469	}
9470	return json.Marshal(objectMap)
9471}
9472
9473// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9474func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
9475	return nil, false
9476}
9477
9478// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9479func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
9480	return &awsapi, true
9481}
9482
9483// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9484func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
9485	return nil, false
9486}
9487
9488// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9489func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
9490	return nil, false
9491}
9492
9493// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9494func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
9495	return &awsapi, true
9496}
9497
9498// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9499func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
9500	return &awsapi, true
9501}
9502
9503// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9504func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
9505	return nil, false
9506}
9507
9508// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent.
9509func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
9510	return &awsapi, true
9511}
9512
9513// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime
9514type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
9515	// TimeRanges - List of log ranges
9516	TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
9517	// ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases:
9518	// When a specific recovery point is accessed using GetRecoveryPoint
9519	// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter
9520	ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
9521	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
9522	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9523	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
9524	Type RestorePointType `json:"type,omitempty"`
9525	// RecoveryPointTierDetails - Recovery point tier information.
9526	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
9527	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
9528	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9529	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
9530	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9531}
9532
9533// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint.
9534func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
9535	awspitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
9536	objectMap := make(map[string]interface{})
9537	if awspitrp.TimeRanges != nil {
9538		objectMap["timeRanges"] = awspitrp.TimeRanges
9539	}
9540	if awspitrp.ExtendedInfo != nil {
9541		objectMap["extendedInfo"] = awspitrp.ExtendedInfo
9542	}
9543	if awspitrp.RecoveryPointTierDetails != nil {
9544		objectMap["recoveryPointTierDetails"] = awspitrp.RecoveryPointTierDetails
9545	}
9546	if awspitrp.RecoveryPointMoveReadinessInfo != nil {
9547		objectMap["recoveryPointMoveReadinessInfo"] = awspitrp.RecoveryPointMoveReadinessInfo
9548	}
9549	if awspitrp.ObjectType != "" {
9550		objectMap["objectType"] = awspitrp.ObjectType
9551	}
9552	return json.Marshal(objectMap)
9553}
9554
9555// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9556func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9557	return nil, false
9558}
9559
9560// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9561func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9562	return nil, false
9563}
9564
9565// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9566func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9567	return nil, false
9568}
9569
9570// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9571func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9572	return nil, false
9573}
9574
9575// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9576func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9577	return &awspitrp, true
9578}
9579
9580// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9581func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9582	return nil, false
9583}
9584
9585// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9586func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9587	return nil, false
9588}
9589
9590// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9591func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9592	return &awspitrp, true
9593}
9594
9595// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9596func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9597	return nil, false
9598}
9599
9600// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9601func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9602	return &awspitrp, true
9603}
9604
9605// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9606func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9607	return nil, false
9608}
9609
9610// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9611func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9612	return nil, false
9613}
9614
9615// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9616func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9617	return nil, false
9618}
9619
9620// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint.
9621func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9622	return &awspitrp, true
9623}
9624
9625// BasicAzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for PointInTime/Log
9626// restore
9627type BasicAzureWorkloadSQLPointInTimeRestoreRequest interface {
9628	AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
9629	AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
9630}
9631
9632// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for
9633// PointInTime/Log restore
9634type AzureWorkloadSQLPointInTimeRestoreRequest struct {
9635	// PointInTime - PointInTime value
9636	PointInTime *date.Time `json:"pointInTime,omitempty"`
9637	// ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided
9638	ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9639	// IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried
9640	IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9641	// AlternateDirectoryPaths - Data directory details
9642	AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9643	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
9644	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9645	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
9646	SourceResourceID *string `json:"sourceResourceId,omitempty"`
9647	// PropertyBag - Workload specific property bag.
9648	PropertyBag map[string]*string `json:"propertyBag"`
9649	// TargetInfo - Details of target database
9650	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9651	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
9652	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9653	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
9654	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
9655	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9656	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
9657	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9658}
9659
9660func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9661	var m map[string]interface{}
9662	err := json.Unmarshal(body, &m)
9663	if err != nil {
9664		return nil, err
9665	}
9666
9667	switch m["objectType"] {
9668	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
9669		var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9670		err := json.Unmarshal(body, &awspitrwrr)
9671		return awspitrwrr, err
9672	default:
9673		var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
9674		err := json.Unmarshal(body, &awspitrr)
9675		return awspitrr, err
9676	}
9677}
9678func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9679	var rawMessages []*json.RawMessage
9680	err := json.Unmarshal(body, &rawMessages)
9681	if err != nil {
9682		return nil, err
9683	}
9684
9685	awspitrrArray := make([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, len(rawMessages))
9686
9687	for index, rawMessage := range rawMessages {
9688		awspitrr, err := unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(*rawMessage)
9689		if err != nil {
9690			return nil, err
9691		}
9692		awspitrrArray[index] = awspitrr
9693	}
9694	return awspitrrArray, nil
9695}
9696
9697// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest.
9698func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
9699	awspitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
9700	objectMap := make(map[string]interface{})
9701	if awspitrr.PointInTime != nil {
9702		objectMap["pointInTime"] = awspitrr.PointInTime
9703	}
9704	if awspitrr.ShouldUseAlternateTargetLocation != nil {
9705		objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
9706	}
9707	if awspitrr.IsNonRecoverable != nil {
9708		objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
9709	}
9710	if awspitrr.AlternateDirectoryPaths != nil {
9711		objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
9712	}
9713	if awspitrr.RecoveryType != "" {
9714		objectMap["recoveryType"] = awspitrr.RecoveryType
9715	}
9716	if awspitrr.SourceResourceID != nil {
9717		objectMap["sourceResourceId"] = awspitrr.SourceResourceID
9718	}
9719	if awspitrr.PropertyBag != nil {
9720		objectMap["propertyBag"] = awspitrr.PropertyBag
9721	}
9722	if awspitrr.TargetInfo != nil {
9723		objectMap["targetInfo"] = awspitrr.TargetInfo
9724	}
9725	if awspitrr.RecoveryMode != "" {
9726		objectMap["recoveryMode"] = awspitrr.RecoveryMode
9727	}
9728	if awspitrr.TargetVirtualMachineID != nil {
9729		objectMap["targetVirtualMachineId"] = awspitrr.TargetVirtualMachineID
9730	}
9731	if awspitrr.ObjectType != "" {
9732		objectMap["objectType"] = awspitrr.ObjectType
9733	}
9734	return json.Marshal(objectMap)
9735}
9736
9737// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9738func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9739	return nil, false
9740}
9741
9742// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9743func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9744	return nil, false
9745}
9746
9747// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9748func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9749	return nil, false
9750}
9751
9752// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9753func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9754	return &awspitrr, true
9755}
9756
9757// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9758func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9759	return nil, false
9760}
9761
9762// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9763func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9764	return nil, false
9765}
9766
9767// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9768func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9769	return nil, false
9770}
9771
9772// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9773func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9774	return nil, false
9775}
9776
9777// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9778func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9779	return &awspitrr, true
9780}
9781
9782// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9783func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9784	return &awspitrr, true
9785}
9786
9787// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9788func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9789	return nil, false
9790}
9791
9792// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9793func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9794	return &awspitrr, true
9795}
9796
9797// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9798func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9799	return nil, false
9800}
9801
9802// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9803func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9804	return nil, false
9805}
9806
9807// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9808func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9809	return nil, false
9810}
9811
9812// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9813func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9814	return nil, false
9815}
9816
9817// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9818func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9819	return nil, false
9820}
9821
9822// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9823func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9824	return nil, false
9825}
9826
9827// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9828func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9829	return nil, false
9830}
9831
9832// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9833func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9834	return nil, false
9835}
9836
9837// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest.
9838func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9839	return &awspitrr, true
9840}
9841
9842// AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest azureWorkload SQL-specific restore with
9843// integrated rehydration of recovery point.
9844type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct {
9845	// RecoveryPointRehydrationInfo - RP Rehydration Info
9846	RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9847	// PointInTime - PointInTime value
9848	PointInTime *date.Time `json:"pointInTime,omitempty"`
9849	// ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided
9850	ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9851	// IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried
9852	IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9853	// AlternateDirectoryPaths - Data directory details
9854	AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9855	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
9856	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9857	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
9858	SourceResourceID *string `json:"sourceResourceId,omitempty"`
9859	// PropertyBag - Workload specific property bag.
9860	PropertyBag map[string]*string `json:"propertyBag"`
9861	// TargetInfo - Details of target database
9862	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9863	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
9864	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9865	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
9866	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
9867	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9868	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
9869	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9870}
9871
9872// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9873func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9874	awspitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9875	objectMap := make(map[string]interface{})
9876	if awspitrwrr.RecoveryPointRehydrationInfo != nil {
9877		objectMap["recoveryPointRehydrationInfo"] = awspitrwrr.RecoveryPointRehydrationInfo
9878	}
9879	if awspitrwrr.PointInTime != nil {
9880		objectMap["pointInTime"] = awspitrwrr.PointInTime
9881	}
9882	if awspitrwrr.ShouldUseAlternateTargetLocation != nil {
9883		objectMap["shouldUseAlternateTargetLocation"] = awspitrwrr.ShouldUseAlternateTargetLocation
9884	}
9885	if awspitrwrr.IsNonRecoverable != nil {
9886		objectMap["isNonRecoverable"] = awspitrwrr.IsNonRecoverable
9887	}
9888	if awspitrwrr.AlternateDirectoryPaths != nil {
9889		objectMap["alternateDirectoryPaths"] = awspitrwrr.AlternateDirectoryPaths
9890	}
9891	if awspitrwrr.RecoveryType != "" {
9892		objectMap["recoveryType"] = awspitrwrr.RecoveryType
9893	}
9894	if awspitrwrr.SourceResourceID != nil {
9895		objectMap["sourceResourceId"] = awspitrwrr.SourceResourceID
9896	}
9897	if awspitrwrr.PropertyBag != nil {
9898		objectMap["propertyBag"] = awspitrwrr.PropertyBag
9899	}
9900	if awspitrwrr.TargetInfo != nil {
9901		objectMap["targetInfo"] = awspitrwrr.TargetInfo
9902	}
9903	if awspitrwrr.RecoveryMode != "" {
9904		objectMap["recoveryMode"] = awspitrwrr.RecoveryMode
9905	}
9906	if awspitrwrr.TargetVirtualMachineID != nil {
9907		objectMap["targetVirtualMachineId"] = awspitrwrr.TargetVirtualMachineID
9908	}
9909	if awspitrwrr.ObjectType != "" {
9910		objectMap["objectType"] = awspitrwrr.ObjectType
9911	}
9912	return json.Marshal(objectMap)
9913}
9914
9915// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9916func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9917	return nil, false
9918}
9919
9920// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9921func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9922	return nil, false
9923}
9924
9925// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9926func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9927	return nil, false
9928}
9929
9930// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9931func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9932	return &awspitrwrr, true
9933}
9934
9935// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9936func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9937	return nil, false
9938}
9939
9940// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9941func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9942	return nil, false
9943}
9944
9945// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9946func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9947	return nil, false
9948}
9949
9950// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9951func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9952	return nil, false
9953}
9954
9955// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9956func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9957	return nil, false
9958}
9959
9960// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9961func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9962	return &awspitrwrr, true
9963}
9964
9965// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9966func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9967	return nil, false
9968}
9969
9970// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9971func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9972	return &awspitrwrr, true
9973}
9974
9975// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9976func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9977	return nil, false
9978}
9979
9980// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9981func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9982	return nil, false
9983}
9984
9985// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9986func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9987	return nil, false
9988}
9989
9990// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9991func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9992	return nil, false
9993}
9994
9995// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
9996func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9997	return &awspitrwrr, true
9998}
9999
10000// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
10001func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10002	return nil, false
10003}
10004
10005// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
10006func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10007	return nil, false
10008}
10009
10010// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
10011func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10012	return nil, false
10013}
10014
10015// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.
10016func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10017	return &awspitrwrr, true
10018}
10019
10020// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint
10021// along with extended info
10022type BasicAzureWorkloadSQLRecoveryPoint interface {
10023	AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
10024	AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
10025}
10026
10027// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint
10028// along with extended info
10029type AzureWorkloadSQLRecoveryPoint struct {
10030	// ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases:
10031	// When a specific recovery point is accessed using GetRecoveryPoint
10032	// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter
10033	ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10034	// RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created
10035	RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10036	// Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential', 'RestorePointTypeIncremental'
10037	Type RestorePointType `json:"type,omitempty"`
10038	// RecoveryPointTierDetails - Recovery point tier information.
10039	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
10040	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
10041	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10042	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
10043	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10044}
10045
10046func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
10047	var m map[string]interface{}
10048	err := json.Unmarshal(body, &m)
10049	if err != nil {
10050		return nil, err
10051	}
10052
10053	switch m["objectType"] {
10054	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
10055		var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
10056		err := json.Unmarshal(body, &awspitrp)
10057		return awspitrp, err
10058	default:
10059		var awsrp AzureWorkloadSQLRecoveryPoint
10060		err := json.Unmarshal(body, &awsrp)
10061		return awsrp, err
10062	}
10063}
10064func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
10065	var rawMessages []*json.RawMessage
10066	err := json.Unmarshal(body, &rawMessages)
10067	if err != nil {
10068		return nil, err
10069	}
10070
10071	awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
10072
10073	for index, rawMessage := range rawMessages {
10074		awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
10075		if err != nil {
10076			return nil, err
10077		}
10078		awsrpArray[index] = awsrp
10079	}
10080	return awsrpArray, nil
10081}
10082
10083// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint.
10084func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
10085	awsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint
10086	objectMap := make(map[string]interface{})
10087	if awsrp.ExtendedInfo != nil {
10088		objectMap["extendedInfo"] = awsrp.ExtendedInfo
10089	}
10090	if awsrp.RecoveryPointTierDetails != nil {
10091		objectMap["recoveryPointTierDetails"] = awsrp.RecoveryPointTierDetails
10092	}
10093	if awsrp.RecoveryPointMoveReadinessInfo != nil {
10094		objectMap["recoveryPointMoveReadinessInfo"] = awsrp.RecoveryPointMoveReadinessInfo
10095	}
10096	if awsrp.ObjectType != "" {
10097		objectMap["objectType"] = awsrp.ObjectType
10098	}
10099	return json.Marshal(objectMap)
10100}
10101
10102// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10103func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10104	return nil, false
10105}
10106
10107// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10108func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10109	return nil, false
10110}
10111
10112// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10113func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10114	return nil, false
10115}
10116
10117// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10118func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10119	return nil, false
10120}
10121
10122// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10123func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10124	return &awsrp, true
10125}
10126
10127// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10128func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10129	return nil, false
10130}
10131
10132// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10133func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10134	return nil, false
10135}
10136
10137// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10138func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10139	return nil, false
10140}
10141
10142// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10143func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10144	return &awsrp, true
10145}
10146
10147// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10148func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10149	return &awsrp, true
10150}
10151
10152// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10153func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10154	return nil, false
10155}
10156
10157// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10158func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10159	return nil, false
10160}
10161
10162// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10163func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10164	return nil, false
10165}
10166
10167// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint.
10168func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10169	return &awsrp, true
10170}
10171
10172// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details
10173type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
10174	// DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured
10175	DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
10176	// DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation.
10177	DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
10178}
10179
10180// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPointExtendedInfo.
10181func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
10182	objectMap := make(map[string]interface{})
10183	return json.Marshal(objectMap)
10184}
10185
10186// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore
10187type BasicAzureWorkloadSQLRestoreRequest interface {
10188	AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10189	AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
10190	AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10191	AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
10192	AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
10193}
10194
10195// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore
10196type AzureWorkloadSQLRestoreRequest struct {
10197	// ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided
10198	ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10199	// IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried
10200	IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10201	// AlternateDirectoryPaths - Data directory details
10202	AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10203	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
10204	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10205	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
10206	SourceResourceID *string `json:"sourceResourceId,omitempty"`
10207	// PropertyBag - Workload specific property bag.
10208	PropertyBag map[string]*string `json:"propertyBag"`
10209	// TargetInfo - Details of target database
10210	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10211	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
10212	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10213	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
10214	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
10215	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10216	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
10217	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10218}
10219
10220func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
10221	var m map[string]interface{}
10222	err := json.Unmarshal(body, &m)
10223	if err != nil {
10224		return nil, err
10225	}
10226
10227	switch m["objectType"] {
10228	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
10229		var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10230		err := json.Unmarshal(body, &awspitrr)
10231		return awspitrr, err
10232	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10233		var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10234		err := json.Unmarshal(body, &awspitrwrr)
10235		return awspitrwrr, err
10236	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
10237		var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
10238		err := json.Unmarshal(body, &awsrwrr)
10239		return awsrwrr, err
10240	default:
10241		var awsrr AzureWorkloadSQLRestoreRequest
10242		err := json.Unmarshal(body, &awsrr)
10243		return awsrr, err
10244	}
10245}
10246func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
10247	var rawMessages []*json.RawMessage
10248	err := json.Unmarshal(body, &rawMessages)
10249	if err != nil {
10250		return nil, err
10251	}
10252
10253	awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
10254
10255	for index, rawMessage := range rawMessages {
10256		awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
10257		if err != nil {
10258			return nil, err
10259		}
10260		awsrrArray[index] = awsrr
10261	}
10262	return awsrrArray, nil
10263}
10264
10265// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest.
10266func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
10267	awsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest
10268	objectMap := make(map[string]interface{})
10269	if awsrr.ShouldUseAlternateTargetLocation != nil {
10270		objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
10271	}
10272	if awsrr.IsNonRecoverable != nil {
10273		objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
10274	}
10275	if awsrr.AlternateDirectoryPaths != nil {
10276		objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
10277	}
10278	if awsrr.RecoveryType != "" {
10279		objectMap["recoveryType"] = awsrr.RecoveryType
10280	}
10281	if awsrr.SourceResourceID != nil {
10282		objectMap["sourceResourceId"] = awsrr.SourceResourceID
10283	}
10284	if awsrr.PropertyBag != nil {
10285		objectMap["propertyBag"] = awsrr.PropertyBag
10286	}
10287	if awsrr.TargetInfo != nil {
10288		objectMap["targetInfo"] = awsrr.TargetInfo
10289	}
10290	if awsrr.RecoveryMode != "" {
10291		objectMap["recoveryMode"] = awsrr.RecoveryMode
10292	}
10293	if awsrr.TargetVirtualMachineID != nil {
10294		objectMap["targetVirtualMachineId"] = awsrr.TargetVirtualMachineID
10295	}
10296	if awsrr.ObjectType != "" {
10297		objectMap["objectType"] = awsrr.ObjectType
10298	}
10299	return json.Marshal(objectMap)
10300}
10301
10302// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10303func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10304	return nil, false
10305}
10306
10307// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10308func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10309	return nil, false
10310}
10311
10312// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10313func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10314	return nil, false
10315}
10316
10317// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10318func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10319	return &awsrr, true
10320}
10321
10322// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10323func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10324	return nil, false
10325}
10326
10327// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10328func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10329	return nil, false
10330}
10331
10332// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10333func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10334	return nil, false
10335}
10336
10337// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10338func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10339	return nil, false
10340}
10341
10342// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10343func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10344	return nil, false
10345}
10346
10347// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10348func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10349	return nil, false
10350}
10351
10352// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10353func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10354	return &awsrr, true
10355}
10356
10357// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10358func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10359	return &awsrr, true
10360}
10361
10362// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10363func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10364	return nil, false
10365}
10366
10367// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10368func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10369	return nil, false
10370}
10371
10372// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10373func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10374	return nil, false
10375}
10376
10377// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10378func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10379	return nil, false
10380}
10381
10382// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10383func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10384	return nil, false
10385}
10386
10387// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10388func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10389	return nil, false
10390}
10391
10392// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10393func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10394	return nil, false
10395}
10396
10397// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10398func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10399	return nil, false
10400}
10401
10402// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest.
10403func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10404	return &awsrr, true
10405}
10406
10407// AzureWorkloadSQLRestoreWithRehydrateRequest azureWorkload SQL-specific restore with integrated
10408// rehydration of recovery point
10409type AzureWorkloadSQLRestoreWithRehydrateRequest struct {
10410	// RecoveryPointRehydrationInfo - RP Rehydration Info
10411	RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10412	// ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided
10413	ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10414	// IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried
10415	IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10416	// AlternateDirectoryPaths - Data directory details
10417	AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10418	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
10419	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10420	// SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered.
10421	SourceResourceID *string `json:"sourceResourceId,omitempty"`
10422	// PropertyBag - Workload specific property bag.
10423	PropertyBag map[string]*string `json:"propertyBag"`
10424	// TargetInfo - Details of target database
10425	TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10426	// RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery'
10427	RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10428	// TargetVirtualMachineID - This is the complete ARM Id of the target VM
10429	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
10430	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10431	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
10432	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10433}
10434
10435// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreWithRehydrateRequest.
10436func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10437	awsrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest
10438	objectMap := make(map[string]interface{})
10439	if awsrwrr.RecoveryPointRehydrationInfo != nil {
10440		objectMap["recoveryPointRehydrationInfo"] = awsrwrr.RecoveryPointRehydrationInfo
10441	}
10442	if awsrwrr.ShouldUseAlternateTargetLocation != nil {
10443		objectMap["shouldUseAlternateTargetLocation"] = awsrwrr.ShouldUseAlternateTargetLocation
10444	}
10445	if awsrwrr.IsNonRecoverable != nil {
10446		objectMap["isNonRecoverable"] = awsrwrr.IsNonRecoverable
10447	}
10448	if awsrwrr.AlternateDirectoryPaths != nil {
10449		objectMap["alternateDirectoryPaths"] = awsrwrr.AlternateDirectoryPaths
10450	}
10451	if awsrwrr.RecoveryType != "" {
10452		objectMap["recoveryType"] = awsrwrr.RecoveryType
10453	}
10454	if awsrwrr.SourceResourceID != nil {
10455		objectMap["sourceResourceId"] = awsrwrr.SourceResourceID
10456	}
10457	if awsrwrr.PropertyBag != nil {
10458		objectMap["propertyBag"] = awsrwrr.PropertyBag
10459	}
10460	if awsrwrr.TargetInfo != nil {
10461		objectMap["targetInfo"] = awsrwrr.TargetInfo
10462	}
10463	if awsrwrr.RecoveryMode != "" {
10464		objectMap["recoveryMode"] = awsrwrr.RecoveryMode
10465	}
10466	if awsrwrr.TargetVirtualMachineID != nil {
10467		objectMap["targetVirtualMachineId"] = awsrwrr.TargetVirtualMachineID
10468	}
10469	if awsrwrr.ObjectType != "" {
10470		objectMap["objectType"] = awsrwrr.ObjectType
10471	}
10472	return json.Marshal(objectMap)
10473}
10474
10475// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10476func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10477	return nil, false
10478}
10479
10480// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10481func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10482	return nil, false
10483}
10484
10485// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10486func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10487	return nil, false
10488}
10489
10490// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10491func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10492	return &awsrwrr, true
10493}
10494
10495// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10496func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10497	return nil, false
10498}
10499
10500// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10501func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10502	return nil, false
10503}
10504
10505// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10506func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10507	return nil, false
10508}
10509
10510// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10511func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10512	return nil, false
10513}
10514
10515// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10516func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10517	return nil, false
10518}
10519
10520// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10521func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10522	return nil, false
10523}
10524
10525// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10526func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10527	return nil, false
10528}
10529
10530// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10531func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10532	return &awsrwrr, true
10533}
10534
10535// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10536func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10537	return nil, false
10538}
10539
10540// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10541func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10542	return nil, false
10543}
10544
10545// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10546func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10547	return nil, false
10548}
10549
10550// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10551func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10552	return nil, false
10553}
10554
10555// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10556func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10557	return nil, false
10558}
10559
10560// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10561func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10562	return &awsrwrr, true
10563}
10564
10565// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10566func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10567	return nil, false
10568}
10569
10570// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10571func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10572	return nil, false
10573}
10574
10575// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreWithRehydrateRequest.
10576func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10577	return &awsrwrr, true
10578}
10579
10580// BEKDetails BEK is bitlocker encryption key.
10581type BEKDetails struct {
10582	// SecretURL - Secret is BEK.
10583	SecretURL *string `json:"secretUrl,omitempty"`
10584	// SecretVaultID - ID of the Key Vault where this Secret is stored.
10585	SecretVaultID *string `json:"secretVaultId,omitempty"`
10586	// SecretData - BEK data.
10587	SecretData *string `json:"secretData,omitempty"`
10588}
10589
10590// BMSAADPropertiesQueryObject filters to list backup items.
10591type BMSAADPropertiesQueryObject struct {
10592	// BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10593	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10594}
10595
10596// BMSBackupEngineQueryObject query parameters to fetch list of backup engines.
10597type BMSBackupEngineQueryObject struct {
10598	// Expand - attribute to add extended info
10599	Expand *string `json:"expand,omitempty"`
10600}
10601
10602// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines.
10603type BMSBackupEnginesQueryObject struct {
10604	// BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10605	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10606	// FriendlyName - Friendly name of the backup engine.
10607	FriendlyName *string `json:"friendlyName,omitempty"`
10608	// Expand - Attribute to add extended info.
10609	Expand *string `json:"expand,omitempty"`
10610}
10611
10612// BMSBackupSummariesQueryObject query parameters to fetch backup summaries.
10613type BMSBackupSummariesQueryObject struct {
10614	// Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary'
10615	Type Type `json:"type,omitempty"`
10616}
10617
10618// BMSContainerQueryObject the query filters that can be used with the list containers API.
10619type BMSContainerQueryObject struct {
10620	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10621	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10622	// ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer'
10623	ContainerType ContainerType `json:"containerType,omitempty"`
10624	// BackupEngineName - Backup engine name
10625	BackupEngineName *string `json:"backupEngineName,omitempty"`
10626	// FabricName - Fabric name for filter
10627	FabricName *string `json:"fabricName,omitempty"`
10628	// Status - Status of registration of this container with the Recovery Services Vault.
10629	Status *string `json:"status,omitempty"`
10630	// FriendlyName - Friendly name of this container.
10631	FriendlyName *string `json:"friendlyName,omitempty"`
10632}
10633
10634// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API.
10635type BMSContainersInquiryQueryObject struct {
10636	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10637	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10638	// WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
10639	WorkloadType WorkloadType `json:"workloadType,omitempty"`
10640}
10641
10642// BMSPOQueryObject filters to list items that can be backed up.
10643type BMSPOQueryObject struct {
10644	// BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10645	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10646	// WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
10647	WorkloadType WorkloadType `json:"workloadType,omitempty"`
10648	// ContainerName - Full name of the container whose Protectable Objects should be returned.
10649	ContainerName *string `json:"containerName,omitempty"`
10650	// Status - Backup status query parameter.
10651	Status *string `json:"status,omitempty"`
10652	// FriendlyName - Friendly name.
10653	FriendlyName *string `json:"friendlyName,omitempty"`
10654}
10655
10656// BMSPrepareDataMoveFuture an abstraction for monitoring and retrieving the results of a long-running
10657// operation.
10658type BMSPrepareDataMoveFuture struct {
10659	azure.FutureAPI
10660	// Result returns the result of the asynchronous operation.
10661	// If the operation has not completed it will return an error.
10662	Result func(BaseClient) (autorest.Response, error)
10663}
10664
10665// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10666func (future *BMSPrepareDataMoveFuture) UnmarshalJSON(body []byte) error {
10667	var azFuture azure.Future
10668	if err := json.Unmarshal(body, &azFuture); err != nil {
10669		return err
10670	}
10671	future.FutureAPI = &azFuture
10672	future.Result = future.result
10673	return nil
10674}
10675
10676// result is the default implementation for BMSPrepareDataMoveFuture.Result.
10677func (future *BMSPrepareDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10678	var done bool
10679	done, err = future.DoneWithContext(context.Background(), client)
10680	if err != nil {
10681		err = autorest.NewErrorWithError(err, "backup.BMSPrepareDataMoveFuture", "Result", future.Response(), "Polling failure")
10682		return
10683	}
10684	if !done {
10685		ar.Response = future.Response()
10686		err = azure.NewAsyncOpIncompleteError("backup.BMSPrepareDataMoveFuture")
10687		return
10688	}
10689	ar.Response = future.Response()
10690	return
10691}
10692
10693// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API.
10694type BMSRefreshContainersQueryObject struct {
10695	// BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10696	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10697}
10698
10699// BMSRPQueryObject filters to list backup copies.
10700type BMSRPQueryObject struct {
10701	// StartDate - Backup copies created after this time.
10702	StartDate *date.Time `json:"startDate,omitempty"`
10703	// EndDate - Backup copies created before this time.
10704	EndDate *date.Time `json:"endDate,omitempty"`
10705	// RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll', 'RestorePointQueryTypeIncremental'
10706	RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
10707	// ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked.
10708	ExtendedInfo *bool `json:"extendedInfo,omitempty"`
10709	// MoveReadyRPOnly - Whether the RP can be moved to another tier
10710	MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"`
10711}
10712
10713// BMSTriggerDataMoveFuture an abstraction for monitoring and retrieving the results of a long-running
10714// operation.
10715type BMSTriggerDataMoveFuture struct {
10716	azure.FutureAPI
10717	// Result returns the result of the asynchronous operation.
10718	// If the operation has not completed it will return an error.
10719	Result func(BaseClient) (autorest.Response, error)
10720}
10721
10722// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10723func (future *BMSTriggerDataMoveFuture) UnmarshalJSON(body []byte) error {
10724	var azFuture azure.Future
10725	if err := json.Unmarshal(body, &azFuture); err != nil {
10726		return err
10727	}
10728	future.FutureAPI = &azFuture
10729	future.Result = future.result
10730	return nil
10731}
10732
10733// result is the default implementation for BMSTriggerDataMoveFuture.Result.
10734func (future *BMSTriggerDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10735	var done bool
10736	done, err = future.DoneWithContext(context.Background(), client)
10737	if err != nil {
10738		err = autorest.NewErrorWithError(err, "backup.BMSTriggerDataMoveFuture", "Result", future.Response(), "Polling failure")
10739		return
10740	}
10741	if !done {
10742		ar.Response = future.Response()
10743		err = azure.NewAsyncOpIncompleteError("backup.BMSTriggerDataMoveFuture")
10744		return
10745	}
10746	ar.Response = future.Response()
10747	return
10748}
10749
10750// BMSWorkloadItemQueryObject filters to list items that can be backed up.
10751type BMSWorkloadItemQueryObject struct {
10752	// BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
10753	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10754	// WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase'
10755	WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
10756	// WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
10757	WorkloadType WorkloadType `json:"workloadType,omitempty"`
10758	// ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
10759	ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
10760}
10761
10762// ClientDiscoveryDisplay localized display information of an operation.
10763type ClientDiscoveryDisplay struct {
10764	// Provider - Name of the provider for display purposes
10765	Provider *string `json:"provider,omitempty"`
10766	// Resource - ResourceType for which this Operation can be performed.
10767	Resource *string `json:"resource,omitempty"`
10768	// Operation - Operations Name itself.
10769	Operation *string `json:"operation,omitempty"`
10770	// Description - Description of the operation having details of what operation is about.
10771	Description *string `json:"description,omitempty"`
10772}
10773
10774// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client
10775// discovery.
10776type ClientDiscoveryForLogSpecification struct {
10777	// Name - Name for shoebox log specification.
10778	Name *string `json:"name,omitempty"`
10779	// DisplayName - Localized display name
10780	DisplayName *string `json:"displayName,omitempty"`
10781	// BlobDuration - blob duration of shoebox log specification
10782	BlobDuration *string `json:"blobDuration,omitempty"`
10783}
10784
10785// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery.
10786type ClientDiscoveryForProperties struct {
10787	// ServiceSpecification - Operation properties.
10788	ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
10789}
10790
10791// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client
10792// discovery.
10793type ClientDiscoveryForServiceSpecification struct {
10794	// LogSpecifications - List of log specifications of this operation.
10795	LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
10796}
10797
10798// ClientDiscoveryResponse operations List response which contains list of available APIs.
10799type ClientDiscoveryResponse struct {
10800	autorest.Response `json:"-"`
10801	// Value - List of available operations.
10802	Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
10803	// NextLink - Link to the next chunk of Response.
10804	NextLink *string `json:"nextLink,omitempty"`
10805}
10806
10807// ClientDiscoveryResponseIterator provides access to a complete listing of
10808// ClientDiscoveryValueForSingleAPI values.
10809type ClientDiscoveryResponseIterator struct {
10810	i    int
10811	page ClientDiscoveryResponsePage
10812}
10813
10814// NextWithContext advances to the next value.  If there was an error making
10815// the request the iterator does not advance and the error is returned.
10816func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
10817	if tracing.IsEnabled() {
10818		ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
10819		defer func() {
10820			sc := -1
10821			if iter.Response().Response.Response != nil {
10822				sc = iter.Response().Response.Response.StatusCode
10823			}
10824			tracing.EndSpan(ctx, sc, err)
10825		}()
10826	}
10827	iter.i++
10828	if iter.i < len(iter.page.Values()) {
10829		return nil
10830	}
10831	err = iter.page.NextWithContext(ctx)
10832	if err != nil {
10833		iter.i--
10834		return err
10835	}
10836	iter.i = 0
10837	return nil
10838}
10839
10840// Next advances to the next value.  If there was an error making
10841// the request the iterator does not advance and the error is returned.
10842// Deprecated: Use NextWithContext() instead.
10843func (iter *ClientDiscoveryResponseIterator) Next() error {
10844	return iter.NextWithContext(context.Background())
10845}
10846
10847// NotDone returns true if the enumeration should be started or is not yet complete.
10848func (iter ClientDiscoveryResponseIterator) NotDone() bool {
10849	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10850}
10851
10852// Response returns the raw server response from the last page request.
10853func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
10854	return iter.page.Response()
10855}
10856
10857// Value returns the current value or a zero-initialized value if the
10858// iterator has advanced beyond the end of the collection.
10859func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
10860	if !iter.page.NotDone() {
10861		return ClientDiscoveryValueForSingleAPI{}
10862	}
10863	return iter.page.Values()[iter.i]
10864}
10865
10866// Creates a new instance of the ClientDiscoveryResponseIterator type.
10867func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
10868	return ClientDiscoveryResponseIterator{page: page}
10869}
10870
10871// IsEmpty returns true if the ListResult contains no values.
10872func (cdr ClientDiscoveryResponse) IsEmpty() bool {
10873	return cdr.Value == nil || len(*cdr.Value) == 0
10874}
10875
10876// hasNextLink returns true if the NextLink is not empty.
10877func (cdr ClientDiscoveryResponse) hasNextLink() bool {
10878	return cdr.NextLink != nil && len(*cdr.NextLink) != 0
10879}
10880
10881// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results.
10882// It returns nil if no more results exist.
10883func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
10884	if !cdr.hasNextLink() {
10885		return nil, nil
10886	}
10887	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10888		autorest.AsJSON(),
10889		autorest.AsGet(),
10890		autorest.WithBaseURL(to.String(cdr.NextLink)))
10891}
10892
10893// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values.
10894type ClientDiscoveryResponsePage struct {
10895	fn  func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
10896	cdr ClientDiscoveryResponse
10897}
10898
10899// NextWithContext advances to the next page of values.  If there was an error making
10900// the request the page does not advance and the error is returned.
10901func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
10902	if tracing.IsEnabled() {
10903		ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
10904		defer func() {
10905			sc := -1
10906			if page.Response().Response.Response != nil {
10907				sc = page.Response().Response.Response.StatusCode
10908			}
10909			tracing.EndSpan(ctx, sc, err)
10910		}()
10911	}
10912	for {
10913		next, err := page.fn(ctx, page.cdr)
10914		if err != nil {
10915			return err
10916		}
10917		page.cdr = next
10918		if !next.hasNextLink() || !next.IsEmpty() {
10919			break
10920		}
10921	}
10922	return nil
10923}
10924
10925// Next advances to the next page of values.  If there was an error making
10926// the request the page does not advance and the error is returned.
10927// Deprecated: Use NextWithContext() instead.
10928func (page *ClientDiscoveryResponsePage) Next() error {
10929	return page.NextWithContext(context.Background())
10930}
10931
10932// NotDone returns true if the page enumeration should be started or is not yet complete.
10933func (page ClientDiscoveryResponsePage) NotDone() bool {
10934	return !page.cdr.IsEmpty()
10935}
10936
10937// Response returns the raw server response from the last page request.
10938func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
10939	return page.cdr
10940}
10941
10942// Values returns the slice of values for the current page or nil if there are no values.
10943func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
10944	if page.cdr.IsEmpty() {
10945		return nil
10946	}
10947	return *page.cdr.Value
10948}
10949
10950// Creates a new instance of the ClientDiscoveryResponsePage type.
10951func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
10952	return ClientDiscoveryResponsePage{
10953		fn:  getNextPage,
10954		cdr: cur,
10955	}
10956}
10957
10958// ClientDiscoveryValueForSingleAPI available operation details.
10959type ClientDiscoveryValueForSingleAPI struct {
10960	// Name - Name of the Operation.
10961	Name *string `json:"name,omitempty"`
10962	// Display - Contains the localized display information for this particular operation
10963	Display *ClientDiscoveryDisplay `json:"display,omitempty"`
10964	// Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX
10965	Origin *string `json:"origin,omitempty"`
10966	// Properties - ShoeBox properties for the given operation.
10967	Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
10968}
10969
10970// ClientScriptForConnect client script details for file / folder restore.
10971type ClientScriptForConnect struct {
10972	// ScriptContent - File content of the client script for file / folder restore.
10973	ScriptContent *string `json:"scriptContent,omitempty"`
10974	// ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc.
10975	ScriptExtension *string `json:"scriptExtension,omitempty"`
10976	// OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works.
10977	OsType *string `json:"osType,omitempty"`
10978	// URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used
10979	URL *string `json:"url,omitempty"`
10980	// ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user.
10981	// If its null or empty then , ignore it.
10982	ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
10983}
10984
10985// CloudError an error response from the Container Instance service.
10986type CloudError struct {
10987	// Error - The error object.
10988	Error *CloudErrorBody `json:"error,omitempty"`
10989}
10990
10991// CloudErrorBody an error response from the Container Instance service.
10992type CloudErrorBody struct {
10993	// Code - READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
10994	Code *string `json:"code,omitempty"`
10995	// Message - READ-ONLY; A message describing the error, intended to be suitable for display in a user interface.
10996	Message *string `json:"message,omitempty"`
10997	// Target - READ-ONLY; The target of the particular error. For example, the name of the property in error.
10998	Target *string `json:"target,omitempty"`
10999	// Details - READ-ONLY; A list of additional details about the error.
11000	Details *[]CloudErrorBody `json:"details,omitempty"`
11001	// AdditionalInfo - READ-ONLY; The error additional info.
11002	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
11003}
11004
11005// MarshalJSON is the custom marshaler for CloudErrorBody.
11006func (ceb CloudErrorBody) MarshalJSON() ([]byte, error) {
11007	objectMap := make(map[string]interface{})
11008	return json.Marshal(objectMap)
11009}
11010
11011// ContainerIdentityInfo container identity information
11012type ContainerIdentityInfo struct {
11013	// UniqueName - Unique name of the container
11014	UniqueName *string `json:"uniqueName,omitempty"`
11015	// AadTenantID - Protection container identity - AAD Tenant
11016	AadTenantID *string `json:"aadTenantId,omitempty"`
11017	// ServicePrincipalClientID - Protection container identity - AAD Service Principal
11018	ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
11019	// Audience - Protection container identity - Audience
11020	Audience *string `json:"audience,omitempty"`
11021}
11022
11023// CrossRegionRestoreRequest ...
11024type CrossRegionRestoreRequest struct {
11025	// CrossRegionRestoreAccessDetails - Access details for cross region restore
11026	CrossRegionRestoreAccessDetails BasicCrrAccessToken `json:"crossRegionRestoreAccessDetails,omitempty"`
11027	// RestoreRequest - Request object for triggering restore
11028	RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
11029}
11030
11031// UnmarshalJSON is the custom unmarshaler for CrossRegionRestoreRequest struct.
11032func (crrr *CrossRegionRestoreRequest) UnmarshalJSON(body []byte) error {
11033	var m map[string]*json.RawMessage
11034	err := json.Unmarshal(body, &m)
11035	if err != nil {
11036		return err
11037	}
11038	for k, v := range m {
11039		switch k {
11040		case "crossRegionRestoreAccessDetails":
11041			if v != nil {
11042				crossRegionRestoreAccessDetails, err := unmarshalBasicCrrAccessToken(*v)
11043				if err != nil {
11044					return err
11045				}
11046				crrr.CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails
11047			}
11048		case "restoreRequest":
11049			if v != nil {
11050				restoreRequest, err := unmarshalBasicRestoreRequest(*v)
11051				if err != nil {
11052					return err
11053				}
11054				crrr.RestoreRequest = restoreRequest
11055			}
11056		}
11057	}
11058
11059	return nil
11060}
11061
11062// CrossRegionRestoreRequestResource ...
11063type CrossRegionRestoreRequestResource struct {
11064	// Properties - CrossRegionRestoreRequestResource properties
11065	Properties *CrossRegionRestoreRequest `json:"properties,omitempty"`
11066	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
11067	ID *string `json:"id,omitempty"`
11068	// Name - READ-ONLY; Resource name associated with the resource.
11069	Name *string `json:"name,omitempty"`
11070	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
11071	Type *string `json:"type,omitempty"`
11072	// Location - Resource location.
11073	Location *string `json:"location,omitempty"`
11074	// Tags - Resource tags.
11075	Tags map[string]*string `json:"tags"`
11076	// ETag - Optional ETag.
11077	ETag *string `json:"eTag,omitempty"`
11078}
11079
11080// MarshalJSON is the custom marshaler for CrossRegionRestoreRequestResource.
11081func (crrrr CrossRegionRestoreRequestResource) MarshalJSON() ([]byte, error) {
11082	objectMap := make(map[string]interface{})
11083	if crrrr.Properties != nil {
11084		objectMap["properties"] = crrrr.Properties
11085	}
11086	if crrrr.Location != nil {
11087		objectMap["location"] = crrrr.Location
11088	}
11089	if crrrr.Tags != nil {
11090		objectMap["tags"] = crrrr.Tags
11091	}
11092	if crrrr.ETag != nil {
11093		objectMap["eTag"] = crrrr.ETag
11094	}
11095	return json.Marshal(objectMap)
11096}
11097
11098// CrossRegionRestoreTriggerFuture an abstraction for monitoring and retrieving the results of a
11099// long-running operation.
11100type CrossRegionRestoreTriggerFuture struct {
11101	azure.FutureAPI
11102	// Result returns the result of the asynchronous operation.
11103	// If the operation has not completed it will return an error.
11104	Result func(CrossRegionRestoreClient) (autorest.Response, error)
11105}
11106
11107// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11108func (future *CrossRegionRestoreTriggerFuture) UnmarshalJSON(body []byte) error {
11109	var azFuture azure.Future
11110	if err := json.Unmarshal(body, &azFuture); err != nil {
11111		return err
11112	}
11113	future.FutureAPI = &azFuture
11114	future.Result = future.result
11115	return nil
11116}
11117
11118// result is the default implementation for CrossRegionRestoreTriggerFuture.Result.
11119func (future *CrossRegionRestoreTriggerFuture) result(client CrossRegionRestoreClient) (ar autorest.Response, err error) {
11120	var done bool
11121	done, err = future.DoneWithContext(context.Background(), client)
11122	if err != nil {
11123		err = autorest.NewErrorWithError(err, "backup.CrossRegionRestoreTriggerFuture", "Result", future.Response(), "Polling failure")
11124		return
11125	}
11126	if !done {
11127		ar.Response = future.Response()
11128		err = azure.NewAsyncOpIncompleteError("backup.CrossRegionRestoreTriggerFuture")
11129		return
11130	}
11131	ar.Response = future.Response()
11132	return
11133}
11134
11135// BasicCrrAccessToken ...
11136type BasicCrrAccessToken interface {
11137	AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool)
11138	AsCrrAccessToken() (*CrrAccessToken, bool)
11139}
11140
11141// CrrAccessToken ...
11142type CrrAccessToken struct {
11143	// AccessTokenString - Access token used for authentication
11144	AccessTokenString *string `json:"accessTokenString,omitempty"`
11145	// SubscriptionID - Subscription Id of the source vault
11146	SubscriptionID *string `json:"subscriptionId,omitempty"`
11147	// ResourceGroupName - Resource Group name of the source vault
11148	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
11149	// ResourceName - Resource Name of the source vault
11150	ResourceName *string `json:"resourceName,omitempty"`
11151	// ResourceID - Resource Id of the source vault
11152	ResourceID *string `json:"resourceId,omitempty"`
11153	// ProtectionContainerID - Protected item container id
11154	ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
11155	// RecoveryPointID - Recovery Point Id
11156	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11157	// RecoveryPointTime - Recovery Point Time
11158	RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
11159	// ContainerName - Container Unique name
11160	ContainerName *string `json:"containerName,omitempty"`
11161	// ContainerType - Container Type
11162	ContainerType *string `json:"containerType,omitempty"`
11163	// BackupManagementType - Backup Management Type
11164	BackupManagementType *string `json:"backupManagementType,omitempty"`
11165	// DatasourceType - Datasource Type
11166	DatasourceType *string `json:"datasourceType,omitempty"`
11167	// DatasourceName - Datasource Friendly Name
11168	DatasourceName *string `json:"datasourceName,omitempty"`
11169	// DatasourceID - Datasource Id
11170	DatasourceID *string `json:"datasourceId,omitempty"`
11171	// DatasourceContainerName - Datasource Container Unique Name
11172	DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
11173	// CoordinatorServiceStampID - CoordinatorServiceStampId to be used by BCM in restore call
11174	CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
11175	// CoordinatorServiceStampURI - CoordinatorServiceStampUri to be used by BCM in restore call
11176	CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
11177	// ProtectionServiceStampID - ProtectionServiceStampId to be used by BCM in restore call
11178	ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
11179	// ProtectionServiceStampURI - ProtectionServiceStampUri to be used by BCM in restore call
11180	ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
11181	// TokenExtendedInformation - Extended Information about the token like FileSpec etc.
11182	TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
11183	// RpTierInformation - Recovery point Tier Information
11184	RpTierInformation map[string]*string `json:"rpTierInformation"`
11185	// RpOriginalSAOption - Recovery point information: Original SA option
11186	RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
11187	// RpIsManagedVirtualMachine - Recovery point information: Managed virtual machine
11188	RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
11189	// RpVMSizeDescription - Recovery point information: VM size description
11190	RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
11191	// BMSActiveRegion - Active region name of BMS Stamp
11192	BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
11193	// ObjectType - Possible values include: 'ObjectTypeBasicCrrAccessTokenObjectTypeCrrAccessToken', 'ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken'
11194	ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
11195}
11196
11197func unmarshalBasicCrrAccessToken(body []byte) (BasicCrrAccessToken, error) {
11198	var m map[string]interface{}
11199	err := json.Unmarshal(body, &m)
11200	if err != nil {
11201		return nil, err
11202	}
11203
11204	switch m["objectType"] {
11205	case string(ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken):
11206		var wcat WorkloadCrrAccessToken
11207		err := json.Unmarshal(body, &wcat)
11208		return wcat, err
11209	default:
11210		var cat CrrAccessToken
11211		err := json.Unmarshal(body, &cat)
11212		return cat, err
11213	}
11214}
11215func unmarshalBasicCrrAccessTokenArray(body []byte) ([]BasicCrrAccessToken, error) {
11216	var rawMessages []*json.RawMessage
11217	err := json.Unmarshal(body, &rawMessages)
11218	if err != nil {
11219		return nil, err
11220	}
11221
11222	catArray := make([]BasicCrrAccessToken, len(rawMessages))
11223
11224	for index, rawMessage := range rawMessages {
11225		cat, err := unmarshalBasicCrrAccessToken(*rawMessage)
11226		if err != nil {
11227			return nil, err
11228		}
11229		catArray[index] = cat
11230	}
11231	return catArray, nil
11232}
11233
11234// MarshalJSON is the custom marshaler for CrrAccessToken.
11235func (cat CrrAccessToken) MarshalJSON() ([]byte, error) {
11236	cat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeCrrAccessToken
11237	objectMap := make(map[string]interface{})
11238	if cat.AccessTokenString != nil {
11239		objectMap["accessTokenString"] = cat.AccessTokenString
11240	}
11241	if cat.SubscriptionID != nil {
11242		objectMap["subscriptionId"] = cat.SubscriptionID
11243	}
11244	if cat.ResourceGroupName != nil {
11245		objectMap["resourceGroupName"] = cat.ResourceGroupName
11246	}
11247	if cat.ResourceName != nil {
11248		objectMap["resourceName"] = cat.ResourceName
11249	}
11250	if cat.ResourceID != nil {
11251		objectMap["resourceId"] = cat.ResourceID
11252	}
11253	if cat.ProtectionContainerID != nil {
11254		objectMap["protectionContainerId"] = cat.ProtectionContainerID
11255	}
11256	if cat.RecoveryPointID != nil {
11257		objectMap["recoveryPointId"] = cat.RecoveryPointID
11258	}
11259	if cat.RecoveryPointTime != nil {
11260		objectMap["recoveryPointTime"] = cat.RecoveryPointTime
11261	}
11262	if cat.ContainerName != nil {
11263		objectMap["containerName"] = cat.ContainerName
11264	}
11265	if cat.ContainerType != nil {
11266		objectMap["containerType"] = cat.ContainerType
11267	}
11268	if cat.BackupManagementType != nil {
11269		objectMap["backupManagementType"] = cat.BackupManagementType
11270	}
11271	if cat.DatasourceType != nil {
11272		objectMap["datasourceType"] = cat.DatasourceType
11273	}
11274	if cat.DatasourceName != nil {
11275		objectMap["datasourceName"] = cat.DatasourceName
11276	}
11277	if cat.DatasourceID != nil {
11278		objectMap["datasourceId"] = cat.DatasourceID
11279	}
11280	if cat.DatasourceContainerName != nil {
11281		objectMap["datasourceContainerName"] = cat.DatasourceContainerName
11282	}
11283	if cat.CoordinatorServiceStampID != nil {
11284		objectMap["coordinatorServiceStampId"] = cat.CoordinatorServiceStampID
11285	}
11286	if cat.CoordinatorServiceStampURI != nil {
11287		objectMap["coordinatorServiceStampUri"] = cat.CoordinatorServiceStampURI
11288	}
11289	if cat.ProtectionServiceStampID != nil {
11290		objectMap["protectionServiceStampId"] = cat.ProtectionServiceStampID
11291	}
11292	if cat.ProtectionServiceStampURI != nil {
11293		objectMap["protectionServiceStampUri"] = cat.ProtectionServiceStampURI
11294	}
11295	if cat.TokenExtendedInformation != nil {
11296		objectMap["tokenExtendedInformation"] = cat.TokenExtendedInformation
11297	}
11298	if cat.RpTierInformation != nil {
11299		objectMap["rpTierInformation"] = cat.RpTierInformation
11300	}
11301	if cat.RpOriginalSAOption != nil {
11302		objectMap["rpOriginalSAOption"] = cat.RpOriginalSAOption
11303	}
11304	if cat.RpIsManagedVirtualMachine != nil {
11305		objectMap["rpIsManagedVirtualMachine"] = cat.RpIsManagedVirtualMachine
11306	}
11307	if cat.RpVMSizeDescription != nil {
11308		objectMap["rpVMSizeDescription"] = cat.RpVMSizeDescription
11309	}
11310	if cat.BMSActiveRegion != nil {
11311		objectMap["bMSActiveRegion"] = cat.BMSActiveRegion
11312	}
11313	if cat.ObjectType != "" {
11314		objectMap["objectType"] = cat.ObjectType
11315	}
11316	return json.Marshal(objectMap)
11317}
11318
11319// AsWorkloadCrrAccessToken is the BasicCrrAccessToken implementation for CrrAccessToken.
11320func (cat CrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
11321	return nil, false
11322}
11323
11324// AsCrrAccessToken is the BasicCrrAccessToken implementation for CrrAccessToken.
11325func (cat CrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
11326	return &cat, true
11327}
11328
11329// AsBasicCrrAccessToken is the BasicCrrAccessToken implementation for CrrAccessToken.
11330func (cat CrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
11331	return &cat, true
11332}
11333
11334// CrrAccessTokenResource ...
11335type CrrAccessTokenResource struct {
11336	autorest.Response `json:"-"`
11337	// Properties - CrrAccessTokenResource properties
11338	Properties BasicCrrAccessToken `json:"properties,omitempty"`
11339	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
11340	ID *string `json:"id,omitempty"`
11341	// Name - READ-ONLY; Resource name associated with the resource.
11342	Name *string `json:"name,omitempty"`
11343	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
11344	Type *string `json:"type,omitempty"`
11345	// Location - Resource location.
11346	Location *string `json:"location,omitempty"`
11347	// Tags - Resource tags.
11348	Tags map[string]*string `json:"tags"`
11349	// ETag - Optional ETag.
11350	ETag *string `json:"eTag,omitempty"`
11351}
11352
11353// MarshalJSON is the custom marshaler for CrrAccessTokenResource.
11354func (catr CrrAccessTokenResource) MarshalJSON() ([]byte, error) {
11355	objectMap := make(map[string]interface{})
11356	objectMap["properties"] = catr.Properties
11357	if catr.Location != nil {
11358		objectMap["location"] = catr.Location
11359	}
11360	if catr.Tags != nil {
11361		objectMap["tags"] = catr.Tags
11362	}
11363	if catr.ETag != nil {
11364		objectMap["eTag"] = catr.ETag
11365	}
11366	return json.Marshal(objectMap)
11367}
11368
11369// UnmarshalJSON is the custom unmarshaler for CrrAccessTokenResource struct.
11370func (catr *CrrAccessTokenResource) UnmarshalJSON(body []byte) error {
11371	var m map[string]*json.RawMessage
11372	err := json.Unmarshal(body, &m)
11373	if err != nil {
11374		return err
11375	}
11376	for k, v := range m {
11377		switch k {
11378		case "properties":
11379			if v != nil {
11380				properties, err := unmarshalBasicCrrAccessToken(*v)
11381				if err != nil {
11382					return err
11383				}
11384				catr.Properties = properties
11385			}
11386		case "id":
11387			if v != nil {
11388				var ID string
11389				err = json.Unmarshal(*v, &ID)
11390				if err != nil {
11391					return err
11392				}
11393				catr.ID = &ID
11394			}
11395		case "name":
11396			if v != nil {
11397				var name string
11398				err = json.Unmarshal(*v, &name)
11399				if err != nil {
11400					return err
11401				}
11402				catr.Name = &name
11403			}
11404		case "type":
11405			if v != nil {
11406				var typeVar string
11407				err = json.Unmarshal(*v, &typeVar)
11408				if err != nil {
11409					return err
11410				}
11411				catr.Type = &typeVar
11412			}
11413		case "location":
11414			if v != nil {
11415				var location string
11416				err = json.Unmarshal(*v, &location)
11417				if err != nil {
11418					return err
11419				}
11420				catr.Location = &location
11421			}
11422		case "tags":
11423			if v != nil {
11424				var tags map[string]*string
11425				err = json.Unmarshal(*v, &tags)
11426				if err != nil {
11427					return err
11428				}
11429				catr.Tags = tags
11430			}
11431		case "eTag":
11432			if v != nil {
11433				var eTag string
11434				err = json.Unmarshal(*v, &eTag)
11435				if err != nil {
11436					return err
11437				}
11438				catr.ETag = &eTag
11439			}
11440		}
11441	}
11442
11443	return nil
11444}
11445
11446// CrrJobRequest request object for fetching CRR jobs.
11447type CrrJobRequest struct {
11448	// ResourceID - Entire ARM resource id of the resource
11449	ResourceID *string `json:"resourceId,omitempty"`
11450	// JobName - Job Name of the job to be fetched
11451	JobName *string `json:"jobName,omitempty"`
11452}
11453
11454// CrrJobRequestResource request object for fetching CRR jobs.
11455type CrrJobRequestResource struct {
11456	// Properties - CrrJobRequestResource properties
11457	Properties *CrrJobRequest `json:"properties,omitempty"`
11458	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
11459	ID *string `json:"id,omitempty"`
11460	// Name - READ-ONLY; Resource name associated with the resource.
11461	Name *string `json:"name,omitempty"`
11462	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
11463	Type *string `json:"type,omitempty"`
11464	// Location - Resource location.
11465	Location *string `json:"location,omitempty"`
11466	// Tags - Resource tags.
11467	Tags map[string]*string `json:"tags"`
11468	// ETag - Optional ETag.
11469	ETag *string `json:"eTag,omitempty"`
11470}
11471
11472// MarshalJSON is the custom marshaler for CrrJobRequestResource.
11473func (cjrr CrrJobRequestResource) MarshalJSON() ([]byte, error) {
11474	objectMap := make(map[string]interface{})
11475	if cjrr.Properties != nil {
11476		objectMap["properties"] = cjrr.Properties
11477	}
11478	if cjrr.Location != nil {
11479		objectMap["location"] = cjrr.Location
11480	}
11481	if cjrr.Tags != nil {
11482		objectMap["tags"] = cjrr.Tags
11483	}
11484	if cjrr.ETag != nil {
11485		objectMap["eTag"] = cjrr.ETag
11486	}
11487	return json.Marshal(objectMap)
11488}
11489
11490// DailyRetentionFormat daily retention format.
11491type DailyRetentionFormat struct {
11492	// DaysOfTheMonth - List of days of the month.
11493	DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
11494}
11495
11496// DailyRetentionSchedule daily retention schedule.
11497type DailyRetentionSchedule struct {
11498	// RetentionTimes - Retention times of retention policy.
11499	RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
11500	// RetentionDuration - Retention duration of retention Policy.
11501	RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
11502}
11503
11504// Day day of the week.
11505type Day struct {
11506	// Date - Date of the month
11507	Date *int32 `json:"date,omitempty"`
11508	// IsLast - Whether Date is last date of month
11509	IsLast *bool `json:"isLast,omitempty"`
11510}
11511
11512// DiskExclusionProperties ...
11513type DiskExclusionProperties struct {
11514	// DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.
11515	DiskLunList *[]int32 `json:"diskLunList,omitempty"`
11516	// IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup.
11517	IsInclusionList *bool `json:"isInclusionList,omitempty"`
11518}
11519
11520// DiskInformation disk information
11521type DiskInformation struct {
11522	Lun  *int32  `json:"lun,omitempty"`
11523	Name *string `json:"name,omitempty"`
11524}
11525
11526// DistributedNodesInfo this is used to represent the various nodes of the distributed container.
11527type DistributedNodesInfo struct {
11528	// NodeName - Name of the node under a distributed container.
11529	NodeName *string `json:"nodeName,omitempty"`
11530	// Status - Status of this Node.
11531	// Failed | Succeeded
11532	Status *string `json:"status,omitempty"`
11533	// ErrorDetail - Error Details if the Status is non-success.
11534	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
11535}
11536
11537// DpmBackupEngine data Protection Manager (DPM) specific backup engine.
11538type DpmBackupEngine struct {
11539	// FriendlyName - Friendly name of the backup engine.
11540	FriendlyName *string `json:"friendlyName,omitempty"`
11541	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
11542	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11543	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
11544	RegistrationStatus *string `json:"registrationStatus,omitempty"`
11545	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
11546	BackupEngineState *string `json:"backupEngineState,omitempty"`
11547	// HealthStatus - Backup status of the backup engine.
11548	HealthStatus *string `json:"healthStatus,omitempty"`
11549	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
11550	CanReRegister *bool `json:"canReRegister,omitempty"`
11551	// BackupEngineID - ID of the backup engine.
11552	BackupEngineID *string `json:"backupEngineId,omitempty"`
11553	// DpmVersion - Backup engine version
11554	DpmVersion *string `json:"dpmVersion,omitempty"`
11555	// AzureBackupAgentVersion - Backup agent version
11556	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
11557	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
11558	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
11559	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
11560	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
11561	// ExtendedInfo - Extended info of the backupengine
11562	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
11563	// BackupEngineType - Possible values include: 'EngineTypeBackupEngineTypeBackupEngineBase', 'EngineTypeBackupEngineTypeAzureBackupServerEngine', 'EngineTypeBackupEngineTypeDpmBackupEngine'
11564	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
11565}
11566
11567// MarshalJSON is the custom marshaler for DpmBackupEngine.
11568func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
11569	dbe.BackupEngineType = EngineTypeBackupEngineTypeDpmBackupEngine
11570	objectMap := make(map[string]interface{})
11571	if dbe.FriendlyName != nil {
11572		objectMap["friendlyName"] = dbe.FriendlyName
11573	}
11574	if dbe.BackupManagementType != "" {
11575		objectMap["backupManagementType"] = dbe.BackupManagementType
11576	}
11577	if dbe.RegistrationStatus != nil {
11578		objectMap["registrationStatus"] = dbe.RegistrationStatus
11579	}
11580	if dbe.BackupEngineState != nil {
11581		objectMap["backupEngineState"] = dbe.BackupEngineState
11582	}
11583	if dbe.HealthStatus != nil {
11584		objectMap["healthStatus"] = dbe.HealthStatus
11585	}
11586	if dbe.CanReRegister != nil {
11587		objectMap["canReRegister"] = dbe.CanReRegister
11588	}
11589	if dbe.BackupEngineID != nil {
11590		objectMap["backupEngineId"] = dbe.BackupEngineID
11591	}
11592	if dbe.DpmVersion != nil {
11593		objectMap["dpmVersion"] = dbe.DpmVersion
11594	}
11595	if dbe.AzureBackupAgentVersion != nil {
11596		objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
11597	}
11598	if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
11599		objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
11600	}
11601	if dbe.IsDpmUpgradeAvailable != nil {
11602		objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
11603	}
11604	if dbe.ExtendedInfo != nil {
11605		objectMap["extendedInfo"] = dbe.ExtendedInfo
11606	}
11607	if dbe.BackupEngineType != "" {
11608		objectMap["backupEngineType"] = dbe.BackupEngineType
11609	}
11610	return json.Marshal(objectMap)
11611}
11612
11613// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine.
11614func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
11615	return nil, false
11616}
11617
11618// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine.
11619func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
11620	return &dbe, true
11621}
11622
11623// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine.
11624func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
11625	return nil, false
11626}
11627
11628// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine.
11629func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
11630	return &dbe, true
11631}
11632
11633// BasicDpmContainer DPM workload-specific protection container.
11634type BasicDpmContainer interface {
11635	AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
11636	AsDpmContainer() (*DpmContainer, bool)
11637}
11638
11639// DpmContainer DPM workload-specific protection container.
11640type DpmContainer struct {
11641	// CanReRegister - Specifies whether the container is re-registrable.
11642	CanReRegister *bool `json:"canReRegister,omitempty"`
11643	// ContainerID - ID of container.
11644	ContainerID *string `json:"containerId,omitempty"`
11645	// ProtectedItemCount - Number of protected items in the BackupEngine
11646	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
11647	// DpmAgentVersion - Backup engine Agent version
11648	DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
11649	// DpmServers - List of BackupEngines protecting the container
11650	DpmServers *[]string `json:"dpmServers,omitempty"`
11651	// UpgradeAvailable - To check if upgrade available
11652	UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
11653	// ProtectionStatus - Protection status of the container.
11654	ProtectionStatus *string `json:"protectionStatus,omitempty"`
11655	// ExtendedInfo - Extended Info of the container.
11656	ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
11657	// FriendlyName - Friendly name of the container.
11658	FriendlyName *string `json:"friendlyName,omitempty"`
11659	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
11660	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11661	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
11662	RegistrationStatus *string `json:"registrationStatus,omitempty"`
11663	// HealthStatus - Status of health of the container.
11664	HealthStatus *string `json:"healthStatus,omitempty"`
11665	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
11666	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11667}
11668
11669func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
11670	var m map[string]interface{}
11671	err := json.Unmarshal(body, &m)
11672	if err != nil {
11673		return nil, err
11674	}
11675
11676	switch m["containerType"] {
11677	case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
11678		var absc AzureBackupServerContainer
11679		err := json.Unmarshal(body, &absc)
11680		return absc, err
11681	default:
11682		var dc DpmContainer
11683		err := json.Unmarshal(body, &dc)
11684		return dc, err
11685	}
11686}
11687func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
11688	var rawMessages []*json.RawMessage
11689	err := json.Unmarshal(body, &rawMessages)
11690	if err != nil {
11691		return nil, err
11692	}
11693
11694	dcArray := make([]BasicDpmContainer, len(rawMessages))
11695
11696	for index, rawMessage := range rawMessages {
11697		dc, err := unmarshalBasicDpmContainer(*rawMessage)
11698		if err != nil {
11699			return nil, err
11700		}
11701		dcArray[index] = dc
11702	}
11703	return dcArray, nil
11704}
11705
11706// MarshalJSON is the custom marshaler for DpmContainer.
11707func (dc DpmContainer) MarshalJSON() ([]byte, error) {
11708	dc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeDPMContainer
11709	objectMap := make(map[string]interface{})
11710	if dc.CanReRegister != nil {
11711		objectMap["canReRegister"] = dc.CanReRegister
11712	}
11713	if dc.ContainerID != nil {
11714		objectMap["containerId"] = dc.ContainerID
11715	}
11716	if dc.ProtectedItemCount != nil {
11717		objectMap["protectedItemCount"] = dc.ProtectedItemCount
11718	}
11719	if dc.DpmAgentVersion != nil {
11720		objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
11721	}
11722	if dc.DpmServers != nil {
11723		objectMap["dpmServers"] = dc.DpmServers
11724	}
11725	if dc.UpgradeAvailable != nil {
11726		objectMap["upgradeAvailable"] = dc.UpgradeAvailable
11727	}
11728	if dc.ProtectionStatus != nil {
11729		objectMap["protectionStatus"] = dc.ProtectionStatus
11730	}
11731	if dc.ExtendedInfo != nil {
11732		objectMap["extendedInfo"] = dc.ExtendedInfo
11733	}
11734	if dc.FriendlyName != nil {
11735		objectMap["friendlyName"] = dc.FriendlyName
11736	}
11737	if dc.BackupManagementType != "" {
11738		objectMap["backupManagementType"] = dc.BackupManagementType
11739	}
11740	if dc.RegistrationStatus != nil {
11741		objectMap["registrationStatus"] = dc.RegistrationStatus
11742	}
11743	if dc.HealthStatus != nil {
11744		objectMap["healthStatus"] = dc.HealthStatus
11745	}
11746	if dc.ContainerType != "" {
11747		objectMap["containerType"] = dc.ContainerType
11748	}
11749	return json.Marshal(objectMap)
11750}
11751
11752// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer.
11753func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11754	return nil, false
11755}
11756
11757// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer.
11758func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11759	return nil, false
11760}
11761
11762// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer.
11763func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11764	return nil, false
11765}
11766
11767// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
11768func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11769	return nil, false
11770}
11771
11772// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer.
11773func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11774	return nil, false
11775}
11776
11777// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer.
11778func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11779	return nil, false
11780}
11781
11782// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
11783func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11784	return nil, false
11785}
11786
11787// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer.
11788func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11789	return nil, false
11790}
11791
11792// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer.
11793func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11794	return nil, false
11795}
11796
11797// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer.
11798func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
11799	return &dc, true
11800}
11801
11802// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer.
11803func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11804	return &dc, true
11805}
11806
11807// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer.
11808func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
11809	return nil, false
11810}
11811
11812// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer.
11813func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11814	return nil, false
11815}
11816
11817// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer.
11818func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11819	return nil, false
11820}
11821
11822// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer.
11823func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
11824	return nil, false
11825}
11826
11827// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
11828func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11829	return nil, false
11830}
11831
11832// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer.
11833func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11834	return &dc, true
11835}
11836
11837// DPMContainerExtendedInfo additional information of the DPMContainer.
11838type DPMContainerExtendedInfo struct {
11839	// LastRefreshedAt - Last refresh time of the DPMContainer.
11840	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
11841}
11842
11843// DpmErrorInfo DPM workload-specific error information.
11844type DpmErrorInfo struct {
11845	// ErrorString - Localized error string.
11846	ErrorString *string `json:"errorString,omitempty"`
11847	// Recommendations - List of localized recommendations for above error code.
11848	Recommendations *[]string `json:"recommendations,omitempty"`
11849}
11850
11851// DpmJob DPM workload-specific job object.
11852type DpmJob struct {
11853	// Duration - Time elapsed for job.
11854	Duration *string `json:"duration,omitempty"`
11855	// DpmServerName - DPM server name managing the backup item or backup job.
11856	DpmServerName *string `json:"dpmServerName,omitempty"`
11857	// ContainerName - Name of cluster/server protecting current backup item, if any.
11858	ContainerName *string `json:"containerName,omitempty"`
11859	// ContainerType - Type of container.
11860	ContainerType *string `json:"containerType,omitempty"`
11861	// WorkloadType - Type of backup item.
11862	WorkloadType *string `json:"workloadType,omitempty"`
11863	// ActionsInfo - The state/actions applicable on this job like cancel/retry.
11864	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
11865	// ErrorDetails - The errors.
11866	ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
11867	// ExtendedInfo - Additional information for this job.
11868	ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
11869	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
11870	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
11871	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
11872	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11873	// Operation - The operation name.
11874	Operation *string `json:"operation,omitempty"`
11875	// Status - Job status.
11876	Status *string `json:"status,omitempty"`
11877	// StartTime - The start time.
11878	StartTime *date.Time `json:"startTime,omitempty"`
11879	// EndTime - The end time.
11880	EndTime *date.Time `json:"endTime,omitempty"`
11881	// ActivityID - ActivityId of job.
11882	ActivityID *string `json:"activityId,omitempty"`
11883	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
11884	JobType JobType `json:"jobType,omitempty"`
11885}
11886
11887// MarshalJSON is the custom marshaler for DpmJob.
11888func (dj DpmJob) MarshalJSON() ([]byte, error) {
11889	dj.JobType = JobTypeDpmJob
11890	objectMap := make(map[string]interface{})
11891	if dj.Duration != nil {
11892		objectMap["duration"] = dj.Duration
11893	}
11894	if dj.DpmServerName != nil {
11895		objectMap["dpmServerName"] = dj.DpmServerName
11896	}
11897	if dj.ContainerName != nil {
11898		objectMap["containerName"] = dj.ContainerName
11899	}
11900	if dj.ContainerType != nil {
11901		objectMap["containerType"] = dj.ContainerType
11902	}
11903	if dj.WorkloadType != nil {
11904		objectMap["workloadType"] = dj.WorkloadType
11905	}
11906	if dj.ActionsInfo != nil {
11907		objectMap["actionsInfo"] = dj.ActionsInfo
11908	}
11909	if dj.ErrorDetails != nil {
11910		objectMap["errorDetails"] = dj.ErrorDetails
11911	}
11912	if dj.ExtendedInfo != nil {
11913		objectMap["extendedInfo"] = dj.ExtendedInfo
11914	}
11915	if dj.EntityFriendlyName != nil {
11916		objectMap["entityFriendlyName"] = dj.EntityFriendlyName
11917	}
11918	if dj.BackupManagementType != "" {
11919		objectMap["backupManagementType"] = dj.BackupManagementType
11920	}
11921	if dj.Operation != nil {
11922		objectMap["operation"] = dj.Operation
11923	}
11924	if dj.Status != nil {
11925		objectMap["status"] = dj.Status
11926	}
11927	if dj.StartTime != nil {
11928		objectMap["startTime"] = dj.StartTime
11929	}
11930	if dj.EndTime != nil {
11931		objectMap["endTime"] = dj.EndTime
11932	}
11933	if dj.ActivityID != nil {
11934		objectMap["activityId"] = dj.ActivityID
11935	}
11936	if dj.JobType != "" {
11937		objectMap["jobType"] = dj.JobType
11938	}
11939	return json.Marshal(objectMap)
11940}
11941
11942// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob.
11943func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
11944	return nil, false
11945}
11946
11947// AsAzureStorageJob is the BasicJob implementation for DpmJob.
11948func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
11949	return nil, false
11950}
11951
11952// AsAzureWorkloadJob is the BasicJob implementation for DpmJob.
11953func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
11954	return nil, false
11955}
11956
11957// AsDpmJob is the BasicJob implementation for DpmJob.
11958func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
11959	return &dj, true
11960}
11961
11962// AsMabJob is the BasicJob implementation for DpmJob.
11963func (dj DpmJob) AsMabJob() (*MabJob, bool) {
11964	return nil, false
11965}
11966
11967// AsVaultJob is the BasicJob implementation for DpmJob.
11968func (dj DpmJob) AsVaultJob() (*VaultJob, bool) {
11969	return nil, false
11970}
11971
11972// AsJob is the BasicJob implementation for DpmJob.
11973func (dj DpmJob) AsJob() (*Job, bool) {
11974	return nil, false
11975}
11976
11977// AsBasicJob is the BasicJob implementation for DpmJob.
11978func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
11979	return &dj, true
11980}
11981
11982// DpmJobExtendedInfo additional information on the DPM workload-specific job.
11983type DpmJobExtendedInfo struct {
11984	// TasksList - List of tasks associated with this job.
11985	TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
11986	// PropertyBag - The job properties.
11987	PropertyBag map[string]*string `json:"propertyBag"`
11988	// DynamicErrorMessage - Non localized error message on job execution.
11989	DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
11990}
11991
11992// MarshalJSON is the custom marshaler for DpmJobExtendedInfo.
11993func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
11994	objectMap := make(map[string]interface{})
11995	if djei.TasksList != nil {
11996		objectMap["tasksList"] = djei.TasksList
11997	}
11998	if djei.PropertyBag != nil {
11999		objectMap["propertyBag"] = djei.PropertyBag
12000	}
12001	if djei.DynamicErrorMessage != nil {
12002		objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
12003	}
12004	return json.Marshal(objectMap)
12005}
12006
12007// DpmJobTaskDetails DPM workload-specific job task details.
12008type DpmJobTaskDetails struct {
12009	// TaskID - The task display name.
12010	TaskID *string `json:"taskId,omitempty"`
12011	// StartTime - The start time.
12012	StartTime *date.Time `json:"startTime,omitempty"`
12013	// EndTime - The end time.
12014	EndTime *date.Time `json:"endTime,omitempty"`
12015	// Duration - Time elapsed for task.
12016	Duration *string `json:"duration,omitempty"`
12017	// Status - The status.
12018	Status *string `json:"status,omitempty"`
12019}
12020
12021// DPMProtectedItem additional information on Backup engine specific backup item.
12022type DPMProtectedItem struct {
12023	// FriendlyName - Friendly name of the managed item
12024	FriendlyName *string `json:"friendlyName,omitempty"`
12025	// BackupEngineName - Backup Management server protecting this backup item
12026	BackupEngineName *string `json:"backupEngineName,omitempty"`
12027	// ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused'
12028	ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
12029	// ExtendedInfo - Extended info of the backup item.
12030	ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
12031	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
12032	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12033	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
12034	WorkloadType DataSourceType `json:"workloadType,omitempty"`
12035	// ContainerName - Unique name of container
12036	ContainerName *string `json:"containerName,omitempty"`
12037	// SourceResourceID - ARM ID of the resource to be backed up.
12038	SourceResourceID *string `json:"sourceResourceId,omitempty"`
12039	// PolicyID - ID of the backup policy with which this item is backed up.
12040	PolicyID *string `json:"policyId,omitempty"`
12041	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
12042	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
12043	// BackupSetName - Name of the backup set the backup item belongs to
12044	BackupSetName *string `json:"backupSetName,omitempty"`
12045	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
12046	CreateMode CreateMode `json:"createMode,omitempty"`
12047	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
12048	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
12049	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
12050	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
12051	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
12052	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
12053	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
12054	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
12055	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
12056	IsRehydrate *bool `json:"isRehydrate,omitempty"`
12057	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
12058	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
12059}
12060
12061// MarshalJSON is the custom marshaler for DPMProtectedItem.
12062func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
12063	dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
12064	objectMap := make(map[string]interface{})
12065	if dpi.FriendlyName != nil {
12066		objectMap["friendlyName"] = dpi.FriendlyName
12067	}
12068	if dpi.BackupEngineName != nil {
12069		objectMap["backupEngineName"] = dpi.BackupEngineName
12070	}
12071	if dpi.ProtectionState != "" {
12072		objectMap["protectionState"] = dpi.ProtectionState
12073	}
12074	if dpi.ExtendedInfo != nil {
12075		objectMap["extendedInfo"] = dpi.ExtendedInfo
12076	}
12077	if dpi.BackupManagementType != "" {
12078		objectMap["backupManagementType"] = dpi.BackupManagementType
12079	}
12080	if dpi.WorkloadType != "" {
12081		objectMap["workloadType"] = dpi.WorkloadType
12082	}
12083	if dpi.ContainerName != nil {
12084		objectMap["containerName"] = dpi.ContainerName
12085	}
12086	if dpi.SourceResourceID != nil {
12087		objectMap["sourceResourceId"] = dpi.SourceResourceID
12088	}
12089	if dpi.PolicyID != nil {
12090		objectMap["policyId"] = dpi.PolicyID
12091	}
12092	if dpi.LastRecoveryPoint != nil {
12093		objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
12094	}
12095	if dpi.BackupSetName != nil {
12096		objectMap["backupSetName"] = dpi.BackupSetName
12097	}
12098	if dpi.CreateMode != "" {
12099		objectMap["createMode"] = dpi.CreateMode
12100	}
12101	if dpi.DeferredDeleteTimeInUTC != nil {
12102		objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
12103	}
12104	if dpi.IsScheduledForDeferredDelete != nil {
12105		objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
12106	}
12107	if dpi.DeferredDeleteTimeRemaining != nil {
12108		objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
12109	}
12110	if dpi.IsDeferredDeleteScheduleUpcoming != nil {
12111		objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
12112	}
12113	if dpi.IsRehydrate != nil {
12114		objectMap["isRehydrate"] = dpi.IsRehydrate
12115	}
12116	if dpi.ProtectedItemType != "" {
12117		objectMap["protectedItemType"] = dpi.ProtectedItemType
12118	}
12119	return json.Marshal(objectMap)
12120}
12121
12122// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12123func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
12124	return nil, false
12125}
12126
12127// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12128func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
12129	return nil, false
12130}
12131
12132// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12133func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
12134	return nil, false
12135}
12136
12137// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12138func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
12139	return nil, false
12140}
12141
12142// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12143func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
12144	return nil, false
12145}
12146
12147// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12148func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
12149	return nil, false
12150}
12151
12152// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12153func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
12154	return nil, false
12155}
12156
12157// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12158func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
12159	return nil, false
12160}
12161
12162// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12163func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
12164	return nil, false
12165}
12166
12167// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12168func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
12169	return nil, false
12170}
12171
12172// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12173func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
12174	return nil, false
12175}
12176
12177// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12178func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
12179	return &dpi, true
12180}
12181
12182// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12183func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
12184	return nil, false
12185}
12186
12187// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12188func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
12189	return nil, false
12190}
12191
12192// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12193func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
12194	return nil, false
12195}
12196
12197// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem.
12198func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
12199	return &dpi, true
12200}
12201
12202// DPMProtectedItemExtendedInfo additional information of DPM Protected item.
12203type DPMProtectedItemExtendedInfo struct {
12204	// ProtectableObjectLoadPath - Attribute to provide information on various DBs.
12205	ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
12206	// Protected - To check if backup item is disk protected.
12207	Protected *bool `json:"protected,omitempty"`
12208	// IsPresentOnCloud - To check if backup item is cloud protected.
12209	IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
12210	// LastBackupStatus - Last backup status information on backup item.
12211	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
12212	// LastRefreshedAt - Last refresh time on backup item.
12213	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
12214	// OldestRecoveryPoint - Oldest cloud recovery point time.
12215	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
12216	// RecoveryPointCount - cloud recovery point count.
12217	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
12218	// OnPremiseOldestRecoveryPoint - Oldest disk recovery point time.
12219	OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
12220	// OnPremiseLatestRecoveryPoint - latest disk recovery point time.
12221	OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
12222	// OnPremiseRecoveryPointCount - disk recovery point count.
12223	OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
12224	// IsCollocated - To check if backup item is collocated.
12225	IsCollocated *bool `json:"isCollocated,omitempty"`
12226	// ProtectionGroupName - Protection group name of the backup item.
12227	ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
12228	// DiskStorageUsedInBytes - Used Disk storage in bytes.
12229	DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
12230	// TotalDiskStorageSizeInBytes - total Disk storage in bytes.
12231	TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
12232}
12233
12234// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo.
12235func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
12236	objectMap := make(map[string]interface{})
12237	if dpiei.ProtectableObjectLoadPath != nil {
12238		objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
12239	}
12240	if dpiei.Protected != nil {
12241		objectMap["protected"] = dpiei.Protected
12242	}
12243	if dpiei.IsPresentOnCloud != nil {
12244		objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
12245	}
12246	if dpiei.LastBackupStatus != nil {
12247		objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
12248	}
12249	if dpiei.LastRefreshedAt != nil {
12250		objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
12251	}
12252	if dpiei.OldestRecoveryPoint != nil {
12253		objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
12254	}
12255	if dpiei.RecoveryPointCount != nil {
12256		objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
12257	}
12258	if dpiei.OnPremiseOldestRecoveryPoint != nil {
12259		objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
12260	}
12261	if dpiei.OnPremiseLatestRecoveryPoint != nil {
12262		objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
12263	}
12264	if dpiei.OnPremiseRecoveryPointCount != nil {
12265		objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
12266	}
12267	if dpiei.IsCollocated != nil {
12268		objectMap["isCollocated"] = dpiei.IsCollocated
12269	}
12270	if dpiei.ProtectionGroupName != nil {
12271		objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
12272	}
12273	if dpiei.DiskStorageUsedInBytes != nil {
12274		objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
12275	}
12276	if dpiei.TotalDiskStorageSizeInBytes != nil {
12277		objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
12278	}
12279	return json.Marshal(objectMap)
12280}
12281
12282// EncryptionDetails details needed if the VM was encrypted at the time of backup.
12283type EncryptionDetails struct {
12284	// EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup.
12285	EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
12286	// KekURL - Key Url.
12287	KekURL *string `json:"kekUrl,omitempty"`
12288	// SecretKeyURL - Secret Url.
12289	SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
12290	// KekVaultID - ID of Key Vault where KEK is stored.
12291	KekVaultID *string `json:"kekVaultId,omitempty"`
12292	// SecretKeyVaultID - ID of Key Vault where Secret is stored.
12293	SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
12294}
12295
12296// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class.
12297type BasicEngineBase interface {
12298	AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
12299	AsDpmBackupEngine() (*DpmBackupEngine, bool)
12300	AsEngineBase() (*EngineBase, bool)
12301}
12302
12303// EngineBase the base backup engine class. All workload specific backup engines derive from this class.
12304type EngineBase struct {
12305	// FriendlyName - Friendly name of the backup engine.
12306	FriendlyName *string `json:"friendlyName,omitempty"`
12307	// BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
12308	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12309	// RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault.
12310	RegistrationStatus *string `json:"registrationStatus,omitempty"`
12311	// BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}
12312	BackupEngineState *string `json:"backupEngineState,omitempty"`
12313	// HealthStatus - Backup status of the backup engine.
12314	HealthStatus *string `json:"healthStatus,omitempty"`
12315	// CanReRegister - Flag indicating if the backup engine be registered, once already registered.
12316	CanReRegister *bool `json:"canReRegister,omitempty"`
12317	// BackupEngineID - ID of the backup engine.
12318	BackupEngineID *string `json:"backupEngineId,omitempty"`
12319	// DpmVersion - Backup engine version
12320	DpmVersion *string `json:"dpmVersion,omitempty"`
12321	// AzureBackupAgentVersion - Backup agent version
12322	AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
12323	// IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available
12324	IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
12325	// IsDpmUpgradeAvailable - To check if backup engine upgrade available
12326	IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
12327	// ExtendedInfo - Extended info of the backupengine
12328	ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
12329	// BackupEngineType - Possible values include: 'EngineTypeBackupEngineTypeBackupEngineBase', 'EngineTypeBackupEngineTypeAzureBackupServerEngine', 'EngineTypeBackupEngineTypeDpmBackupEngine'
12330	BackupEngineType EngineType `json:"backupEngineType,omitempty"`
12331}
12332
12333func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
12334	var m map[string]interface{}
12335	err := json.Unmarshal(body, &m)
12336	if err != nil {
12337		return nil, err
12338	}
12339
12340	switch m["backupEngineType"] {
12341	case string(EngineTypeBackupEngineTypeAzureBackupServerEngine):
12342		var abse AzureBackupServerEngine
12343		err := json.Unmarshal(body, &abse)
12344		return abse, err
12345	case string(EngineTypeBackupEngineTypeDpmBackupEngine):
12346		var dbe DpmBackupEngine
12347		err := json.Unmarshal(body, &dbe)
12348		return dbe, err
12349	default:
12350		var eb EngineBase
12351		err := json.Unmarshal(body, &eb)
12352		return eb, err
12353	}
12354}
12355func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
12356	var rawMessages []*json.RawMessage
12357	err := json.Unmarshal(body, &rawMessages)
12358	if err != nil {
12359		return nil, err
12360	}
12361
12362	ebArray := make([]BasicEngineBase, len(rawMessages))
12363
12364	for index, rawMessage := range rawMessages {
12365		eb, err := unmarshalBasicEngineBase(*rawMessage)
12366		if err != nil {
12367			return nil, err
12368		}
12369		ebArray[index] = eb
12370	}
12371	return ebArray, nil
12372}
12373
12374// MarshalJSON is the custom marshaler for EngineBase.
12375func (eb EngineBase) MarshalJSON() ([]byte, error) {
12376	eb.BackupEngineType = EngineTypeBackupEngineTypeBackupEngineBase
12377	objectMap := make(map[string]interface{})
12378	if eb.FriendlyName != nil {
12379		objectMap["friendlyName"] = eb.FriendlyName
12380	}
12381	if eb.BackupManagementType != "" {
12382		objectMap["backupManagementType"] = eb.BackupManagementType
12383	}
12384	if eb.RegistrationStatus != nil {
12385		objectMap["registrationStatus"] = eb.RegistrationStatus
12386	}
12387	if eb.BackupEngineState != nil {
12388		objectMap["backupEngineState"] = eb.BackupEngineState
12389	}
12390	if eb.HealthStatus != nil {
12391		objectMap["healthStatus"] = eb.HealthStatus
12392	}
12393	if eb.CanReRegister != nil {
12394		objectMap["canReRegister"] = eb.CanReRegister
12395	}
12396	if eb.BackupEngineID != nil {
12397		objectMap["backupEngineId"] = eb.BackupEngineID
12398	}
12399	if eb.DpmVersion != nil {
12400		objectMap["dpmVersion"] = eb.DpmVersion
12401	}
12402	if eb.AzureBackupAgentVersion != nil {
12403		objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
12404	}
12405	if eb.IsAzureBackupAgentUpgradeAvailable != nil {
12406		objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
12407	}
12408	if eb.IsDpmUpgradeAvailable != nil {
12409		objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
12410	}
12411	if eb.ExtendedInfo != nil {
12412		objectMap["extendedInfo"] = eb.ExtendedInfo
12413	}
12414	if eb.BackupEngineType != "" {
12415		objectMap["backupEngineType"] = eb.BackupEngineType
12416	}
12417	return json.Marshal(objectMap)
12418}
12419
12420// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase.
12421func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
12422	return nil, false
12423}
12424
12425// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase.
12426func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
12427	return nil, false
12428}
12429
12430// AsEngineBase is the BasicEngineBase implementation for EngineBase.
12431func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
12432	return &eb, true
12433}
12434
12435// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase.
12436func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
12437	return &eb, true
12438}
12439
12440// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this
12441// class.
12442type EngineBaseResource struct {
12443	autorest.Response `json:"-"`
12444	// Properties - BackupEngineBaseResource properties
12445	Properties BasicEngineBase `json:"properties,omitempty"`
12446	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
12447	ID *string `json:"id,omitempty"`
12448	// Name - READ-ONLY; Resource name associated with the resource.
12449	Name *string `json:"name,omitempty"`
12450	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
12451	Type *string `json:"type,omitempty"`
12452	// Location - Resource location.
12453	Location *string `json:"location,omitempty"`
12454	// Tags - Resource tags.
12455	Tags map[string]*string `json:"tags"`
12456	// ETag - Optional ETag.
12457	ETag *string `json:"eTag,omitempty"`
12458}
12459
12460// MarshalJSON is the custom marshaler for EngineBaseResource.
12461func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
12462	objectMap := make(map[string]interface{})
12463	objectMap["properties"] = ebr.Properties
12464	if ebr.Location != nil {
12465		objectMap["location"] = ebr.Location
12466	}
12467	if ebr.Tags != nil {
12468		objectMap["tags"] = ebr.Tags
12469	}
12470	if ebr.ETag != nil {
12471		objectMap["eTag"] = ebr.ETag
12472	}
12473	return json.Marshal(objectMap)
12474}
12475
12476// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct.
12477func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
12478	var m map[string]*json.RawMessage
12479	err := json.Unmarshal(body, &m)
12480	if err != nil {
12481		return err
12482	}
12483	for k, v := range m {
12484		switch k {
12485		case "properties":
12486			if v != nil {
12487				properties, err := unmarshalBasicEngineBase(*v)
12488				if err != nil {
12489					return err
12490				}
12491				ebr.Properties = properties
12492			}
12493		case "id":
12494			if v != nil {
12495				var ID string
12496				err = json.Unmarshal(*v, &ID)
12497				if err != nil {
12498					return err
12499				}
12500				ebr.ID = &ID
12501			}
12502		case "name":
12503			if v != nil {
12504				var name string
12505				err = json.Unmarshal(*v, &name)
12506				if err != nil {
12507					return err
12508				}
12509				ebr.Name = &name
12510			}
12511		case "type":
12512			if v != nil {
12513				var typeVar string
12514				err = json.Unmarshal(*v, &typeVar)
12515				if err != nil {
12516					return err
12517				}
12518				ebr.Type = &typeVar
12519			}
12520		case "location":
12521			if v != nil {
12522				var location string
12523				err = json.Unmarshal(*v, &location)
12524				if err != nil {
12525					return err
12526				}
12527				ebr.Location = &location
12528			}
12529		case "tags":
12530			if v != nil {
12531				var tags map[string]*string
12532				err = json.Unmarshal(*v, &tags)
12533				if err != nil {
12534					return err
12535				}
12536				ebr.Tags = tags
12537			}
12538		case "eTag":
12539			if v != nil {
12540				var eTag string
12541				err = json.Unmarshal(*v, &eTag)
12542				if err != nil {
12543					return err
12544				}
12545				ebr.ETag = &eTag
12546			}
12547		}
12548	}
12549
12550	return nil
12551}
12552
12553// EngineBaseResourceList list of BackupEngineBase resources
12554type EngineBaseResourceList struct {
12555	autorest.Response `json:"-"`
12556	// Value - List of resources.
12557	Value *[]EngineBaseResource `json:"value,omitempty"`
12558	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
12559	NextLink *string `json:"nextLink,omitempty"`
12560}
12561
12562// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values.
12563type EngineBaseResourceListIterator struct {
12564	i    int
12565	page EngineBaseResourceListPage
12566}
12567
12568// NextWithContext advances to the next value.  If there was an error making
12569// the request the iterator does not advance and the error is returned.
12570func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12571	if tracing.IsEnabled() {
12572		ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
12573		defer func() {
12574			sc := -1
12575			if iter.Response().Response.Response != nil {
12576				sc = iter.Response().Response.Response.StatusCode
12577			}
12578			tracing.EndSpan(ctx, sc, err)
12579		}()
12580	}
12581	iter.i++
12582	if iter.i < len(iter.page.Values()) {
12583		return nil
12584	}
12585	err = iter.page.NextWithContext(ctx)
12586	if err != nil {
12587		iter.i--
12588		return err
12589	}
12590	iter.i = 0
12591	return nil
12592}
12593
12594// Next advances to the next value.  If there was an error making
12595// the request the iterator does not advance and the error is returned.
12596// Deprecated: Use NextWithContext() instead.
12597func (iter *EngineBaseResourceListIterator) Next() error {
12598	return iter.NextWithContext(context.Background())
12599}
12600
12601// NotDone returns true if the enumeration should be started or is not yet complete.
12602func (iter EngineBaseResourceListIterator) NotDone() bool {
12603	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12604}
12605
12606// Response returns the raw server response from the last page request.
12607func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
12608	return iter.page.Response()
12609}
12610
12611// Value returns the current value or a zero-initialized value if the
12612// iterator has advanced beyond the end of the collection.
12613func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
12614	if !iter.page.NotDone() {
12615		return EngineBaseResource{}
12616	}
12617	return iter.page.Values()[iter.i]
12618}
12619
12620// Creates a new instance of the EngineBaseResourceListIterator type.
12621func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
12622	return EngineBaseResourceListIterator{page: page}
12623}
12624
12625// IsEmpty returns true if the ListResult contains no values.
12626func (ebrl EngineBaseResourceList) IsEmpty() bool {
12627	return ebrl.Value == nil || len(*ebrl.Value) == 0
12628}
12629
12630// hasNextLink returns true if the NextLink is not empty.
12631func (ebrl EngineBaseResourceList) hasNextLink() bool {
12632	return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
12633}
12634
12635// engineBaseResourceListPreparer prepares a request to retrieve the next set of results.
12636// It returns nil if no more results exist.
12637func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
12638	if !ebrl.hasNextLink() {
12639		return nil, nil
12640	}
12641	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12642		autorest.AsJSON(),
12643		autorest.AsGet(),
12644		autorest.WithBaseURL(to.String(ebrl.NextLink)))
12645}
12646
12647// EngineBaseResourceListPage contains a page of EngineBaseResource values.
12648type EngineBaseResourceListPage struct {
12649	fn   func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
12650	ebrl EngineBaseResourceList
12651}
12652
12653// NextWithContext advances to the next page of values.  If there was an error making
12654// the request the page does not advance and the error is returned.
12655func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
12656	if tracing.IsEnabled() {
12657		ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
12658		defer func() {
12659			sc := -1
12660			if page.Response().Response.Response != nil {
12661				sc = page.Response().Response.Response.StatusCode
12662			}
12663			tracing.EndSpan(ctx, sc, err)
12664		}()
12665	}
12666	for {
12667		next, err := page.fn(ctx, page.ebrl)
12668		if err != nil {
12669			return err
12670		}
12671		page.ebrl = next
12672		if !next.hasNextLink() || !next.IsEmpty() {
12673			break
12674		}
12675	}
12676	return nil
12677}
12678
12679// Next advances to the next page of values.  If there was an error making
12680// the request the page does not advance and the error is returned.
12681// Deprecated: Use NextWithContext() instead.
12682func (page *EngineBaseResourceListPage) Next() error {
12683	return page.NextWithContext(context.Background())
12684}
12685
12686// NotDone returns true if the page enumeration should be started or is not yet complete.
12687func (page EngineBaseResourceListPage) NotDone() bool {
12688	return !page.ebrl.IsEmpty()
12689}
12690
12691// Response returns the raw server response from the last page request.
12692func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
12693	return page.ebrl
12694}
12695
12696// Values returns the slice of values for the current page or nil if there are no values.
12697func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
12698	if page.ebrl.IsEmpty() {
12699		return nil
12700	}
12701	return *page.ebrl.Value
12702}
12703
12704// Creates a new instance of the EngineBaseResourceListPage type.
12705func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
12706	return EngineBaseResourceListPage{
12707		fn:   getNextPage,
12708		ebrl: cur,
12709	}
12710}
12711
12712// EngineExtendedInfo additional information on backup engine.
12713type EngineExtendedInfo struct {
12714	// DatabaseName - Database name of backup engine.
12715	DatabaseName *string `json:"databaseName,omitempty"`
12716	// ProtectedItemsCount - Number of protected items in the backup engine.
12717	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
12718	// ProtectedServersCount - Number of protected servers in the backup engine.
12719	ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
12720	// DiskCount - Number of disks in the backup engine.
12721	DiskCount *int32 `json:"diskCount,omitempty"`
12722	// UsedDiskSpace - Disk space used in the backup engine.
12723	UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
12724	// AvailableDiskSpace - Disk space currently available in the backup engine.
12725	AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
12726	// RefreshedAt - Last refresh time in the backup engine.
12727	RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
12728	// AzureProtectedInstances - Protected instances in the backup engine.
12729	AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
12730}
12731
12732// ErrorAdditionalInfo the resource management error additional info.
12733type ErrorAdditionalInfo struct {
12734	// Type - READ-ONLY; The additional info type.
12735	Type *string `json:"type,omitempty"`
12736	// Info - READ-ONLY; The additional info.
12737	Info interface{} `json:"info,omitempty"`
12738}
12739
12740// MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
12741func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
12742	objectMap := make(map[string]interface{})
12743	return json.Marshal(objectMap)
12744}
12745
12746// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations.
12747type ErrorDetail struct {
12748	// Code - READ-ONLY; Error code.
12749	Code *string `json:"code,omitempty"`
12750	// Message - READ-ONLY; Error Message related to the Code.
12751	Message *string `json:"message,omitempty"`
12752	// Recommendations - READ-ONLY; List of recommendation strings.
12753	Recommendations *[]string `json:"recommendations,omitempty"`
12754}
12755
12756// MarshalJSON is the custom marshaler for ErrorDetail.
12757func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
12758	objectMap := make(map[string]interface{})
12759	return json.Marshal(objectMap)
12760}
12761
12762// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs.
12763type ExportJobsOperationResultInfo struct {
12764	// BlobURL - URL of the blob into which the serialized string of list of jobs is exported.
12765	BlobURL *string `json:"blobUrl,omitempty"`
12766	// BlobSasKey - SAS key to access the blob. It expires in 15 mins.
12767	BlobSasKey *string `json:"blobSasKey,omitempty"`
12768	// ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded.
12769	ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
12770	// ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins.
12771	ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
12772	// ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo'
12773	ObjectType ObjectType `json:"objectType,omitempty"`
12774}
12775
12776// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo.
12777func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
12778	ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
12779	objectMap := make(map[string]interface{})
12780	if ejori.BlobURL != nil {
12781		objectMap["blobUrl"] = ejori.BlobURL
12782	}
12783	if ejori.BlobSasKey != nil {
12784		objectMap["blobSasKey"] = ejori.BlobSasKey
12785	}
12786	if ejori.ExcelFileBlobURL != nil {
12787		objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
12788	}
12789	if ejori.ExcelFileBlobSasKey != nil {
12790		objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
12791	}
12792	if ejori.ObjectType != "" {
12793		objectMap["objectType"] = ejori.ObjectType
12794	}
12795	return json.Marshal(objectMap)
12796}
12797
12798// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo.
12799func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
12800	return &ejori, true
12801}
12802
12803// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo.
12804func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
12805	return nil, false
12806}
12807
12808// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo.
12809func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
12810	return nil, false
12811}
12812
12813// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo.
12814func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
12815	return &ejori, true
12816}
12817
12818// ExtendedProperties extended Properties for Azure IaasVM Backup.
12819type ExtendedProperties struct {
12820	// DiskExclusionProperties - Extended Properties for Disk Exclusion.
12821	DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
12822}
12823
12824// BasicFeatureSupportRequest base class for feature request
12825type BasicFeatureSupportRequest interface {
12826	AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
12827	AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
12828	AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
12829}
12830
12831// FeatureSupportRequest base class for feature request
12832type FeatureSupportRequest struct {
12833	// FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup'
12834	FeatureType FeatureType `json:"featureType,omitempty"`
12835}
12836
12837func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
12838	var m map[string]interface{}
12839	err := json.Unmarshal(body, &m)
12840	if err != nil {
12841		return nil, err
12842	}
12843
12844	switch m["featureType"] {
12845	case string(FeatureTypeAzureBackupGoals):
12846		var abgfsr AzureBackupGoalFeatureSupportRequest
12847		err := json.Unmarshal(body, &abgfsr)
12848		return abgfsr, err
12849	case string(FeatureTypeAzureVMResourceBackup):
12850		var avrfsr AzureVMResourceFeatureSupportRequest
12851		err := json.Unmarshal(body, &avrfsr)
12852		return avrfsr, err
12853	default:
12854		var fsr FeatureSupportRequest
12855		err := json.Unmarshal(body, &fsr)
12856		return fsr, err
12857	}
12858}
12859func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
12860	var rawMessages []*json.RawMessage
12861	err := json.Unmarshal(body, &rawMessages)
12862	if err != nil {
12863		return nil, err
12864	}
12865
12866	fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
12867
12868	for index, rawMessage := range rawMessages {
12869		fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
12870		if err != nil {
12871			return nil, err
12872		}
12873		fsrArray[index] = fsr
12874	}
12875	return fsrArray, nil
12876}
12877
12878// MarshalJSON is the custom marshaler for FeatureSupportRequest.
12879func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
12880	fsr.FeatureType = FeatureTypeFeatureSupportRequest
12881	objectMap := make(map[string]interface{})
12882	if fsr.FeatureType != "" {
12883		objectMap["featureType"] = fsr.FeatureType
12884	}
12885	return json.Marshal(objectMap)
12886}
12887
12888// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest.
12889func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
12890	return nil, false
12891}
12892
12893// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest.
12894func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
12895	return nil, false
12896}
12897
12898// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest.
12899func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
12900	return &fsr, true
12901}
12902
12903// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest.
12904func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
12905	return &fsr, true
12906}
12907
12908// GenericContainer base class for generic container of backup items
12909type GenericContainer struct {
12910	// FabricName - Name of the container's fabric
12911	FabricName *string `json:"fabricName,omitempty"`
12912	// ExtendedInformation - Extended information (not returned in List container API calls)
12913	ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
12914	// FriendlyName - Friendly name of the container.
12915	FriendlyName *string `json:"friendlyName,omitempty"`
12916	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
12917	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12918	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
12919	RegistrationStatus *string `json:"registrationStatus,omitempty"`
12920	// HealthStatus - Status of health of the container.
12921	HealthStatus *string `json:"healthStatus,omitempty"`
12922	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
12923	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
12924}
12925
12926// MarshalJSON is the custom marshaler for GenericContainer.
12927func (gc GenericContainer) MarshalJSON() ([]byte, error) {
12928	gc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeGenericContainer
12929	objectMap := make(map[string]interface{})
12930	if gc.FabricName != nil {
12931		objectMap["fabricName"] = gc.FabricName
12932	}
12933	if gc.ExtendedInformation != nil {
12934		objectMap["extendedInformation"] = gc.ExtendedInformation
12935	}
12936	if gc.FriendlyName != nil {
12937		objectMap["friendlyName"] = gc.FriendlyName
12938	}
12939	if gc.BackupManagementType != "" {
12940		objectMap["backupManagementType"] = gc.BackupManagementType
12941	}
12942	if gc.RegistrationStatus != nil {
12943		objectMap["registrationStatus"] = gc.RegistrationStatus
12944	}
12945	if gc.HealthStatus != nil {
12946		objectMap["healthStatus"] = gc.HealthStatus
12947	}
12948	if gc.ContainerType != "" {
12949		objectMap["containerType"] = gc.ContainerType
12950	}
12951	return json.Marshal(objectMap)
12952}
12953
12954// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer.
12955func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
12956	return nil, false
12957}
12958
12959// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer.
12960func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
12961	return nil, false
12962}
12963
12964// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer.
12965func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
12966	return nil, false
12967}
12968
12969// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
12970func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
12971	return nil, false
12972}
12973
12974// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer.
12975func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
12976	return nil, false
12977}
12978
12979// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer.
12980func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
12981	return nil, false
12982}
12983
12984// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
12985func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
12986	return nil, false
12987}
12988
12989// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer.
12990func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
12991	return nil, false
12992}
12993
12994// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer.
12995func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
12996	return nil, false
12997}
12998
12999// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer.
13000func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
13001	return nil, false
13002}
13003
13004// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer.
13005func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13006	return nil, false
13007}
13008
13009// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer.
13010func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
13011	return &gc, true
13012}
13013
13014// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer.
13015func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13016	return nil, false
13017}
13018
13019// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer.
13020func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13021	return nil, false
13022}
13023
13024// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer.
13025func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
13026	return nil, false
13027}
13028
13029// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
13030func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13031	return nil, false
13032}
13033
13034// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer.
13035func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13036	return &gc, true
13037}
13038
13039// GenericContainerExtendedInfo container extended information
13040type GenericContainerExtendedInfo struct {
13041	// RawCertData - Public key of container cert
13042	RawCertData *string `json:"rawCertData,omitempty"`
13043	// ContainerIdentityInfo - Container identity information
13044	ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
13045	// ServiceEndpoints - Azure Backup Service Endpoints for the container
13046	ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
13047}
13048
13049// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo.
13050func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
13051	objectMap := make(map[string]interface{})
13052	if gcei.RawCertData != nil {
13053		objectMap["rawCertData"] = gcei.RawCertData
13054	}
13055	if gcei.ContainerIdentityInfo != nil {
13056		objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
13057	}
13058	if gcei.ServiceEndpoints != nil {
13059		objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
13060	}
13061	return json.Marshal(objectMap)
13062}
13063
13064// GenericProtectedItem base class for backup items.
13065type GenericProtectedItem struct {
13066	// FriendlyName - Friendly name of the container.
13067	FriendlyName *string `json:"friendlyName,omitempty"`
13068	// PolicyState - Indicates consistency of policy object and policy applied to this backup item.
13069	PolicyState *string `json:"policyState,omitempty"`
13070	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused'
13071	ProtectionState ProtectionState `json:"protectionState,omitempty"`
13072	// ProtectedItemID - Data Plane Service ID of the protected item.
13073	ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
13074	// SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item)
13075	SourceAssociations map[string]*string `json:"sourceAssociations"`
13076	// FabricName - Name of this backup item's fabric.
13077	FabricName *string `json:"fabricName,omitempty"`
13078	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
13079	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13080	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
13081	WorkloadType DataSourceType `json:"workloadType,omitempty"`
13082	// ContainerName - Unique name of container
13083	ContainerName *string `json:"containerName,omitempty"`
13084	// SourceResourceID - ARM ID of the resource to be backed up.
13085	SourceResourceID *string `json:"sourceResourceId,omitempty"`
13086	// PolicyID - ID of the backup policy with which this item is backed up.
13087	PolicyID *string `json:"policyId,omitempty"`
13088	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
13089	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13090	// BackupSetName - Name of the backup set the backup item belongs to
13091	BackupSetName *string `json:"backupSetName,omitempty"`
13092	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
13093	CreateMode CreateMode `json:"createMode,omitempty"`
13094	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
13095	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13096	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
13097	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13098	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
13099	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13100	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
13101	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13102	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
13103	IsRehydrate *bool `json:"isRehydrate,omitempty"`
13104	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
13105	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13106}
13107
13108// MarshalJSON is the custom marshaler for GenericProtectedItem.
13109func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
13110	gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
13111	objectMap := make(map[string]interface{})
13112	if gpi.FriendlyName != nil {
13113		objectMap["friendlyName"] = gpi.FriendlyName
13114	}
13115	if gpi.PolicyState != nil {
13116		objectMap["policyState"] = gpi.PolicyState
13117	}
13118	if gpi.ProtectionState != "" {
13119		objectMap["protectionState"] = gpi.ProtectionState
13120	}
13121	if gpi.ProtectedItemID != nil {
13122		objectMap["protectedItemId"] = gpi.ProtectedItemID
13123	}
13124	if gpi.SourceAssociations != nil {
13125		objectMap["sourceAssociations"] = gpi.SourceAssociations
13126	}
13127	if gpi.FabricName != nil {
13128		objectMap["fabricName"] = gpi.FabricName
13129	}
13130	if gpi.BackupManagementType != "" {
13131		objectMap["backupManagementType"] = gpi.BackupManagementType
13132	}
13133	if gpi.WorkloadType != "" {
13134		objectMap["workloadType"] = gpi.WorkloadType
13135	}
13136	if gpi.ContainerName != nil {
13137		objectMap["containerName"] = gpi.ContainerName
13138	}
13139	if gpi.SourceResourceID != nil {
13140		objectMap["sourceResourceId"] = gpi.SourceResourceID
13141	}
13142	if gpi.PolicyID != nil {
13143		objectMap["policyId"] = gpi.PolicyID
13144	}
13145	if gpi.LastRecoveryPoint != nil {
13146		objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
13147	}
13148	if gpi.BackupSetName != nil {
13149		objectMap["backupSetName"] = gpi.BackupSetName
13150	}
13151	if gpi.CreateMode != "" {
13152		objectMap["createMode"] = gpi.CreateMode
13153	}
13154	if gpi.DeferredDeleteTimeInUTC != nil {
13155		objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
13156	}
13157	if gpi.IsScheduledForDeferredDelete != nil {
13158		objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
13159	}
13160	if gpi.DeferredDeleteTimeRemaining != nil {
13161		objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
13162	}
13163	if gpi.IsDeferredDeleteScheduleUpcoming != nil {
13164		objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
13165	}
13166	if gpi.IsRehydrate != nil {
13167		objectMap["isRehydrate"] = gpi.IsRehydrate
13168	}
13169	if gpi.ProtectedItemType != "" {
13170		objectMap["protectedItemType"] = gpi.ProtectedItemType
13171	}
13172	return json.Marshal(objectMap)
13173}
13174
13175// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13176func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13177	return nil, false
13178}
13179
13180// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13181func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13182	return nil, false
13183}
13184
13185// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13186func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13187	return nil, false
13188}
13189
13190// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13191func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13192	return nil, false
13193}
13194
13195// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13196func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13197	return nil, false
13198}
13199
13200// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13201func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13202	return nil, false
13203}
13204
13205// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13206func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13207	return nil, false
13208}
13209
13210// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13211func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13212	return nil, false
13213}
13214
13215// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13216func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13217	return nil, false
13218}
13219
13220// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13221func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13222	return nil, false
13223}
13224
13225// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13226func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13227	return nil, false
13228}
13229
13230// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13231func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13232	return nil, false
13233}
13234
13235// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13236func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13237	return &gpi, true
13238}
13239
13240// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13241func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13242	return nil, false
13243}
13244
13245// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13246func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13247	return nil, false
13248}
13249
13250// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem.
13251func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13252	return &gpi, true
13253}
13254
13255// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy.
13256type GenericProtectionPolicy struct {
13257	// SubProtectionPolicy - List of sub-protection policies which includes schedule and retention
13258	SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
13259	// TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
13260	TimeZone *string `json:"timeZone,omitempty"`
13261	// FabricName - Name of this policy's fabric.
13262	FabricName *string `json:"fabricName,omitempty"`
13263	// ProtectedItemsCount - Number of items associated with this policy.
13264	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13265	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
13266	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13267}
13268
13269// MarshalJSON is the custom marshaler for GenericProtectionPolicy.
13270func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
13271	gpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy
13272	objectMap := make(map[string]interface{})
13273	if gpp.SubProtectionPolicy != nil {
13274		objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
13275	}
13276	if gpp.TimeZone != nil {
13277		objectMap["timeZone"] = gpp.TimeZone
13278	}
13279	if gpp.FabricName != nil {
13280		objectMap["fabricName"] = gpp.FabricName
13281	}
13282	if gpp.ProtectedItemsCount != nil {
13283		objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
13284	}
13285	if gpp.BackupManagementType != "" {
13286		objectMap["backupManagementType"] = gpp.BackupManagementType
13287	}
13288	return json.Marshal(objectMap)
13289}
13290
13291// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13292func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13293	return nil, false
13294}
13295
13296// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13297func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13298	return nil, false
13299}
13300
13301// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13302func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13303	return nil, false
13304}
13305
13306// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13307func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13308	return nil, false
13309}
13310
13311// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13312func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13313	return &gpp, true
13314}
13315
13316// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13317func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13318	return nil, false
13319}
13320
13321// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13322func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13323	return nil, false
13324}
13325
13326// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy.
13327func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13328	return &gpp, true
13329}
13330
13331// GenericRecoveryPoint generic backup copy.
13332type GenericRecoveryPoint struct {
13333	// FriendlyName - Friendly name of the backup copy.
13334	FriendlyName *string `json:"friendlyName,omitempty"`
13335	// RecoveryPointType - Type of the backup copy.
13336	RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13337	// RecoveryPointTime - Time at which this backup copy was created.
13338	RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13339	// RecoveryPointAdditionalInfo - Additional information associated with this backup copy.
13340	RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13341	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
13342	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13343}
13344
13345// MarshalJSON is the custom marshaler for GenericRecoveryPoint.
13346func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
13347	grp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint
13348	objectMap := make(map[string]interface{})
13349	if grp.FriendlyName != nil {
13350		objectMap["friendlyName"] = grp.FriendlyName
13351	}
13352	if grp.RecoveryPointType != nil {
13353		objectMap["recoveryPointType"] = grp.RecoveryPointType
13354	}
13355	if grp.RecoveryPointTime != nil {
13356		objectMap["recoveryPointTime"] = grp.RecoveryPointTime
13357	}
13358	if grp.RecoveryPointAdditionalInfo != nil {
13359		objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
13360	}
13361	if grp.ObjectType != "" {
13362		objectMap["objectType"] = grp.ObjectType
13363	}
13364	return json.Marshal(objectMap)
13365}
13366
13367// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13368func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13369	return nil, false
13370}
13371
13372// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13373func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13374	return nil, false
13375}
13376
13377// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13378func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13379	return nil, false
13380}
13381
13382// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13383func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13384	return nil, false
13385}
13386
13387// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13388func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13389	return nil, false
13390}
13391
13392// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13393func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13394	return nil, false
13395}
13396
13397// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13398func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
13399	return nil, false
13400}
13401
13402// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13403func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
13404	return nil, false
13405}
13406
13407// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13408func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
13409	return nil, false
13410}
13411
13412// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13413func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
13414	return nil, false
13415}
13416
13417// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13418func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
13419	return &grp, true
13420}
13421
13422// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13423func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
13424	return nil, false
13425}
13426
13427// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13428func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
13429	return nil, false
13430}
13431
13432// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint.
13433func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
13434	return &grp, true
13435}
13436
13437// GetProtectedItemQueryObject filters to list backup items.
13438type GetProtectedItemQueryObject struct {
13439	// Expand - Specifies if the additional information should be provided for this item.
13440	Expand *string `json:"expand,omitempty"`
13441}
13442
13443// IaasVMBackupRequest iaaS VM workload-specific backup request.
13444type IaasVMBackupRequest struct {
13445	// RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC).
13446	RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
13447	// ObjectType - Possible values include: 'ObjectTypeBasicRequestObjectTypeBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest'
13448	ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
13449}
13450
13451// MarshalJSON is the custom marshaler for IaasVMBackupRequest.
13452func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
13453	ivbr.ObjectType = ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest
13454	objectMap := make(map[string]interface{})
13455	if ivbr.RecoveryPointExpiryTimeInUTC != nil {
13456		objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
13457	}
13458	if ivbr.ObjectType != "" {
13459		objectMap["objectType"] = ivbr.ObjectType
13460	}
13461	return json.Marshal(objectMap)
13462}
13463
13464// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
13465func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
13466	return nil, false
13467}
13468
13469// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
13470func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
13471	return nil, false
13472}
13473
13474// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest.
13475func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
13476	return &ivbr, true
13477}
13478
13479// AsRequest is the BasicRequest implementation for IaasVMBackupRequest.
13480func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
13481	return nil, false
13482}
13483
13484// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest.
13485func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
13486	return &ivbr, true
13487}
13488
13489// BasicIaaSVMContainer iaaS VM workload-specific container.
13490type BasicIaaSVMContainer interface {
13491	AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
13492	AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
13493	AsIaaSVMContainer() (*IaaSVMContainer, bool)
13494}
13495
13496// IaaSVMContainer iaaS VM workload-specific container.
13497type IaaSVMContainer struct {
13498	// VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.
13499	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13500	// VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM.
13501	VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13502	// ResourceGroup - Resource group name of Recovery Services Vault.
13503	ResourceGroup *string `json:"resourceGroup,omitempty"`
13504	// FriendlyName - Friendly name of the container.
13505	FriendlyName *string `json:"friendlyName,omitempty"`
13506	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
13507	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13508	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
13509	RegistrationStatus *string `json:"registrationStatus,omitempty"`
13510	// HealthStatus - Status of health of the container.
13511	HealthStatus *string `json:"healthStatus,omitempty"`
13512	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
13513	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13514}
13515
13516func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
13517	var m map[string]interface{}
13518	err := json.Unmarshal(body, &m)
13519	if err != nil {
13520		return nil, err
13521	}
13522
13523	switch m["containerType"] {
13524	case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
13525		var aisccvc AzureIaaSClassicComputeVMContainer
13526		err := json.Unmarshal(body, &aisccvc)
13527		return aisccvc, err
13528	case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
13529		var aiscvc AzureIaaSComputeVMContainer
13530		err := json.Unmarshal(body, &aiscvc)
13531		return aiscvc, err
13532	default:
13533		var isc IaaSVMContainer
13534		err := json.Unmarshal(body, &isc)
13535		return isc, err
13536	}
13537}
13538func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
13539	var rawMessages []*json.RawMessage
13540	err := json.Unmarshal(body, &rawMessages)
13541	if err != nil {
13542		return nil, err
13543	}
13544
13545	iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
13546
13547	for index, rawMessage := range rawMessages {
13548		isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
13549		if err != nil {
13550			return nil, err
13551		}
13552		iscArray[index] = isc
13553	}
13554	return iscArray, nil
13555}
13556
13557// MarshalJSON is the custom marshaler for IaaSVMContainer.
13558func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
13559	isc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer
13560	objectMap := make(map[string]interface{})
13561	if isc.VirtualMachineID != nil {
13562		objectMap["virtualMachineId"] = isc.VirtualMachineID
13563	}
13564	if isc.VirtualMachineVersion != nil {
13565		objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
13566	}
13567	if isc.ResourceGroup != nil {
13568		objectMap["resourceGroup"] = isc.ResourceGroup
13569	}
13570	if isc.FriendlyName != nil {
13571		objectMap["friendlyName"] = isc.FriendlyName
13572	}
13573	if isc.BackupManagementType != "" {
13574		objectMap["backupManagementType"] = isc.BackupManagementType
13575	}
13576	if isc.RegistrationStatus != nil {
13577		objectMap["registrationStatus"] = isc.RegistrationStatus
13578	}
13579	if isc.HealthStatus != nil {
13580		objectMap["healthStatus"] = isc.HealthStatus
13581	}
13582	if isc.ContainerType != "" {
13583		objectMap["containerType"] = isc.ContainerType
13584	}
13585	return json.Marshal(objectMap)
13586}
13587
13588// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13589func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13590	return nil, false
13591}
13592
13593// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13594func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13595	return nil, false
13596}
13597
13598// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13599func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13600	return nil, false
13601}
13602
13603// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13604func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13605	return nil, false
13606}
13607
13608// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13609func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13610	return nil, false
13611}
13612
13613// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13614func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13615	return nil, false
13616}
13617
13618// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13619func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13620	return nil, false
13621}
13622
13623// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13624func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13625	return nil, false
13626}
13627
13628// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13629func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13630	return nil, false
13631}
13632
13633// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13634func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
13635	return nil, false
13636}
13637
13638// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13639func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13640	return nil, false
13641}
13642
13643// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13644func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
13645	return nil, false
13646}
13647
13648// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13649func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13650	return &isc, true
13651}
13652
13653// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13654func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13655	return &isc, true
13656}
13657
13658// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13659func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
13660	return nil, false
13661}
13662
13663// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13664func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13665	return nil, false
13666}
13667
13668// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer.
13669func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13670	return &isc, true
13671}
13672
13673// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM.
13674type IaasVMILRRegistrationRequest struct {
13675	// RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored.
13676	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
13677	// VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored.
13678	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13679	// InitiatorName - iSCSI initiator name.
13680	InitiatorName *string `json:"initiatorName,omitempty"`
13681	// RenewExistingRegistration - Whether to renew existing registration with the iSCSI server.
13682	RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
13683	// ObjectType - Possible values include: 'ObjectTypeBasicILRRequestObjectTypeILRRequest', 'ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest'
13684	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
13685}
13686
13687// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest.
13688func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
13689	ivrr.ObjectType = ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest
13690	objectMap := make(map[string]interface{})
13691	if ivrr.RecoveryPointID != nil {
13692		objectMap["recoveryPointId"] = ivrr.RecoveryPointID
13693	}
13694	if ivrr.VirtualMachineID != nil {
13695		objectMap["virtualMachineId"] = ivrr.VirtualMachineID
13696	}
13697	if ivrr.InitiatorName != nil {
13698		objectMap["initiatorName"] = ivrr.InitiatorName
13699	}
13700	if ivrr.RenewExistingRegistration != nil {
13701		objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
13702	}
13703	if ivrr.ObjectType != "" {
13704		objectMap["objectType"] = ivrr.ObjectType
13705	}
13706	return json.Marshal(objectMap)
13707}
13708
13709// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
13710func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
13711	return nil, false
13712}
13713
13714// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
13715func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
13716	return &ivrr, true
13717}
13718
13719// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
13720func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
13721	return nil, false
13722}
13723
13724// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest.
13725func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
13726	return &ivrr, true
13727}
13728
13729// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item.
13730type BasicIaaSVMProtectableItem interface {
13731	AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
13732	AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
13733	AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
13734}
13735
13736// IaaSVMProtectableItem iaaS VM workload-specific backup item.
13737type IaaSVMProtectableItem struct {
13738	// VirtualMachineID - Fully qualified ARM ID of the virtual machine.
13739	VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13740	// BackupManagementType - Type of backup management to backup an item.
13741	BackupManagementType *string `json:"backupManagementType,omitempty"`
13742	// WorkloadType - Type of workload for the backup management
13743	WorkloadType *string `json:"workloadType,omitempty"`
13744	// FriendlyName - Friendly name of the backup item.
13745	FriendlyName *string `json:"friendlyName,omitempty"`
13746	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
13747	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
13748	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
13749	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
13750}
13751
13752func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
13753	var m map[string]interface{}
13754	err := json.Unmarshal(body, &m)
13755	if err != nil {
13756		return nil, err
13757	}
13758
13759	switch m["protectableItemType"] {
13760	case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
13761		var aisccvpi AzureIaaSClassicComputeVMProtectableItem
13762		err := json.Unmarshal(body, &aisccvpi)
13763		return aisccvpi, err
13764	case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
13765		var aiscvpi AzureIaaSComputeVMProtectableItem
13766		err := json.Unmarshal(body, &aiscvpi)
13767		return aiscvpi, err
13768	default:
13769		var ispi IaaSVMProtectableItem
13770		err := json.Unmarshal(body, &ispi)
13771		return ispi, err
13772	}
13773}
13774func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
13775	var rawMessages []*json.RawMessage
13776	err := json.Unmarshal(body, &rawMessages)
13777	if err != nil {
13778		return nil, err
13779	}
13780
13781	ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
13782
13783	for index, rawMessage := range rawMessages {
13784		ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
13785		if err != nil {
13786			return nil, err
13787		}
13788		ispiArray[index] = ispi
13789	}
13790	return ispiArray, nil
13791}
13792
13793// MarshalJSON is the custom marshaler for IaaSVMProtectableItem.
13794func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
13795	ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
13796	objectMap := make(map[string]interface{})
13797	if ispi.VirtualMachineID != nil {
13798		objectMap["virtualMachineId"] = ispi.VirtualMachineID
13799	}
13800	if ispi.BackupManagementType != nil {
13801		objectMap["backupManagementType"] = ispi.BackupManagementType
13802	}
13803	if ispi.WorkloadType != nil {
13804		objectMap["workloadType"] = ispi.WorkloadType
13805	}
13806	if ispi.FriendlyName != nil {
13807		objectMap["friendlyName"] = ispi.FriendlyName
13808	}
13809	if ispi.ProtectionState != "" {
13810		objectMap["protectionState"] = ispi.ProtectionState
13811	}
13812	if ispi.ProtectableItemType != "" {
13813		objectMap["protectableItemType"] = ispi.ProtectableItemType
13814	}
13815	return json.Marshal(objectMap)
13816}
13817
13818// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13819func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
13820	return nil, false
13821}
13822
13823// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13824func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
13825	return nil, false
13826}
13827
13828// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13829func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
13830	return nil, false
13831}
13832
13833// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13834func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
13835	return nil, false
13836}
13837
13838// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13839func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
13840	return nil, false
13841}
13842
13843// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13844func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
13845	return nil, false
13846}
13847
13848// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13849func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
13850	return nil, false
13851}
13852
13853// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13854func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
13855	return nil, false
13856}
13857
13858// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13859func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
13860	return nil, false
13861}
13862
13863// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13864func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
13865	return nil, false
13866}
13867
13868// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13869func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
13870	return nil, false
13871}
13872
13873// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13874func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
13875	return &ispi, true
13876}
13877
13878// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13879func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
13880	return &ispi, true
13881}
13882
13883// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13884func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
13885	return nil, false
13886}
13887
13888// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem.
13889func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
13890	return &ispi, true
13891}
13892
13893// IaasVMRecoveryPoint iaaS VM workload specific backup copy.
13894type IaasVMRecoveryPoint struct {
13895	// RecoveryPointType - READ-ONLY; Type of the backup copy.
13896	RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13897	// RecoveryPointTime - READ-ONLY; Time at which this backup copy was created.
13898	RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13899	// RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy.
13900	RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13901	// SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created.
13902	SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
13903	// IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created.
13904	IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
13905	// KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true.
13906	KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
13907	// IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active.
13908	IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
13909	// RecoveryPointTierDetails - Recovery point tier information.
13910	RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
13911	// IsManagedVirtualMachine - Whether VM is with Managed Disks
13912	IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
13913	// VirtualMachineSize - Virtual Machine Size
13914	VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
13915	// OriginalStorageAccountOption - Original Storage Account Option
13916	OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
13917	// OsType - OS type
13918	OsType *string `json:"osType,omitempty"`
13919	// RecoveryPointDiskConfiguration - Disk configuration
13920	RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
13921	// Zones - Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms
13922	Zones *[]string `json:"zones,omitempty"`
13923	// RecoveryPointMoveReadinessInfo - Eligibility of RP to be moved to another tier
13924	RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
13925	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
13926	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13927}
13928
13929// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint.
13930func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
13931	ivrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint
13932	objectMap := make(map[string]interface{})
13933	if ivrp.KeyAndSecret != nil {
13934		objectMap["keyAndSecret"] = ivrp.KeyAndSecret
13935	}
13936	if ivrp.IsInstantIlrSessionActive != nil {
13937		objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
13938	}
13939	if ivrp.RecoveryPointTierDetails != nil {
13940		objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
13941	}
13942	if ivrp.IsManagedVirtualMachine != nil {
13943		objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
13944	}
13945	if ivrp.VirtualMachineSize != nil {
13946		objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
13947	}
13948	if ivrp.OriginalStorageAccountOption != nil {
13949		objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
13950	}
13951	if ivrp.OsType != nil {
13952		objectMap["osType"] = ivrp.OsType
13953	}
13954	if ivrp.RecoveryPointDiskConfiguration != nil {
13955		objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
13956	}
13957	if ivrp.Zones != nil {
13958		objectMap["zones"] = ivrp.Zones
13959	}
13960	if ivrp.RecoveryPointMoveReadinessInfo != nil {
13961		objectMap["recoveryPointMoveReadinessInfo"] = ivrp.RecoveryPointMoveReadinessInfo
13962	}
13963	if ivrp.ObjectType != "" {
13964		objectMap["objectType"] = ivrp.ObjectType
13965	}
13966	return json.Marshal(objectMap)
13967}
13968
13969// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13970func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13971	return nil, false
13972}
13973
13974// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13975func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13976	return nil, false
13977}
13978
13979// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13980func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13981	return nil, false
13982}
13983
13984// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13985func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13986	return nil, false
13987}
13988
13989// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13990func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13991	return nil, false
13992}
13993
13994// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
13995func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13996	return nil, false
13997}
13998
13999// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14000func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
14001	return nil, false
14002}
14003
14004// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14005func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
14006	return nil, false
14007}
14008
14009// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14010func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
14011	return nil, false
14012}
14013
14014// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14015func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
14016	return nil, false
14017}
14018
14019// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14020func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
14021	return nil, false
14022}
14023
14024// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14025func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
14026	return &ivrp, true
14027}
14028
14029// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14030func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
14031	return nil, false
14032}
14033
14034// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint.
14035func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
14036	return &ivrp, true
14037}
14038
14039// BasicIaasVMRestoreRequest iaaS VM workload-specific restore.
14040type BasicIaasVMRestoreRequest interface {
14041	AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
14042	AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
14043}
14044
14045// IaasVMRestoreRequest iaaS VM workload-specific restore.
14046type IaasVMRestoreRequest struct {
14047	// RecoveryPointID - ID of the backup copy to be recovered.
14048	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14049	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
14050	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14051	// SourceResourceID - Fully qualified ARM ID of the VM which is being recovered.
14052	SourceResourceID *string `json:"sourceResourceId,omitempty"`
14053	// TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created.
14054	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
14055	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14056	// TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts.
14057	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}
14058	TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14059	// StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored.
14060	StorageAccountID *string `json:"storageAccountId,omitempty"`
14061	// VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine.
14062	// User will be validated for join action permissions in the linked access.
14063	VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14064	// SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be
14065	// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent
14066	// the subnet.
14067	SubnetID *string `json:"subnetId,omitempty"`
14068	// TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic
14069	// Virtual Machines.
14070	TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14071	// Region - Region in which the virtual machine is restored.
14072	Region *string `json:"region,omitempty"`
14073	// AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines.
14074	AffinityGroup *string `json:"affinityGroup,omitempty"`
14075	// CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same
14076	// cloud service as it was at the time of backup.
14077	CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14078	// OriginalStorageAccountOption - Original Storage Account Option
14079	OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14080	// EncryptionDetails - Details needed if the VM was encrypted at the time of backup.
14081	EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14082	// RestoreDiskLunList - List of Disk LUNs for partial restore
14083	RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14084	// RestoreWithManagedDisks - Flag to denote of an Unmanaged disk VM should be restored with Managed disks.
14085	RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14086	// DiskEncryptionSetID - DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key.
14087	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14088	// Zones - Target zone where the VM and its disks should be restored.
14089	Zones *[]string `json:"zones,omitempty"`
14090	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
14091	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14092}
14093
14094func unmarshalBasicIaasVMRestoreRequest(body []byte) (BasicIaasVMRestoreRequest, error) {
14095	var m map[string]interface{}
14096	err := json.Unmarshal(body, &m)
14097	if err != nil {
14098		return nil, err
14099	}
14100
14101	switch m["objectType"] {
14102	case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
14103		var ivrwrr IaasVMRestoreWithRehydrationRequest
14104		err := json.Unmarshal(body, &ivrwrr)
14105		return ivrwrr, err
14106	default:
14107		var ivrr IaasVMRestoreRequest
14108		err := json.Unmarshal(body, &ivrr)
14109		return ivrr, err
14110	}
14111}
14112func unmarshalBasicIaasVMRestoreRequestArray(body []byte) ([]BasicIaasVMRestoreRequest, error) {
14113	var rawMessages []*json.RawMessage
14114	err := json.Unmarshal(body, &rawMessages)
14115	if err != nil {
14116		return nil, err
14117	}
14118
14119	ivrrArray := make([]BasicIaasVMRestoreRequest, len(rawMessages))
14120
14121	for index, rawMessage := range rawMessages {
14122		ivrr, err := unmarshalBasicIaasVMRestoreRequest(*rawMessage)
14123		if err != nil {
14124			return nil, err
14125		}
14126		ivrrArray[index] = ivrr
14127	}
14128	return ivrrArray, nil
14129}
14130
14131// MarshalJSON is the custom marshaler for IaasVMRestoreRequest.
14132func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
14133	ivrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest
14134	objectMap := make(map[string]interface{})
14135	if ivrr.RecoveryPointID != nil {
14136		objectMap["recoveryPointId"] = ivrr.RecoveryPointID
14137	}
14138	if ivrr.RecoveryType != "" {
14139		objectMap["recoveryType"] = ivrr.RecoveryType
14140	}
14141	if ivrr.SourceResourceID != nil {
14142		objectMap["sourceResourceId"] = ivrr.SourceResourceID
14143	}
14144	if ivrr.TargetVirtualMachineID != nil {
14145		objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
14146	}
14147	if ivrr.TargetResourceGroupID != nil {
14148		objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
14149	}
14150	if ivrr.StorageAccountID != nil {
14151		objectMap["storageAccountId"] = ivrr.StorageAccountID
14152	}
14153	if ivrr.VirtualNetworkID != nil {
14154		objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
14155	}
14156	if ivrr.SubnetID != nil {
14157		objectMap["subnetId"] = ivrr.SubnetID
14158	}
14159	if ivrr.TargetDomainNameID != nil {
14160		objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
14161	}
14162	if ivrr.Region != nil {
14163		objectMap["region"] = ivrr.Region
14164	}
14165	if ivrr.AffinityGroup != nil {
14166		objectMap["affinityGroup"] = ivrr.AffinityGroup
14167	}
14168	if ivrr.CreateNewCloudService != nil {
14169		objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
14170	}
14171	if ivrr.OriginalStorageAccountOption != nil {
14172		objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
14173	}
14174	if ivrr.EncryptionDetails != nil {
14175		objectMap["encryptionDetails"] = ivrr.EncryptionDetails
14176	}
14177	if ivrr.RestoreDiskLunList != nil {
14178		objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
14179	}
14180	if ivrr.RestoreWithManagedDisks != nil {
14181		objectMap["restoreWithManagedDisks"] = ivrr.RestoreWithManagedDisks
14182	}
14183	if ivrr.DiskEncryptionSetID != nil {
14184		objectMap["diskEncryptionSetId"] = ivrr.DiskEncryptionSetID
14185	}
14186	if ivrr.Zones != nil {
14187		objectMap["zones"] = ivrr.Zones
14188	}
14189	if ivrr.ObjectType != "" {
14190		objectMap["objectType"] = ivrr.ObjectType
14191	}
14192	return json.Marshal(objectMap)
14193}
14194
14195// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14196func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14197	return nil, false
14198}
14199
14200// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14201func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14202	return nil, false
14203}
14204
14205// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14206func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14207	return nil, false
14208}
14209
14210// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14211func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14212	return nil, false
14213}
14214
14215// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14216func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14217	return nil, false
14218}
14219
14220// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14221func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14222	return nil, false
14223}
14224
14225// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14226func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14227	return nil, false
14228}
14229
14230// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14231func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14232	return nil, false
14233}
14234
14235// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14236func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14237	return nil, false
14238}
14239
14240// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14241func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14242	return nil, false
14243}
14244
14245// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14246func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14247	return nil, false
14248}
14249
14250// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14251func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14252	return nil, false
14253}
14254
14255// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14256func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14257	return &ivrr, true
14258}
14259
14260// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14261func (ivrr IaasVMRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14262	return &ivrr, true
14263}
14264
14265// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14266func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14267	return nil, false
14268}
14269
14270// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14271func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14272	return nil, false
14273}
14274
14275// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14276func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14277	return nil, false
14278}
14279
14280// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14281func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14282	return nil, false
14283}
14284
14285// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14286func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14287	return nil, false
14288}
14289
14290// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14291func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14292	return nil, false
14293}
14294
14295// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest.
14296func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14297	return &ivrr, true
14298}
14299
14300// IaasVMRestoreWithRehydrationRequest iaaS VM workload-specific restore with integrated rehydration of
14301// recovery point.
14302type IaasVMRestoreWithRehydrationRequest struct {
14303	// RecoveryPointRehydrationInfo - RP Rehydration Info
14304	RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
14305	// RecoveryPointID - ID of the backup copy to be recovered.
14306	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14307	// RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline'
14308	RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14309	// SourceResourceID - Fully qualified ARM ID of the VM which is being recovered.
14310	SourceResourceID *string `json:"sourceResourceId,omitempty"`
14311	// TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created.
14312	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}
14313	TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14314	// TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts.
14315	// For e.g. /subscriptions/{subId}/resourcegroups/{rg}
14316	TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14317	// StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored.
14318	StorageAccountID *string `json:"storageAccountId,omitempty"`
14319	// VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine.
14320	// User will be validated for join action permissions in the linked access.
14321	VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14322	// SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be
14323	// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent
14324	// the subnet.
14325	SubnetID *string `json:"subnetId,omitempty"`
14326	// TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic
14327	// Virtual Machines.
14328	TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14329	// Region - Region in which the virtual machine is restored.
14330	Region *string `json:"region,omitempty"`
14331	// AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines.
14332	AffinityGroup *string `json:"affinityGroup,omitempty"`
14333	// CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same
14334	// cloud service as it was at the time of backup.
14335	CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14336	// OriginalStorageAccountOption - Original Storage Account Option
14337	OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14338	// EncryptionDetails - Details needed if the VM was encrypted at the time of backup.
14339	EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14340	// RestoreDiskLunList - List of Disk LUNs for partial restore
14341	RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14342	// RestoreWithManagedDisks - Flag to denote of an Unmanaged disk VM should be restored with Managed disks.
14343	RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14344	// DiskEncryptionSetID - DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key.
14345	DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14346	// Zones - Target zone where the VM and its disks should be restored.
14347	Zones *[]string `json:"zones,omitempty"`
14348	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
14349	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14350}
14351
14352// MarshalJSON is the custom marshaler for IaasVMRestoreWithRehydrationRequest.
14353func (ivrwrr IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) {
14354	ivrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest
14355	objectMap := make(map[string]interface{})
14356	if ivrwrr.RecoveryPointRehydrationInfo != nil {
14357		objectMap["recoveryPointRehydrationInfo"] = ivrwrr.RecoveryPointRehydrationInfo
14358	}
14359	if ivrwrr.RecoveryPointID != nil {
14360		objectMap["recoveryPointId"] = ivrwrr.RecoveryPointID
14361	}
14362	if ivrwrr.RecoveryType != "" {
14363		objectMap["recoveryType"] = ivrwrr.RecoveryType
14364	}
14365	if ivrwrr.SourceResourceID != nil {
14366		objectMap["sourceResourceId"] = ivrwrr.SourceResourceID
14367	}
14368	if ivrwrr.TargetVirtualMachineID != nil {
14369		objectMap["targetVirtualMachineId"] = ivrwrr.TargetVirtualMachineID
14370	}
14371	if ivrwrr.TargetResourceGroupID != nil {
14372		objectMap["targetResourceGroupId"] = ivrwrr.TargetResourceGroupID
14373	}
14374	if ivrwrr.StorageAccountID != nil {
14375		objectMap["storageAccountId"] = ivrwrr.StorageAccountID
14376	}
14377	if ivrwrr.VirtualNetworkID != nil {
14378		objectMap["virtualNetworkId"] = ivrwrr.VirtualNetworkID
14379	}
14380	if ivrwrr.SubnetID != nil {
14381		objectMap["subnetId"] = ivrwrr.SubnetID
14382	}
14383	if ivrwrr.TargetDomainNameID != nil {
14384		objectMap["targetDomainNameId"] = ivrwrr.TargetDomainNameID
14385	}
14386	if ivrwrr.Region != nil {
14387		objectMap["region"] = ivrwrr.Region
14388	}
14389	if ivrwrr.AffinityGroup != nil {
14390		objectMap["affinityGroup"] = ivrwrr.AffinityGroup
14391	}
14392	if ivrwrr.CreateNewCloudService != nil {
14393		objectMap["createNewCloudService"] = ivrwrr.CreateNewCloudService
14394	}
14395	if ivrwrr.OriginalStorageAccountOption != nil {
14396		objectMap["originalStorageAccountOption"] = ivrwrr.OriginalStorageAccountOption
14397	}
14398	if ivrwrr.EncryptionDetails != nil {
14399		objectMap["encryptionDetails"] = ivrwrr.EncryptionDetails
14400	}
14401	if ivrwrr.RestoreDiskLunList != nil {
14402		objectMap["restoreDiskLunList"] = ivrwrr.RestoreDiskLunList
14403	}
14404	if ivrwrr.RestoreWithManagedDisks != nil {
14405		objectMap["restoreWithManagedDisks"] = ivrwrr.RestoreWithManagedDisks
14406	}
14407	if ivrwrr.DiskEncryptionSetID != nil {
14408		objectMap["diskEncryptionSetId"] = ivrwrr.DiskEncryptionSetID
14409	}
14410	if ivrwrr.Zones != nil {
14411		objectMap["zones"] = ivrwrr.Zones
14412	}
14413	if ivrwrr.ObjectType != "" {
14414		objectMap["objectType"] = ivrwrr.ObjectType
14415	}
14416	return json.Marshal(objectMap)
14417}
14418
14419// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14420func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14421	return nil, false
14422}
14423
14424// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14425func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14426	return nil, false
14427}
14428
14429// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14430func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14431	return nil, false
14432}
14433
14434// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14435func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14436	return nil, false
14437}
14438
14439// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14440func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14441	return nil, false
14442}
14443
14444// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14445func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14446	return nil, false
14447}
14448
14449// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14450func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14451	return nil, false
14452}
14453
14454// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14455func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14456	return nil, false
14457}
14458
14459// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14460func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14461	return nil, false
14462}
14463
14464// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14465func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14466	return nil, false
14467}
14468
14469// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14470func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14471	return nil, false
14472}
14473
14474// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14475func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14476	return nil, false
14477}
14478
14479// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14480func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14481	return nil, false
14482}
14483
14484// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14485func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14486	return &ivrwrr, true
14487}
14488
14489// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14490func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14491	return nil, false
14492}
14493
14494// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14495func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14496	return nil, false
14497}
14498
14499// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14500func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14501	return nil, false
14502}
14503
14504// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14505func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14506	return nil, false
14507}
14508
14509// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14510func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14511	return &ivrwrr, true
14512}
14513
14514// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14515func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14516	return nil, false
14517}
14518
14519// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreWithRehydrationRequest.
14520func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14521	return &ivrwrr, true
14522}
14523
14524// BasicILRRequest parameters to Provision ILR API.
14525type BasicILRRequest interface {
14526	AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
14527	AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
14528	AsILRRequest() (*ILRRequest, bool)
14529}
14530
14531// ILRRequest parameters to Provision ILR API.
14532type ILRRequest struct {
14533	// ObjectType - Possible values include: 'ObjectTypeBasicILRRequestObjectTypeILRRequest', 'ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest'
14534	ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
14535}
14536
14537func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
14538	var m map[string]interface{}
14539	err := json.Unmarshal(body, &m)
14540	if err != nil {
14541		return nil, err
14542	}
14543
14544	switch m["objectType"] {
14545	case string(ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest):
14546		var afspir AzureFileShareProvisionILRRequest
14547		err := json.Unmarshal(body, &afspir)
14548		return afspir, err
14549	case string(ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest):
14550		var ivrr IaasVMILRRegistrationRequest
14551		err := json.Unmarshal(body, &ivrr)
14552		return ivrr, err
14553	default:
14554		var ir ILRRequest
14555		err := json.Unmarshal(body, &ir)
14556		return ir, err
14557	}
14558}
14559func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
14560	var rawMessages []*json.RawMessage
14561	err := json.Unmarshal(body, &rawMessages)
14562	if err != nil {
14563		return nil, err
14564	}
14565
14566	irArray := make([]BasicILRRequest, len(rawMessages))
14567
14568	for index, rawMessage := range rawMessages {
14569		ir, err := unmarshalBasicILRRequest(*rawMessage)
14570		if err != nil {
14571			return nil, err
14572		}
14573		irArray[index] = ir
14574	}
14575	return irArray, nil
14576}
14577
14578// MarshalJSON is the custom marshaler for ILRRequest.
14579func (ir ILRRequest) MarshalJSON() ([]byte, error) {
14580	ir.ObjectType = ObjectTypeBasicILRRequestObjectTypeILRRequest
14581	objectMap := make(map[string]interface{})
14582	if ir.ObjectType != "" {
14583		objectMap["objectType"] = ir.ObjectType
14584	}
14585	return json.Marshal(objectMap)
14586}
14587
14588// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest.
14589func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
14590	return nil, false
14591}
14592
14593// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest.
14594func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
14595	return nil, false
14596}
14597
14598// AsILRRequest is the BasicILRRequest implementation for ILRRequest.
14599func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
14600	return &ir, true
14601}
14602
14603// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest.
14604func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
14605	return &ir, true
14606}
14607
14608// ILRRequestResource parameters to Provision ILR API.
14609type ILRRequestResource struct {
14610	// Properties - ILRRequestResource properties
14611	Properties BasicILRRequest `json:"properties,omitempty"`
14612	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
14613	ID *string `json:"id,omitempty"`
14614	// Name - READ-ONLY; Resource name associated with the resource.
14615	Name *string `json:"name,omitempty"`
14616	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
14617	Type *string `json:"type,omitempty"`
14618	// Location - Resource location.
14619	Location *string `json:"location,omitempty"`
14620	// Tags - Resource tags.
14621	Tags map[string]*string `json:"tags"`
14622	// ETag - Optional ETag.
14623	ETag *string `json:"eTag,omitempty"`
14624}
14625
14626// MarshalJSON is the custom marshaler for ILRRequestResource.
14627func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
14628	objectMap := make(map[string]interface{})
14629	objectMap["properties"] = irr.Properties
14630	if irr.Location != nil {
14631		objectMap["location"] = irr.Location
14632	}
14633	if irr.Tags != nil {
14634		objectMap["tags"] = irr.Tags
14635	}
14636	if irr.ETag != nil {
14637		objectMap["eTag"] = irr.ETag
14638	}
14639	return json.Marshal(objectMap)
14640}
14641
14642// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct.
14643func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
14644	var m map[string]*json.RawMessage
14645	err := json.Unmarshal(body, &m)
14646	if err != nil {
14647		return err
14648	}
14649	for k, v := range m {
14650		switch k {
14651		case "properties":
14652			if v != nil {
14653				properties, err := unmarshalBasicILRRequest(*v)
14654				if err != nil {
14655					return err
14656				}
14657				irr.Properties = properties
14658			}
14659		case "id":
14660			if v != nil {
14661				var ID string
14662				err = json.Unmarshal(*v, &ID)
14663				if err != nil {
14664					return err
14665				}
14666				irr.ID = &ID
14667			}
14668		case "name":
14669			if v != nil {
14670				var name string
14671				err = json.Unmarshal(*v, &name)
14672				if err != nil {
14673					return err
14674				}
14675				irr.Name = &name
14676			}
14677		case "type":
14678			if v != nil {
14679				var typeVar string
14680				err = json.Unmarshal(*v, &typeVar)
14681				if err != nil {
14682					return err
14683				}
14684				irr.Type = &typeVar
14685			}
14686		case "location":
14687			if v != nil {
14688				var location string
14689				err = json.Unmarshal(*v, &location)
14690				if err != nil {
14691					return err
14692				}
14693				irr.Location = &location
14694			}
14695		case "tags":
14696			if v != nil {
14697				var tags map[string]*string
14698				err = json.Unmarshal(*v, &tags)
14699				if err != nil {
14700					return err
14701				}
14702				irr.Tags = tags
14703			}
14704		case "eTag":
14705			if v != nil {
14706				var eTag string
14707				err = json.Unmarshal(*v, &eTag)
14708				if err != nil {
14709					return err
14710				}
14711				irr.ETag = &eTag
14712			}
14713		}
14714	}
14715
14716	return nil
14717}
14718
14719// InquiryInfo details about inquired protectable items under a given container.
14720type InquiryInfo struct {
14721	// Status - Inquiry Status for this container such as
14722	// InProgress | Failed | Succeeded
14723	Status *string `json:"status,omitempty"`
14724	// ErrorDetail - Error Details if the Status is non-success.
14725	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14726	// InquiryDetails - Inquiry Details which will have workload specific details.
14727	// For e.g. - For SQL and oracle this will contain different details.
14728	InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
14729}
14730
14731// InquiryValidation validation for inquired protectable items under a given container.
14732type InquiryValidation struct {
14733	// Status - Status for the Inquiry Validation.
14734	Status *string `json:"status,omitempty"`
14735	// ErrorDetail - Error Detail in case the status is non-success.
14736	ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14737	// AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success.
14738	AdditionalDetail *string `json:"additionalDetail,omitempty"`
14739}
14740
14741// MarshalJSON is the custom marshaler for InquiryValidation.
14742func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
14743	objectMap := make(map[string]interface{})
14744	if iv.Status != nil {
14745		objectMap["status"] = iv.Status
14746	}
14747	if iv.ErrorDetail != nil {
14748		objectMap["errorDetail"] = iv.ErrorDetail
14749	}
14750	return json.Marshal(objectMap)
14751}
14752
14753// InstantItemRecoveryTarget target details for file / folder restore.
14754type InstantItemRecoveryTarget struct {
14755	// ClientScripts - List of client scripts.
14756	ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
14757}
14758
14759// InstantRPAdditionalDetails ...
14760type InstantRPAdditionalDetails struct {
14761	AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
14762	AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
14763}
14764
14765// BasicJob defines workload agnostic properties for a job.
14766type BasicJob interface {
14767	AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
14768	AsAzureStorageJob() (*AzureStorageJob, bool)
14769	AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
14770	AsDpmJob() (*DpmJob, bool)
14771	AsMabJob() (*MabJob, bool)
14772	AsVaultJob() (*VaultJob, bool)
14773	AsJob() (*Job, bool)
14774}
14775
14776// Job defines workload agnostic properties for a job.
14777type Job struct {
14778	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
14779	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
14780	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
14781	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14782	// Operation - The operation name.
14783	Operation *string `json:"operation,omitempty"`
14784	// Status - Job status.
14785	Status *string `json:"status,omitempty"`
14786	// StartTime - The start time.
14787	StartTime *date.Time `json:"startTime,omitempty"`
14788	// EndTime - The end time.
14789	EndTime *date.Time `json:"endTime,omitempty"`
14790	// ActivityID - ActivityId of job.
14791	ActivityID *string `json:"activityId,omitempty"`
14792	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
14793	JobType JobType `json:"jobType,omitempty"`
14794}
14795
14796func unmarshalBasicJob(body []byte) (BasicJob, error) {
14797	var m map[string]interface{}
14798	err := json.Unmarshal(body, &m)
14799	if err != nil {
14800		return nil, err
14801	}
14802
14803	switch m["jobType"] {
14804	case string(JobTypeAzureIaaSVMJob):
14805		var aisj AzureIaaSVMJob
14806		err := json.Unmarshal(body, &aisj)
14807		return aisj, err
14808	case string(JobTypeAzureStorageJob):
14809		var asj AzureStorageJob
14810		err := json.Unmarshal(body, &asj)
14811		return asj, err
14812	case string(JobTypeAzureWorkloadJob):
14813		var awj AzureWorkloadJob
14814		err := json.Unmarshal(body, &awj)
14815		return awj, err
14816	case string(JobTypeDpmJob):
14817		var dj DpmJob
14818		err := json.Unmarshal(body, &dj)
14819		return dj, err
14820	case string(JobTypeMabJob):
14821		var mj MabJob
14822		err := json.Unmarshal(body, &mj)
14823		return mj, err
14824	case string(JobTypeVaultJob):
14825		var vj VaultJob
14826		err := json.Unmarshal(body, &vj)
14827		return vj, err
14828	default:
14829		var j Job
14830		err := json.Unmarshal(body, &j)
14831		return j, err
14832	}
14833}
14834func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
14835	var rawMessages []*json.RawMessage
14836	err := json.Unmarshal(body, &rawMessages)
14837	if err != nil {
14838		return nil, err
14839	}
14840
14841	jArray := make([]BasicJob, len(rawMessages))
14842
14843	for index, rawMessage := range rawMessages {
14844		j, err := unmarshalBasicJob(*rawMessage)
14845		if err != nil {
14846			return nil, err
14847		}
14848		jArray[index] = j
14849	}
14850	return jArray, nil
14851}
14852
14853// MarshalJSON is the custom marshaler for Job.
14854func (j Job) MarshalJSON() ([]byte, error) {
14855	j.JobType = JobTypeJob
14856	objectMap := make(map[string]interface{})
14857	if j.EntityFriendlyName != nil {
14858		objectMap["entityFriendlyName"] = j.EntityFriendlyName
14859	}
14860	if j.BackupManagementType != "" {
14861		objectMap["backupManagementType"] = j.BackupManagementType
14862	}
14863	if j.Operation != nil {
14864		objectMap["operation"] = j.Operation
14865	}
14866	if j.Status != nil {
14867		objectMap["status"] = j.Status
14868	}
14869	if j.StartTime != nil {
14870		objectMap["startTime"] = j.StartTime
14871	}
14872	if j.EndTime != nil {
14873		objectMap["endTime"] = j.EndTime
14874	}
14875	if j.ActivityID != nil {
14876		objectMap["activityId"] = j.ActivityID
14877	}
14878	if j.JobType != "" {
14879		objectMap["jobType"] = j.JobType
14880	}
14881	return json.Marshal(objectMap)
14882}
14883
14884// AsAzureIaaSVMJob is the BasicJob implementation for Job.
14885func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
14886	return nil, false
14887}
14888
14889// AsAzureStorageJob is the BasicJob implementation for Job.
14890func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
14891	return nil, false
14892}
14893
14894// AsAzureWorkloadJob is the BasicJob implementation for Job.
14895func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
14896	return nil, false
14897}
14898
14899// AsDpmJob is the BasicJob implementation for Job.
14900func (j Job) AsDpmJob() (*DpmJob, bool) {
14901	return nil, false
14902}
14903
14904// AsMabJob is the BasicJob implementation for Job.
14905func (j Job) AsMabJob() (*MabJob, bool) {
14906	return nil, false
14907}
14908
14909// AsVaultJob is the BasicJob implementation for Job.
14910func (j Job) AsVaultJob() (*VaultJob, bool) {
14911	return nil, false
14912}
14913
14914// AsJob is the BasicJob implementation for Job.
14915func (j Job) AsJob() (*Job, bool) {
14916	return &j, true
14917}
14918
14919// AsBasicJob is the BasicJob implementation for Job.
14920func (j Job) AsBasicJob() (BasicJob, bool) {
14921	return &j, true
14922}
14923
14924// JobQueryObject filters to list the jobs.
14925type JobQueryObject struct {
14926	// Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling'
14927	Status JobStatus `json:"status,omitempty"`
14928	// BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
14929	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14930	// Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete', 'JobOperationTypeUpdateCustomerManagedKey'
14931	Operation JobOperationType `json:"operation,omitempty"`
14932	// JobID - JobID represents the job uniquely.
14933	JobID *string `json:"jobId,omitempty"`
14934	// StartTime - Job has started at this time. Value is in UTC.
14935	StartTime *date.Time `json:"startTime,omitempty"`
14936	// EndTime - Job has ended at this time. Value is in UTC.
14937	EndTime *date.Time `json:"endTime,omitempty"`
14938}
14939
14940// JobResource defines workload agnostic properties for a job.
14941type JobResource struct {
14942	autorest.Response `json:"-"`
14943	// Properties - JobResource properties
14944	Properties BasicJob `json:"properties,omitempty"`
14945	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
14946	ID *string `json:"id,omitempty"`
14947	// Name - READ-ONLY; Resource name associated with the resource.
14948	Name *string `json:"name,omitempty"`
14949	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
14950	Type *string `json:"type,omitempty"`
14951	// Location - Resource location.
14952	Location *string `json:"location,omitempty"`
14953	// Tags - Resource tags.
14954	Tags map[string]*string `json:"tags"`
14955	// ETag - Optional ETag.
14956	ETag *string `json:"eTag,omitempty"`
14957}
14958
14959// MarshalJSON is the custom marshaler for JobResource.
14960func (jr JobResource) MarshalJSON() ([]byte, error) {
14961	objectMap := make(map[string]interface{})
14962	objectMap["properties"] = jr.Properties
14963	if jr.Location != nil {
14964		objectMap["location"] = jr.Location
14965	}
14966	if jr.Tags != nil {
14967		objectMap["tags"] = jr.Tags
14968	}
14969	if jr.ETag != nil {
14970		objectMap["eTag"] = jr.ETag
14971	}
14972	return json.Marshal(objectMap)
14973}
14974
14975// UnmarshalJSON is the custom unmarshaler for JobResource struct.
14976func (jr *JobResource) UnmarshalJSON(body []byte) error {
14977	var m map[string]*json.RawMessage
14978	err := json.Unmarshal(body, &m)
14979	if err != nil {
14980		return err
14981	}
14982	for k, v := range m {
14983		switch k {
14984		case "properties":
14985			if v != nil {
14986				properties, err := unmarshalBasicJob(*v)
14987				if err != nil {
14988					return err
14989				}
14990				jr.Properties = properties
14991			}
14992		case "id":
14993			if v != nil {
14994				var ID string
14995				err = json.Unmarshal(*v, &ID)
14996				if err != nil {
14997					return err
14998				}
14999				jr.ID = &ID
15000			}
15001		case "name":
15002			if v != nil {
15003				var name string
15004				err = json.Unmarshal(*v, &name)
15005				if err != nil {
15006					return err
15007				}
15008				jr.Name = &name
15009			}
15010		case "type":
15011			if v != nil {
15012				var typeVar string
15013				err = json.Unmarshal(*v, &typeVar)
15014				if err != nil {
15015					return err
15016				}
15017				jr.Type = &typeVar
15018			}
15019		case "location":
15020			if v != nil {
15021				var location string
15022				err = json.Unmarshal(*v, &location)
15023				if err != nil {
15024					return err
15025				}
15026				jr.Location = &location
15027			}
15028		case "tags":
15029			if v != nil {
15030				var tags map[string]*string
15031				err = json.Unmarshal(*v, &tags)
15032				if err != nil {
15033					return err
15034				}
15035				jr.Tags = tags
15036			}
15037		case "eTag":
15038			if v != nil {
15039				var eTag string
15040				err = json.Unmarshal(*v, &eTag)
15041				if err != nil {
15042					return err
15043				}
15044				jr.ETag = &eTag
15045			}
15046		}
15047	}
15048
15049	return nil
15050}
15051
15052// JobResourceList list of Job resources
15053type JobResourceList struct {
15054	autorest.Response `json:"-"`
15055	// Value - List of resources.
15056	Value *[]JobResource `json:"value,omitempty"`
15057	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
15058	NextLink *string `json:"nextLink,omitempty"`
15059}
15060
15061// JobResourceListIterator provides access to a complete listing of JobResource values.
15062type JobResourceListIterator struct {
15063	i    int
15064	page JobResourceListPage
15065}
15066
15067// NextWithContext advances to the next value.  If there was an error making
15068// the request the iterator does not advance and the error is returned.
15069func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15070	if tracing.IsEnabled() {
15071		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
15072		defer func() {
15073			sc := -1
15074			if iter.Response().Response.Response != nil {
15075				sc = iter.Response().Response.Response.StatusCode
15076			}
15077			tracing.EndSpan(ctx, sc, err)
15078		}()
15079	}
15080	iter.i++
15081	if iter.i < len(iter.page.Values()) {
15082		return nil
15083	}
15084	err = iter.page.NextWithContext(ctx)
15085	if err != nil {
15086		iter.i--
15087		return err
15088	}
15089	iter.i = 0
15090	return nil
15091}
15092
15093// Next advances to the next value.  If there was an error making
15094// the request the iterator does not advance and the error is returned.
15095// Deprecated: Use NextWithContext() instead.
15096func (iter *JobResourceListIterator) Next() error {
15097	return iter.NextWithContext(context.Background())
15098}
15099
15100// NotDone returns true if the enumeration should be started or is not yet complete.
15101func (iter JobResourceListIterator) NotDone() bool {
15102	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15103}
15104
15105// Response returns the raw server response from the last page request.
15106func (iter JobResourceListIterator) Response() JobResourceList {
15107	return iter.page.Response()
15108}
15109
15110// Value returns the current value or a zero-initialized value if the
15111// iterator has advanced beyond the end of the collection.
15112func (iter JobResourceListIterator) Value() JobResource {
15113	if !iter.page.NotDone() {
15114		return JobResource{}
15115	}
15116	return iter.page.Values()[iter.i]
15117}
15118
15119// Creates a new instance of the JobResourceListIterator type.
15120func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
15121	return JobResourceListIterator{page: page}
15122}
15123
15124// IsEmpty returns true if the ListResult contains no values.
15125func (jrl JobResourceList) IsEmpty() bool {
15126	return jrl.Value == nil || len(*jrl.Value) == 0
15127}
15128
15129// hasNextLink returns true if the NextLink is not empty.
15130func (jrl JobResourceList) hasNextLink() bool {
15131	return jrl.NextLink != nil && len(*jrl.NextLink) != 0
15132}
15133
15134// jobResourceListPreparer prepares a request to retrieve the next set of results.
15135// It returns nil if no more results exist.
15136func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
15137	if !jrl.hasNextLink() {
15138		return nil, nil
15139	}
15140	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15141		autorest.AsJSON(),
15142		autorest.AsGet(),
15143		autorest.WithBaseURL(to.String(jrl.NextLink)))
15144}
15145
15146// JobResourceListPage contains a page of JobResource values.
15147type JobResourceListPage struct {
15148	fn  func(context.Context, JobResourceList) (JobResourceList, error)
15149	jrl JobResourceList
15150}
15151
15152// NextWithContext advances to the next page of values.  If there was an error making
15153// the request the page does not advance and the error is returned.
15154func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
15155	if tracing.IsEnabled() {
15156		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
15157		defer func() {
15158			sc := -1
15159			if page.Response().Response.Response != nil {
15160				sc = page.Response().Response.Response.StatusCode
15161			}
15162			tracing.EndSpan(ctx, sc, err)
15163		}()
15164	}
15165	for {
15166		next, err := page.fn(ctx, page.jrl)
15167		if err != nil {
15168			return err
15169		}
15170		page.jrl = next
15171		if !next.hasNextLink() || !next.IsEmpty() {
15172			break
15173		}
15174	}
15175	return nil
15176}
15177
15178// Next advances to the next page of values.  If there was an error making
15179// the request the page does not advance and the error is returned.
15180// Deprecated: Use NextWithContext() instead.
15181func (page *JobResourceListPage) Next() error {
15182	return page.NextWithContext(context.Background())
15183}
15184
15185// NotDone returns true if the page enumeration should be started or is not yet complete.
15186func (page JobResourceListPage) NotDone() bool {
15187	return !page.jrl.IsEmpty()
15188}
15189
15190// Response returns the raw server response from the last page request.
15191func (page JobResourceListPage) Response() JobResourceList {
15192	return page.jrl
15193}
15194
15195// Values returns the slice of values for the current page or nil if there are no values.
15196func (page JobResourceListPage) Values() []JobResource {
15197	if page.jrl.IsEmpty() {
15198		return nil
15199	}
15200	return *page.jrl.Value
15201}
15202
15203// Creates a new instance of the JobResourceListPage type.
15204func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
15205	return JobResourceListPage{
15206		fn:  getNextPage,
15207		jrl: cur,
15208	}
15209}
15210
15211// KEKDetails KEK is encryption key for BEK.
15212type KEKDetails struct {
15213	// KeyURL - Key is KEK.
15214	KeyURL *string `json:"keyUrl,omitempty"`
15215	// KeyVaultID - Key Vault ID where this Key is stored.
15216	KeyVaultID *string `json:"keyVaultId,omitempty"`
15217	// KeyBackupData - KEK data.
15218	KeyBackupData *string `json:"keyBackupData,omitempty"`
15219}
15220
15221// KeyAndSecretDetails BEK is bitlocker key.
15222// KEK is encryption key for BEK
15223// If the VM was encrypted then we will store following details :
15224// 1. Secret(BEK) - Url + Backup Data + vaultId.
15225// 2. Key(KEK) - Url + Backup Data + vaultId.
15226// 3. EncryptionMechanism
15227// BEK and KEK can potentially have different vault ids.
15228type KeyAndSecretDetails struct {
15229	// KekDetails - KEK is encryption key for BEK.
15230	KekDetails *KEKDetails `json:"kekDetails,omitempty"`
15231	// BekDetails - BEK is bitlocker encryption key.
15232	BekDetails *BEKDetails `json:"bekDetails,omitempty"`
15233	// EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass
15234	EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
15235}
15236
15237// KPIResourceHealthDetails KPI Resource Health Details
15238type KPIResourceHealthDetails struct {
15239	// ResourceHealthStatus - Resource Health Status. Possible values include: 'ResourceHealthStatusHealthy', 'ResourceHealthStatusTransientDegraded', 'ResourceHealthStatusPersistentDegraded', 'ResourceHealthStatusTransientUnhealthy', 'ResourceHealthStatusPersistentUnhealthy', 'ResourceHealthStatusInvalid'
15240	ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
15241	// ResourceHealthDetails - Resource Health Status
15242	ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
15243}
15244
15245// ListRecoveryPointsRecommendedForMoveRequest listRecoveryPointsRecommendedForMoveRequest Request
15246type ListRecoveryPointsRecommendedForMoveRequest struct {
15247	// ObjectType - Gets the class type.
15248	ObjectType *string `json:"objectType,omitempty"`
15249	// ExcludedRPList - List of Recovery Points excluded from Move
15250	ExcludedRPList *[]string `json:"excludedRPList,omitempty"`
15251}
15252
15253// LogSchedulePolicy log policy schedule.
15254type LogSchedulePolicy struct {
15255	// ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes.
15256	ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
15257	// SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy'
15258	SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15259}
15260
15261// MarshalJSON is the custom marshaler for LogSchedulePolicy.
15262func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
15263	lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
15264	objectMap := make(map[string]interface{})
15265	if lsp.ScheduleFrequencyInMins != nil {
15266		objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
15267	}
15268	if lsp.SchedulePolicyType != "" {
15269		objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
15270	}
15271	return json.Marshal(objectMap)
15272}
15273
15274// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy.
15275func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15276	return &lsp, true
15277}
15278
15279// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy.
15280func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15281	return nil, false
15282}
15283
15284// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy.
15285func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15286	return nil, false
15287}
15288
15289// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy.
15290func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15291	return nil, false
15292}
15293
15294// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy.
15295func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15296	return &lsp, true
15297}
15298
15299// LongTermRetentionPolicy long term retention policy.
15300type LongTermRetentionPolicy struct {
15301	// DailySchedule - Daily retention schedule of the protection policy.
15302	DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
15303	// WeeklySchedule - Weekly retention schedule of the protection policy.
15304	WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
15305	// MonthlySchedule - Monthly retention schedule of the protection policy.
15306	MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
15307	// YearlySchedule - Yearly retention schedule of the protection policy.
15308	YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
15309	// RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy'
15310	RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
15311}
15312
15313// MarshalJSON is the custom marshaler for LongTermRetentionPolicy.
15314func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
15315	ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
15316	objectMap := make(map[string]interface{})
15317	if ltrp.DailySchedule != nil {
15318		objectMap["dailySchedule"] = ltrp.DailySchedule
15319	}
15320	if ltrp.WeeklySchedule != nil {
15321		objectMap["weeklySchedule"] = ltrp.WeeklySchedule
15322	}
15323	if ltrp.MonthlySchedule != nil {
15324		objectMap["monthlySchedule"] = ltrp.MonthlySchedule
15325	}
15326	if ltrp.YearlySchedule != nil {
15327		objectMap["yearlySchedule"] = ltrp.YearlySchedule
15328	}
15329	if ltrp.RetentionPolicyType != "" {
15330		objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
15331	}
15332	return json.Marshal(objectMap)
15333}
15334
15335// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy.
15336func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
15337	return &ltrp, true
15338}
15339
15340// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy.
15341func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
15342	return nil, false
15343}
15344
15345// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy.
15346func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
15347	return nil, false
15348}
15349
15350// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy.
15351func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
15352	return &ltrp, true
15353}
15354
15355// LongTermSchedulePolicy long term policy schedule.
15356type LongTermSchedulePolicy struct {
15357	// SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy'
15358	SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15359}
15360
15361// MarshalJSON is the custom marshaler for LongTermSchedulePolicy.
15362func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
15363	ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
15364	objectMap := make(map[string]interface{})
15365	if ltsp.SchedulePolicyType != "" {
15366		objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
15367	}
15368	return json.Marshal(objectMap)
15369}
15370
15371// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy.
15372func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15373	return nil, false
15374}
15375
15376// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy.
15377func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15378	return &ltsp, true
15379}
15380
15381// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy.
15382func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15383	return nil, false
15384}
15385
15386// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy.
15387func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15388	return nil, false
15389}
15390
15391// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy.
15392func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15393	return &ltsp, true
15394}
15395
15396// MabContainer container with items backed up using MAB backup engine.
15397type MabContainer struct {
15398	// CanReRegister - Can the container be registered one more time.
15399	CanReRegister *bool `json:"canReRegister,omitempty"`
15400	// ContainerID - ContainerID represents the container.
15401	ContainerID *int64 `json:"containerId,omitempty"`
15402	// ProtectedItemCount - Number of items backed up in this container.
15403	ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
15404	// AgentVersion - Agent version of this container.
15405	AgentVersion *string `json:"agentVersion,omitempty"`
15406	// ExtendedInfo - Additional information for this container
15407	ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
15408	// MabContainerHealthDetails - Health details on this mab container.
15409	MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
15410	// ContainerHealthState - Health state of mab container.
15411	ContainerHealthState *string `json:"containerHealthState,omitempty"`
15412	// FriendlyName - Friendly name of the container.
15413	FriendlyName *string `json:"friendlyName,omitempty"`
15414	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
15415	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15416	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
15417	RegistrationStatus *string `json:"registrationStatus,omitempty"`
15418	// HealthStatus - Status of health of the container.
15419	HealthStatus *string `json:"healthStatus,omitempty"`
15420	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
15421	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15422}
15423
15424// MarshalJSON is the custom marshaler for MabContainer.
15425func (mc MabContainer) MarshalJSON() ([]byte, error) {
15426	mc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeWindows
15427	objectMap := make(map[string]interface{})
15428	if mc.CanReRegister != nil {
15429		objectMap["canReRegister"] = mc.CanReRegister
15430	}
15431	if mc.ContainerID != nil {
15432		objectMap["containerId"] = mc.ContainerID
15433	}
15434	if mc.ProtectedItemCount != nil {
15435		objectMap["protectedItemCount"] = mc.ProtectedItemCount
15436	}
15437	if mc.AgentVersion != nil {
15438		objectMap["agentVersion"] = mc.AgentVersion
15439	}
15440	if mc.ExtendedInfo != nil {
15441		objectMap["extendedInfo"] = mc.ExtendedInfo
15442	}
15443	if mc.MabContainerHealthDetails != nil {
15444		objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
15445	}
15446	if mc.ContainerHealthState != nil {
15447		objectMap["containerHealthState"] = mc.ContainerHealthState
15448	}
15449	if mc.FriendlyName != nil {
15450		objectMap["friendlyName"] = mc.FriendlyName
15451	}
15452	if mc.BackupManagementType != "" {
15453		objectMap["backupManagementType"] = mc.BackupManagementType
15454	}
15455	if mc.RegistrationStatus != nil {
15456		objectMap["registrationStatus"] = mc.RegistrationStatus
15457	}
15458	if mc.HealthStatus != nil {
15459		objectMap["healthStatus"] = mc.HealthStatus
15460	}
15461	if mc.ContainerType != "" {
15462		objectMap["containerType"] = mc.ContainerType
15463	}
15464	return json.Marshal(objectMap)
15465}
15466
15467// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer.
15468func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15469	return nil, false
15470}
15471
15472// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer.
15473func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15474	return nil, false
15475}
15476
15477// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer.
15478func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15479	return nil, false
15480}
15481
15482// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
15483func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15484	return nil, false
15485}
15486
15487// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer.
15488func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15489	return nil, false
15490}
15491
15492// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer.
15493func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15494	return nil, false
15495}
15496
15497// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
15498func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15499	return nil, false
15500}
15501
15502// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer.
15503func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15504	return nil, false
15505}
15506
15507// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer.
15508func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15509	return nil, false
15510}
15511
15512// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer.
15513func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
15514	return nil, false
15515}
15516
15517// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer.
15518func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15519	return nil, false
15520}
15521
15522// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer.
15523func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
15524	return nil, false
15525}
15526
15527// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer.
15528func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15529	return nil, false
15530}
15531
15532// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer.
15533func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15534	return nil, false
15535}
15536
15537// AsMabContainer is the BasicProtectionContainer implementation for MabContainer.
15538func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
15539	return &mc, true
15540}
15541
15542// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
15543func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15544	return nil, false
15545}
15546
15547// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer.
15548func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15549	return &mc, true
15550}
15551
15552// MabContainerExtendedInfo additional information of the container.
15553type MabContainerExtendedInfo struct {
15554	// LastRefreshedAt - Time stamp when this container was refreshed.
15555	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15556	// BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase'
15557	BackupItemType ItemType `json:"backupItemType,omitempty"`
15558	// BackupItems - List of backup items associated with this container.
15559	BackupItems *[]string `json:"backupItems,omitempty"`
15560	// PolicyName - Backup policy associated with this container.
15561	PolicyName *string `json:"policyName,omitempty"`
15562	// LastBackupStatus - Latest backup status of this container.
15563	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15564}
15565
15566// MABContainerHealthDetails MAB workload-specific Health Details.
15567type MABContainerHealthDetails struct {
15568	// Code - Health Code
15569	Code *int32 `json:"code,omitempty"`
15570	// Title - Health Title
15571	Title *string `json:"title,omitempty"`
15572	// Message - Health Message
15573	Message *string `json:"message,omitempty"`
15574	// Recommendations - Health Recommended Actions
15575	Recommendations *[]string `json:"recommendations,omitempty"`
15576}
15577
15578// MabErrorInfo MAB workload-specific error information.
15579type MabErrorInfo struct {
15580	// ErrorString - READ-ONLY; Localized error string.
15581	ErrorString *string `json:"errorString,omitempty"`
15582	// Recommendations - READ-ONLY; List of localized recommendations.
15583	Recommendations *[]string `json:"recommendations,omitempty"`
15584}
15585
15586// MarshalJSON is the custom marshaler for MabErrorInfo.
15587func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
15588	objectMap := make(map[string]interface{})
15589	return json.Marshal(objectMap)
15590}
15591
15592// MabFileFolderProtectedItem MAB workload-specific backup item.
15593type MabFileFolderProtectedItem struct {
15594	// FriendlyName - Friendly name of this backup item.
15595	FriendlyName *string `json:"friendlyName,omitempty"`
15596	// ComputerName - Name of the computer associated with this backup item.
15597	ComputerName *string `json:"computerName,omitempty"`
15598	// LastBackupStatus - Status of last backup operation.
15599	LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15600	// LastBackupTime - Timestamp of the last backup operation on this backup item.
15601	LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
15602	// ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError
15603	ProtectionState *string `json:"protectionState,omitempty"`
15604	// DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC
15605	DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
15606	// ExtendedInfo - Additional information with this backup item.
15607	ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
15608	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
15609	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15610	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
15611	WorkloadType DataSourceType `json:"workloadType,omitempty"`
15612	// ContainerName - Unique name of container
15613	ContainerName *string `json:"containerName,omitempty"`
15614	// SourceResourceID - ARM ID of the resource to be backed up.
15615	SourceResourceID *string `json:"sourceResourceId,omitempty"`
15616	// PolicyID - ID of the backup policy with which this item is backed up.
15617	PolicyID *string `json:"policyId,omitempty"`
15618	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
15619	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
15620	// BackupSetName - Name of the backup set the backup item belongs to
15621	BackupSetName *string `json:"backupSetName,omitempty"`
15622	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
15623	CreateMode CreateMode `json:"createMode,omitempty"`
15624	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
15625	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
15626	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
15627	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
15628	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
15629	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
15630	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
15631	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
15632	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
15633	IsRehydrate *bool `json:"isRehydrate,omitempty"`
15634	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
15635	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
15636}
15637
15638// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem.
15639func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
15640	mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
15641	objectMap := make(map[string]interface{})
15642	if mffpi.FriendlyName != nil {
15643		objectMap["friendlyName"] = mffpi.FriendlyName
15644	}
15645	if mffpi.ComputerName != nil {
15646		objectMap["computerName"] = mffpi.ComputerName
15647	}
15648	if mffpi.LastBackupStatus != nil {
15649		objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
15650	}
15651	if mffpi.LastBackupTime != nil {
15652		objectMap["lastBackupTime"] = mffpi.LastBackupTime
15653	}
15654	if mffpi.ProtectionState != nil {
15655		objectMap["protectionState"] = mffpi.ProtectionState
15656	}
15657	if mffpi.DeferredDeleteSyncTimeInUTC != nil {
15658		objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
15659	}
15660	if mffpi.ExtendedInfo != nil {
15661		objectMap["extendedInfo"] = mffpi.ExtendedInfo
15662	}
15663	if mffpi.BackupManagementType != "" {
15664		objectMap["backupManagementType"] = mffpi.BackupManagementType
15665	}
15666	if mffpi.WorkloadType != "" {
15667		objectMap["workloadType"] = mffpi.WorkloadType
15668	}
15669	if mffpi.ContainerName != nil {
15670		objectMap["containerName"] = mffpi.ContainerName
15671	}
15672	if mffpi.SourceResourceID != nil {
15673		objectMap["sourceResourceId"] = mffpi.SourceResourceID
15674	}
15675	if mffpi.PolicyID != nil {
15676		objectMap["policyId"] = mffpi.PolicyID
15677	}
15678	if mffpi.LastRecoveryPoint != nil {
15679		objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
15680	}
15681	if mffpi.BackupSetName != nil {
15682		objectMap["backupSetName"] = mffpi.BackupSetName
15683	}
15684	if mffpi.CreateMode != "" {
15685		objectMap["createMode"] = mffpi.CreateMode
15686	}
15687	if mffpi.DeferredDeleteTimeInUTC != nil {
15688		objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
15689	}
15690	if mffpi.IsScheduledForDeferredDelete != nil {
15691		objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
15692	}
15693	if mffpi.DeferredDeleteTimeRemaining != nil {
15694		objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
15695	}
15696	if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
15697		objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
15698	}
15699	if mffpi.IsRehydrate != nil {
15700		objectMap["isRehydrate"] = mffpi.IsRehydrate
15701	}
15702	if mffpi.ProtectedItemType != "" {
15703		objectMap["protectedItemType"] = mffpi.ProtectedItemType
15704	}
15705	return json.Marshal(objectMap)
15706}
15707
15708// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15709func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15710	return nil, false
15711}
15712
15713// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15714func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15715	return nil, false
15716}
15717
15718// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15719func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15720	return nil, false
15721}
15722
15723// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15724func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15725	return nil, false
15726}
15727
15728// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15729func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15730	return nil, false
15731}
15732
15733// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15734func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15735	return nil, false
15736}
15737
15738// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15739func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15740	return nil, false
15741}
15742
15743// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15744func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15745	return nil, false
15746}
15747
15748// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15749func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15750	return nil, false
15751}
15752
15753// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15754func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15755	return nil, false
15756}
15757
15758// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15759func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15760	return nil, false
15761}
15762
15763// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15764func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15765	return nil, false
15766}
15767
15768// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15769func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15770	return nil, false
15771}
15772
15773// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15774func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15775	return &mffpi, true
15776}
15777
15778// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15779func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
15780	return nil, false
15781}
15782
15783// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem.
15784func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
15785	return &mffpi, true
15786}
15787
15788// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item.
15789type MabFileFolderProtectedItemExtendedInfo struct {
15790	// LastRefreshedAt - Last time when the agent data synced to service.
15791	LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15792	// OldestRecoveryPoint - The oldest backup copy available.
15793	OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
15794	// RecoveryPointCount - Number of backup copies associated with the backup item.
15795	RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
15796}
15797
15798// MabJob MAB workload-specific job.
15799type MabJob struct {
15800	// Duration - Time taken by job to run.
15801	Duration *string `json:"duration,omitempty"`
15802	// ActionsInfo - The state/actions applicable on jobs like cancel/retry.
15803	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
15804	// MabServerName - Name of server protecting the DS.
15805	MabServerName *string `json:"mabServerName,omitempty"`
15806	// MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer'
15807	MabServerType MabServerType `json:"mabServerType,omitempty"`
15808	// WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
15809	WorkloadType WorkloadType `json:"workloadType,omitempty"`
15810	// ErrorDetails - The errors.
15811	ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
15812	// ExtendedInfo - Additional information on the job.
15813	ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
15814	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
15815	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
15816	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
15817	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15818	// Operation - The operation name.
15819	Operation *string `json:"operation,omitempty"`
15820	// Status - Job status.
15821	Status *string `json:"status,omitempty"`
15822	// StartTime - The start time.
15823	StartTime *date.Time `json:"startTime,omitempty"`
15824	// EndTime - The end time.
15825	EndTime *date.Time `json:"endTime,omitempty"`
15826	// ActivityID - ActivityId of job.
15827	ActivityID *string `json:"activityId,omitempty"`
15828	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
15829	JobType JobType `json:"jobType,omitempty"`
15830}
15831
15832// MarshalJSON is the custom marshaler for MabJob.
15833func (mj MabJob) MarshalJSON() ([]byte, error) {
15834	mj.JobType = JobTypeMabJob
15835	objectMap := make(map[string]interface{})
15836	if mj.Duration != nil {
15837		objectMap["duration"] = mj.Duration
15838	}
15839	if mj.ActionsInfo != nil {
15840		objectMap["actionsInfo"] = mj.ActionsInfo
15841	}
15842	if mj.MabServerName != nil {
15843		objectMap["mabServerName"] = mj.MabServerName
15844	}
15845	if mj.MabServerType != "" {
15846		objectMap["mabServerType"] = mj.MabServerType
15847	}
15848	if mj.WorkloadType != "" {
15849		objectMap["workloadType"] = mj.WorkloadType
15850	}
15851	if mj.ErrorDetails != nil {
15852		objectMap["errorDetails"] = mj.ErrorDetails
15853	}
15854	if mj.ExtendedInfo != nil {
15855		objectMap["extendedInfo"] = mj.ExtendedInfo
15856	}
15857	if mj.EntityFriendlyName != nil {
15858		objectMap["entityFriendlyName"] = mj.EntityFriendlyName
15859	}
15860	if mj.BackupManagementType != "" {
15861		objectMap["backupManagementType"] = mj.BackupManagementType
15862	}
15863	if mj.Operation != nil {
15864		objectMap["operation"] = mj.Operation
15865	}
15866	if mj.Status != nil {
15867		objectMap["status"] = mj.Status
15868	}
15869	if mj.StartTime != nil {
15870		objectMap["startTime"] = mj.StartTime
15871	}
15872	if mj.EndTime != nil {
15873		objectMap["endTime"] = mj.EndTime
15874	}
15875	if mj.ActivityID != nil {
15876		objectMap["activityId"] = mj.ActivityID
15877	}
15878	if mj.JobType != "" {
15879		objectMap["jobType"] = mj.JobType
15880	}
15881	return json.Marshal(objectMap)
15882}
15883
15884// AsAzureIaaSVMJob is the BasicJob implementation for MabJob.
15885func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
15886	return nil, false
15887}
15888
15889// AsAzureStorageJob is the BasicJob implementation for MabJob.
15890func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
15891	return nil, false
15892}
15893
15894// AsAzureWorkloadJob is the BasicJob implementation for MabJob.
15895func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
15896	return nil, false
15897}
15898
15899// AsDpmJob is the BasicJob implementation for MabJob.
15900func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
15901	return nil, false
15902}
15903
15904// AsMabJob is the BasicJob implementation for MabJob.
15905func (mj MabJob) AsMabJob() (*MabJob, bool) {
15906	return &mj, true
15907}
15908
15909// AsVaultJob is the BasicJob implementation for MabJob.
15910func (mj MabJob) AsVaultJob() (*VaultJob, bool) {
15911	return nil, false
15912}
15913
15914// AsJob is the BasicJob implementation for MabJob.
15915func (mj MabJob) AsJob() (*Job, bool) {
15916	return nil, false
15917}
15918
15919// AsBasicJob is the BasicJob implementation for MabJob.
15920func (mj MabJob) AsBasicJob() (BasicJob, bool) {
15921	return &mj, true
15922}
15923
15924// MabJobExtendedInfo additional information for the MAB workload-specific job.
15925type MabJobExtendedInfo struct {
15926	// TasksList - List of tasks for this job.
15927	TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
15928	// PropertyBag - The job properties.
15929	PropertyBag map[string]*string `json:"propertyBag"`
15930	// DynamicErrorMessage - Non localized error message specific to this job.
15931	DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
15932}
15933
15934// MarshalJSON is the custom marshaler for MabJobExtendedInfo.
15935func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
15936	objectMap := make(map[string]interface{})
15937	if mjei.TasksList != nil {
15938		objectMap["tasksList"] = mjei.TasksList
15939	}
15940	if mjei.PropertyBag != nil {
15941		objectMap["propertyBag"] = mjei.PropertyBag
15942	}
15943	if mjei.DynamicErrorMessage != nil {
15944		objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
15945	}
15946	return json.Marshal(objectMap)
15947}
15948
15949// MabJobTaskDetails MAB workload-specific job task details.
15950type MabJobTaskDetails struct {
15951	// TaskID - The task display name.
15952	TaskID *string `json:"taskId,omitempty"`
15953	// StartTime - The start time.
15954	StartTime *date.Time `json:"startTime,omitempty"`
15955	// EndTime - The end time.
15956	EndTime *date.Time `json:"endTime,omitempty"`
15957	// Duration - Time elapsed for task.
15958	Duration *string `json:"duration,omitempty"`
15959	// Status - The status.
15960	Status *string `json:"status,omitempty"`
15961}
15962
15963// MabProtectionPolicy mab container-specific backup policy.
15964type MabProtectionPolicy struct {
15965	// SchedulePolicy - Backup schedule of backup policy.
15966	SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
15967	// RetentionPolicy - Retention policy details.
15968	RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
15969	// ProtectedItemsCount - Number of items associated with this policy.
15970	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
15971	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
15972	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
15973}
15974
15975// MarshalJSON is the custom marshaler for MabProtectionPolicy.
15976func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
15977	mpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB
15978	objectMap := make(map[string]interface{})
15979	objectMap["schedulePolicy"] = mpp.SchedulePolicy
15980	objectMap["retentionPolicy"] = mpp.RetentionPolicy
15981	if mpp.ProtectedItemsCount != nil {
15982		objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
15983	}
15984	if mpp.BackupManagementType != "" {
15985		objectMap["backupManagementType"] = mpp.BackupManagementType
15986	}
15987	return json.Marshal(objectMap)
15988}
15989
15990// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
15991func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
15992	return nil, false
15993}
15994
15995// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
15996func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
15997	return nil, false
15998}
15999
16000// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16001func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16002	return nil, false
16003}
16004
16005// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16006func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16007	return nil, false
16008}
16009
16010// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16011func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16012	return nil, false
16013}
16014
16015// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16016func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16017	return &mpp, true
16018}
16019
16020// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16021func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16022	return nil, false
16023}
16024
16025// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy.
16026func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16027	return &mpp, true
16028}
16029
16030// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct.
16031func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
16032	var m map[string]*json.RawMessage
16033	err := json.Unmarshal(body, &m)
16034	if err != nil {
16035		return err
16036	}
16037	for k, v := range m {
16038		switch k {
16039		case "schedulePolicy":
16040			if v != nil {
16041				schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
16042				if err != nil {
16043					return err
16044				}
16045				mpp.SchedulePolicy = schedulePolicy
16046			}
16047		case "retentionPolicy":
16048			if v != nil {
16049				retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
16050				if err != nil {
16051					return err
16052				}
16053				mpp.RetentionPolicy = retentionPolicy
16054			}
16055		case "protectedItemsCount":
16056			if v != nil {
16057				var protectedItemsCount int32
16058				err = json.Unmarshal(*v, &protectedItemsCount)
16059				if err != nil {
16060					return err
16061				}
16062				mpp.ProtectedItemsCount = &protectedItemsCount
16063			}
16064		case "backupManagementType":
16065			if v != nil {
16066				var backupManagementType ManagementTypeBasicProtectionPolicy
16067				err = json.Unmarshal(*v, &backupManagementType)
16068				if err != nil {
16069					return err
16070				}
16071				mpp.BackupManagementType = backupManagementType
16072			}
16073		}
16074	}
16075
16076	return nil
16077}
16078
16079// ManagementUsage backup management usages of a vault.
16080type ManagementUsage struct {
16081	// Unit - Unit of the usage. Possible values include: 'UsagesUnitCount', 'UsagesUnitBytes', 'UsagesUnitSeconds', 'UsagesUnitPercent', 'UsagesUnitCountPerSecond', 'UsagesUnitBytesPerSecond'
16082	Unit UsagesUnit `json:"unit,omitempty"`
16083	// QuotaPeriod - Quota period of usage.
16084	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
16085	// NextResetTime - Next reset time of usage.
16086	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
16087	// CurrentValue - Current value of usage.
16088	CurrentValue *int64 `json:"currentValue,omitempty"`
16089	// Limit - Limit of usage.
16090	Limit *int64 `json:"limit,omitempty"`
16091	// Name - Name of usage.
16092	Name *NameInfo `json:"name,omitempty"`
16093}
16094
16095// ManagementUsageList backup management usage for vault.
16096type ManagementUsageList struct {
16097	autorest.Response `json:"-"`
16098	// Value - The list of backup management usages for the given vault.
16099	Value *[]ManagementUsage `json:"value,omitempty"`
16100}
16101
16102// MonthlyRetentionSchedule monthly retention schedule.
16103type MonthlyRetentionSchedule struct {
16104	// RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly'
16105	RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
16106	// RetentionScheduleDaily - Daily retention format for monthly retention policy.
16107	RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
16108	// RetentionScheduleWeekly - Weekly retention format for monthly retention policy.
16109	RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
16110	// RetentionTimes - Retention times of retention policy.
16111	RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
16112	// RetentionDuration - Retention duration of retention Policy.
16113	RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
16114}
16115
16116// MoveRecoveryPointFuture an abstraction for monitoring and retrieving the results of a long-running
16117// operation.
16118type MoveRecoveryPointFuture struct {
16119	azure.FutureAPI
16120	// Result returns the result of the asynchronous operation.
16121	// If the operation has not completed it will return an error.
16122	Result func(BaseClient) (autorest.Response, error)
16123}
16124
16125// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16126func (future *MoveRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16127	var azFuture azure.Future
16128	if err := json.Unmarshal(body, &azFuture); err != nil {
16129		return err
16130	}
16131	future.FutureAPI = &azFuture
16132	future.Result = future.result
16133	return nil
16134}
16135
16136// result is the default implementation for MoveRecoveryPointFuture.Result.
16137func (future *MoveRecoveryPointFuture) result(client BaseClient) (ar autorest.Response, err error) {
16138	var done bool
16139	done, err = future.DoneWithContext(context.Background(), client)
16140	if err != nil {
16141		err = autorest.NewErrorWithError(err, "backup.MoveRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16142		return
16143	}
16144	if !done {
16145		ar.Response = future.Response()
16146		err = azure.NewAsyncOpIncompleteError("backup.MoveRecoveryPointFuture")
16147		return
16148	}
16149	ar.Response = future.Response()
16150	return
16151}
16152
16153// MoveRPAcrossTiersRequest ...
16154type MoveRPAcrossTiersRequest struct {
16155	// ObjectType - Gets the class type.
16156	ObjectType *string `json:"objectType,omitempty"`
16157	// SourceTierType - Source tier from where RP needs to be moved. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP', 'RecoveryPointTierTypeArchivedRP'
16158	SourceTierType RecoveryPointTierType `json:"sourceTierType,omitempty"`
16159	// TargetTierType - Target tier where RP needs to be moved. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP', 'RecoveryPointTierTypeArchivedRP'
16160	TargetTierType RecoveryPointTierType `json:"targetTierType,omitempty"`
16161}
16162
16163// NameInfo the name of usage.
16164type NameInfo struct {
16165	// Value - Value of usage.
16166	Value *string `json:"value,omitempty"`
16167	// LocalizedValue - Localized value of usage.
16168	LocalizedValue *string `json:"localizedValue,omitempty"`
16169}
16170
16171// NewErrorResponse the resource management error response.
16172type NewErrorResponse struct {
16173	// Error - The error object.
16174	Error *NewErrorResponseError `json:"error,omitempty"`
16175}
16176
16177// NewErrorResponseError the error object.
16178type NewErrorResponseError struct {
16179	// Code - READ-ONLY; The error code.
16180	Code *string `json:"code,omitempty"`
16181	// Message - READ-ONLY; The error message.
16182	Message *string `json:"message,omitempty"`
16183	// Target - READ-ONLY; The error target.
16184	Target *string `json:"target,omitempty"`
16185	// Details - READ-ONLY; The error details.
16186	Details *[]NewErrorResponse `json:"details,omitempty"`
16187	// AdditionalInfo - READ-ONLY; The error additional info.
16188	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
16189}
16190
16191// MarshalJSON is the custom marshaler for NewErrorResponseError.
16192func (ner NewErrorResponseError) MarshalJSON() ([]byte, error) {
16193	objectMap := make(map[string]interface{})
16194	return json.Marshal(objectMap)
16195}
16196
16197// OperationResultInfo operation result info.
16198type OperationResultInfo struct {
16199	// JobList - List of jobs created by this operation.
16200	JobList *[]string `json:"jobList,omitempty"`
16201	// ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo'
16202	ObjectType ObjectType `json:"objectType,omitempty"`
16203}
16204
16205// MarshalJSON is the custom marshaler for OperationResultInfo.
16206func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
16207	ori.ObjectType = ObjectTypeOperationResultInfo
16208	objectMap := make(map[string]interface{})
16209	if ori.JobList != nil {
16210		objectMap["jobList"] = ori.JobList
16211	}
16212	if ori.ObjectType != "" {
16213		objectMap["objectType"] = ori.ObjectType
16214	}
16215	return json.Marshal(objectMap)
16216}
16217
16218// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo.
16219func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16220	return nil, false
16221}
16222
16223// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo.
16224func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
16225	return &ori, true
16226}
16227
16228// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo.
16229func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16230	return nil, false
16231}
16232
16233// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo.
16234func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16235	return &ori, true
16236}
16237
16238// BasicOperationResultInfoBase base class for operation result info.
16239type BasicOperationResultInfoBase interface {
16240	AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
16241	AsOperationResultInfo() (*OperationResultInfo, bool)
16242	AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
16243}
16244
16245// OperationResultInfoBase base class for operation result info.
16246type OperationResultInfoBase struct {
16247	// ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo'
16248	ObjectType ObjectType `json:"objectType,omitempty"`
16249}
16250
16251func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
16252	var m map[string]interface{}
16253	err := json.Unmarshal(body, &m)
16254	if err != nil {
16255		return nil, err
16256	}
16257
16258	switch m["objectType"] {
16259	case string(ObjectTypeExportJobsOperationResultInfo):
16260		var ejori ExportJobsOperationResultInfo
16261		err := json.Unmarshal(body, &ejori)
16262		return ejori, err
16263	case string(ObjectTypeOperationResultInfo):
16264		var ori OperationResultInfo
16265		err := json.Unmarshal(body, &ori)
16266		return ori, err
16267	default:
16268		var orib OperationResultInfoBase
16269		err := json.Unmarshal(body, &orib)
16270		return orib, err
16271	}
16272}
16273func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
16274	var rawMessages []*json.RawMessage
16275	err := json.Unmarshal(body, &rawMessages)
16276	if err != nil {
16277		return nil, err
16278	}
16279
16280	oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
16281
16282	for index, rawMessage := range rawMessages {
16283		orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
16284		if err != nil {
16285			return nil, err
16286		}
16287		oribArray[index] = orib
16288	}
16289	return oribArray, nil
16290}
16291
16292// MarshalJSON is the custom marshaler for OperationResultInfoBase.
16293func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
16294	orib.ObjectType = ObjectTypeOperationResultInfoBase
16295	objectMap := make(map[string]interface{})
16296	if orib.ObjectType != "" {
16297		objectMap["objectType"] = orib.ObjectType
16298	}
16299	return json.Marshal(objectMap)
16300}
16301
16302// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase.
16303func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16304	return nil, false
16305}
16306
16307// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase.
16308func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
16309	return nil, false
16310}
16311
16312// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase.
16313func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16314	return &orib, true
16315}
16316
16317// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase.
16318func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16319	return &orib, true
16320}
16321
16322// OperationResultInfoBaseResource base class for operation result info.
16323type OperationResultInfoBaseResource struct {
16324	autorest.Response `json:"-"`
16325	// Operation - OperationResultInfoBaseResource operation
16326	Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
16327	// StatusCode - HTTP Status Code of the operation. Possible values include: 'HTTPStatusCodeContinue', 'HTTPStatusCodeSwitchingProtocols', 'HTTPStatusCodeOK', 'HTTPStatusCodeCreated', 'HTTPStatusCodeAccepted', 'HTTPStatusCodeNonAuthoritativeInformation', 'HTTPStatusCodeNoContent', 'HTTPStatusCodeResetContent', 'HTTPStatusCodePartialContent', 'HTTPStatusCodeMultipleChoices', 'HTTPStatusCodeAmbiguous', 'HTTPStatusCodeMovedPermanently', 'HTTPStatusCodeMoved', 'HTTPStatusCodeFound', 'HTTPStatusCodeRedirect', 'HTTPStatusCodeSeeOther', 'HTTPStatusCodeRedirectMethod', 'HTTPStatusCodeNotModified', 'HTTPStatusCodeUseProxy', 'HTTPStatusCodeUnused', 'HTTPStatusCodeTemporaryRedirect', 'HTTPStatusCodeRedirectKeepVerb', 'HTTPStatusCodeBadRequest', 'HTTPStatusCodeUnauthorized', 'HTTPStatusCodePaymentRequired', 'HTTPStatusCodeForbidden', 'HTTPStatusCodeNotFound', 'HTTPStatusCodeMethodNotAllowed', 'HTTPStatusCodeNotAcceptable', 'HTTPStatusCodeProxyAuthenticationRequired', 'HTTPStatusCodeRequestTimeout', 'HTTPStatusCodeConflict', 'HTTPStatusCodeGone', 'HTTPStatusCodeLengthRequired', 'HTTPStatusCodePreconditionFailed', 'HTTPStatusCodeRequestEntityTooLarge', 'HTTPStatusCodeRequestURITooLong', 'HTTPStatusCodeUnsupportedMediaType', 'HTTPStatusCodeRequestedRangeNotSatisfiable', 'HTTPStatusCodeExpectationFailed', 'HTTPStatusCodeUpgradeRequired', 'HTTPStatusCodeInternalServerError', 'HTTPStatusCodeNotImplemented', 'HTTPStatusCodeBadGateway', 'HTTPStatusCodeServiceUnavailable', 'HTTPStatusCodeGatewayTimeout', 'HTTPStatusCodeHTTPVersionNotSupported'
16328	StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16329	// Headers - HTTP headers associated with this operation.
16330	Headers map[string][]string `json:"headers"`
16331}
16332
16333// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource.
16334func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
16335	objectMap := make(map[string]interface{})
16336	objectMap["operation"] = oribr.Operation
16337	if oribr.StatusCode != "" {
16338		objectMap["statusCode"] = oribr.StatusCode
16339	}
16340	if oribr.Headers != nil {
16341		objectMap["headers"] = oribr.Headers
16342	}
16343	return json.Marshal(objectMap)
16344}
16345
16346// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct.
16347func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
16348	var m map[string]*json.RawMessage
16349	err := json.Unmarshal(body, &m)
16350	if err != nil {
16351		return err
16352	}
16353	for k, v := range m {
16354		switch k {
16355		case "operation":
16356			if v != nil {
16357				operation, err := unmarshalBasicOperationResultInfoBase(*v)
16358				if err != nil {
16359					return err
16360				}
16361				oribr.Operation = operation
16362			}
16363		case "statusCode":
16364			if v != nil {
16365				var statusCode HTTPStatusCode
16366				err = json.Unmarshal(*v, &statusCode)
16367				if err != nil {
16368					return err
16369				}
16370				oribr.StatusCode = statusCode
16371			}
16372		case "headers":
16373			if v != nil {
16374				var headers map[string][]string
16375				err = json.Unmarshal(*v, &headers)
16376				if err != nil {
16377					return err
16378				}
16379				oribr.Headers = headers
16380			}
16381		}
16382	}
16383
16384	return nil
16385}
16386
16387// OperationStatus operation status.
16388type OperationStatus struct {
16389	autorest.Response `json:"-"`
16390	// ID - ID of the operation.
16391	ID *string `json:"id,omitempty"`
16392	// Name - Name of the operation.
16393	Name *string `json:"name,omitempty"`
16394	// Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled'
16395	Status OperationStatusValues `json:"status,omitempty"`
16396	// StartTime - Operation start time. Format: ISO-8601.
16397	StartTime *date.Time `json:"startTime,omitempty"`
16398	// EndTime - Operation end time. Format: ISO-8601.
16399	EndTime *date.Time `json:"endTime,omitempty"`
16400	// Error - Error information related to this operation.
16401	Error *OperationStatusError `json:"error,omitempty"`
16402	// Properties - Additional information associated with this operation.
16403	Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
16404}
16405
16406// UnmarshalJSON is the custom unmarshaler for OperationStatus struct.
16407func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
16408	var m map[string]*json.RawMessage
16409	err := json.Unmarshal(body, &m)
16410	if err != nil {
16411		return err
16412	}
16413	for k, v := range m {
16414		switch k {
16415		case "id":
16416			if v != nil {
16417				var ID string
16418				err = json.Unmarshal(*v, &ID)
16419				if err != nil {
16420					return err
16421				}
16422				osVar.ID = &ID
16423			}
16424		case "name":
16425			if v != nil {
16426				var name string
16427				err = json.Unmarshal(*v, &name)
16428				if err != nil {
16429					return err
16430				}
16431				osVar.Name = &name
16432			}
16433		case "status":
16434			if v != nil {
16435				var status OperationStatusValues
16436				err = json.Unmarshal(*v, &status)
16437				if err != nil {
16438					return err
16439				}
16440				osVar.Status = status
16441			}
16442		case "startTime":
16443			if v != nil {
16444				var startTime date.Time
16445				err = json.Unmarshal(*v, &startTime)
16446				if err != nil {
16447					return err
16448				}
16449				osVar.StartTime = &startTime
16450			}
16451		case "endTime":
16452			if v != nil {
16453				var endTime date.Time
16454				err = json.Unmarshal(*v, &endTime)
16455				if err != nil {
16456					return err
16457				}
16458				osVar.EndTime = &endTime
16459			}
16460		case "error":
16461			if v != nil {
16462				var errorVar OperationStatusError
16463				err = json.Unmarshal(*v, &errorVar)
16464				if err != nil {
16465					return err
16466				}
16467				osVar.Error = &errorVar
16468			}
16469		case "properties":
16470			if v != nil {
16471				properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
16472				if err != nil {
16473					return err
16474				}
16475				osVar.Properties = properties
16476			}
16477		}
16478	}
16479
16480	return nil
16481}
16482
16483// OperationStatusError error information associated with operation status call.
16484type OperationStatusError struct {
16485	// Code - Error code of the operation failure.
16486	Code *string `json:"code,omitempty"`
16487	// Message - Error message displayed if the operation failure.
16488	Message *string `json:"message,omitempty"`
16489}
16490
16491// BasicOperationStatusExtendedInfo base class for additional information of operation status.
16492type BasicOperationStatusExtendedInfo interface {
16493	AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
16494	AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
16495	AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
16496	AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool)
16497	AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
16498}
16499
16500// OperationStatusExtendedInfo base class for additional information of operation status.
16501type OperationStatusExtendedInfo struct {
16502	// ObjectType - Possible values include: 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo'
16503	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16504}
16505
16506func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
16507	var m map[string]interface{}
16508	err := json.Unmarshal(body, &m)
16509	if err != nil {
16510		return nil, err
16511	}
16512
16513	switch m["objectType"] {
16514	case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo):
16515		var osjei OperationStatusJobExtendedInfo
16516		err := json.Unmarshal(body, &osjei)
16517		return osjei, err
16518	case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo):
16519		var osjei OperationStatusJobsExtendedInfo
16520		err := json.Unmarshal(body, &osjei)
16521		return osjei, err
16522	case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo):
16523		var ospiei OperationStatusProvisionILRExtendedInfo
16524		err := json.Unmarshal(body, &ospiei)
16525		return ospiei, err
16526	case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo):
16527		var osrpei OperationStatusRecoveryPointExtendedInfo
16528		err := json.Unmarshal(body, &osrpei)
16529		return osrpei, err
16530	default:
16531		var osei OperationStatusExtendedInfo
16532		err := json.Unmarshal(body, &osei)
16533		return osei, err
16534	}
16535}
16536func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
16537	var rawMessages []*json.RawMessage
16538	err := json.Unmarshal(body, &rawMessages)
16539	if err != nil {
16540		return nil, err
16541	}
16542
16543	oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
16544
16545	for index, rawMessage := range rawMessages {
16546		osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
16547		if err != nil {
16548			return nil, err
16549		}
16550		oseiArray[index] = osei
16551	}
16552	return oseiArray, nil
16553}
16554
16555// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo.
16556func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
16557	osei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo
16558	objectMap := make(map[string]interface{})
16559	if osei.ObjectType != "" {
16560		objectMap["objectType"] = osei.ObjectType
16561	}
16562	return json.Marshal(objectMap)
16563}
16564
16565// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16566func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16567	return nil, false
16568}
16569
16570// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16571func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16572	return nil, false
16573}
16574
16575// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16576func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16577	return nil, false
16578}
16579
16580// AsOperationStatusRecoveryPointExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16581func (osei OperationStatusExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16582	return nil, false
16583}
16584
16585// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16586func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16587	return &osei, true
16588}
16589
16590// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo.
16591func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16592	return &osei, true
16593}
16594
16595// OperationStatusJobExtendedInfo operation status job extended info.
16596type OperationStatusJobExtendedInfo struct {
16597	// JobID - ID of the job created for this protected item.
16598	JobID *string `json:"jobId,omitempty"`
16599	// ObjectType - Possible values include: 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo'
16600	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16601}
16602
16603// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo.
16604func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
16605	osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo
16606	objectMap := make(map[string]interface{})
16607	if osjei.JobID != nil {
16608		objectMap["jobId"] = osjei.JobID
16609	}
16610	if osjei.ObjectType != "" {
16611		objectMap["objectType"] = osjei.ObjectType
16612	}
16613	return json.Marshal(objectMap)
16614}
16615
16616// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16617func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16618	return &osjei, true
16619}
16620
16621// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16622func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16623	return nil, false
16624}
16625
16626// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16627func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16628	return nil, false
16629}
16630
16631// AsOperationStatusRecoveryPointExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16632func (osjei OperationStatusJobExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16633	return nil, false
16634}
16635
16636// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16637func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16638	return nil, false
16639}
16640
16641// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo.
16642func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16643	return &osjei, true
16644}
16645
16646// OperationStatusJobsExtendedInfo operation status extended info for list of jobs.
16647type OperationStatusJobsExtendedInfo struct {
16648	// JobIds - IDs of the jobs created for the protected item.
16649	JobIds *[]string `json:"jobIds,omitempty"`
16650	// FailedJobsError - Stores all the failed jobs along with the corresponding error codes.
16651	FailedJobsError map[string]*string `json:"failedJobsError"`
16652	// ObjectType - Possible values include: 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo'
16653	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16654}
16655
16656// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo.
16657func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
16658	osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo
16659	objectMap := make(map[string]interface{})
16660	if osjei.JobIds != nil {
16661		objectMap["jobIds"] = osjei.JobIds
16662	}
16663	if osjei.FailedJobsError != nil {
16664		objectMap["failedJobsError"] = osjei.FailedJobsError
16665	}
16666	if osjei.ObjectType != "" {
16667		objectMap["objectType"] = osjei.ObjectType
16668	}
16669	return json.Marshal(objectMap)
16670}
16671
16672// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16673func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16674	return nil, false
16675}
16676
16677// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16678func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16679	return &osjei, true
16680}
16681
16682// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16683func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16684	return nil, false
16685}
16686
16687// AsOperationStatusRecoveryPointExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16688func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16689	return nil, false
16690}
16691
16692// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16693func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16694	return nil, false
16695}
16696
16697// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo.
16698func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16699	return &osjei, true
16700}
16701
16702// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action.
16703type OperationStatusProvisionILRExtendedInfo struct {
16704	// RecoveryTarget - Target details for file / folder restore.
16705	RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
16706	// ObjectType - Possible values include: 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo'
16707	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16708}
16709
16710// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo.
16711func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
16712	ospiei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo
16713	objectMap := make(map[string]interface{})
16714	if ospiei.RecoveryTarget != nil {
16715		objectMap["recoveryTarget"] = ospiei.RecoveryTarget
16716	}
16717	if ospiei.ObjectType != "" {
16718		objectMap["objectType"] = ospiei.ObjectType
16719	}
16720	return json.Marshal(objectMap)
16721}
16722
16723// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16724func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16725	return nil, false
16726}
16727
16728// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16729func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16730	return nil, false
16731}
16732
16733// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16734func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16735	return &ospiei, true
16736}
16737
16738// AsOperationStatusRecoveryPointExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16739func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16740	return nil, false
16741}
16742
16743// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16744func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16745	return nil, false
16746}
16747
16748// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo.
16749func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16750	return &ospiei, true
16751}
16752
16753// OperationStatusRecoveryPointExtendedInfo operation status extended info for Updated Recovery Point.
16754type OperationStatusRecoveryPointExtendedInfo struct {
16755	// UpdatedRecoveryPoint - Recovery Point info with updated source snapshot URI
16756	UpdatedRecoveryPoint BasicRecoveryPoint `json:"updatedRecoveryPoint,omitempty"`
16757	// DeletedBackupItemVersion - In case the share is in soft-deleted state, populate this field with deleted backup item
16758	DeletedBackupItemVersion *string `json:"deletedBackupItemVersion,omitempty"`
16759	// ObjectType - Possible values include: 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo', 'ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo'
16760	ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16761}
16762
16763// MarshalJSON is the custom marshaler for OperationStatusRecoveryPointExtendedInfo.
16764func (osrpei OperationStatusRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
16765	osrpei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo
16766	objectMap := make(map[string]interface{})
16767	objectMap["updatedRecoveryPoint"] = osrpei.UpdatedRecoveryPoint
16768	if osrpei.DeletedBackupItemVersion != nil {
16769		objectMap["deletedBackupItemVersion"] = osrpei.DeletedBackupItemVersion
16770	}
16771	if osrpei.ObjectType != "" {
16772		objectMap["objectType"] = osrpei.ObjectType
16773	}
16774	return json.Marshal(objectMap)
16775}
16776
16777// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16778func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16779	return nil, false
16780}
16781
16782// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16783func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16784	return nil, false
16785}
16786
16787// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16788func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16789	return nil, false
16790}
16791
16792// AsOperationStatusRecoveryPointExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16793func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16794	return &osrpei, true
16795}
16796
16797// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16798func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16799	return nil, false
16800}
16801
16802// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusRecoveryPointExtendedInfo.
16803func (osrpei OperationStatusRecoveryPointExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16804	return &osrpei, true
16805}
16806
16807// UnmarshalJSON is the custom unmarshaler for OperationStatusRecoveryPointExtendedInfo struct.
16808func (osrpei *OperationStatusRecoveryPointExtendedInfo) UnmarshalJSON(body []byte) error {
16809	var m map[string]*json.RawMessage
16810	err := json.Unmarshal(body, &m)
16811	if err != nil {
16812		return err
16813	}
16814	for k, v := range m {
16815		switch k {
16816		case "updatedRecoveryPoint":
16817			if v != nil {
16818				updatedRecoveryPoint, err := unmarshalBasicRecoveryPoint(*v)
16819				if err != nil {
16820					return err
16821				}
16822				osrpei.UpdatedRecoveryPoint = updatedRecoveryPoint
16823			}
16824		case "deletedBackupItemVersion":
16825			if v != nil {
16826				var deletedBackupItemVersion string
16827				err = json.Unmarshal(*v, &deletedBackupItemVersion)
16828				if err != nil {
16829					return err
16830				}
16831				osrpei.DeletedBackupItemVersion = &deletedBackupItemVersion
16832			}
16833		case "objectType":
16834			if v != nil {
16835				var objectType ObjectTypeBasicOperationStatusExtendedInfo
16836				err = json.Unmarshal(*v, &objectType)
16837				if err != nil {
16838					return err
16839				}
16840				osrpei.ObjectType = objectType
16841			}
16842		}
16843	}
16844
16845	return nil
16846}
16847
16848// OperationWorkerResponse this is the base class for operation result responses.
16849type OperationWorkerResponse struct {
16850	// StatusCode - HTTP Status Code of the operation. Possible values include: 'HTTPStatusCodeContinue', 'HTTPStatusCodeSwitchingProtocols', 'HTTPStatusCodeOK', 'HTTPStatusCodeCreated', 'HTTPStatusCodeAccepted', 'HTTPStatusCodeNonAuthoritativeInformation', 'HTTPStatusCodeNoContent', 'HTTPStatusCodeResetContent', 'HTTPStatusCodePartialContent', 'HTTPStatusCodeMultipleChoices', 'HTTPStatusCodeAmbiguous', 'HTTPStatusCodeMovedPermanently', 'HTTPStatusCodeMoved', 'HTTPStatusCodeFound', 'HTTPStatusCodeRedirect', 'HTTPStatusCodeSeeOther', 'HTTPStatusCodeRedirectMethod', 'HTTPStatusCodeNotModified', 'HTTPStatusCodeUseProxy', 'HTTPStatusCodeUnused', 'HTTPStatusCodeTemporaryRedirect', 'HTTPStatusCodeRedirectKeepVerb', 'HTTPStatusCodeBadRequest', 'HTTPStatusCodeUnauthorized', 'HTTPStatusCodePaymentRequired', 'HTTPStatusCodeForbidden', 'HTTPStatusCodeNotFound', 'HTTPStatusCodeMethodNotAllowed', 'HTTPStatusCodeNotAcceptable', 'HTTPStatusCodeProxyAuthenticationRequired', 'HTTPStatusCodeRequestTimeout', 'HTTPStatusCodeConflict', 'HTTPStatusCodeGone', 'HTTPStatusCodeLengthRequired', 'HTTPStatusCodePreconditionFailed', 'HTTPStatusCodeRequestEntityTooLarge', 'HTTPStatusCodeRequestURITooLong', 'HTTPStatusCodeUnsupportedMediaType', 'HTTPStatusCodeRequestedRangeNotSatisfiable', 'HTTPStatusCodeExpectationFailed', 'HTTPStatusCodeUpgradeRequired', 'HTTPStatusCodeInternalServerError', 'HTTPStatusCodeNotImplemented', 'HTTPStatusCodeBadGateway', 'HTTPStatusCodeServiceUnavailable', 'HTTPStatusCodeGatewayTimeout', 'HTTPStatusCodeHTTPVersionNotSupported'
16851	StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16852	// Headers - HTTP headers associated with this operation.
16853	Headers map[string][]string `json:"headers"`
16854}
16855
16856// MarshalJSON is the custom marshaler for OperationWorkerResponse.
16857func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
16858	objectMap := make(map[string]interface{})
16859	if owr.StatusCode != "" {
16860		objectMap["statusCode"] = owr.StatusCode
16861	}
16862	if owr.Headers != nil {
16863		objectMap["headers"] = owr.Headers
16864	}
16865	return json.Marshal(objectMap)
16866}
16867
16868// PointInTimeRange provides details for log ranges
16869type PointInTimeRange struct {
16870	// StartTime - Start time of the time range for log recovery.
16871	StartTime *date.Time `json:"startTime,omitempty"`
16872	// EndTime - End time of the time range for log recovery.
16873	EndTime *date.Time `json:"endTime,omitempty"`
16874}
16875
16876// PreBackupValidation pre-backup validation for Azure VM Workload provider.
16877type PreBackupValidation struct {
16878	// Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed'
16879	Status InquiryStatus `json:"status,omitempty"`
16880	// Code - Error code of protectable item
16881	Code *string `json:"code,omitempty"`
16882	// Message - Message corresponding to the error code for the protectable item
16883	Message *string `json:"message,omitempty"`
16884}
16885
16886// PrepareDataMoveRequest prepare DataMove Request
16887type PrepareDataMoveRequest struct {
16888	// TargetResourceID - ARM Id of target vault
16889	TargetResourceID *string `json:"targetResourceId,omitempty"`
16890	// TargetRegion - Target Region
16891	TargetRegion *string `json:"targetRegion,omitempty"`
16892	// DataMoveLevel - DataMove Level. Possible values include: 'DataMoveLevelInvalid', 'DataMoveLevelVault', 'DataMoveLevelContainer'
16893	DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
16894	// SourceContainerArmIds - Source Container ArmIds
16895	// This needs to be populated only if DataMoveLevel is set to container
16896	SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
16897	// IgnoreMoved - Ignore the artifacts which are already moved.
16898	IgnoreMoved *bool `json:"ignoreMoved,omitempty"`
16899}
16900
16901// PrepareDataMoveResponse prepare DataMove Response
16902type PrepareDataMoveResponse struct {
16903	// CorrelationID - Co-relationId for move operation
16904	CorrelationID *string `json:"correlationId,omitempty"`
16905	// SourceVaultProperties - Source Vault Properties
16906	SourceVaultProperties map[string]*string `json:"sourceVaultProperties"`
16907	// ObjectType - Possible values include: 'ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse', 'ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse'
16908	ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
16909}
16910
16911// MarshalJSON is the custom marshaler for PrepareDataMoveResponse.
16912func (pdmr PrepareDataMoveResponse) MarshalJSON() ([]byte, error) {
16913	pdmr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse
16914	objectMap := make(map[string]interface{})
16915	if pdmr.CorrelationID != nil {
16916		objectMap["correlationId"] = pdmr.CorrelationID
16917	}
16918	if pdmr.SourceVaultProperties != nil {
16919		objectMap["sourceVaultProperties"] = pdmr.SourceVaultProperties
16920	}
16921	if pdmr.ObjectType != "" {
16922		objectMap["objectType"] = pdmr.ObjectType
16923	}
16924	return json.Marshal(objectMap)
16925}
16926
16927// AsPrepareDataMoveResponse is the BasicVaultStorageConfigOperationResultResponse implementation for PrepareDataMoveResponse.
16928func (pdmr PrepareDataMoveResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
16929	return &pdmr, true
16930}
16931
16932// AsVaultStorageConfigOperationResultResponse is the BasicVaultStorageConfigOperationResultResponse implementation for PrepareDataMoveResponse.
16933func (pdmr PrepareDataMoveResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
16934	return nil, false
16935}
16936
16937// AsBasicVaultStorageConfigOperationResultResponse is the BasicVaultStorageConfigOperationResultResponse implementation for PrepareDataMoveResponse.
16938func (pdmr PrepareDataMoveResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
16939	return &pdmr, true
16940}
16941
16942// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a
16943// given vault and given configuration.
16944// It will validate followings
16945// 1. Vault capacity
16946// 2. VM is already protected
16947// 3. Any VM related configuration passed in properties.
16948type PreValidateEnableBackupRequest struct {
16949	// ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
16950	ResourceType DataSourceType `json:"resourceType,omitempty"`
16951	// ResourceID - ARM Virtual Machine Id
16952	ResourceID *string `json:"resourceId,omitempty"`
16953	// VaultID - ARM id of the Recovery Services Vault
16954	VaultID *string `json:"vaultId,omitempty"`
16955	// Properties - Configuration of VM if any needs to be validated like OS type etc
16956	Properties *string `json:"properties,omitempty"`
16957}
16958
16959// PreValidateEnableBackupResponse response contract for enable backup validation request
16960type PreValidateEnableBackupResponse struct {
16961	autorest.Response `json:"-"`
16962	// Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed'
16963	Status ValidationStatus `json:"status,omitempty"`
16964	// ErrorCode - Response error code
16965	ErrorCode *string `json:"errorCode,omitempty"`
16966	// ErrorMessage - Response error message
16967	ErrorMessage *string `json:"errorMessage,omitempty"`
16968	// Recommendation - Recommended action for user
16969	Recommendation *string `json:"recommendation,omitempty"`
16970	// ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required
16971	// for portal
16972	ContainerName *string `json:"containerName,omitempty"`
16973	// ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal
16974	ProtectedItemName *string `json:"protectedItemName,omitempty"`
16975}
16976
16977// PrivateEndpoint the Private Endpoint network resource that is linked to the Private Endpoint connection
16978type PrivateEndpoint struct {
16979	// ID - Gets or sets id
16980	ID *string `json:"id,omitempty"`
16981}
16982
16983// PrivateEndpointConnection private Endpoint Connection Response Properties
16984type PrivateEndpointConnection struct {
16985	// ProvisioningState - Gets or sets provisioning state of the private endpoint connection. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStatePending'
16986	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16987	// PrivateEndpoint - Gets or sets private endpoint associated with the private endpoint connection
16988	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
16989	// PrivateLinkServiceConnectionState - Gets or sets private link service connection state
16990	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
16991}
16992
16993// PrivateEndpointConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a
16994// long-running operation.
16995type PrivateEndpointConnectionDeleteFuture struct {
16996	azure.FutureAPI
16997	// Result returns the result of the asynchronous operation.
16998	// If the operation has not completed it will return an error.
16999	Result func(PrivateEndpointConnectionClient) (autorest.Response, error)
17000}
17001
17002// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17003func (future *PrivateEndpointConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
17004	var azFuture azure.Future
17005	if err := json.Unmarshal(body, &azFuture); err != nil {
17006		return err
17007	}
17008	future.FutureAPI = &azFuture
17009	future.Result = future.result
17010	return nil
17011}
17012
17013// result is the default implementation for PrivateEndpointConnectionDeleteFuture.Result.
17014func (future *PrivateEndpointConnectionDeleteFuture) result(client PrivateEndpointConnectionClient) (ar autorest.Response, err error) {
17015	var done bool
17016	done, err = future.DoneWithContext(context.Background(), client)
17017	if err != nil {
17018		err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
17019		return
17020	}
17021	if !done {
17022		ar.Response = future.Response()
17023		err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionDeleteFuture")
17024		return
17025	}
17026	ar.Response = future.Response()
17027	return
17028}
17029
17030// PrivateEndpointConnectionPutFuture an abstraction for monitoring and retrieving the results of a
17031// long-running operation.
17032type PrivateEndpointConnectionPutFuture struct {
17033	azure.FutureAPI
17034	// Result returns the result of the asynchronous operation.
17035	// If the operation has not completed it will return an error.
17036	Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error)
17037}
17038
17039// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17040func (future *PrivateEndpointConnectionPutFuture) UnmarshalJSON(body []byte) error {
17041	var azFuture azure.Future
17042	if err := json.Unmarshal(body, &azFuture); err != nil {
17043		return err
17044	}
17045	future.FutureAPI = &azFuture
17046	future.Result = future.result
17047	return nil
17048}
17049
17050// result is the default implementation for PrivateEndpointConnectionPutFuture.Result.
17051func (future *PrivateEndpointConnectionPutFuture) result(client PrivateEndpointConnectionClient) (pecr PrivateEndpointConnectionResource, err error) {
17052	var done bool
17053	done, err = future.DoneWithContext(context.Background(), client)
17054	if err != nil {
17055		err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", future.Response(), "Polling failure")
17056		return
17057	}
17058	if !done {
17059		pecr.Response.Response = future.Response()
17060		err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionPutFuture")
17061		return
17062	}
17063	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17064	if pecr.Response.Response, err = future.GetResult(sender); err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
17065		pecr, err = client.PutResponder(pecr.Response.Response)
17066		if err != nil {
17067			err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", pecr.Response.Response, "Failure responding to request")
17068		}
17069	}
17070	return
17071}
17072
17073// PrivateEndpointConnectionResource private Endpoint Connection Response Properties
17074type PrivateEndpointConnectionResource struct {
17075	autorest.Response `json:"-"`
17076	// Properties - PrivateEndpointConnectionResource properties
17077	Properties *PrivateEndpointConnection `json:"properties,omitempty"`
17078	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
17079	ID *string `json:"id,omitempty"`
17080	// Name - READ-ONLY; Resource name associated with the resource.
17081	Name *string `json:"name,omitempty"`
17082	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
17083	Type *string `json:"type,omitempty"`
17084	// Location - Resource location.
17085	Location *string `json:"location,omitempty"`
17086	// Tags - Resource tags.
17087	Tags map[string]*string `json:"tags"`
17088	// ETag - Optional ETag.
17089	ETag *string `json:"eTag,omitempty"`
17090}
17091
17092// MarshalJSON is the custom marshaler for PrivateEndpointConnectionResource.
17093func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) {
17094	objectMap := make(map[string]interface{})
17095	if pecr.Properties != nil {
17096		objectMap["properties"] = pecr.Properties
17097	}
17098	if pecr.Location != nil {
17099		objectMap["location"] = pecr.Location
17100	}
17101	if pecr.Tags != nil {
17102		objectMap["tags"] = pecr.Tags
17103	}
17104	if pecr.ETag != nil {
17105		objectMap["eTag"] = pecr.ETag
17106	}
17107	return json.Marshal(objectMap)
17108}
17109
17110// PrivateLinkServiceConnectionState private Link Service Connection State
17111type PrivateLinkServiceConnectionState struct {
17112	// Status - Gets or sets the status. Possible values include: 'PrivateEndpointConnectionStatusPending', 'PrivateEndpointConnectionStatusApproved', 'PrivateEndpointConnectionStatusRejected', 'PrivateEndpointConnectionStatusDisconnected'
17113	Status PrivateEndpointConnectionStatus `json:"status,omitempty"`
17114	// Description - Gets or sets description
17115	Description *string `json:"description,omitempty"`
17116	// ActionRequired - Gets or sets actions required
17117	ActionRequired *string `json:"actionRequired,omitempty"`
17118}
17119
17120// BasicProtectableContainer protectable Container Class.
17121type BasicProtectableContainer interface {
17122	AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
17123	AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
17124	AsProtectableContainer() (*ProtectableContainer, bool)
17125}
17126
17127// ProtectableContainer protectable Container Class.
17128type ProtectableContainer struct {
17129	// FriendlyName - Friendly name of the container.
17130	FriendlyName *string `json:"friendlyName,omitempty"`
17131	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
17132	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17133	// HealthStatus - Status of health of the container.
17134	HealthStatus *string `json:"healthStatus,omitempty"`
17135	// ContainerID - Fabric Id of the container such as ARM Id.
17136	ContainerID *string `json:"containerId,omitempty"`
17137	// ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer'
17138	ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
17139}
17140
17141func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
17142	var m map[string]interface{}
17143	err := json.Unmarshal(body, &m)
17144	if err != nil {
17145		return nil, err
17146	}
17147
17148	switch m["protectableContainerType"] {
17149	case string(ProtectableContainerTypeStorageContainer):
17150		var aspc AzureStorageProtectableContainer
17151		err := json.Unmarshal(body, &aspc)
17152		return aspc, err
17153	case string(ProtectableContainerTypeVMAppContainer):
17154		var avacpc AzureVMAppContainerProtectableContainer
17155		err := json.Unmarshal(body, &avacpc)
17156		return avacpc, err
17157	default:
17158		var pc ProtectableContainer
17159		err := json.Unmarshal(body, &pc)
17160		return pc, err
17161	}
17162}
17163func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
17164	var rawMessages []*json.RawMessage
17165	err := json.Unmarshal(body, &rawMessages)
17166	if err != nil {
17167		return nil, err
17168	}
17169
17170	pcArray := make([]BasicProtectableContainer, len(rawMessages))
17171
17172	for index, rawMessage := range rawMessages {
17173		pc, err := unmarshalBasicProtectableContainer(*rawMessage)
17174		if err != nil {
17175			return nil, err
17176		}
17177		pcArray[index] = pc
17178	}
17179	return pcArray, nil
17180}
17181
17182// MarshalJSON is the custom marshaler for ProtectableContainer.
17183func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
17184	pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
17185	objectMap := make(map[string]interface{})
17186	if pc.FriendlyName != nil {
17187		objectMap["friendlyName"] = pc.FriendlyName
17188	}
17189	if pc.BackupManagementType != "" {
17190		objectMap["backupManagementType"] = pc.BackupManagementType
17191	}
17192	if pc.HealthStatus != nil {
17193		objectMap["healthStatus"] = pc.HealthStatus
17194	}
17195	if pc.ContainerID != nil {
17196		objectMap["containerId"] = pc.ContainerID
17197	}
17198	if pc.ProtectableContainerType != "" {
17199		objectMap["protectableContainerType"] = pc.ProtectableContainerType
17200	}
17201	return json.Marshal(objectMap)
17202}
17203
17204// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
17205func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
17206	return nil, false
17207}
17208
17209// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
17210func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
17211	return nil, false
17212}
17213
17214// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
17215func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
17216	return &pc, true
17217}
17218
17219// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer.
17220func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
17221	return &pc, true
17222}
17223
17224// ProtectableContainerResource protectable Container Class.
17225type ProtectableContainerResource struct {
17226	// Properties - ProtectableContainerResource properties
17227	Properties BasicProtectableContainer `json:"properties,omitempty"`
17228	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
17229	ID *string `json:"id,omitempty"`
17230	// Name - READ-ONLY; Resource name associated with the resource.
17231	Name *string `json:"name,omitempty"`
17232	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
17233	Type *string `json:"type,omitempty"`
17234	// Location - Resource location.
17235	Location *string `json:"location,omitempty"`
17236	// Tags - Resource tags.
17237	Tags map[string]*string `json:"tags"`
17238	// ETag - Optional ETag.
17239	ETag *string `json:"eTag,omitempty"`
17240}
17241
17242// MarshalJSON is the custom marshaler for ProtectableContainerResource.
17243func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
17244	objectMap := make(map[string]interface{})
17245	objectMap["properties"] = pcr.Properties
17246	if pcr.Location != nil {
17247		objectMap["location"] = pcr.Location
17248	}
17249	if pcr.Tags != nil {
17250		objectMap["tags"] = pcr.Tags
17251	}
17252	if pcr.ETag != nil {
17253		objectMap["eTag"] = pcr.ETag
17254	}
17255	return json.Marshal(objectMap)
17256}
17257
17258// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct.
17259func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
17260	var m map[string]*json.RawMessage
17261	err := json.Unmarshal(body, &m)
17262	if err != nil {
17263		return err
17264	}
17265	for k, v := range m {
17266		switch k {
17267		case "properties":
17268			if v != nil {
17269				properties, err := unmarshalBasicProtectableContainer(*v)
17270				if err != nil {
17271					return err
17272				}
17273				pcr.Properties = properties
17274			}
17275		case "id":
17276			if v != nil {
17277				var ID string
17278				err = json.Unmarshal(*v, &ID)
17279				if err != nil {
17280					return err
17281				}
17282				pcr.ID = &ID
17283			}
17284		case "name":
17285			if v != nil {
17286				var name string
17287				err = json.Unmarshal(*v, &name)
17288				if err != nil {
17289					return err
17290				}
17291				pcr.Name = &name
17292			}
17293		case "type":
17294			if v != nil {
17295				var typeVar string
17296				err = json.Unmarshal(*v, &typeVar)
17297				if err != nil {
17298					return err
17299				}
17300				pcr.Type = &typeVar
17301			}
17302		case "location":
17303			if v != nil {
17304				var location string
17305				err = json.Unmarshal(*v, &location)
17306				if err != nil {
17307					return err
17308				}
17309				pcr.Location = &location
17310			}
17311		case "tags":
17312			if v != nil {
17313				var tags map[string]*string
17314				err = json.Unmarshal(*v, &tags)
17315				if err != nil {
17316					return err
17317				}
17318				pcr.Tags = tags
17319			}
17320		case "eTag":
17321			if v != nil {
17322				var eTag string
17323				err = json.Unmarshal(*v, &eTag)
17324				if err != nil {
17325					return err
17326				}
17327				pcr.ETag = &eTag
17328			}
17329		}
17330	}
17331
17332	return nil
17333}
17334
17335// ProtectableContainerResourceList list of ProtectableContainer resources
17336type ProtectableContainerResourceList struct {
17337	autorest.Response `json:"-"`
17338	// Value - List of resources.
17339	Value *[]ProtectableContainerResource `json:"value,omitempty"`
17340	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
17341	NextLink *string `json:"nextLink,omitempty"`
17342}
17343
17344// ProtectableContainerResourceListIterator provides access to a complete listing of
17345// ProtectableContainerResource values.
17346type ProtectableContainerResourceListIterator struct {
17347	i    int
17348	page ProtectableContainerResourceListPage
17349}
17350
17351// NextWithContext advances to the next value.  If there was an error making
17352// the request the iterator does not advance and the error is returned.
17353func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17354	if tracing.IsEnabled() {
17355		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
17356		defer func() {
17357			sc := -1
17358			if iter.Response().Response.Response != nil {
17359				sc = iter.Response().Response.Response.StatusCode
17360			}
17361			tracing.EndSpan(ctx, sc, err)
17362		}()
17363	}
17364	iter.i++
17365	if iter.i < len(iter.page.Values()) {
17366		return nil
17367	}
17368	err = iter.page.NextWithContext(ctx)
17369	if err != nil {
17370		iter.i--
17371		return err
17372	}
17373	iter.i = 0
17374	return nil
17375}
17376
17377// Next advances to the next value.  If there was an error making
17378// the request the iterator does not advance and the error is returned.
17379// Deprecated: Use NextWithContext() instead.
17380func (iter *ProtectableContainerResourceListIterator) Next() error {
17381	return iter.NextWithContext(context.Background())
17382}
17383
17384// NotDone returns true if the enumeration should be started or is not yet complete.
17385func (iter ProtectableContainerResourceListIterator) NotDone() bool {
17386	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17387}
17388
17389// Response returns the raw server response from the last page request.
17390func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
17391	return iter.page.Response()
17392}
17393
17394// Value returns the current value or a zero-initialized value if the
17395// iterator has advanced beyond the end of the collection.
17396func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
17397	if !iter.page.NotDone() {
17398		return ProtectableContainerResource{}
17399	}
17400	return iter.page.Values()[iter.i]
17401}
17402
17403// Creates a new instance of the ProtectableContainerResourceListIterator type.
17404func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
17405	return ProtectableContainerResourceListIterator{page: page}
17406}
17407
17408// IsEmpty returns true if the ListResult contains no values.
17409func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
17410	return pcrl.Value == nil || len(*pcrl.Value) == 0
17411}
17412
17413// hasNextLink returns true if the NextLink is not empty.
17414func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
17415	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
17416}
17417
17418// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results.
17419// It returns nil if no more results exist.
17420func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
17421	if !pcrl.hasNextLink() {
17422		return nil, nil
17423	}
17424	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17425		autorest.AsJSON(),
17426		autorest.AsGet(),
17427		autorest.WithBaseURL(to.String(pcrl.NextLink)))
17428}
17429
17430// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values.
17431type ProtectableContainerResourceListPage struct {
17432	fn   func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
17433	pcrl ProtectableContainerResourceList
17434}
17435
17436// NextWithContext advances to the next page of values.  If there was an error making
17437// the request the page does not advance and the error is returned.
17438func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
17439	if tracing.IsEnabled() {
17440		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
17441		defer func() {
17442			sc := -1
17443			if page.Response().Response.Response != nil {
17444				sc = page.Response().Response.Response.StatusCode
17445			}
17446			tracing.EndSpan(ctx, sc, err)
17447		}()
17448	}
17449	for {
17450		next, err := page.fn(ctx, page.pcrl)
17451		if err != nil {
17452			return err
17453		}
17454		page.pcrl = next
17455		if !next.hasNextLink() || !next.IsEmpty() {
17456			break
17457		}
17458	}
17459	return nil
17460}
17461
17462// Next advances to the next page of values.  If there was an error making
17463// the request the page does not advance and the error is returned.
17464// Deprecated: Use NextWithContext() instead.
17465func (page *ProtectableContainerResourceListPage) Next() error {
17466	return page.NextWithContext(context.Background())
17467}
17468
17469// NotDone returns true if the page enumeration should be started or is not yet complete.
17470func (page ProtectableContainerResourceListPage) NotDone() bool {
17471	return !page.pcrl.IsEmpty()
17472}
17473
17474// Response returns the raw server response from the last page request.
17475func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
17476	return page.pcrl
17477}
17478
17479// Values returns the slice of values for the current page or nil if there are no values.
17480func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
17481	if page.pcrl.IsEmpty() {
17482		return nil
17483	}
17484	return *page.pcrl.Value
17485}
17486
17487// Creates a new instance of the ProtectableContainerResourceListPage type.
17488func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
17489	return ProtectableContainerResourceListPage{
17490		fn:   getNextPage,
17491		pcrl: cur,
17492	}
17493}
17494
17495// BasicProtectedItem base class for backup items.
17496type BasicProtectedItem interface {
17497	AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
17498	AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
17499	AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
17500	AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
17501	AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
17502	AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
17503	AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
17504	AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
17505	AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
17506	AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
17507	AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
17508	AsDPMProtectedItem() (*DPMProtectedItem, bool)
17509	AsGenericProtectedItem() (*GenericProtectedItem, bool)
17510	AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
17511	AsProtectedItem() (*ProtectedItem, bool)
17512}
17513
17514// ProtectedItem base class for backup items.
17515type ProtectedItem struct {
17516	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
17517	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17518	// WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
17519	WorkloadType DataSourceType `json:"workloadType,omitempty"`
17520	// ContainerName - Unique name of container
17521	ContainerName *string `json:"containerName,omitempty"`
17522	// SourceResourceID - ARM ID of the resource to be backed up.
17523	SourceResourceID *string `json:"sourceResourceId,omitempty"`
17524	// PolicyID - ID of the backup policy with which this item is backed up.
17525	PolicyID *string `json:"policyId,omitempty"`
17526	// LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item.
17527	LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
17528	// BackupSetName - Name of the backup set the backup item belongs to
17529	BackupSetName *string `json:"backupSetName,omitempty"`
17530	// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover'
17531	CreateMode CreateMode `json:"createMode,omitempty"`
17532	// DeferredDeleteTimeInUTC - Time for deferred deletion in UTC
17533	DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
17534	// IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete
17535	IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
17536	// DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted
17537	DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
17538	// IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon
17539	IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
17540	// IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state
17541	IsRehydrate *bool `json:"isRehydrate,omitempty"`
17542	// ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem'
17543	ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
17544}
17545
17546func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
17547	var m map[string]interface{}
17548	err := json.Unmarshal(body, &m)
17549	if err != nil {
17550		return nil, err
17551	}
17552
17553	switch m["protectedItemType"] {
17554	case string(ProtectedItemTypeAzureFileShareProtectedItem):
17555		var afpi AzureFileshareProtectedItem
17556		err := json.Unmarshal(body, &afpi)
17557		return afpi, err
17558	case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
17559		var aisccvpi AzureIaaSClassicComputeVMProtectedItem
17560		err := json.Unmarshal(body, &aisccvpi)
17561		return aisccvpi, err
17562	case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
17563		var aiscvpi AzureIaaSComputeVMProtectedItem
17564		err := json.Unmarshal(body, &aiscvpi)
17565		return aiscvpi, err
17566	case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
17567		var aispi AzureIaaSVMProtectedItem
17568		err := json.Unmarshal(body, &aispi)
17569		return aispi, err
17570	case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
17571		var aspi AzureSQLProtectedItem
17572		err := json.Unmarshal(body, &aspi)
17573		return aspi, err
17574	case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
17575		var avwpi AzureVMWorkloadProtectedItem
17576		err := json.Unmarshal(body, &avwpi)
17577		return avwpi, err
17578	case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
17579		var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
17580		err := json.Unmarshal(body, &avwsadpi)
17581		return avwsadpi, err
17582	case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
17583		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
17584		err := json.Unmarshal(body, &avwshdpi)
17585		return avwshdpi, err
17586	case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
17587		var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
17588		err := json.Unmarshal(body, &avwsdpi)
17589		return avwsdpi, err
17590	case string(ProtectedItemTypeDPMProtectedItem):
17591		var dpi DPMProtectedItem
17592		err := json.Unmarshal(body, &dpi)
17593		return dpi, err
17594	case string(ProtectedItemTypeGenericProtectedItem):
17595		var gpi GenericProtectedItem
17596		err := json.Unmarshal(body, &gpi)
17597		return gpi, err
17598	case string(ProtectedItemTypeMabFileFolderProtectedItem):
17599		var mffpi MabFileFolderProtectedItem
17600		err := json.Unmarshal(body, &mffpi)
17601		return mffpi, err
17602	default:
17603		var pi ProtectedItem
17604		err := json.Unmarshal(body, &pi)
17605		return pi, err
17606	}
17607}
17608func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
17609	var rawMessages []*json.RawMessage
17610	err := json.Unmarshal(body, &rawMessages)
17611	if err != nil {
17612		return nil, err
17613	}
17614
17615	piArray := make([]BasicProtectedItem, len(rawMessages))
17616
17617	for index, rawMessage := range rawMessages {
17618		pi, err := unmarshalBasicProtectedItem(*rawMessage)
17619		if err != nil {
17620			return nil, err
17621		}
17622		piArray[index] = pi
17623	}
17624	return piArray, nil
17625}
17626
17627// MarshalJSON is the custom marshaler for ProtectedItem.
17628func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
17629	pi.ProtectedItemType = ProtectedItemTypeProtectedItem
17630	objectMap := make(map[string]interface{})
17631	if pi.BackupManagementType != "" {
17632		objectMap["backupManagementType"] = pi.BackupManagementType
17633	}
17634	if pi.WorkloadType != "" {
17635		objectMap["workloadType"] = pi.WorkloadType
17636	}
17637	if pi.ContainerName != nil {
17638		objectMap["containerName"] = pi.ContainerName
17639	}
17640	if pi.SourceResourceID != nil {
17641		objectMap["sourceResourceId"] = pi.SourceResourceID
17642	}
17643	if pi.PolicyID != nil {
17644		objectMap["policyId"] = pi.PolicyID
17645	}
17646	if pi.LastRecoveryPoint != nil {
17647		objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
17648	}
17649	if pi.BackupSetName != nil {
17650		objectMap["backupSetName"] = pi.BackupSetName
17651	}
17652	if pi.CreateMode != "" {
17653		objectMap["createMode"] = pi.CreateMode
17654	}
17655	if pi.DeferredDeleteTimeInUTC != nil {
17656		objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
17657	}
17658	if pi.IsScheduledForDeferredDelete != nil {
17659		objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
17660	}
17661	if pi.DeferredDeleteTimeRemaining != nil {
17662		objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
17663	}
17664	if pi.IsDeferredDeleteScheduleUpcoming != nil {
17665		objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
17666	}
17667	if pi.IsRehydrate != nil {
17668		objectMap["isRehydrate"] = pi.IsRehydrate
17669	}
17670	if pi.ProtectedItemType != "" {
17671		objectMap["protectedItemType"] = pi.ProtectedItemType
17672	}
17673	return json.Marshal(objectMap)
17674}
17675
17676// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17677func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
17678	return nil, false
17679}
17680
17681// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17682func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
17683	return nil, false
17684}
17685
17686// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17687func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
17688	return nil, false
17689}
17690
17691// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17692func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
17693	return nil, false
17694}
17695
17696// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17697func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
17698	return nil, false
17699}
17700
17701// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17702func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
17703	return nil, false
17704}
17705
17706// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17707func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
17708	return nil, false
17709}
17710
17711// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17712func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
17713	return nil, false
17714}
17715
17716// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17717func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
17718	return nil, false
17719}
17720
17721// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17722func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
17723	return nil, false
17724}
17725
17726// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17727func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
17728	return nil, false
17729}
17730
17731// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17732func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
17733	return nil, false
17734}
17735
17736// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17737func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
17738	return nil, false
17739}
17740
17741// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17742func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
17743	return nil, false
17744}
17745
17746// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17747func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
17748	return &pi, true
17749}
17750
17751// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem.
17752func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
17753	return &pi, true
17754}
17755
17756// ProtectedItemQueryObject filters to list backup items.
17757type ProtectedItemQueryObject struct {
17758	// HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid'
17759	HealthState HealthState `json:"healthState,omitempty"`
17760	// BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
17761	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17762	// ItemType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
17763	ItemType DataSourceType `json:"itemType,omitempty"`
17764	// PolicyName - Backup policy name associated with the backup item.
17765	PolicyName *string `json:"policyName,omitempty"`
17766	// ContainerName - Name of the container.
17767	ContainerName *string `json:"containerName,omitempty"`
17768	// BackupEngineName - Backup Engine name
17769	BackupEngineName *string `json:"backupEngineName,omitempty"`
17770	// FriendlyName - Friendly name of protected item
17771	FriendlyName *string `json:"friendlyName,omitempty"`
17772	// FabricName - Name of the fabric.
17773	FabricName *string `json:"fabricName,omitempty"`
17774	// BackupSetName - Name of the backup set.
17775	BackupSetName *string `json:"backupSetName,omitempty"`
17776}
17777
17778// ProtectedItemResource base class for backup items.
17779type ProtectedItemResource struct {
17780	autorest.Response `json:"-"`
17781	// Properties - ProtectedItemResource properties
17782	Properties BasicProtectedItem `json:"properties,omitempty"`
17783	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
17784	ID *string `json:"id,omitempty"`
17785	// Name - READ-ONLY; Resource name associated with the resource.
17786	Name *string `json:"name,omitempty"`
17787	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
17788	Type *string `json:"type,omitempty"`
17789	// Location - Resource location.
17790	Location *string `json:"location,omitempty"`
17791	// Tags - Resource tags.
17792	Tags map[string]*string `json:"tags"`
17793	// ETag - Optional ETag.
17794	ETag *string `json:"eTag,omitempty"`
17795}
17796
17797// MarshalJSON is the custom marshaler for ProtectedItemResource.
17798func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
17799	objectMap := make(map[string]interface{})
17800	objectMap["properties"] = pir.Properties
17801	if pir.Location != nil {
17802		objectMap["location"] = pir.Location
17803	}
17804	if pir.Tags != nil {
17805		objectMap["tags"] = pir.Tags
17806	}
17807	if pir.ETag != nil {
17808		objectMap["eTag"] = pir.ETag
17809	}
17810	return json.Marshal(objectMap)
17811}
17812
17813// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct.
17814func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
17815	var m map[string]*json.RawMessage
17816	err := json.Unmarshal(body, &m)
17817	if err != nil {
17818		return err
17819	}
17820	for k, v := range m {
17821		switch k {
17822		case "properties":
17823			if v != nil {
17824				properties, err := unmarshalBasicProtectedItem(*v)
17825				if err != nil {
17826					return err
17827				}
17828				pir.Properties = properties
17829			}
17830		case "id":
17831			if v != nil {
17832				var ID string
17833				err = json.Unmarshal(*v, &ID)
17834				if err != nil {
17835					return err
17836				}
17837				pir.ID = &ID
17838			}
17839		case "name":
17840			if v != nil {
17841				var name string
17842				err = json.Unmarshal(*v, &name)
17843				if err != nil {
17844					return err
17845				}
17846				pir.Name = &name
17847			}
17848		case "type":
17849			if v != nil {
17850				var typeVar string
17851				err = json.Unmarshal(*v, &typeVar)
17852				if err != nil {
17853					return err
17854				}
17855				pir.Type = &typeVar
17856			}
17857		case "location":
17858			if v != nil {
17859				var location string
17860				err = json.Unmarshal(*v, &location)
17861				if err != nil {
17862					return err
17863				}
17864				pir.Location = &location
17865			}
17866		case "tags":
17867			if v != nil {
17868				var tags map[string]*string
17869				err = json.Unmarshal(*v, &tags)
17870				if err != nil {
17871					return err
17872				}
17873				pir.Tags = tags
17874			}
17875		case "eTag":
17876			if v != nil {
17877				var eTag string
17878				err = json.Unmarshal(*v, &eTag)
17879				if err != nil {
17880					return err
17881				}
17882				pir.ETag = &eTag
17883			}
17884		}
17885	}
17886
17887	return nil
17888}
17889
17890// ProtectedItemResourceList list of ProtectedItem resources
17891type ProtectedItemResourceList struct {
17892	autorest.Response `json:"-"`
17893	// Value - List of resources.
17894	Value *[]ProtectedItemResource `json:"value,omitempty"`
17895	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
17896	NextLink *string `json:"nextLink,omitempty"`
17897}
17898
17899// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values.
17900type ProtectedItemResourceListIterator struct {
17901	i    int
17902	page ProtectedItemResourceListPage
17903}
17904
17905// NextWithContext advances to the next value.  If there was an error making
17906// the request the iterator does not advance and the error is returned.
17907func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17908	if tracing.IsEnabled() {
17909		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
17910		defer func() {
17911			sc := -1
17912			if iter.Response().Response.Response != nil {
17913				sc = iter.Response().Response.Response.StatusCode
17914			}
17915			tracing.EndSpan(ctx, sc, err)
17916		}()
17917	}
17918	iter.i++
17919	if iter.i < len(iter.page.Values()) {
17920		return nil
17921	}
17922	err = iter.page.NextWithContext(ctx)
17923	if err != nil {
17924		iter.i--
17925		return err
17926	}
17927	iter.i = 0
17928	return nil
17929}
17930
17931// Next advances to the next value.  If there was an error making
17932// the request the iterator does not advance and the error is returned.
17933// Deprecated: Use NextWithContext() instead.
17934func (iter *ProtectedItemResourceListIterator) Next() error {
17935	return iter.NextWithContext(context.Background())
17936}
17937
17938// NotDone returns true if the enumeration should be started or is not yet complete.
17939func (iter ProtectedItemResourceListIterator) NotDone() bool {
17940	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17941}
17942
17943// Response returns the raw server response from the last page request.
17944func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
17945	return iter.page.Response()
17946}
17947
17948// Value returns the current value or a zero-initialized value if the
17949// iterator has advanced beyond the end of the collection.
17950func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
17951	if !iter.page.NotDone() {
17952		return ProtectedItemResource{}
17953	}
17954	return iter.page.Values()[iter.i]
17955}
17956
17957// Creates a new instance of the ProtectedItemResourceListIterator type.
17958func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
17959	return ProtectedItemResourceListIterator{page: page}
17960}
17961
17962// IsEmpty returns true if the ListResult contains no values.
17963func (pirl ProtectedItemResourceList) IsEmpty() bool {
17964	return pirl.Value == nil || len(*pirl.Value) == 0
17965}
17966
17967// hasNextLink returns true if the NextLink is not empty.
17968func (pirl ProtectedItemResourceList) hasNextLink() bool {
17969	return pirl.NextLink != nil && len(*pirl.NextLink) != 0
17970}
17971
17972// protectedItemResourceListPreparer prepares a request to retrieve the next set of results.
17973// It returns nil if no more results exist.
17974func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
17975	if !pirl.hasNextLink() {
17976		return nil, nil
17977	}
17978	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17979		autorest.AsJSON(),
17980		autorest.AsGet(),
17981		autorest.WithBaseURL(to.String(pirl.NextLink)))
17982}
17983
17984// ProtectedItemResourceListPage contains a page of ProtectedItemResource values.
17985type ProtectedItemResourceListPage struct {
17986	fn   func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
17987	pirl ProtectedItemResourceList
17988}
17989
17990// NextWithContext advances to the next page of values.  If there was an error making
17991// the request the page does not advance and the error is returned.
17992func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
17993	if tracing.IsEnabled() {
17994		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
17995		defer func() {
17996			sc := -1
17997			if page.Response().Response.Response != nil {
17998				sc = page.Response().Response.Response.StatusCode
17999			}
18000			tracing.EndSpan(ctx, sc, err)
18001		}()
18002	}
18003	for {
18004		next, err := page.fn(ctx, page.pirl)
18005		if err != nil {
18006			return err
18007		}
18008		page.pirl = next
18009		if !next.hasNextLink() || !next.IsEmpty() {
18010			break
18011		}
18012	}
18013	return nil
18014}
18015
18016// Next advances to the next page of values.  If there was an error making
18017// the request the page does not advance and the error is returned.
18018// Deprecated: Use NextWithContext() instead.
18019func (page *ProtectedItemResourceListPage) Next() error {
18020	return page.NextWithContext(context.Background())
18021}
18022
18023// NotDone returns true if the page enumeration should be started or is not yet complete.
18024func (page ProtectedItemResourceListPage) NotDone() bool {
18025	return !page.pirl.IsEmpty()
18026}
18027
18028// Response returns the raw server response from the last page request.
18029func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
18030	return page.pirl
18031}
18032
18033// Values returns the slice of values for the current page or nil if there are no values.
18034func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
18035	if page.pirl.IsEmpty() {
18036		return nil
18037	}
18038	return *page.pirl.Value
18039}
18040
18041// Creates a new instance of the ProtectedItemResourceListPage type.
18042func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
18043	return ProtectedItemResourceListPage{
18044		fn:   getNextPage,
18045		pirl: cur,
18046	}
18047}
18048
18049// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived
18050// from this class.
18051type BasicProtectionContainer interface {
18052	AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
18053	AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
18054	AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
18055	AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
18056	AsAzureSQLContainer() (*AzureSQLContainer, bool)
18057	AsAzureStorageContainer() (*AzureStorageContainer, bool)
18058	AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
18059	AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
18060	AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
18061	AsDpmContainer() (*DpmContainer, bool)
18062	AsBasicDpmContainer() (BasicDpmContainer, bool)
18063	AsGenericContainer() (*GenericContainer, bool)
18064	AsIaaSVMContainer() (*IaaSVMContainer, bool)
18065	AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
18066	AsMabContainer() (*MabContainer, bool)
18067	AsProtectionContainer() (*ProtectionContainer, bool)
18068}
18069
18070// ProtectionContainer base class for container with backup items. Containers with specific workloads are
18071// derived from this class.
18072type ProtectionContainer struct {
18073	// FriendlyName - Friendly name of the container.
18074	FriendlyName *string `json:"friendlyName,omitempty"`
18075	// BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
18076	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18077	// RegistrationStatus - Status of registration of the container with the Recovery Services Vault.
18078	RegistrationStatus *string `json:"registrationStatus,omitempty"`
18079	// HealthStatus - Status of health of the container.
18080	HealthStatus *string `json:"healthStatus,omitempty"`
18081	// ContainerType - Possible values include: 'ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer', 'ContainerTypeBasicProtectionContainerContainerTypeStorageContainer', 'ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer', 'ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer', 'ContainerTypeBasicProtectionContainerContainerTypeDPMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeGenericContainer', 'ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer', 'ContainerTypeBasicProtectionContainerContainerTypeWindows'
18082	ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
18083}
18084
18085func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
18086	var m map[string]interface{}
18087	err := json.Unmarshal(body, &m)
18088	if err != nil {
18089		return nil, err
18090	}
18091
18092	switch m["containerType"] {
18093	case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
18094		var absc AzureBackupServerContainer
18095		err := json.Unmarshal(body, &absc)
18096		return absc, err
18097	case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
18098		var aisccvc AzureIaaSClassicComputeVMContainer
18099		err := json.Unmarshal(body, &aisccvc)
18100		return aisccvc, err
18101	case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
18102		var aiscvc AzureIaaSComputeVMContainer
18103		err := json.Unmarshal(body, &aiscvc)
18104		return aiscvc, err
18105	case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
18106		var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
18107		err := json.Unmarshal(body, &aswcpc)
18108		return aswcpc, err
18109	case string(ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer):
18110		var asc AzureSQLContainer
18111		err := json.Unmarshal(body, &asc)
18112		return asc, err
18113	case string(ContainerTypeBasicProtectionContainerContainerTypeStorageContainer):
18114		var asc AzureStorageContainer
18115		err := json.Unmarshal(body, &asc)
18116		return asc, err
18117	case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
18118		var avacpc AzureVMAppContainerProtectionContainer
18119		err := json.Unmarshal(body, &avacpc)
18120		return avacpc, err
18121	case string(ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer):
18122		var awc AzureWorkloadContainer
18123		err := json.Unmarshal(body, &awc)
18124		return awc, err
18125	case string(ContainerTypeBasicProtectionContainerContainerTypeDPMContainer):
18126		var dc DpmContainer
18127		err := json.Unmarshal(body, &dc)
18128		return dc, err
18129	case string(ContainerTypeBasicProtectionContainerContainerTypeGenericContainer):
18130		var gc GenericContainer
18131		err := json.Unmarshal(body, &gc)
18132		return gc, err
18133	case string(ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer):
18134		var isc IaaSVMContainer
18135		err := json.Unmarshal(body, &isc)
18136		return isc, err
18137	case string(ContainerTypeBasicProtectionContainerContainerTypeWindows):
18138		var mc MabContainer
18139		err := json.Unmarshal(body, &mc)
18140		return mc, err
18141	default:
18142		var pc ProtectionContainer
18143		err := json.Unmarshal(body, &pc)
18144		return pc, err
18145	}
18146}
18147func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
18148	var rawMessages []*json.RawMessage
18149	err := json.Unmarshal(body, &rawMessages)
18150	if err != nil {
18151		return nil, err
18152	}
18153
18154	pcArray := make([]BasicProtectionContainer, len(rawMessages))
18155
18156	for index, rawMessage := range rawMessages {
18157		pc, err := unmarshalBasicProtectionContainer(*rawMessage)
18158		if err != nil {
18159			return nil, err
18160		}
18161		pcArray[index] = pc
18162	}
18163	return pcArray, nil
18164}
18165
18166// MarshalJSON is the custom marshaler for ProtectionContainer.
18167func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
18168	pc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer
18169	objectMap := make(map[string]interface{})
18170	if pc.FriendlyName != nil {
18171		objectMap["friendlyName"] = pc.FriendlyName
18172	}
18173	if pc.BackupManagementType != "" {
18174		objectMap["backupManagementType"] = pc.BackupManagementType
18175	}
18176	if pc.RegistrationStatus != nil {
18177		objectMap["registrationStatus"] = pc.RegistrationStatus
18178	}
18179	if pc.HealthStatus != nil {
18180		objectMap["healthStatus"] = pc.HealthStatus
18181	}
18182	if pc.ContainerType != "" {
18183		objectMap["containerType"] = pc.ContainerType
18184	}
18185	return json.Marshal(objectMap)
18186}
18187
18188// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18189func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
18190	return nil, false
18191}
18192
18193// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18194func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
18195	return nil, false
18196}
18197
18198// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18199func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
18200	return nil, false
18201}
18202
18203// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18204func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
18205	return nil, false
18206}
18207
18208// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18209func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
18210	return nil, false
18211}
18212
18213// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18214func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
18215	return nil, false
18216}
18217
18218// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18219func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
18220	return nil, false
18221}
18222
18223// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18224func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
18225	return nil, false
18226}
18227
18228// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18229func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
18230	return nil, false
18231}
18232
18233// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18234func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
18235	return nil, false
18236}
18237
18238// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18239func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
18240	return nil, false
18241}
18242
18243// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18244func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
18245	return nil, false
18246}
18247
18248// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18249func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
18250	return nil, false
18251}
18252
18253// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18254func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
18255	return nil, false
18256}
18257
18258// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18259func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
18260	return nil, false
18261}
18262
18263// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18264func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
18265	return &pc, true
18266}
18267
18268// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer.
18269func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
18270	return &pc, true
18271}
18272
18273// ProtectionContainerResource base class for container with backup items. Containers with specific
18274// workloads are derived from this class.
18275type ProtectionContainerResource struct {
18276	autorest.Response `json:"-"`
18277	// Properties - ProtectionContainerResource properties
18278	Properties BasicProtectionContainer `json:"properties,omitempty"`
18279	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
18280	ID *string `json:"id,omitempty"`
18281	// Name - READ-ONLY; Resource name associated with the resource.
18282	Name *string `json:"name,omitempty"`
18283	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
18284	Type *string `json:"type,omitempty"`
18285	// Location - Resource location.
18286	Location *string `json:"location,omitempty"`
18287	// Tags - Resource tags.
18288	Tags map[string]*string `json:"tags"`
18289	// ETag - Optional ETag.
18290	ETag *string `json:"eTag,omitempty"`
18291}
18292
18293// MarshalJSON is the custom marshaler for ProtectionContainerResource.
18294func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
18295	objectMap := make(map[string]interface{})
18296	objectMap["properties"] = pcr.Properties
18297	if pcr.Location != nil {
18298		objectMap["location"] = pcr.Location
18299	}
18300	if pcr.Tags != nil {
18301		objectMap["tags"] = pcr.Tags
18302	}
18303	if pcr.ETag != nil {
18304		objectMap["eTag"] = pcr.ETag
18305	}
18306	return json.Marshal(objectMap)
18307}
18308
18309// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct.
18310func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
18311	var m map[string]*json.RawMessage
18312	err := json.Unmarshal(body, &m)
18313	if err != nil {
18314		return err
18315	}
18316	for k, v := range m {
18317		switch k {
18318		case "properties":
18319			if v != nil {
18320				properties, err := unmarshalBasicProtectionContainer(*v)
18321				if err != nil {
18322					return err
18323				}
18324				pcr.Properties = properties
18325			}
18326		case "id":
18327			if v != nil {
18328				var ID string
18329				err = json.Unmarshal(*v, &ID)
18330				if err != nil {
18331					return err
18332				}
18333				pcr.ID = &ID
18334			}
18335		case "name":
18336			if v != nil {
18337				var name string
18338				err = json.Unmarshal(*v, &name)
18339				if err != nil {
18340					return err
18341				}
18342				pcr.Name = &name
18343			}
18344		case "type":
18345			if v != nil {
18346				var typeVar string
18347				err = json.Unmarshal(*v, &typeVar)
18348				if err != nil {
18349					return err
18350				}
18351				pcr.Type = &typeVar
18352			}
18353		case "location":
18354			if v != nil {
18355				var location string
18356				err = json.Unmarshal(*v, &location)
18357				if err != nil {
18358					return err
18359				}
18360				pcr.Location = &location
18361			}
18362		case "tags":
18363			if v != nil {
18364				var tags map[string]*string
18365				err = json.Unmarshal(*v, &tags)
18366				if err != nil {
18367					return err
18368				}
18369				pcr.Tags = tags
18370			}
18371		case "eTag":
18372			if v != nil {
18373				var eTag string
18374				err = json.Unmarshal(*v, &eTag)
18375				if err != nil {
18376					return err
18377				}
18378				pcr.ETag = &eTag
18379			}
18380		}
18381	}
18382
18383	return nil
18384}
18385
18386// ProtectionContainerResourceList list of ProtectionContainer resources
18387type ProtectionContainerResourceList struct {
18388	autorest.Response `json:"-"`
18389	// Value - List of resources.
18390	Value *[]ProtectionContainerResource `json:"value,omitempty"`
18391	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
18392	NextLink *string `json:"nextLink,omitempty"`
18393}
18394
18395// ProtectionContainerResourceListIterator provides access to a complete listing of
18396// ProtectionContainerResource values.
18397type ProtectionContainerResourceListIterator struct {
18398	i    int
18399	page ProtectionContainerResourceListPage
18400}
18401
18402// NextWithContext advances to the next value.  If there was an error making
18403// the request the iterator does not advance and the error is returned.
18404func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18405	if tracing.IsEnabled() {
18406		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
18407		defer func() {
18408			sc := -1
18409			if iter.Response().Response.Response != nil {
18410				sc = iter.Response().Response.Response.StatusCode
18411			}
18412			tracing.EndSpan(ctx, sc, err)
18413		}()
18414	}
18415	iter.i++
18416	if iter.i < len(iter.page.Values()) {
18417		return nil
18418	}
18419	err = iter.page.NextWithContext(ctx)
18420	if err != nil {
18421		iter.i--
18422		return err
18423	}
18424	iter.i = 0
18425	return nil
18426}
18427
18428// Next advances to the next value.  If there was an error making
18429// the request the iterator does not advance and the error is returned.
18430// Deprecated: Use NextWithContext() instead.
18431func (iter *ProtectionContainerResourceListIterator) Next() error {
18432	return iter.NextWithContext(context.Background())
18433}
18434
18435// NotDone returns true if the enumeration should be started or is not yet complete.
18436func (iter ProtectionContainerResourceListIterator) NotDone() bool {
18437	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18438}
18439
18440// Response returns the raw server response from the last page request.
18441func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
18442	return iter.page.Response()
18443}
18444
18445// Value returns the current value or a zero-initialized value if the
18446// iterator has advanced beyond the end of the collection.
18447func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
18448	if !iter.page.NotDone() {
18449		return ProtectionContainerResource{}
18450	}
18451	return iter.page.Values()[iter.i]
18452}
18453
18454// Creates a new instance of the ProtectionContainerResourceListIterator type.
18455func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
18456	return ProtectionContainerResourceListIterator{page: page}
18457}
18458
18459// IsEmpty returns true if the ListResult contains no values.
18460func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
18461	return pcrl.Value == nil || len(*pcrl.Value) == 0
18462}
18463
18464// hasNextLink returns true if the NextLink is not empty.
18465func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
18466	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
18467}
18468
18469// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results.
18470// It returns nil if no more results exist.
18471func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
18472	if !pcrl.hasNextLink() {
18473		return nil, nil
18474	}
18475	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18476		autorest.AsJSON(),
18477		autorest.AsGet(),
18478		autorest.WithBaseURL(to.String(pcrl.NextLink)))
18479}
18480
18481// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values.
18482type ProtectionContainerResourceListPage struct {
18483	fn   func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
18484	pcrl ProtectionContainerResourceList
18485}
18486
18487// NextWithContext advances to the next page of values.  If there was an error making
18488// the request the page does not advance and the error is returned.
18489func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
18490	if tracing.IsEnabled() {
18491		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
18492		defer func() {
18493			sc := -1
18494			if page.Response().Response.Response != nil {
18495				sc = page.Response().Response.Response.StatusCode
18496			}
18497			tracing.EndSpan(ctx, sc, err)
18498		}()
18499	}
18500	for {
18501		next, err := page.fn(ctx, page.pcrl)
18502		if err != nil {
18503			return err
18504		}
18505		page.pcrl = next
18506		if !next.hasNextLink() || !next.IsEmpty() {
18507			break
18508		}
18509	}
18510	return nil
18511}
18512
18513// Next advances to the next page of values.  If there was an error making
18514// the request the page does not advance and the error is returned.
18515// Deprecated: Use NextWithContext() instead.
18516func (page *ProtectionContainerResourceListPage) Next() error {
18517	return page.NextWithContext(context.Background())
18518}
18519
18520// NotDone returns true if the page enumeration should be started or is not yet complete.
18521func (page ProtectionContainerResourceListPage) NotDone() bool {
18522	return !page.pcrl.IsEmpty()
18523}
18524
18525// Response returns the raw server response from the last page request.
18526func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
18527	return page.pcrl
18528}
18529
18530// Values returns the slice of values for the current page or nil if there are no values.
18531func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
18532	if page.pcrl.IsEmpty() {
18533		return nil
18534	}
18535	return *page.pcrl.Value
18536}
18537
18538// Creates a new instance of the ProtectionContainerResourceListPage type.
18539func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
18540	return ProtectionContainerResourceListPage{
18541		fn:   getNextPage,
18542		pcrl: cur,
18543	}
18544}
18545
18546// BasicProtectionIntent base class for backup ProtectionIntent.
18547type BasicProtectionIntent interface {
18548	AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
18549	AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
18550	AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
18551	AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
18552	AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
18553	AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
18554	AsProtectionIntent() (*ProtectionIntent, bool)
18555}
18556
18557// ProtectionIntent base class for backup ProtectionIntent.
18558type ProtectionIntent struct {
18559	// BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
18560	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18561	// SourceResourceID - ARM ID of the resource to be backed up.
18562	SourceResourceID *string `json:"sourceResourceId,omitempty"`
18563	// ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId
18564	ItemID *string `json:"itemId,omitempty"`
18565	// PolicyID - ID of the backup policy with which this item is backed up.
18566	PolicyID *string `json:"policyId,omitempty"`
18567	// ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
18568	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18569	// ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent'
18570	ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
18571}
18572
18573func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
18574	var m map[string]interface{}
18575	err := json.Unmarshal(body, &m)
18576	if err != nil {
18577		return nil, err
18578	}
18579
18580	switch m["protectionIntentItemType"] {
18581	case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
18582		var arsvpi AzureRecoveryServiceVaultProtectionIntent
18583		err := json.Unmarshal(body, &arsvpi)
18584		return arsvpi, err
18585	case string(ProtectionIntentItemTypeAzureResourceItem):
18586		var arpi AzureResourceProtectionIntent
18587		err := json.Unmarshal(body, &arpi)
18588		return arpi, err
18589	case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
18590		var awapi AzureWorkloadAutoProtectionIntent
18591		err := json.Unmarshal(body, &awapi)
18592		return awapi, err
18593	case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
18594		var awsapi AzureWorkloadSQLAutoProtectionIntent
18595		err := json.Unmarshal(body, &awsapi)
18596		return awsapi, err
18597	default:
18598		var pi ProtectionIntent
18599		err := json.Unmarshal(body, &pi)
18600		return pi, err
18601	}
18602}
18603func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
18604	var rawMessages []*json.RawMessage
18605	err := json.Unmarshal(body, &rawMessages)
18606	if err != nil {
18607		return nil, err
18608	}
18609
18610	piArray := make([]BasicProtectionIntent, len(rawMessages))
18611
18612	for index, rawMessage := range rawMessages {
18613		pi, err := unmarshalBasicProtectionIntent(*rawMessage)
18614		if err != nil {
18615			return nil, err
18616		}
18617		piArray[index] = pi
18618	}
18619	return piArray, nil
18620}
18621
18622// MarshalJSON is the custom marshaler for ProtectionIntent.
18623func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
18624	pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
18625	objectMap := make(map[string]interface{})
18626	if pi.BackupManagementType != "" {
18627		objectMap["backupManagementType"] = pi.BackupManagementType
18628	}
18629	if pi.SourceResourceID != nil {
18630		objectMap["sourceResourceId"] = pi.SourceResourceID
18631	}
18632	if pi.ItemID != nil {
18633		objectMap["itemId"] = pi.ItemID
18634	}
18635	if pi.PolicyID != nil {
18636		objectMap["policyId"] = pi.PolicyID
18637	}
18638	if pi.ProtectionState != "" {
18639		objectMap["protectionState"] = pi.ProtectionState
18640	}
18641	if pi.ProtectionIntentItemType != "" {
18642		objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
18643	}
18644	return json.Marshal(objectMap)
18645}
18646
18647// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18648func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
18649	return nil, false
18650}
18651
18652// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18653func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
18654	return nil, false
18655}
18656
18657// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18658func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
18659	return nil, false
18660}
18661
18662// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18663func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
18664	return nil, false
18665}
18666
18667// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18668func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
18669	return nil, false
18670}
18671
18672// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18673func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
18674	return nil, false
18675}
18676
18677// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18678func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
18679	return &pi, true
18680}
18681
18682// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent.
18683func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
18684	return &pi, true
18685}
18686
18687// ProtectionIntentQueryObject filters to list protection intent.
18688type ProtectionIntentQueryObject struct {
18689	// BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
18690	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18691	// ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer'
18692	ItemType IntentItemType `json:"itemType,omitempty"`
18693	// ParentName - Parent name of the intent
18694	ParentName *string `json:"parentName,omitempty"`
18695	// ItemName - Item name of the intent
18696	ItemName *string `json:"itemName,omitempty"`
18697}
18698
18699// ProtectionIntentResource base class for backup ProtectionIntent.
18700type ProtectionIntentResource struct {
18701	autorest.Response `json:"-"`
18702	// Properties - ProtectionIntentResource properties
18703	Properties BasicProtectionIntent `json:"properties,omitempty"`
18704	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
18705	ID *string `json:"id,omitempty"`
18706	// Name - READ-ONLY; Resource name associated with the resource.
18707	Name *string `json:"name,omitempty"`
18708	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
18709	Type *string `json:"type,omitempty"`
18710	// Location - Resource location.
18711	Location *string `json:"location,omitempty"`
18712	// Tags - Resource tags.
18713	Tags map[string]*string `json:"tags"`
18714	// ETag - Optional ETag.
18715	ETag *string `json:"eTag,omitempty"`
18716}
18717
18718// MarshalJSON is the custom marshaler for ProtectionIntentResource.
18719func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
18720	objectMap := make(map[string]interface{})
18721	objectMap["properties"] = pir.Properties
18722	if pir.Location != nil {
18723		objectMap["location"] = pir.Location
18724	}
18725	if pir.Tags != nil {
18726		objectMap["tags"] = pir.Tags
18727	}
18728	if pir.ETag != nil {
18729		objectMap["eTag"] = pir.ETag
18730	}
18731	return json.Marshal(objectMap)
18732}
18733
18734// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct.
18735func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
18736	var m map[string]*json.RawMessage
18737	err := json.Unmarshal(body, &m)
18738	if err != nil {
18739		return err
18740	}
18741	for k, v := range m {
18742		switch k {
18743		case "properties":
18744			if v != nil {
18745				properties, err := unmarshalBasicProtectionIntent(*v)
18746				if err != nil {
18747					return err
18748				}
18749				pir.Properties = properties
18750			}
18751		case "id":
18752			if v != nil {
18753				var ID string
18754				err = json.Unmarshal(*v, &ID)
18755				if err != nil {
18756					return err
18757				}
18758				pir.ID = &ID
18759			}
18760		case "name":
18761			if v != nil {
18762				var name string
18763				err = json.Unmarshal(*v, &name)
18764				if err != nil {
18765					return err
18766				}
18767				pir.Name = &name
18768			}
18769		case "type":
18770			if v != nil {
18771				var typeVar string
18772				err = json.Unmarshal(*v, &typeVar)
18773				if err != nil {
18774					return err
18775				}
18776				pir.Type = &typeVar
18777			}
18778		case "location":
18779			if v != nil {
18780				var location string
18781				err = json.Unmarshal(*v, &location)
18782				if err != nil {
18783					return err
18784				}
18785				pir.Location = &location
18786			}
18787		case "tags":
18788			if v != nil {
18789				var tags map[string]*string
18790				err = json.Unmarshal(*v, &tags)
18791				if err != nil {
18792					return err
18793				}
18794				pir.Tags = tags
18795			}
18796		case "eTag":
18797			if v != nil {
18798				var eTag string
18799				err = json.Unmarshal(*v, &eTag)
18800				if err != nil {
18801					return err
18802				}
18803				pir.ETag = &eTag
18804			}
18805		}
18806	}
18807
18808	return nil
18809}
18810
18811// ProtectionIntentResourceList list of ProtectionIntent resources
18812type ProtectionIntentResourceList struct {
18813	autorest.Response `json:"-"`
18814	// Value - List of resources.
18815	Value *[]ProtectionIntentResource `json:"value,omitempty"`
18816	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
18817	NextLink *string `json:"nextLink,omitempty"`
18818}
18819
18820// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource
18821// values.
18822type ProtectionIntentResourceListIterator struct {
18823	i    int
18824	page ProtectionIntentResourceListPage
18825}
18826
18827// NextWithContext advances to the next value.  If there was an error making
18828// the request the iterator does not advance and the error is returned.
18829func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18830	if tracing.IsEnabled() {
18831		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
18832		defer func() {
18833			sc := -1
18834			if iter.Response().Response.Response != nil {
18835				sc = iter.Response().Response.Response.StatusCode
18836			}
18837			tracing.EndSpan(ctx, sc, err)
18838		}()
18839	}
18840	iter.i++
18841	if iter.i < len(iter.page.Values()) {
18842		return nil
18843	}
18844	err = iter.page.NextWithContext(ctx)
18845	if err != nil {
18846		iter.i--
18847		return err
18848	}
18849	iter.i = 0
18850	return nil
18851}
18852
18853// Next advances to the next value.  If there was an error making
18854// the request the iterator does not advance and the error is returned.
18855// Deprecated: Use NextWithContext() instead.
18856func (iter *ProtectionIntentResourceListIterator) Next() error {
18857	return iter.NextWithContext(context.Background())
18858}
18859
18860// NotDone returns true if the enumeration should be started or is not yet complete.
18861func (iter ProtectionIntentResourceListIterator) NotDone() bool {
18862	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18863}
18864
18865// Response returns the raw server response from the last page request.
18866func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
18867	return iter.page.Response()
18868}
18869
18870// Value returns the current value or a zero-initialized value if the
18871// iterator has advanced beyond the end of the collection.
18872func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
18873	if !iter.page.NotDone() {
18874		return ProtectionIntentResource{}
18875	}
18876	return iter.page.Values()[iter.i]
18877}
18878
18879// Creates a new instance of the ProtectionIntentResourceListIterator type.
18880func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
18881	return ProtectionIntentResourceListIterator{page: page}
18882}
18883
18884// IsEmpty returns true if the ListResult contains no values.
18885func (pirl ProtectionIntentResourceList) IsEmpty() bool {
18886	return pirl.Value == nil || len(*pirl.Value) == 0
18887}
18888
18889// hasNextLink returns true if the NextLink is not empty.
18890func (pirl ProtectionIntentResourceList) hasNextLink() bool {
18891	return pirl.NextLink != nil && len(*pirl.NextLink) != 0
18892}
18893
18894// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results.
18895// It returns nil if no more results exist.
18896func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
18897	if !pirl.hasNextLink() {
18898		return nil, nil
18899	}
18900	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18901		autorest.AsJSON(),
18902		autorest.AsGet(),
18903		autorest.WithBaseURL(to.String(pirl.NextLink)))
18904}
18905
18906// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values.
18907type ProtectionIntentResourceListPage struct {
18908	fn   func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
18909	pirl ProtectionIntentResourceList
18910}
18911
18912// NextWithContext advances to the next page of values.  If there was an error making
18913// the request the page does not advance and the error is returned.
18914func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
18915	if tracing.IsEnabled() {
18916		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
18917		defer func() {
18918			sc := -1
18919			if page.Response().Response.Response != nil {
18920				sc = page.Response().Response.Response.StatusCode
18921			}
18922			tracing.EndSpan(ctx, sc, err)
18923		}()
18924	}
18925	for {
18926		next, err := page.fn(ctx, page.pirl)
18927		if err != nil {
18928			return err
18929		}
18930		page.pirl = next
18931		if !next.hasNextLink() || !next.IsEmpty() {
18932			break
18933		}
18934	}
18935	return nil
18936}
18937
18938// Next advances to the next page of values.  If there was an error making
18939// the request the page does not advance and the error is returned.
18940// Deprecated: Use NextWithContext() instead.
18941func (page *ProtectionIntentResourceListPage) Next() error {
18942	return page.NextWithContext(context.Background())
18943}
18944
18945// NotDone returns true if the page enumeration should be started or is not yet complete.
18946func (page ProtectionIntentResourceListPage) NotDone() bool {
18947	return !page.pirl.IsEmpty()
18948}
18949
18950// Response returns the raw server response from the last page request.
18951func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
18952	return page.pirl
18953}
18954
18955// Values returns the slice of values for the current page or nil if there are no values.
18956func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
18957	if page.pirl.IsEmpty() {
18958		return nil
18959	}
18960	return *page.pirl.Value
18961}
18962
18963// Creates a new instance of the ProtectionIntentResourceListPage type.
18964func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
18965	return ProtectionIntentResourceListPage{
18966		fn:   getNextPage,
18967		pirl: cur,
18968	}
18969}
18970
18971// ProtectionPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
18972// long-running operation.
18973type ProtectionPoliciesDeleteFuture struct {
18974	azure.FutureAPI
18975	// Result returns the result of the asynchronous operation.
18976	// If the operation has not completed it will return an error.
18977	Result func(ProtectionPoliciesClient) (autorest.Response, error)
18978}
18979
18980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18981func (future *ProtectionPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
18982	var azFuture azure.Future
18983	if err := json.Unmarshal(body, &azFuture); err != nil {
18984		return err
18985	}
18986	future.FutureAPI = &azFuture
18987	future.Result = future.result
18988	return nil
18989}
18990
18991// result is the default implementation for ProtectionPoliciesDeleteFuture.Result.
18992func (future *ProtectionPoliciesDeleteFuture) result(client ProtectionPoliciesClient) (ar autorest.Response, err error) {
18993	var done bool
18994	done, err = future.DoneWithContext(context.Background(), client)
18995	if err != nil {
18996		err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
18997		return
18998	}
18999	if !done {
19000		ar.Response = future.Response()
19001		err = azure.NewAsyncOpIncompleteError("backup.ProtectionPoliciesDeleteFuture")
19002		return
19003	}
19004	ar.Response = future.Response()
19005	return
19006}
19007
19008// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class.
19009type BasicProtectionPolicy interface {
19010	AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
19011	AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
19012	AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
19013	AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
19014	AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
19015	AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
19016	AsProtectionPolicy() (*ProtectionPolicy, bool)
19017}
19018
19019// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this
19020// class.
19021type ProtectionPolicy struct {
19022	// ProtectedItemsCount - Number of items associated with this policy.
19023	ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
19024	// BackupManagementType - Possible values include: 'ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy', 'ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB'
19025	BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
19026}
19027
19028func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
19029	var m map[string]interface{}
19030	err := json.Unmarshal(body, &m)
19031	if err != nil {
19032		return nil, err
19033	}
19034
19035	switch m["backupManagementType"] {
19036	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload):
19037		var avwpp AzureVMWorkloadProtectionPolicy
19038		err := json.Unmarshal(body, &avwpp)
19039		return avwpp, err
19040	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage):
19041		var afspp AzureFileShareProtectionPolicy
19042		err := json.Unmarshal(body, &afspp)
19043		return afspp, err
19044	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM):
19045		var aispp AzureIaaSVMProtectionPolicy
19046		err := json.Unmarshal(body, &aispp)
19047		return aispp, err
19048	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL):
19049		var aspp AzureSQLProtectionPolicy
19050		err := json.Unmarshal(body, &aspp)
19051		return aspp, err
19052	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy):
19053		var gpp GenericProtectionPolicy
19054		err := json.Unmarshal(body, &gpp)
19055		return gpp, err
19056	case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB):
19057		var mpp MabProtectionPolicy
19058		err := json.Unmarshal(body, &mpp)
19059		return mpp, err
19060	default:
19061		var pp ProtectionPolicy
19062		err := json.Unmarshal(body, &pp)
19063		return pp, err
19064	}
19065}
19066func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
19067	var rawMessages []*json.RawMessage
19068	err := json.Unmarshal(body, &rawMessages)
19069	if err != nil {
19070		return nil, err
19071	}
19072
19073	ppArray := make([]BasicProtectionPolicy, len(rawMessages))
19074
19075	for index, rawMessage := range rawMessages {
19076		pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
19077		if err != nil {
19078			return nil, err
19079		}
19080		ppArray[index] = pp
19081	}
19082	return ppArray, nil
19083}
19084
19085// MarshalJSON is the custom marshaler for ProtectionPolicy.
19086func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
19087	pp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy
19088	objectMap := make(map[string]interface{})
19089	if pp.ProtectedItemsCount != nil {
19090		objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
19091	}
19092	if pp.BackupManagementType != "" {
19093		objectMap["backupManagementType"] = pp.BackupManagementType
19094	}
19095	return json.Marshal(objectMap)
19096}
19097
19098// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19099func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
19100	return nil, false
19101}
19102
19103// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19104func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
19105	return nil, false
19106}
19107
19108// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19109func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
19110	return nil, false
19111}
19112
19113// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19114func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
19115	return nil, false
19116}
19117
19118// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19119func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
19120	return nil, false
19121}
19122
19123// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19124func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
19125	return nil, false
19126}
19127
19128// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19129func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
19130	return &pp, true
19131}
19132
19133// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy.
19134func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
19135	return &pp, true
19136}
19137
19138// ProtectionPolicyQueryObject filters the list backup policies API.
19139type ProtectionPolicyQueryObject struct {
19140	// BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
19141	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
19142	// FabricName - Fabric name for filter
19143	FabricName *string `json:"fabricName,omitempty"`
19144	// WorkloadType - Workload type for the backup policy. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase'
19145	WorkloadType WorkloadType `json:"workloadType,omitempty"`
19146}
19147
19148// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived
19149// from this class.
19150type ProtectionPolicyResource struct {
19151	autorest.Response `json:"-"`
19152	// Properties - ProtectionPolicyResource properties
19153	Properties BasicProtectionPolicy `json:"properties,omitempty"`
19154	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
19155	ID *string `json:"id,omitempty"`
19156	// Name - READ-ONLY; Resource name associated with the resource.
19157	Name *string `json:"name,omitempty"`
19158	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
19159	Type *string `json:"type,omitempty"`
19160	// Location - Resource location.
19161	Location *string `json:"location,omitempty"`
19162	// Tags - Resource tags.
19163	Tags map[string]*string `json:"tags"`
19164	// ETag - Optional ETag.
19165	ETag *string `json:"eTag,omitempty"`
19166}
19167
19168// MarshalJSON is the custom marshaler for ProtectionPolicyResource.
19169func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
19170	objectMap := make(map[string]interface{})
19171	objectMap["properties"] = ppr.Properties
19172	if ppr.Location != nil {
19173		objectMap["location"] = ppr.Location
19174	}
19175	if ppr.Tags != nil {
19176		objectMap["tags"] = ppr.Tags
19177	}
19178	if ppr.ETag != nil {
19179		objectMap["eTag"] = ppr.ETag
19180	}
19181	return json.Marshal(objectMap)
19182}
19183
19184// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct.
19185func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
19186	var m map[string]*json.RawMessage
19187	err := json.Unmarshal(body, &m)
19188	if err != nil {
19189		return err
19190	}
19191	for k, v := range m {
19192		switch k {
19193		case "properties":
19194			if v != nil {
19195				properties, err := unmarshalBasicProtectionPolicy(*v)
19196				if err != nil {
19197					return err
19198				}
19199				ppr.Properties = properties
19200			}
19201		case "id":
19202			if v != nil {
19203				var ID string
19204				err = json.Unmarshal(*v, &ID)
19205				if err != nil {
19206					return err
19207				}
19208				ppr.ID = &ID
19209			}
19210		case "name":
19211			if v != nil {
19212				var name string
19213				err = json.Unmarshal(*v, &name)
19214				if err != nil {
19215					return err
19216				}
19217				ppr.Name = &name
19218			}
19219		case "type":
19220			if v != nil {
19221				var typeVar string
19222				err = json.Unmarshal(*v, &typeVar)
19223				if err != nil {
19224					return err
19225				}
19226				ppr.Type = &typeVar
19227			}
19228		case "location":
19229			if v != nil {
19230				var location string
19231				err = json.Unmarshal(*v, &location)
19232				if err != nil {
19233					return err
19234				}
19235				ppr.Location = &location
19236			}
19237		case "tags":
19238			if v != nil {
19239				var tags map[string]*string
19240				err = json.Unmarshal(*v, &tags)
19241				if err != nil {
19242					return err
19243				}
19244				ppr.Tags = tags
19245			}
19246		case "eTag":
19247			if v != nil {
19248				var eTag string
19249				err = json.Unmarshal(*v, &eTag)
19250				if err != nil {
19251					return err
19252				}
19253				ppr.ETag = &eTag
19254			}
19255		}
19256	}
19257
19258	return nil
19259}
19260
19261// ProtectionPolicyResourceList list of ProtectionPolicy resources
19262type ProtectionPolicyResourceList struct {
19263	autorest.Response `json:"-"`
19264	// Value - List of resources.
19265	Value *[]ProtectionPolicyResource `json:"value,omitempty"`
19266	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
19267	NextLink *string `json:"nextLink,omitempty"`
19268}
19269
19270// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource
19271// values.
19272type ProtectionPolicyResourceListIterator struct {
19273	i    int
19274	page ProtectionPolicyResourceListPage
19275}
19276
19277// NextWithContext advances to the next value.  If there was an error making
19278// the request the iterator does not advance and the error is returned.
19279func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19280	if tracing.IsEnabled() {
19281		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
19282		defer func() {
19283			sc := -1
19284			if iter.Response().Response.Response != nil {
19285				sc = iter.Response().Response.Response.StatusCode
19286			}
19287			tracing.EndSpan(ctx, sc, err)
19288		}()
19289	}
19290	iter.i++
19291	if iter.i < len(iter.page.Values()) {
19292		return nil
19293	}
19294	err = iter.page.NextWithContext(ctx)
19295	if err != nil {
19296		iter.i--
19297		return err
19298	}
19299	iter.i = 0
19300	return nil
19301}
19302
19303// Next advances to the next value.  If there was an error making
19304// the request the iterator does not advance and the error is returned.
19305// Deprecated: Use NextWithContext() instead.
19306func (iter *ProtectionPolicyResourceListIterator) Next() error {
19307	return iter.NextWithContext(context.Background())
19308}
19309
19310// NotDone returns true if the enumeration should be started or is not yet complete.
19311func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
19312	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19313}
19314
19315// Response returns the raw server response from the last page request.
19316func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
19317	return iter.page.Response()
19318}
19319
19320// Value returns the current value or a zero-initialized value if the
19321// iterator has advanced beyond the end of the collection.
19322func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
19323	if !iter.page.NotDone() {
19324		return ProtectionPolicyResource{}
19325	}
19326	return iter.page.Values()[iter.i]
19327}
19328
19329// Creates a new instance of the ProtectionPolicyResourceListIterator type.
19330func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
19331	return ProtectionPolicyResourceListIterator{page: page}
19332}
19333
19334// IsEmpty returns true if the ListResult contains no values.
19335func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
19336	return pprl.Value == nil || len(*pprl.Value) == 0
19337}
19338
19339// hasNextLink returns true if the NextLink is not empty.
19340func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
19341	return pprl.NextLink != nil && len(*pprl.NextLink) != 0
19342}
19343
19344// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results.
19345// It returns nil if no more results exist.
19346func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
19347	if !pprl.hasNextLink() {
19348		return nil, nil
19349	}
19350	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19351		autorest.AsJSON(),
19352		autorest.AsGet(),
19353		autorest.WithBaseURL(to.String(pprl.NextLink)))
19354}
19355
19356// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values.
19357type ProtectionPolicyResourceListPage struct {
19358	fn   func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
19359	pprl ProtectionPolicyResourceList
19360}
19361
19362// NextWithContext advances to the next page of values.  If there was an error making
19363// the request the page does not advance and the error is returned.
19364func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
19365	if tracing.IsEnabled() {
19366		ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
19367		defer func() {
19368			sc := -1
19369			if page.Response().Response.Response != nil {
19370				sc = page.Response().Response.Response.StatusCode
19371			}
19372			tracing.EndSpan(ctx, sc, err)
19373		}()
19374	}
19375	for {
19376		next, err := page.fn(ctx, page.pprl)
19377		if err != nil {
19378			return err
19379		}
19380		page.pprl = next
19381		if !next.hasNextLink() || !next.IsEmpty() {
19382			break
19383		}
19384	}
19385	return nil
19386}
19387
19388// Next advances to the next page of values.  If there was an error making
19389// the request the page does not advance and the error is returned.
19390// Deprecated: Use NextWithContext() instead.
19391func (page *ProtectionPolicyResourceListPage) Next() error {
19392	return page.NextWithContext(context.Background())
19393}
19394
19395// NotDone returns true if the page enumeration should be started or is not yet complete.
19396func (page ProtectionPolicyResourceListPage) NotDone() bool {
19397	return !page.pprl.IsEmpty()
19398}
19399
19400// Response returns the raw server response from the last page request.
19401func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
19402	return page.pprl
19403}
19404
19405// Values returns the slice of values for the current page or nil if there are no values.
19406func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
19407	if page.pprl.IsEmpty() {
19408		return nil
19409	}
19410	return *page.pprl.Value
19411}
19412
19413// Creates a new instance of the ProtectionPolicyResourceListPage type.
19414func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
19415	return ProtectionPolicyResourceListPage{
19416		fn:   getNextPage,
19417		pprl: cur,
19418	}
19419}
19420
19421// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class.
19422type BasicRecoveryPoint interface {
19423	AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
19424	AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
19425	AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
19426	AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
19427	AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
19428	AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
19429	AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
19430	AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
19431	AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
19432	AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
19433	AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
19434	AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
19435	AsRecoveryPoint() (*RecoveryPoint, bool)
19436}
19437
19438// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class.
19439type RecoveryPoint struct {
19440	// ObjectType - Possible values include: 'ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint', 'ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint'
19441	ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
19442}
19443
19444func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
19445	var m map[string]interface{}
19446	err := json.Unmarshal(body, &m)
19447	if err != nil {
19448		return nil, err
19449	}
19450
19451	switch m["objectType"] {
19452	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint):
19453		var afsrp AzureFileShareRecoveryPoint
19454		err := json.Unmarshal(body, &afsrp)
19455		return afsrp, err
19456	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
19457		var awpitrp AzureWorkloadPointInTimeRecoveryPoint
19458		err := json.Unmarshal(body, &awpitrp)
19459		return awpitrp, err
19460	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint):
19461		var awrp AzureWorkloadRecoveryPoint
19462		err := json.Unmarshal(body, &awrp)
19463		return awrp, err
19464	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
19465		var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
19466		err := json.Unmarshal(body, &awshpitrp)
19467		return awshpitrp, err
19468	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
19469		var awshrp AzureWorkloadSAPHanaRecoveryPoint
19470		err := json.Unmarshal(body, &awshrp)
19471		return awshrp, err
19472	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
19473		var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
19474		err := json.Unmarshal(body, &awspitrp)
19475		return awspitrp, err
19476	case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
19477		var awsrp AzureWorkloadSQLRecoveryPoint
19478		err := json.Unmarshal(body, &awsrp)
19479		return awsrp, err
19480	case string(ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint):
19481		var grp GenericRecoveryPoint
19482		err := json.Unmarshal(body, &grp)
19483		return grp, err
19484	case string(ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint):
19485		var ivrp IaasVMRecoveryPoint
19486		err := json.Unmarshal(body, &ivrp)
19487		return ivrp, err
19488	default:
19489		var rp RecoveryPoint
19490		err := json.Unmarshal(body, &rp)
19491		return rp, err
19492	}
19493}
19494func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
19495	var rawMessages []*json.RawMessage
19496	err := json.Unmarshal(body, &rawMessages)
19497	if err != nil {
19498		return nil, err
19499	}
19500
19501	rpArray := make([]BasicRecoveryPoint, len(rawMessages))
19502
19503	for index, rawMessage := range rawMessages {
19504		rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
19505		if err != nil {
19506			return nil, err
19507		}
19508		rpArray[index] = rp
19509	}
19510	return rpArray, nil
19511}
19512
19513// MarshalJSON is the custom marshaler for RecoveryPoint.
19514func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19515	rp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint
19516	objectMap := make(map[string]interface{})
19517	if rp.ObjectType != "" {
19518		objectMap["objectType"] = rp.ObjectType
19519	}
19520	return json.Marshal(objectMap)
19521}
19522
19523// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19524func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
19525	return nil, false
19526}
19527
19528// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19529func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
19530	return nil, false
19531}
19532
19533// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19534func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
19535	return nil, false
19536}
19537
19538// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19539func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
19540	return nil, false
19541}
19542
19543// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19544func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
19545	return nil, false
19546}
19547
19548// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19549func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
19550	return nil, false
19551}
19552
19553// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19554func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
19555	return nil, false
19556}
19557
19558// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19559func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
19560	return nil, false
19561}
19562
19563// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19564func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
19565	return nil, false
19566}
19567
19568// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19569func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
19570	return nil, false
19571}
19572
19573// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19574func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
19575	return nil, false
19576}
19577
19578// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19579func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
19580	return nil, false
19581}
19582
19583// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19584func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
19585	return &rp, true
19586}
19587
19588// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint.
19589func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
19590	return &rp, true
19591}
19592
19593// RecoveryPointDiskConfiguration disk configuration
19594type RecoveryPointDiskConfiguration struct {
19595	// NumberOfDisksIncludedInBackup - Number of disks included in backup
19596	NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
19597	// NumberOfDisksAttachedToVM - Number of disks attached to the VM
19598	NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
19599	// IncludedDiskList - Information of disks included in backup
19600	IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
19601	// ExcludedDiskList - Information of disks excluded from backup
19602	ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
19603}
19604
19605// RecoveryPointMoveReadinessInfo ...
19606type RecoveryPointMoveReadinessInfo struct {
19607	IsReadyForMove *bool   `json:"isReadyForMove,omitempty"`
19608	AdditionalInfo *string `json:"additionalInfo,omitempty"`
19609}
19610
19611// RecoveryPointRehydrationInfo RP Rehydration Info
19612type RecoveryPointRehydrationInfo struct {
19613	// RehydrationRetentionDuration - How long the rehydrated RP should be kept
19614	// Should be ISO8601 Duration format e.g. "P7D"
19615	RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`
19616	// RehydrationPriority - Rehydration Priority. Possible values include: 'RehydrationPriorityStandard', 'RehydrationPriorityHigh'
19617	RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"`
19618}
19619
19620// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from
19621// this class.
19622type RecoveryPointResource struct {
19623	autorest.Response `json:"-"`
19624	// Properties - RecoveryPointResource properties
19625	Properties BasicRecoveryPoint `json:"properties,omitempty"`
19626	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
19627	ID *string `json:"id,omitempty"`
19628	// Name - READ-ONLY; Resource name associated with the resource.
19629	Name *string `json:"name,omitempty"`
19630	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
19631	Type *string `json:"type,omitempty"`
19632	// Location - Resource location.
19633	Location *string `json:"location,omitempty"`
19634	// Tags - Resource tags.
19635	Tags map[string]*string `json:"tags"`
19636	// ETag - Optional ETag.
19637	ETag *string `json:"eTag,omitempty"`
19638}
19639
19640// MarshalJSON is the custom marshaler for RecoveryPointResource.
19641func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
19642	objectMap := make(map[string]interface{})
19643	objectMap["properties"] = rpr.Properties
19644	if rpr.Location != nil {
19645		objectMap["location"] = rpr.Location
19646	}
19647	if rpr.Tags != nil {
19648		objectMap["tags"] = rpr.Tags
19649	}
19650	if rpr.ETag != nil {
19651		objectMap["eTag"] = rpr.ETag
19652	}
19653	return json.Marshal(objectMap)
19654}
19655
19656// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct.
19657func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
19658	var m map[string]*json.RawMessage
19659	err := json.Unmarshal(body, &m)
19660	if err != nil {
19661		return err
19662	}
19663	for k, v := range m {
19664		switch k {
19665		case "properties":
19666			if v != nil {
19667				properties, err := unmarshalBasicRecoveryPoint(*v)
19668				if err != nil {
19669					return err
19670				}
19671				rpr.Properties = properties
19672			}
19673		case "id":
19674			if v != nil {
19675				var ID string
19676				err = json.Unmarshal(*v, &ID)
19677				if err != nil {
19678					return err
19679				}
19680				rpr.ID = &ID
19681			}
19682		case "name":
19683			if v != nil {
19684				var name string
19685				err = json.Unmarshal(*v, &name)
19686				if err != nil {
19687					return err
19688				}
19689				rpr.Name = &name
19690			}
19691		case "type":
19692			if v != nil {
19693				var typeVar string
19694				err = json.Unmarshal(*v, &typeVar)
19695				if err != nil {
19696					return err
19697				}
19698				rpr.Type = &typeVar
19699			}
19700		case "location":
19701			if v != nil {
19702				var location string
19703				err = json.Unmarshal(*v, &location)
19704				if err != nil {
19705					return err
19706				}
19707				rpr.Location = &location
19708			}
19709		case "tags":
19710			if v != nil {
19711				var tags map[string]*string
19712				err = json.Unmarshal(*v, &tags)
19713				if err != nil {
19714					return err
19715				}
19716				rpr.Tags = tags
19717			}
19718		case "eTag":
19719			if v != nil {
19720				var eTag string
19721				err = json.Unmarshal(*v, &eTag)
19722				if err != nil {
19723					return err
19724				}
19725				rpr.ETag = &eTag
19726			}
19727		}
19728	}
19729
19730	return nil
19731}
19732
19733// RecoveryPointResourceList list of RecoveryPoint resources
19734type RecoveryPointResourceList struct {
19735	autorest.Response `json:"-"`
19736	// Value - List of resources.
19737	Value *[]RecoveryPointResource `json:"value,omitempty"`
19738	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
19739	NextLink *string `json:"nextLink,omitempty"`
19740}
19741
19742// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values.
19743type RecoveryPointResourceListIterator struct {
19744	i    int
19745	page RecoveryPointResourceListPage
19746}
19747
19748// NextWithContext advances to the next value.  If there was an error making
19749// the request the iterator does not advance and the error is returned.
19750func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19751	if tracing.IsEnabled() {
19752		ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
19753		defer func() {
19754			sc := -1
19755			if iter.Response().Response.Response != nil {
19756				sc = iter.Response().Response.Response.StatusCode
19757			}
19758			tracing.EndSpan(ctx, sc, err)
19759		}()
19760	}
19761	iter.i++
19762	if iter.i < len(iter.page.Values()) {
19763		return nil
19764	}
19765	err = iter.page.NextWithContext(ctx)
19766	if err != nil {
19767		iter.i--
19768		return err
19769	}
19770	iter.i = 0
19771	return nil
19772}
19773
19774// Next advances to the next value.  If there was an error making
19775// the request the iterator does not advance and the error is returned.
19776// Deprecated: Use NextWithContext() instead.
19777func (iter *RecoveryPointResourceListIterator) Next() error {
19778	return iter.NextWithContext(context.Background())
19779}
19780
19781// NotDone returns true if the enumeration should be started or is not yet complete.
19782func (iter RecoveryPointResourceListIterator) NotDone() bool {
19783	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19784}
19785
19786// Response returns the raw server response from the last page request.
19787func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
19788	return iter.page.Response()
19789}
19790
19791// Value returns the current value or a zero-initialized value if the
19792// iterator has advanced beyond the end of the collection.
19793func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
19794	if !iter.page.NotDone() {
19795		return RecoveryPointResource{}
19796	}
19797	return iter.page.Values()[iter.i]
19798}
19799
19800// Creates a new instance of the RecoveryPointResourceListIterator type.
19801func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
19802	return RecoveryPointResourceListIterator{page: page}
19803}
19804
19805// IsEmpty returns true if the ListResult contains no values.
19806func (rprl RecoveryPointResourceList) IsEmpty() bool {
19807	return rprl.Value == nil || len(*rprl.Value) == 0
19808}
19809
19810// hasNextLink returns true if the NextLink is not empty.
19811func (rprl RecoveryPointResourceList) hasNextLink() bool {
19812	return rprl.NextLink != nil && len(*rprl.NextLink) != 0
19813}
19814
19815// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results.
19816// It returns nil if no more results exist.
19817func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
19818	if !rprl.hasNextLink() {
19819		return nil, nil
19820	}
19821	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19822		autorest.AsJSON(),
19823		autorest.AsGet(),
19824		autorest.WithBaseURL(to.String(rprl.NextLink)))
19825}
19826
19827// RecoveryPointResourceListPage contains a page of RecoveryPointResource values.
19828type RecoveryPointResourceListPage struct {
19829	fn   func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
19830	rprl RecoveryPointResourceList
19831}
19832
19833// NextWithContext advances to the next page of values.  If there was an error making
19834// the request the page does not advance and the error is returned.
19835func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
19836	if tracing.IsEnabled() {
19837		ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
19838		defer func() {
19839			sc := -1
19840			if page.Response().Response.Response != nil {
19841				sc = page.Response().Response.Response.StatusCode
19842			}
19843			tracing.EndSpan(ctx, sc, err)
19844		}()
19845	}
19846	for {
19847		next, err := page.fn(ctx, page.rprl)
19848		if err != nil {
19849			return err
19850		}
19851		page.rprl = next
19852		if !next.hasNextLink() || !next.IsEmpty() {
19853			break
19854		}
19855	}
19856	return nil
19857}
19858
19859// Next advances to the next page of values.  If there was an error making
19860// the request the page does not advance and the error is returned.
19861// Deprecated: Use NextWithContext() instead.
19862func (page *RecoveryPointResourceListPage) Next() error {
19863	return page.NextWithContext(context.Background())
19864}
19865
19866// NotDone returns true if the page enumeration should be started or is not yet complete.
19867func (page RecoveryPointResourceListPage) NotDone() bool {
19868	return !page.rprl.IsEmpty()
19869}
19870
19871// Response returns the raw server response from the last page request.
19872func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
19873	return page.rprl
19874}
19875
19876// Values returns the slice of values for the current page or nil if there are no values.
19877func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
19878	if page.rprl.IsEmpty() {
19879		return nil
19880	}
19881	return *page.rprl.Value
19882}
19883
19884// Creates a new instance of the RecoveryPointResourceListPage type.
19885func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
19886	return RecoveryPointResourceListPage{
19887		fn:   getNextPage,
19888		rprl: cur,
19889	}
19890}
19891
19892// RecoveryPointTierInformation recovery point tier information.
19893type RecoveryPointTierInformation struct {
19894	// Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP', 'RecoveryPointTierTypeArchivedRP'
19895	Type RecoveryPointTierType `json:"type,omitempty"`
19896	// Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted', 'RecoveryPointTierStatusRehydrated'
19897	Status RecoveryPointTierStatus `json:"status,omitempty"`
19898	// ExtendedInfo - Recovery point tier status.
19899	ExtendedInfo map[string]*string `json:"extendedInfo"`
19900}
19901
19902// MarshalJSON is the custom marshaler for RecoveryPointTierInformation.
19903func (rpti RecoveryPointTierInformation) MarshalJSON() ([]byte, error) {
19904	objectMap := make(map[string]interface{})
19905	if rpti.Type != "" {
19906		objectMap["type"] = rpti.Type
19907	}
19908	if rpti.Status != "" {
19909		objectMap["status"] = rpti.Status
19910	}
19911	if rpti.ExtendedInfo != nil {
19912		objectMap["extendedInfo"] = rpti.ExtendedInfo
19913	}
19914	return json.Marshal(objectMap)
19915}
19916
19917// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class.
19918type BasicRequest interface {
19919	AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
19920	AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
19921	AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
19922	AsRequest() (*Request, bool)
19923}
19924
19925// Request base class for backup request. Workload-specific backup requests are derived from this class.
19926type Request struct {
19927	// ObjectType - Possible values include: 'ObjectTypeBasicRequestObjectTypeBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest', 'ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest'
19928	ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
19929}
19930
19931func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
19932	var m map[string]interface{}
19933	err := json.Unmarshal(body, &m)
19934	if err != nil {
19935		return nil, err
19936	}
19937
19938	switch m["objectType"] {
19939	case string(ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest):
19940		var afsbr AzureFileShareBackupRequest
19941		err := json.Unmarshal(body, &afsbr)
19942		return afsbr, err
19943	case string(ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest):
19944		var awbr AzureWorkloadBackupRequest
19945		err := json.Unmarshal(body, &awbr)
19946		return awbr, err
19947	case string(ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest):
19948		var ivbr IaasVMBackupRequest
19949		err := json.Unmarshal(body, &ivbr)
19950		return ivbr, err
19951	default:
19952		var r Request
19953		err := json.Unmarshal(body, &r)
19954		return r, err
19955	}
19956}
19957func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
19958	var rawMessages []*json.RawMessage
19959	err := json.Unmarshal(body, &rawMessages)
19960	if err != nil {
19961		return nil, err
19962	}
19963
19964	rArray := make([]BasicRequest, len(rawMessages))
19965
19966	for index, rawMessage := range rawMessages {
19967		r, err := unmarshalBasicRequest(*rawMessage)
19968		if err != nil {
19969			return nil, err
19970		}
19971		rArray[index] = r
19972	}
19973	return rArray, nil
19974}
19975
19976// MarshalJSON is the custom marshaler for Request.
19977func (r Request) MarshalJSON() ([]byte, error) {
19978	r.ObjectType = ObjectTypeBasicRequestObjectTypeBackupRequest
19979	objectMap := make(map[string]interface{})
19980	if r.ObjectType != "" {
19981		objectMap["objectType"] = r.ObjectType
19982	}
19983	return json.Marshal(objectMap)
19984}
19985
19986// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request.
19987func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
19988	return nil, false
19989}
19990
19991// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request.
19992func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
19993	return nil, false
19994}
19995
19996// AsIaasVMBackupRequest is the BasicRequest implementation for Request.
19997func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
19998	return nil, false
19999}
20000
20001// AsRequest is the BasicRequest implementation for Request.
20002func (r Request) AsRequest() (*Request, bool) {
20003	return &r, true
20004}
20005
20006// AsBasicRequest is the BasicRequest implementation for Request.
20007func (r Request) AsBasicRequest() (BasicRequest, bool) {
20008	return &r, true
20009}
20010
20011// RequestResource base class for backup request. Workload-specific backup requests are derived from this
20012// class.
20013type RequestResource struct {
20014	// Properties - BackupRequestResource properties
20015	Properties BasicRequest `json:"properties,omitempty"`
20016	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20017	ID *string `json:"id,omitempty"`
20018	// Name - READ-ONLY; Resource name associated with the resource.
20019	Name *string `json:"name,omitempty"`
20020	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20021	Type *string `json:"type,omitempty"`
20022	// Location - Resource location.
20023	Location *string `json:"location,omitempty"`
20024	// Tags - Resource tags.
20025	Tags map[string]*string `json:"tags"`
20026	// ETag - Optional ETag.
20027	ETag *string `json:"eTag,omitempty"`
20028}
20029
20030// MarshalJSON is the custom marshaler for RequestResource.
20031func (rr RequestResource) MarshalJSON() ([]byte, error) {
20032	objectMap := make(map[string]interface{})
20033	objectMap["properties"] = rr.Properties
20034	if rr.Location != nil {
20035		objectMap["location"] = rr.Location
20036	}
20037	if rr.Tags != nil {
20038		objectMap["tags"] = rr.Tags
20039	}
20040	if rr.ETag != nil {
20041		objectMap["eTag"] = rr.ETag
20042	}
20043	return json.Marshal(objectMap)
20044}
20045
20046// UnmarshalJSON is the custom unmarshaler for RequestResource struct.
20047func (rr *RequestResource) UnmarshalJSON(body []byte) error {
20048	var m map[string]*json.RawMessage
20049	err := json.Unmarshal(body, &m)
20050	if err != nil {
20051		return err
20052	}
20053	for k, v := range m {
20054		switch k {
20055		case "properties":
20056			if v != nil {
20057				properties, err := unmarshalBasicRequest(*v)
20058				if err != nil {
20059					return err
20060				}
20061				rr.Properties = properties
20062			}
20063		case "id":
20064			if v != nil {
20065				var ID string
20066				err = json.Unmarshal(*v, &ID)
20067				if err != nil {
20068					return err
20069				}
20070				rr.ID = &ID
20071			}
20072		case "name":
20073			if v != nil {
20074				var name string
20075				err = json.Unmarshal(*v, &name)
20076				if err != nil {
20077					return err
20078				}
20079				rr.Name = &name
20080			}
20081		case "type":
20082			if v != nil {
20083				var typeVar string
20084				err = json.Unmarshal(*v, &typeVar)
20085				if err != nil {
20086					return err
20087				}
20088				rr.Type = &typeVar
20089			}
20090		case "location":
20091			if v != nil {
20092				var location string
20093				err = json.Unmarshal(*v, &location)
20094				if err != nil {
20095					return err
20096				}
20097				rr.Location = &location
20098			}
20099		case "tags":
20100			if v != nil {
20101				var tags map[string]*string
20102				err = json.Unmarshal(*v, &tags)
20103				if err != nil {
20104					return err
20105				}
20106				rr.Tags = tags
20107			}
20108		case "eTag":
20109			if v != nil {
20110				var eTag string
20111				err = json.Unmarshal(*v, &eTag)
20112				if err != nil {
20113					return err
20114				}
20115				rr.ETag = &eTag
20116			}
20117		}
20118	}
20119
20120	return nil
20121}
20122
20123// Resource ARM Resource.
20124type Resource struct {
20125	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20126	ID *string `json:"id,omitempty"`
20127	// Name - READ-ONLY; Resource name associated with the resource.
20128	Name *string `json:"name,omitempty"`
20129	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20130	Type *string `json:"type,omitempty"`
20131	// Location - Resource location.
20132	Location *string `json:"location,omitempty"`
20133	// Tags - Resource tags.
20134	Tags map[string]*string `json:"tags"`
20135	// ETag - Optional ETag.
20136	ETag *string `json:"eTag,omitempty"`
20137}
20138
20139// MarshalJSON is the custom marshaler for Resource.
20140func (r Resource) MarshalJSON() ([]byte, error) {
20141	objectMap := make(map[string]interface{})
20142	if r.Location != nil {
20143		objectMap["location"] = r.Location
20144	}
20145	if r.Tags != nil {
20146		objectMap["tags"] = r.Tags
20147	}
20148	if r.ETag != nil {
20149		objectMap["eTag"] = r.ETag
20150	}
20151	return json.Marshal(objectMap)
20152}
20153
20154// ResourceConfig the resource storage details.
20155type ResourceConfig struct {
20156	// StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant', 'StorageTypeZoneRedundant', 'StorageTypeReadAccessGeoZoneRedundant'
20157	StorageModelType StorageType `json:"storageModelType,omitempty"`
20158	// StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant', 'StorageTypeZoneRedundant', 'StorageTypeReadAccessGeoZoneRedundant'
20159	StorageType StorageType `json:"storageType,omitempty"`
20160	// StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked'
20161	StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20162	// CrossRegionRestoreFlag - Opt in details of Cross Region Restore feature.
20163	CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"`
20164}
20165
20166// ResourceConfigResource the resource storage details.
20167type ResourceConfigResource struct {
20168	autorest.Response `json:"-"`
20169	// Properties - BackupResourceConfigResource properties
20170	Properties *ResourceConfig `json:"properties,omitempty"`
20171	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20172	ID *string `json:"id,omitempty"`
20173	// Name - READ-ONLY; Resource name associated with the resource.
20174	Name *string `json:"name,omitempty"`
20175	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20176	Type *string `json:"type,omitempty"`
20177	// Location - Resource location.
20178	Location *string `json:"location,omitempty"`
20179	// Tags - Resource tags.
20180	Tags map[string]*string `json:"tags"`
20181	// ETag - Optional ETag.
20182	ETag *string `json:"eTag,omitempty"`
20183}
20184
20185// MarshalJSON is the custom marshaler for ResourceConfigResource.
20186func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
20187	objectMap := make(map[string]interface{})
20188	if rcr.Properties != nil {
20189		objectMap["properties"] = rcr.Properties
20190	}
20191	if rcr.Location != nil {
20192		objectMap["location"] = rcr.Location
20193	}
20194	if rcr.Tags != nil {
20195		objectMap["tags"] = rcr.Tags
20196	}
20197	if rcr.ETag != nil {
20198		objectMap["eTag"] = rcr.ETag
20199	}
20200	return json.Marshal(objectMap)
20201}
20202
20203// ResourceEncryptionConfig ...
20204type ResourceEncryptionConfig struct {
20205	// EncryptionAtRestType - Encryption At Rest Type. Possible values include: 'EncryptionAtRestTypeInvalid', 'EncryptionAtRestTypeMicrosoftManaged', 'EncryptionAtRestTypeCustomerManaged'
20206	EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20207	// KeyURI - Key Vault Key URI
20208	KeyURI *string `json:"keyUri,omitempty"`
20209	// SubscriptionID - Key Vault Subscription Id
20210	SubscriptionID *string `json:"subscriptionId,omitempty"`
20211	// LastUpdateStatus - Possible values include: 'LastUpdateStatusInvalid', 'LastUpdateStatusNotEnabled', 'LastUpdateStatusPartiallySucceeded', 'LastUpdateStatusPartiallyFailed', 'LastUpdateStatusFailed', 'LastUpdateStatusSucceeded'
20212	LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20213	// InfrastructureEncryptionState - Possible values include: 'InfrastructureEncryptionStateInvalid', 'InfrastructureEncryptionStateDisabled', 'InfrastructureEncryptionStateEnabled'
20214	InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20215}
20216
20217// ResourceEncryptionConfigResource ...
20218type ResourceEncryptionConfigResource struct {
20219	autorest.Response `json:"-"`
20220	// Properties - BackupResourceEncryptionConfigResource properties
20221	Properties *ResourceEncryptionConfig `json:"properties,omitempty"`
20222	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20223	ID *string `json:"id,omitempty"`
20224	// Name - READ-ONLY; Resource name associated with the resource.
20225	Name *string `json:"name,omitempty"`
20226	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20227	Type *string `json:"type,omitempty"`
20228	// Location - Resource location.
20229	Location *string `json:"location,omitempty"`
20230	// Tags - Resource tags.
20231	Tags map[string]*string `json:"tags"`
20232	// ETag - Optional ETag.
20233	ETag *string `json:"eTag,omitempty"`
20234}
20235
20236// MarshalJSON is the custom marshaler for ResourceEncryptionConfigResource.
20237func (recr ResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) {
20238	objectMap := make(map[string]interface{})
20239	if recr.Properties != nil {
20240		objectMap["properties"] = recr.Properties
20241	}
20242	if recr.Location != nil {
20243		objectMap["location"] = recr.Location
20244	}
20245	if recr.Tags != nil {
20246		objectMap["tags"] = recr.Tags
20247	}
20248	if recr.ETag != nil {
20249		objectMap["eTag"] = recr.ETag
20250	}
20251	return json.Marshal(objectMap)
20252}
20253
20254// ResourceHealthDetails health Details for backup items.
20255type ResourceHealthDetails struct {
20256	// Code - READ-ONLY; Health Code
20257	Code *int32 `json:"code,omitempty"`
20258	// Title - READ-ONLY; Health Title
20259	Title *string `json:"title,omitempty"`
20260	// Message - READ-ONLY; Health Message
20261	Message *string `json:"message,omitempty"`
20262	// Recommendations - READ-ONLY; Health Recommended Actions
20263	Recommendations *[]string `json:"recommendations,omitempty"`
20264}
20265
20266// MarshalJSON is the custom marshaler for ResourceHealthDetails.
20267func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
20268	objectMap := make(map[string]interface{})
20269	return json.Marshal(objectMap)
20270}
20271
20272// ResourceList base for all lists of resources.
20273type ResourceList struct {
20274	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
20275	NextLink *string `json:"nextLink,omitempty"`
20276}
20277
20278// ResourceVaultConfig backup resource vault config details.
20279type ResourceVaultConfig struct {
20280	// StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant', 'StorageTypeZoneRedundant', 'StorageTypeReadAccessGeoZoneRedundant'
20281	StorageModelType StorageType `json:"storageModelType,omitempty"`
20282	// StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant', 'StorageTypeZoneRedundant', 'StorageTypeReadAccessGeoZoneRedundant'
20283	StorageType StorageType `json:"storageType,omitempty"`
20284	// StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked'
20285	StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20286	// EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled'
20287	EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
20288	// SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled'
20289	SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
20290}
20291
20292// ResourceVaultConfigResource backup resource vault config details.
20293type ResourceVaultConfigResource struct {
20294	autorest.Response `json:"-"`
20295	// Properties - BackupResourceVaultConfigResource properties
20296	Properties *ResourceVaultConfig `json:"properties,omitempty"`
20297	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20298	ID *string `json:"id,omitempty"`
20299	// Name - READ-ONLY; Resource name associated with the resource.
20300	Name *string `json:"name,omitempty"`
20301	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20302	Type *string `json:"type,omitempty"`
20303	// Location - Resource location.
20304	Location *string `json:"location,omitempty"`
20305	// Tags - Resource tags.
20306	Tags map[string]*string `json:"tags"`
20307	// ETag - Optional ETag.
20308	ETag *string `json:"eTag,omitempty"`
20309}
20310
20311// MarshalJSON is the custom marshaler for ResourceVaultConfigResource.
20312func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
20313	objectMap := make(map[string]interface{})
20314	if rvcr.Properties != nil {
20315		objectMap["properties"] = rvcr.Properties
20316	}
20317	if rvcr.Location != nil {
20318		objectMap["location"] = rvcr.Location
20319	}
20320	if rvcr.Tags != nil {
20321		objectMap["tags"] = rvcr.Tags
20322	}
20323	if rvcr.ETag != nil {
20324		objectMap["eTag"] = rvcr.ETag
20325	}
20326	return json.Marshal(objectMap)
20327}
20328
20329// RestoreFileSpecs restore file specs like file path, type and target folder path info.
20330type RestoreFileSpecs struct {
20331	// Path - Source File/Folder path
20332	Path *string `json:"path,omitempty"`
20333	// FileSpecType - Indicates what the Path variable stands for
20334	FileSpecType *string `json:"fileSpecType,omitempty"`
20335	// TargetFolderPath - Destination folder path in target FileShare
20336	TargetFolderPath *string `json:"targetFolderPath,omitempty"`
20337}
20338
20339// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class.
20340type BasicRestoreRequest interface {
20341	AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
20342	AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
20343	AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
20344	AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
20345	AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20346	AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20347	AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
20348	AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
20349	AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
20350	AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
20351	AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
20352	AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
20353	AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
20354	AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool)
20355	AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
20356	AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
20357	AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
20358	AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
20359	AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
20360	AsRestoreRequest() (*RestoreRequest, bool)
20361}
20362
20363// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this
20364// class.
20365type RestoreRequest struct {
20366	// ObjectType - Possible values include: 'ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest', 'ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest'
20367	ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
20368}
20369
20370func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
20371	var m map[string]interface{}
20372	err := json.Unmarshal(body, &m)
20373	if err != nil {
20374		return nil, err
20375	}
20376
20377	switch m["objectType"] {
20378	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest):
20379		var afsrr AzureFileShareRestoreRequest
20380		err := json.Unmarshal(body, &afsrr)
20381		return afsrr, err
20382	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
20383		var awpitrr AzureWorkloadPointInTimeRestoreRequest
20384		err := json.Unmarshal(body, &awpitrr)
20385		return awpitrr, err
20386	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest):
20387		var awrr AzureWorkloadRestoreRequest
20388		err := json.Unmarshal(body, &awrr)
20389		return awrr, err
20390	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
20391		var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
20392		err := json.Unmarshal(body, &awshpitrr)
20393		return awshpitrr, err
20394	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
20395		var awshrr AzureWorkloadSAPHanaRestoreRequest
20396		err := json.Unmarshal(body, &awshrr)
20397		return awshrr, err
20398	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
20399		var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
20400		err := json.Unmarshal(body, &awspitrr)
20401		return awspitrr, err
20402	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
20403		var awsrr AzureWorkloadSQLRestoreRequest
20404		err := json.Unmarshal(body, &awsrr)
20405		return awsrr, err
20406	case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest):
20407		var ivrr IaasVMRestoreRequest
20408		err := json.Unmarshal(body, &ivrr)
20409		return ivrr, err
20410	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
20411		var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
20412		err := json.Unmarshal(body, &awshpitrwrr)
20413		return awshpitrwrr, err
20414	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
20415		var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
20416		err := json.Unmarshal(body, &awshrwrr)
20417		return awshrwrr, err
20418	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
20419		var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
20420		err := json.Unmarshal(body, &awspitrwrr)
20421		return awspitrwrr, err
20422	case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
20423		var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
20424		err := json.Unmarshal(body, &awsrwrr)
20425		return awsrwrr, err
20426	case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
20427		var ivrwrr IaasVMRestoreWithRehydrationRequest
20428		err := json.Unmarshal(body, &ivrwrr)
20429		return ivrwrr, err
20430	default:
20431		var rr RestoreRequest
20432		err := json.Unmarshal(body, &rr)
20433		return rr, err
20434	}
20435}
20436func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
20437	var rawMessages []*json.RawMessage
20438	err := json.Unmarshal(body, &rawMessages)
20439	if err != nil {
20440		return nil, err
20441	}
20442
20443	rrArray := make([]BasicRestoreRequest, len(rawMessages))
20444
20445	for index, rawMessage := range rawMessages {
20446		rr, err := unmarshalBasicRestoreRequest(*rawMessage)
20447		if err != nil {
20448			return nil, err
20449		}
20450		rrArray[index] = rr
20451	}
20452	return rrArray, nil
20453}
20454
20455// MarshalJSON is the custom marshaler for RestoreRequest.
20456func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
20457	rr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest
20458	objectMap := make(map[string]interface{})
20459	if rr.ObjectType != "" {
20460		objectMap["objectType"] = rr.ObjectType
20461	}
20462	return json.Marshal(objectMap)
20463}
20464
20465// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20466func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
20467	return nil, false
20468}
20469
20470// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20471func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
20472	return nil, false
20473}
20474
20475// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20476func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
20477	return nil, false
20478}
20479
20480// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20481func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
20482	return nil, false
20483}
20484
20485// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20486func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20487	return nil, false
20488}
20489
20490// AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20491func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20492	return nil, false
20493}
20494
20495// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20496func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
20497	return nil, false
20498}
20499
20500// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20501func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
20502	return nil, false
20503}
20504
20505// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20506func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20507	return nil, false
20508}
20509
20510// AsBasicAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20511func (rr RestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20512	return nil, false
20513}
20514
20515// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20516func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
20517	return nil, false
20518}
20519
20520// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20521func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
20522	return nil, false
20523}
20524
20525// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20526func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
20527	return nil, false
20528}
20529
20530// AsBasicIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20531func (rr RestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
20532	return nil, false
20533}
20534
20535// AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for RestoreRequest.
20536func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
20537	return nil, false
20538}
20539
20540// AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for RestoreRequest.
20541func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
20542	return nil, false
20543}
20544
20545// AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for RestoreRequest.
20546func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
20547	return nil, false
20548}
20549
20550// AsAzureWorkloadSQLRestoreWithRehydrateRequest is the BasicRestoreRequest implementation for RestoreRequest.
20551func (rr RestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
20552	return nil, false
20553}
20554
20555// AsIaasVMRestoreWithRehydrationRequest is the BasicRestoreRequest implementation for RestoreRequest.
20556func (rr RestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
20557	return nil, false
20558}
20559
20560// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20561func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
20562	return &rr, true
20563}
20564
20565// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest.
20566func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
20567	return &rr, true
20568}
20569
20570// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived
20571// from this class.
20572type RestoreRequestResource struct {
20573	// Properties - RestoreRequestResource properties
20574	Properties BasicRestoreRequest `json:"properties,omitempty"`
20575	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
20576	ID *string `json:"id,omitempty"`
20577	// Name - READ-ONLY; Resource name associated with the resource.
20578	Name *string `json:"name,omitempty"`
20579	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
20580	Type *string `json:"type,omitempty"`
20581	// Location - Resource location.
20582	Location *string `json:"location,omitempty"`
20583	// Tags - Resource tags.
20584	Tags map[string]*string `json:"tags"`
20585	// ETag - Optional ETag.
20586	ETag *string `json:"eTag,omitempty"`
20587}
20588
20589// MarshalJSON is the custom marshaler for RestoreRequestResource.
20590func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
20591	objectMap := make(map[string]interface{})
20592	objectMap["properties"] = rrr.Properties
20593	if rrr.Location != nil {
20594		objectMap["location"] = rrr.Location
20595	}
20596	if rrr.Tags != nil {
20597		objectMap["tags"] = rrr.Tags
20598	}
20599	if rrr.ETag != nil {
20600		objectMap["eTag"] = rrr.ETag
20601	}
20602	return json.Marshal(objectMap)
20603}
20604
20605// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct.
20606func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
20607	var m map[string]*json.RawMessage
20608	err := json.Unmarshal(body, &m)
20609	if err != nil {
20610		return err
20611	}
20612	for k, v := range m {
20613		switch k {
20614		case "properties":
20615			if v != nil {
20616				properties, err := unmarshalBasicRestoreRequest(*v)
20617				if err != nil {
20618					return err
20619				}
20620				rrr.Properties = properties
20621			}
20622		case "id":
20623			if v != nil {
20624				var ID string
20625				err = json.Unmarshal(*v, &ID)
20626				if err != nil {
20627					return err
20628				}
20629				rrr.ID = &ID
20630			}
20631		case "name":
20632			if v != nil {
20633				var name string
20634				err = json.Unmarshal(*v, &name)
20635				if err != nil {
20636					return err
20637				}
20638				rrr.Name = &name
20639			}
20640		case "type":
20641			if v != nil {
20642				var typeVar string
20643				err = json.Unmarshal(*v, &typeVar)
20644				if err != nil {
20645					return err
20646				}
20647				rrr.Type = &typeVar
20648			}
20649		case "location":
20650			if v != nil {
20651				var location string
20652				err = json.Unmarshal(*v, &location)
20653				if err != nil {
20654					return err
20655				}
20656				rrr.Location = &location
20657			}
20658		case "tags":
20659			if v != nil {
20660				var tags map[string]*string
20661				err = json.Unmarshal(*v, &tags)
20662				if err != nil {
20663					return err
20664				}
20665				rrr.Tags = tags
20666			}
20667		case "eTag":
20668			if v != nil {
20669				var eTag string
20670				err = json.Unmarshal(*v, &eTag)
20671				if err != nil {
20672					return err
20673				}
20674				rrr.ETag = &eTag
20675			}
20676		}
20677	}
20678
20679	return nil
20680}
20681
20682// RestoresTriggerFuture an abstraction for monitoring and retrieving the results of a long-running
20683// operation.
20684type RestoresTriggerFuture struct {
20685	azure.FutureAPI
20686	// Result returns the result of the asynchronous operation.
20687	// If the operation has not completed it will return an error.
20688	Result func(RestoresClient) (autorest.Response, error)
20689}
20690
20691// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20692func (future *RestoresTriggerFuture) UnmarshalJSON(body []byte) error {
20693	var azFuture azure.Future
20694	if err := json.Unmarshal(body, &azFuture); err != nil {
20695		return err
20696	}
20697	future.FutureAPI = &azFuture
20698	future.Result = future.result
20699	return nil
20700}
20701
20702// result is the default implementation for RestoresTriggerFuture.Result.
20703func (future *RestoresTriggerFuture) result(client RestoresClient) (ar autorest.Response, err error) {
20704	var done bool
20705	done, err = future.DoneWithContext(context.Background(), client)
20706	if err != nil {
20707		err = autorest.NewErrorWithError(err, "backup.RestoresTriggerFuture", "Result", future.Response(), "Polling failure")
20708		return
20709	}
20710	if !done {
20711		ar.Response = future.Response()
20712		err = azure.NewAsyncOpIncompleteError("backup.RestoresTriggerFuture")
20713		return
20714	}
20715	ar.Response = future.Response()
20716	return
20717}
20718
20719// RetentionDuration retention duration.
20720type RetentionDuration struct {
20721	// Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times.
20722	// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
20723	Count *int32 `json:"count,omitempty"`
20724	// DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears'
20725	DurationType RetentionDurationType `json:"durationType,omitempty"`
20726}
20727
20728// BasicRetentionPolicy base class for retention policy.
20729type BasicRetentionPolicy interface {
20730	AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
20731	AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
20732	AsRetentionPolicy() (*RetentionPolicy, bool)
20733}
20734
20735// RetentionPolicy base class for retention policy.
20736type RetentionPolicy struct {
20737	// RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy'
20738	RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
20739}
20740
20741func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
20742	var m map[string]interface{}
20743	err := json.Unmarshal(body, &m)
20744	if err != nil {
20745		return nil, err
20746	}
20747
20748	switch m["retentionPolicyType"] {
20749	case string(RetentionPolicyTypeLongTermRetentionPolicy):
20750		var ltrp LongTermRetentionPolicy
20751		err := json.Unmarshal(body, &ltrp)
20752		return ltrp, err
20753	case string(RetentionPolicyTypeSimpleRetentionPolicy):
20754		var srp SimpleRetentionPolicy
20755		err := json.Unmarshal(body, &srp)
20756		return srp, err
20757	default:
20758		var rp RetentionPolicy
20759		err := json.Unmarshal(body, &rp)
20760		return rp, err
20761	}
20762}
20763func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
20764	var rawMessages []*json.RawMessage
20765	err := json.Unmarshal(body, &rawMessages)
20766	if err != nil {
20767		return nil, err
20768	}
20769
20770	rpArray := make([]BasicRetentionPolicy, len(rawMessages))
20771
20772	for index, rawMessage := range rawMessages {
20773		rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
20774		if err != nil {
20775			return nil, err
20776		}
20777		rpArray[index] = rp
20778	}
20779	return rpArray, nil
20780}
20781
20782// MarshalJSON is the custom marshaler for RetentionPolicy.
20783func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
20784	rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
20785	objectMap := make(map[string]interface{})
20786	if rp.RetentionPolicyType != "" {
20787		objectMap["retentionPolicyType"] = rp.RetentionPolicyType
20788	}
20789	return json.Marshal(objectMap)
20790}
20791
20792// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy.
20793func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
20794	return nil, false
20795}
20796
20797// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy.
20798func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
20799	return nil, false
20800}
20801
20802// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy.
20803func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
20804	return &rp, true
20805}
20806
20807// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy.
20808func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
20809	return &rp, true
20810}
20811
20812// BasicSchedulePolicy base class for backup schedule.
20813type BasicSchedulePolicy interface {
20814	AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
20815	AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
20816	AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
20817	AsSchedulePolicy() (*SchedulePolicy, bool)
20818}
20819
20820// SchedulePolicy base class for backup schedule.
20821type SchedulePolicy struct {
20822	// SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy'
20823	SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
20824}
20825
20826func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
20827	var m map[string]interface{}
20828	err := json.Unmarshal(body, &m)
20829	if err != nil {
20830		return nil, err
20831	}
20832
20833	switch m["schedulePolicyType"] {
20834	case string(SchedulePolicyTypeLogSchedulePolicy):
20835		var lsp LogSchedulePolicy
20836		err := json.Unmarshal(body, &lsp)
20837		return lsp, err
20838	case string(SchedulePolicyTypeLongTermSchedulePolicy):
20839		var ltsp LongTermSchedulePolicy
20840		err := json.Unmarshal(body, &ltsp)
20841		return ltsp, err
20842	case string(SchedulePolicyTypeSimpleSchedulePolicy):
20843		var ssp SimpleSchedulePolicy
20844		err := json.Unmarshal(body, &ssp)
20845		return ssp, err
20846	default:
20847		var sp SchedulePolicy
20848		err := json.Unmarshal(body, &sp)
20849		return sp, err
20850	}
20851}
20852func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
20853	var rawMessages []*json.RawMessage
20854	err := json.Unmarshal(body, &rawMessages)
20855	if err != nil {
20856		return nil, err
20857	}
20858
20859	spArray := make([]BasicSchedulePolicy, len(rawMessages))
20860
20861	for index, rawMessage := range rawMessages {
20862		sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
20863		if err != nil {
20864			return nil, err
20865		}
20866		spArray[index] = sp
20867	}
20868	return spArray, nil
20869}
20870
20871// MarshalJSON is the custom marshaler for SchedulePolicy.
20872func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
20873	sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
20874	objectMap := make(map[string]interface{})
20875	if sp.SchedulePolicyType != "" {
20876		objectMap["schedulePolicyType"] = sp.SchedulePolicyType
20877	}
20878	return json.Marshal(objectMap)
20879}
20880
20881// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy.
20882func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
20883	return nil, false
20884}
20885
20886// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy.
20887func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
20888	return nil, false
20889}
20890
20891// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy.
20892func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
20893	return nil, false
20894}
20895
20896// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy.
20897func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
20898	return &sp, true
20899}
20900
20901// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy.
20902func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
20903	return &sp, true
20904}
20905
20906// Settings common settings field for backup management
20907type Settings struct {
20908	// TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
20909	TimeZone *string `json:"timeZone,omitempty"`
20910	// Issqlcompression - SQL compression flag
20911	Issqlcompression *bool `json:"issqlcompression,omitempty"`
20912	// IsCompression - Workload compression flag. This has been added so that 'isSqlCompression'
20913	// will be deprecated once clients upgrade to consider this flag.
20914	IsCompression *bool `json:"isCompression,omitempty"`
20915}
20916
20917// SimpleRetentionPolicy simple policy retention.
20918type SimpleRetentionPolicy struct {
20919	// RetentionDuration - Retention duration of the protection policy.
20920	RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
20921	// RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy'
20922	RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
20923}
20924
20925// MarshalJSON is the custom marshaler for SimpleRetentionPolicy.
20926func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
20927	srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
20928	objectMap := make(map[string]interface{})
20929	if srp.RetentionDuration != nil {
20930		objectMap["retentionDuration"] = srp.RetentionDuration
20931	}
20932	if srp.RetentionPolicyType != "" {
20933		objectMap["retentionPolicyType"] = srp.RetentionPolicyType
20934	}
20935	return json.Marshal(objectMap)
20936}
20937
20938// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy.
20939func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
20940	return nil, false
20941}
20942
20943// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy.
20944func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
20945	return &srp, true
20946}
20947
20948// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy.
20949func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
20950	return nil, false
20951}
20952
20953// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy.
20954func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
20955	return &srp, true
20956}
20957
20958// SimpleSchedulePolicy simple policy schedule.
20959type SimpleSchedulePolicy struct {
20960	// ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly'
20961	ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
20962	// ScheduleRunDays - List of days of week this schedule has to be run.
20963	ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
20964	// ScheduleRunTimes - List of times of day this schedule has to be run.
20965	ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
20966	// ScheduleWeeklyFrequency - At every number weeks this schedule has to be run.
20967	ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
20968	// SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy'
20969	SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
20970}
20971
20972// MarshalJSON is the custom marshaler for SimpleSchedulePolicy.
20973func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
20974	ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
20975	objectMap := make(map[string]interface{})
20976	if ssp.ScheduleRunFrequency != "" {
20977		objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
20978	}
20979	if ssp.ScheduleRunDays != nil {
20980		objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
20981	}
20982	if ssp.ScheduleRunTimes != nil {
20983		objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
20984	}
20985	if ssp.ScheduleWeeklyFrequency != nil {
20986		objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
20987	}
20988	if ssp.SchedulePolicyType != "" {
20989		objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
20990	}
20991	return json.Marshal(objectMap)
20992}
20993
20994// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy.
20995func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
20996	return nil, false
20997}
20998
20999// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy.
21000func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21001	return nil, false
21002}
21003
21004// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy.
21005func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21006	return &ssp, true
21007}
21008
21009// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy.
21010func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21011	return nil, false
21012}
21013
21014// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy.
21015func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21016	return &ssp, true
21017}
21018
21019// SQLDataDirectory sQLDataDirectory info
21020type SQLDataDirectory struct {
21021	// Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog'
21022	Type SQLDataDirectoryType `json:"type,omitempty"`
21023	// Path - File path
21024	Path *string `json:"path,omitempty"`
21025	// LogicalName - Logical name of the file
21026	LogicalName *string `json:"logicalName,omitempty"`
21027}
21028
21029// SQLDataDirectoryMapping encapsulates information regarding data directory
21030type SQLDataDirectoryMapping struct {
21031	// MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog'
21032	MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
21033	// SourceLogicalName - Restore source logical name path
21034	SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
21035	// SourcePath - Restore source path
21036	SourcePath *string `json:"sourcePath,omitempty"`
21037	// TargetPath - Target path
21038	TargetPath *string `json:"targetPath,omitempty"`
21039}
21040
21041// StatusRequest backupStatus request.
21042type StatusRequest struct {
21043	// ResourceType - Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase'
21044	ResourceType DataSourceType `json:"resourceType,omitempty"`
21045	// ResourceID - Entire ARM resource id of the resource
21046	ResourceID *string `json:"resourceId,omitempty"`
21047	// PoLogicalName - Protectable Item Logical Name
21048	PoLogicalName *string `json:"poLogicalName,omitempty"`
21049}
21050
21051// StatusResponse backupStatus response.
21052type StatusResponse struct {
21053	autorest.Response `json:"-"`
21054	// ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
21055	ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
21056	// VaultID - Specifies the arm resource id of the vault
21057	VaultID *string `json:"vaultId,omitempty"`
21058	// FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure'
21059	FabricName FabricName `json:"fabricName,omitempty"`
21060	// ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname.
21061	ContainerName *string `json:"containerName,omitempty"`
21062	// ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname.
21063	ProtectedItemName *string `json:"protectedItemName,omitempty"`
21064	// ErrorCode - ErrorCode in case of intent failed
21065	ErrorCode *string `json:"errorCode,omitempty"`
21066	// ErrorMessage - ErrorMessage in case of intent failed.
21067	ErrorMessage *string `json:"errorMessage,omitempty"`
21068	// PolicyName - Specifies the policy name which is used for protection
21069	PolicyName *string `json:"policyName,omitempty"`
21070	// RegistrationStatus - Container registration status
21071	RegistrationStatus *string `json:"registrationStatus,omitempty"`
21072}
21073
21074// SubProtectionPolicy sub-protection policy which includes schedule and retention
21075type SubProtectionPolicy struct {
21076	// PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull', 'PolicyTypeIncremental'
21077	PolicyType PolicyType `json:"policyType,omitempty"`
21078	// SchedulePolicy - Backup schedule specified as part of backup policy.
21079	SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
21080	// RetentionPolicy - Retention policy with the details on backup copy retention ranges.
21081	RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
21082}
21083
21084// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct.
21085func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
21086	var m map[string]*json.RawMessage
21087	err := json.Unmarshal(body, &m)
21088	if err != nil {
21089		return err
21090	}
21091	for k, v := range m {
21092		switch k {
21093		case "policyType":
21094			if v != nil {
21095				var policyType PolicyType
21096				err = json.Unmarshal(*v, &policyType)
21097				if err != nil {
21098					return err
21099				}
21100				spp.PolicyType = policyType
21101			}
21102		case "schedulePolicy":
21103			if v != nil {
21104				schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
21105				if err != nil {
21106					return err
21107				}
21108				spp.SchedulePolicy = schedulePolicy
21109			}
21110		case "retentionPolicy":
21111			if v != nil {
21112				retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
21113				if err != nil {
21114					return err
21115				}
21116				spp.RetentionPolicy = retentionPolicy
21117			}
21118		}
21119	}
21120
21121	return nil
21122}
21123
21124// TargetAFSRestoreInfo target Azure File Share Info.
21125type TargetAFSRestoreInfo struct {
21126	// Name - File share name
21127	Name *string `json:"name,omitempty"`
21128	// TargetResourceID - Target file share resource ARM ID
21129	TargetResourceID *string `json:"targetResourceId,omitempty"`
21130}
21131
21132// TargetRestoreInfo details about target workload during restore operation.
21133type TargetRestoreInfo struct {
21134	// OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite'
21135	OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
21136	// ContainerID - Resource Id name of the container in which Target DataBase resides
21137	ContainerID *string `json:"containerId,omitempty"`
21138	// DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana
21139	DatabaseName *string `json:"databaseName,omitempty"`
21140	// TargetDirectoryForFileRestore - Target directory location for restore as files.
21141	TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
21142}
21143
21144// TokenInformation the token information details.
21145type TokenInformation struct {
21146	autorest.Response `json:"-"`
21147	// Token - Token value.
21148	Token *string `json:"token,omitempty"`
21149	// ExpiryTimeInUtcTicks - Expiry time of token.
21150	ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
21151	// SecurityPIN - Security PIN
21152	SecurityPIN *string `json:"securityPIN,omitempty"`
21153}
21154
21155// TriggerDataMoveRequest trigger DataMove Request
21156type TriggerDataMoveRequest struct {
21157	// SourceResourceID - ARM Id of source vault
21158	SourceResourceID *string `json:"sourceResourceId,omitempty"`
21159	// SourceRegion - Source Region
21160	SourceRegion *string `json:"sourceRegion,omitempty"`
21161	// DataMoveLevel - DataMove Level. Possible values include: 'DataMoveLevelInvalid', 'DataMoveLevelVault', 'DataMoveLevelContainer'
21162	DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
21163	// CorrelationID - Correlation Id
21164	CorrelationID *string `json:"correlationId,omitempty"`
21165	// SourceContainerArmIds - Source Container ArmIds
21166	SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
21167	// PauseGC - Pause GC
21168	PauseGC *bool `json:"pauseGC,omitempty"`
21169}
21170
21171// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request.
21172type ValidateIaasVMRestoreOperationRequest struct {
21173	// RestoreRequest - Sets restore request to be validated
21174	RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21175	// ObjectType - Possible values include: 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest'
21176	ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21177}
21178
21179// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest.
21180func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21181	vivror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest
21182	objectMap := make(map[string]interface{})
21183	objectMap["restoreRequest"] = vivror.RestoreRequest
21184	if vivror.ObjectType != "" {
21185		objectMap["objectType"] = vivror.ObjectType
21186	}
21187	return json.Marshal(objectMap)
21188}
21189
21190// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest.
21191func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21192	return &vivror, true
21193}
21194
21195// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest.
21196func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21197	return nil, false
21198}
21199
21200// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest.
21201func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21202	return &vivror, true
21203}
21204
21205// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest.
21206func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21207	return nil, false
21208}
21209
21210// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest.
21211func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21212	return &vivror, true
21213}
21214
21215// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct.
21216func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21217	var m map[string]*json.RawMessage
21218	err := json.Unmarshal(body, &m)
21219	if err != nil {
21220		return err
21221	}
21222	for k, v := range m {
21223		switch k {
21224		case "restoreRequest":
21225			if v != nil {
21226				restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21227				if err != nil {
21228					return err
21229				}
21230				vivror.RestoreRequest = restoreRequest
21231			}
21232		case "objectType":
21233			if v != nil {
21234				var objectType ObjectTypeBasicValidateOperationRequest
21235				err = json.Unmarshal(*v, &objectType)
21236				if err != nil {
21237					return err
21238				}
21239				vivror.ObjectType = objectType
21240			}
21241		}
21242	}
21243
21244	return nil
21245}
21246
21247// BasicValidateOperationRequest base class for validate operation request.
21248type BasicValidateOperationRequest interface {
21249	AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21250	AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21251	AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
21252	AsValidateOperationRequest() (*ValidateOperationRequest, bool)
21253}
21254
21255// ValidateOperationRequest base class for validate operation request.
21256type ValidateOperationRequest struct {
21257	// ObjectType - Possible values include: 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest'
21258	ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21259}
21260
21261func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
21262	var m map[string]interface{}
21263	err := json.Unmarshal(body, &m)
21264	if err != nil {
21265		return nil, err
21266	}
21267
21268	switch m["objectType"] {
21269	case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21270		var vivror ValidateIaasVMRestoreOperationRequest
21271		err := json.Unmarshal(body, &vivror)
21272		return vivror, err
21273	case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest):
21274		var vror ValidateRestoreOperationRequest
21275		err := json.Unmarshal(body, &vror)
21276		return vror, err
21277	default:
21278		var vor ValidateOperationRequest
21279		err := json.Unmarshal(body, &vor)
21280		return vor, err
21281	}
21282}
21283func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
21284	var rawMessages []*json.RawMessage
21285	err := json.Unmarshal(body, &rawMessages)
21286	if err != nil {
21287		return nil, err
21288	}
21289
21290	vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
21291
21292	for index, rawMessage := range rawMessages {
21293		vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
21294		if err != nil {
21295			return nil, err
21296		}
21297		vorArray[index] = vor
21298	}
21299	return vorArray, nil
21300}
21301
21302// MarshalJSON is the custom marshaler for ValidateOperationRequest.
21303func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
21304	vor.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest
21305	objectMap := make(map[string]interface{})
21306	if vor.ObjectType != "" {
21307		objectMap["objectType"] = vor.ObjectType
21308	}
21309	return json.Marshal(objectMap)
21310}
21311
21312// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest.
21313func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21314	return nil, false
21315}
21316
21317// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest.
21318func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21319	return nil, false
21320}
21321
21322// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest.
21323func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21324	return nil, false
21325}
21326
21327// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest.
21328func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21329	return &vor, true
21330}
21331
21332// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest.
21333func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21334	return &vor, true
21335}
21336
21337// ValidateOperationResponse base class for validate operation response.
21338type ValidateOperationResponse struct {
21339	// ValidationResults - Gets the validation result
21340	ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
21341}
21342
21343// ValidateOperationsResponse ...
21344type ValidateOperationsResponse struct {
21345	autorest.Response         `json:"-"`
21346	ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
21347}
21348
21349// BasicValidateRestoreOperationRequest azureRestoreValidation request.
21350type BasicValidateRestoreOperationRequest interface {
21351	AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21352	AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21353}
21354
21355// ValidateRestoreOperationRequest azureRestoreValidation request.
21356type ValidateRestoreOperationRequest struct {
21357	// RestoreRequest - Sets restore request to be validated
21358	RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21359	// ObjectType - Possible values include: 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest'
21360	ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21361}
21362
21363func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
21364	var m map[string]interface{}
21365	err := json.Unmarshal(body, &m)
21366	if err != nil {
21367		return nil, err
21368	}
21369
21370	switch m["objectType"] {
21371	case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21372		var vivror ValidateIaasVMRestoreOperationRequest
21373		err := json.Unmarshal(body, &vivror)
21374		return vivror, err
21375	default:
21376		var vror ValidateRestoreOperationRequest
21377		err := json.Unmarshal(body, &vror)
21378		return vror, err
21379	}
21380}
21381func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
21382	var rawMessages []*json.RawMessage
21383	err := json.Unmarshal(body, &rawMessages)
21384	if err != nil {
21385		return nil, err
21386	}
21387
21388	vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
21389
21390	for index, rawMessage := range rawMessages {
21391		vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
21392		if err != nil {
21393			return nil, err
21394		}
21395		vrorArray[index] = vror
21396	}
21397	return vrorArray, nil
21398}
21399
21400// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest.
21401func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21402	vror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest
21403	objectMap := make(map[string]interface{})
21404	objectMap["restoreRequest"] = vror.RestoreRequest
21405	if vror.ObjectType != "" {
21406		objectMap["objectType"] = vror.ObjectType
21407	}
21408	return json.Marshal(objectMap)
21409}
21410
21411// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest.
21412func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21413	return nil, false
21414}
21415
21416// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest.
21417func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21418	return &vror, true
21419}
21420
21421// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest.
21422func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21423	return &vror, true
21424}
21425
21426// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest.
21427func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21428	return nil, false
21429}
21430
21431// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest.
21432func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21433	return &vror, true
21434}
21435
21436// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct.
21437func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21438	var m map[string]*json.RawMessage
21439	err := json.Unmarshal(body, &m)
21440	if err != nil {
21441		return err
21442	}
21443	for k, v := range m {
21444		switch k {
21445		case "restoreRequest":
21446			if v != nil {
21447				restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21448				if err != nil {
21449					return err
21450				}
21451				vror.RestoreRequest = restoreRequest
21452			}
21453		case "objectType":
21454			if v != nil {
21455				var objectType ObjectTypeBasicValidateOperationRequest
21456				err = json.Unmarshal(*v, &objectType)
21457				if err != nil {
21458					return err
21459				}
21460				vror.ObjectType = objectType
21461			}
21462		}
21463	}
21464
21465	return nil
21466}
21467
21468// VaultJob vault level Job
21469type VaultJob struct {
21470	// Duration - Time elapsed during the execution of this job.
21471	Duration *string `json:"duration,omitempty"`
21472	// ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry.
21473	ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
21474	// ErrorDetails - Error details on execution of this job.
21475	ErrorDetails *[]VaultJobErrorInfo `json:"errorDetails,omitempty"`
21476	// ExtendedInfo - Additional information about the job.
21477	ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"`
21478	// EntityFriendlyName - Friendly name of the entity on which the current job is executing.
21479	EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
21480	// BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup'
21481	BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
21482	// Operation - The operation name.
21483	Operation *string `json:"operation,omitempty"`
21484	// Status - Job status.
21485	Status *string `json:"status,omitempty"`
21486	// StartTime - The start time.
21487	StartTime *date.Time `json:"startTime,omitempty"`
21488	// EndTime - The end time.
21489	EndTime *date.Time `json:"endTime,omitempty"`
21490	// ActivityID - ActivityId of job.
21491	ActivityID *string `json:"activityId,omitempty"`
21492	// JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob', 'JobTypeVaultJob'
21493	JobType JobType `json:"jobType,omitempty"`
21494}
21495
21496// MarshalJSON is the custom marshaler for VaultJob.
21497func (vj VaultJob) MarshalJSON() ([]byte, error) {
21498	vj.JobType = JobTypeVaultJob
21499	objectMap := make(map[string]interface{})
21500	if vj.Duration != nil {
21501		objectMap["duration"] = vj.Duration
21502	}
21503	if vj.ActionsInfo != nil {
21504		objectMap["actionsInfo"] = vj.ActionsInfo
21505	}
21506	if vj.ErrorDetails != nil {
21507		objectMap["errorDetails"] = vj.ErrorDetails
21508	}
21509	if vj.ExtendedInfo != nil {
21510		objectMap["extendedInfo"] = vj.ExtendedInfo
21511	}
21512	if vj.EntityFriendlyName != nil {
21513		objectMap["entityFriendlyName"] = vj.EntityFriendlyName
21514	}
21515	if vj.BackupManagementType != "" {
21516		objectMap["backupManagementType"] = vj.BackupManagementType
21517	}
21518	if vj.Operation != nil {
21519		objectMap["operation"] = vj.Operation
21520	}
21521	if vj.Status != nil {
21522		objectMap["status"] = vj.Status
21523	}
21524	if vj.StartTime != nil {
21525		objectMap["startTime"] = vj.StartTime
21526	}
21527	if vj.EndTime != nil {
21528		objectMap["endTime"] = vj.EndTime
21529	}
21530	if vj.ActivityID != nil {
21531		objectMap["activityId"] = vj.ActivityID
21532	}
21533	if vj.JobType != "" {
21534		objectMap["jobType"] = vj.JobType
21535	}
21536	return json.Marshal(objectMap)
21537}
21538
21539// AsAzureIaaSVMJob is the BasicJob implementation for VaultJob.
21540func (vj VaultJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
21541	return nil, false
21542}
21543
21544// AsAzureStorageJob is the BasicJob implementation for VaultJob.
21545func (vj VaultJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
21546	return nil, false
21547}
21548
21549// AsAzureWorkloadJob is the BasicJob implementation for VaultJob.
21550func (vj VaultJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
21551	return nil, false
21552}
21553
21554// AsDpmJob is the BasicJob implementation for VaultJob.
21555func (vj VaultJob) AsDpmJob() (*DpmJob, bool) {
21556	return nil, false
21557}
21558
21559// AsMabJob is the BasicJob implementation for VaultJob.
21560func (vj VaultJob) AsMabJob() (*MabJob, bool) {
21561	return nil, false
21562}
21563
21564// AsVaultJob is the BasicJob implementation for VaultJob.
21565func (vj VaultJob) AsVaultJob() (*VaultJob, bool) {
21566	return &vj, true
21567}
21568
21569// AsJob is the BasicJob implementation for VaultJob.
21570func (vj VaultJob) AsJob() (*Job, bool) {
21571	return nil, false
21572}
21573
21574// AsBasicJob is the BasicJob implementation for VaultJob.
21575func (vj VaultJob) AsBasicJob() (BasicJob, bool) {
21576	return &vj, true
21577}
21578
21579// VaultJobErrorInfo vault Job specific error information
21580type VaultJobErrorInfo struct {
21581	// ErrorCode - Error code.
21582	ErrorCode *int32 `json:"errorCode,omitempty"`
21583	// ErrorString - Localized error string.
21584	ErrorString *string `json:"errorString,omitempty"`
21585	// Recommendations - List of localized recommendations for above error code.
21586	Recommendations *[]string `json:"recommendations,omitempty"`
21587}
21588
21589// VaultJobExtendedInfo vault Job for CMK - has CMK specific info.
21590type VaultJobExtendedInfo struct {
21591	// PropertyBag - Job properties.
21592	PropertyBag map[string]*string `json:"propertyBag"`
21593}
21594
21595// MarshalJSON is the custom marshaler for VaultJobExtendedInfo.
21596func (vjei VaultJobExtendedInfo) MarshalJSON() ([]byte, error) {
21597	objectMap := make(map[string]interface{})
21598	if vjei.PropertyBag != nil {
21599		objectMap["propertyBag"] = vjei.PropertyBag
21600	}
21601	return json.Marshal(objectMap)
21602}
21603
21604// BasicVaultStorageConfigOperationResultResponse operation result response for Vault Storage Config
21605type BasicVaultStorageConfigOperationResultResponse interface {
21606	AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool)
21607	AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool)
21608}
21609
21610// VaultStorageConfigOperationResultResponse operation result response for Vault Storage Config
21611type VaultStorageConfigOperationResultResponse struct {
21612	autorest.Response `json:"-"`
21613	// ObjectType - Possible values include: 'ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse', 'ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse'
21614	ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
21615}
21616
21617func unmarshalBasicVaultStorageConfigOperationResultResponse(body []byte) (BasicVaultStorageConfigOperationResultResponse, error) {
21618	var m map[string]interface{}
21619	err := json.Unmarshal(body, &m)
21620	if err != nil {
21621		return nil, err
21622	}
21623
21624	switch m["objectType"] {
21625	case string(ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse):
21626		var pdmr PrepareDataMoveResponse
21627		err := json.Unmarshal(body, &pdmr)
21628		return pdmr, err
21629	default:
21630		var vscorr VaultStorageConfigOperationResultResponse
21631		err := json.Unmarshal(body, &vscorr)
21632		return vscorr, err
21633	}
21634}
21635func unmarshalBasicVaultStorageConfigOperationResultResponseArray(body []byte) ([]BasicVaultStorageConfigOperationResultResponse, error) {
21636	var rawMessages []*json.RawMessage
21637	err := json.Unmarshal(body, &rawMessages)
21638	if err != nil {
21639		return nil, err
21640	}
21641
21642	vscorrArray := make([]BasicVaultStorageConfigOperationResultResponse, len(rawMessages))
21643
21644	for index, rawMessage := range rawMessages {
21645		vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(*rawMessage)
21646		if err != nil {
21647			return nil, err
21648		}
21649		vscorrArray[index] = vscorr
21650	}
21651	return vscorrArray, nil
21652}
21653
21654// MarshalJSON is the custom marshaler for VaultStorageConfigOperationResultResponse.
21655func (vscorr VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) {
21656	vscorr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse
21657	objectMap := make(map[string]interface{})
21658	if vscorr.ObjectType != "" {
21659		objectMap["objectType"] = vscorr.ObjectType
21660	}
21661	return json.Marshal(objectMap)
21662}
21663
21664// AsPrepareDataMoveResponse is the BasicVaultStorageConfigOperationResultResponse implementation for VaultStorageConfigOperationResultResponse.
21665func (vscorr VaultStorageConfigOperationResultResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
21666	return nil, false
21667}
21668
21669// AsVaultStorageConfigOperationResultResponse is the BasicVaultStorageConfigOperationResultResponse implementation for VaultStorageConfigOperationResultResponse.
21670func (vscorr VaultStorageConfigOperationResultResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
21671	return &vscorr, true
21672}
21673
21674// AsBasicVaultStorageConfigOperationResultResponse is the BasicVaultStorageConfigOperationResultResponse implementation for VaultStorageConfigOperationResultResponse.
21675func (vscorr VaultStorageConfigOperationResultResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
21676	return &vscorr, true
21677}
21678
21679// VaultStorageConfigOperationResultResponseModel ...
21680type VaultStorageConfigOperationResultResponseModel struct {
21681	autorest.Response `json:"-"`
21682	Value             BasicVaultStorageConfigOperationResultResponse `json:"value,omitempty"`
21683}
21684
21685// UnmarshalJSON is the custom unmarshaler for VaultStorageConfigOperationResultResponseModel struct.
21686func (vscorrm *VaultStorageConfigOperationResultResponseModel) UnmarshalJSON(body []byte) error {
21687	vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(body)
21688	if err != nil {
21689		return err
21690	}
21691	vscorrm.Value = vscorr
21692
21693	return nil
21694}
21695
21696// WeeklyRetentionFormat weekly retention format.
21697type WeeklyRetentionFormat struct {
21698	// DaysOfTheWeek - List of days of the week.
21699	DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
21700	// WeeksOfTheMonth - List of weeks of month.
21701	WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
21702}
21703
21704// WeeklyRetentionSchedule weekly retention schedule.
21705type WeeklyRetentionSchedule struct {
21706	// DaysOfTheWeek - List of days of week for weekly retention policy.
21707	DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
21708	// RetentionTimes - Retention times of retention policy.
21709	RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
21710	// RetentionDuration - Retention duration of retention Policy.
21711	RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
21712}
21713
21714// WorkloadCrrAccessToken ...
21715type WorkloadCrrAccessToken struct {
21716	ProtectableObjectUniqueName                 *string `json:"protectableObjectUniqueName,omitempty"`
21717	ProtectableObjectFriendlyName               *string `json:"protectableObjectFriendlyName,omitempty"`
21718	ProtectableObjectWorkloadType               *string `json:"protectableObjectWorkloadType,omitempty"`
21719	ProtectableObjectProtectionState            *string `json:"protectableObjectProtectionState,omitempty"`
21720	ProtectableObjectContainerHostOsName        *string `json:"protectableObjectContainerHostOsName,omitempty"`
21721	ProtectableObjectParentLogicalContainerName *string `json:"protectableObjectParentLogicalContainerName,omitempty"`
21722	// ContainerID - Container Id
21723	ContainerID *string `json:"containerId,omitempty"`
21724	// PolicyName - Policy Name
21725	PolicyName *string `json:"policyName,omitempty"`
21726	// PolicyID - Policy Id
21727	PolicyID *string `json:"policyId,omitempty"`
21728	// AccessTokenString - Access token used for authentication
21729	AccessTokenString *string `json:"accessTokenString,omitempty"`
21730	// SubscriptionID - Subscription Id of the source vault
21731	SubscriptionID *string `json:"subscriptionId,omitempty"`
21732	// ResourceGroupName - Resource Group name of the source vault
21733	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
21734	// ResourceName - Resource Name of the source vault
21735	ResourceName *string `json:"resourceName,omitempty"`
21736	// ResourceID - Resource Id of the source vault
21737	ResourceID *string `json:"resourceId,omitempty"`
21738	// ProtectionContainerID - Protected item container id
21739	ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
21740	// RecoveryPointID - Recovery Point Id
21741	RecoveryPointID *string `json:"recoveryPointId,omitempty"`
21742	// RecoveryPointTime - Recovery Point Time
21743	RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
21744	// ContainerName - Container Unique name
21745	ContainerName *string `json:"containerName,omitempty"`
21746	// ContainerType - Container Type
21747	ContainerType *string `json:"containerType,omitempty"`
21748	// BackupManagementType - Backup Management Type
21749	BackupManagementType *string `json:"backupManagementType,omitempty"`
21750	// DatasourceType - Datasource Type
21751	DatasourceType *string `json:"datasourceType,omitempty"`
21752	// DatasourceName - Datasource Friendly Name
21753	DatasourceName *string `json:"datasourceName,omitempty"`
21754	// DatasourceID - Datasource Id
21755	DatasourceID *string `json:"datasourceId,omitempty"`
21756	// DatasourceContainerName - Datasource Container Unique Name
21757	DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
21758	// CoordinatorServiceStampID - CoordinatorServiceStampId to be used by BCM in restore call
21759	CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
21760	// CoordinatorServiceStampURI - CoordinatorServiceStampUri to be used by BCM in restore call
21761	CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
21762	// ProtectionServiceStampID - ProtectionServiceStampId to be used by BCM in restore call
21763	ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
21764	// ProtectionServiceStampURI - ProtectionServiceStampUri to be used by BCM in restore call
21765	ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
21766	// TokenExtendedInformation - Extended Information about the token like FileSpec etc.
21767	TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
21768	// RpTierInformation - Recovery point Tier Information
21769	RpTierInformation map[string]*string `json:"rpTierInformation"`
21770	// RpOriginalSAOption - Recovery point information: Original SA option
21771	RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
21772	// RpIsManagedVirtualMachine - Recovery point information: Managed virtual machine
21773	RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
21774	// RpVMSizeDescription - Recovery point information: VM size description
21775	RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
21776	// BMSActiveRegion - Active region name of BMS Stamp
21777	BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
21778	// ObjectType - Possible values include: 'ObjectTypeBasicCrrAccessTokenObjectTypeCrrAccessToken', 'ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken'
21779	ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
21780}
21781
21782// MarshalJSON is the custom marshaler for WorkloadCrrAccessToken.
21783func (wcat WorkloadCrrAccessToken) MarshalJSON() ([]byte, error) {
21784	wcat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken
21785	objectMap := make(map[string]interface{})
21786	if wcat.ProtectableObjectUniqueName != nil {
21787		objectMap["protectableObjectUniqueName"] = wcat.ProtectableObjectUniqueName
21788	}
21789	if wcat.ProtectableObjectFriendlyName != nil {
21790		objectMap["protectableObjectFriendlyName"] = wcat.ProtectableObjectFriendlyName
21791	}
21792	if wcat.ProtectableObjectWorkloadType != nil {
21793		objectMap["protectableObjectWorkloadType"] = wcat.ProtectableObjectWorkloadType
21794	}
21795	if wcat.ProtectableObjectProtectionState != nil {
21796		objectMap["protectableObjectProtectionState"] = wcat.ProtectableObjectProtectionState
21797	}
21798	if wcat.ProtectableObjectContainerHostOsName != nil {
21799		objectMap["protectableObjectContainerHostOsName"] = wcat.ProtectableObjectContainerHostOsName
21800	}
21801	if wcat.ProtectableObjectParentLogicalContainerName != nil {
21802		objectMap["protectableObjectParentLogicalContainerName"] = wcat.ProtectableObjectParentLogicalContainerName
21803	}
21804	if wcat.ContainerID != nil {
21805		objectMap["containerId"] = wcat.ContainerID
21806	}
21807	if wcat.PolicyName != nil {
21808		objectMap["policyName"] = wcat.PolicyName
21809	}
21810	if wcat.PolicyID != nil {
21811		objectMap["policyId"] = wcat.PolicyID
21812	}
21813	if wcat.AccessTokenString != nil {
21814		objectMap["accessTokenString"] = wcat.AccessTokenString
21815	}
21816	if wcat.SubscriptionID != nil {
21817		objectMap["subscriptionId"] = wcat.SubscriptionID
21818	}
21819	if wcat.ResourceGroupName != nil {
21820		objectMap["resourceGroupName"] = wcat.ResourceGroupName
21821	}
21822	if wcat.ResourceName != nil {
21823		objectMap["resourceName"] = wcat.ResourceName
21824	}
21825	if wcat.ResourceID != nil {
21826		objectMap["resourceId"] = wcat.ResourceID
21827	}
21828	if wcat.ProtectionContainerID != nil {
21829		objectMap["protectionContainerId"] = wcat.ProtectionContainerID
21830	}
21831	if wcat.RecoveryPointID != nil {
21832		objectMap["recoveryPointId"] = wcat.RecoveryPointID
21833	}
21834	if wcat.RecoveryPointTime != nil {
21835		objectMap["recoveryPointTime"] = wcat.RecoveryPointTime
21836	}
21837	if wcat.ContainerName != nil {
21838		objectMap["containerName"] = wcat.ContainerName
21839	}
21840	if wcat.ContainerType != nil {
21841		objectMap["containerType"] = wcat.ContainerType
21842	}
21843	if wcat.BackupManagementType != nil {
21844		objectMap["backupManagementType"] = wcat.BackupManagementType
21845	}
21846	if wcat.DatasourceType != nil {
21847		objectMap["datasourceType"] = wcat.DatasourceType
21848	}
21849	if wcat.DatasourceName != nil {
21850		objectMap["datasourceName"] = wcat.DatasourceName
21851	}
21852	if wcat.DatasourceID != nil {
21853		objectMap["datasourceId"] = wcat.DatasourceID
21854	}
21855	if wcat.DatasourceContainerName != nil {
21856		objectMap["datasourceContainerName"] = wcat.DatasourceContainerName
21857	}
21858	if wcat.CoordinatorServiceStampID != nil {
21859		objectMap["coordinatorServiceStampId"] = wcat.CoordinatorServiceStampID
21860	}
21861	if wcat.CoordinatorServiceStampURI != nil {
21862		objectMap["coordinatorServiceStampUri"] = wcat.CoordinatorServiceStampURI
21863	}
21864	if wcat.ProtectionServiceStampID != nil {
21865		objectMap["protectionServiceStampId"] = wcat.ProtectionServiceStampID
21866	}
21867	if wcat.ProtectionServiceStampURI != nil {
21868		objectMap["protectionServiceStampUri"] = wcat.ProtectionServiceStampURI
21869	}
21870	if wcat.TokenExtendedInformation != nil {
21871		objectMap["tokenExtendedInformation"] = wcat.TokenExtendedInformation
21872	}
21873	if wcat.RpTierInformation != nil {
21874		objectMap["rpTierInformation"] = wcat.RpTierInformation
21875	}
21876	if wcat.RpOriginalSAOption != nil {
21877		objectMap["rpOriginalSAOption"] = wcat.RpOriginalSAOption
21878	}
21879	if wcat.RpIsManagedVirtualMachine != nil {
21880		objectMap["rpIsManagedVirtualMachine"] = wcat.RpIsManagedVirtualMachine
21881	}
21882	if wcat.RpVMSizeDescription != nil {
21883		objectMap["rpVMSizeDescription"] = wcat.RpVMSizeDescription
21884	}
21885	if wcat.BMSActiveRegion != nil {
21886		objectMap["bMSActiveRegion"] = wcat.BMSActiveRegion
21887	}
21888	if wcat.ObjectType != "" {
21889		objectMap["objectType"] = wcat.ObjectType
21890	}
21891	return json.Marshal(objectMap)
21892}
21893
21894// AsWorkloadCrrAccessToken is the BasicCrrAccessToken implementation for WorkloadCrrAccessToken.
21895func (wcat WorkloadCrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
21896	return &wcat, true
21897}
21898
21899// AsCrrAccessToken is the BasicCrrAccessToken implementation for WorkloadCrrAccessToken.
21900func (wcat WorkloadCrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
21901	return nil, false
21902}
21903
21904// AsBasicCrrAccessToken is the BasicCrrAccessToken implementation for WorkloadCrrAccessToken.
21905func (wcat WorkloadCrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
21906	return &wcat, true
21907}
21908
21909// WorkloadInquiryDetails details of an inquired protectable item.
21910type WorkloadInquiryDetails struct {
21911	// Type - Type of the Workload such as SQL, Oracle etc.
21912	Type *string `json:"type,omitempty"`
21913	// ItemCount - Contains the protectable item Count inside this Container.
21914	ItemCount *int64 `json:"itemCount,omitempty"`
21915	// InquiryValidation - Inquiry validation such as permissions and other backup validations.
21916	InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
21917}
21918
21919// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class.
21920type BasicWorkloadItem interface {
21921	AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
21922	AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
21923	AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
21924	AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
21925	AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
21926	AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
21927	AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
21928	AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
21929	AsWorkloadItem() (*WorkloadItem, bool)
21930}
21931
21932// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class.
21933type WorkloadItem struct {
21934	// BackupManagementType - Type of backup management to backup an item.
21935	BackupManagementType *string `json:"backupManagementType,omitempty"`
21936	// WorkloadType - Type of workload for the backup management
21937	WorkloadType *string `json:"workloadType,omitempty"`
21938	// FriendlyName - Friendly name of the backup item.
21939	FriendlyName *string `json:"friendlyName,omitempty"`
21940	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
21941	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
21942	// WorkloadItemType - Possible values include: 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase', 'WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance'
21943	WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
21944}
21945
21946func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
21947	var m map[string]interface{}
21948	err := json.Unmarshal(body, &m)
21949	if err != nil {
21950		return nil, err
21951	}
21952
21953	switch m["workloadItemType"] {
21954	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem):
21955		var avwi AzureVMWorkloadItem
21956		err := json.Unmarshal(body, &avwi)
21957		return avwi, err
21958	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
21959		var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
21960		err := json.Unmarshal(body, &avwsadwi)
21961		return avwsadwi, err
21962	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
21963		var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
21964		err := json.Unmarshal(body, &avwsaswi)
21965		return avwsaswi, err
21966	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
21967		var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
21968		err := json.Unmarshal(body, &avwshdwi)
21969		return avwshdwi, err
21970	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
21971		var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
21972		err := json.Unmarshal(body, &avwshswi)
21973		return avwshswi, err
21974	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
21975		var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
21976		err := json.Unmarshal(body, &avwsdwi)
21977		return avwsdwi, err
21978	case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
21979		var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
21980		err := json.Unmarshal(body, &avwsiwi)
21981		return avwsiwi, err
21982	default:
21983		var wi WorkloadItem
21984		err := json.Unmarshal(body, &wi)
21985		return wi, err
21986	}
21987}
21988func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
21989	var rawMessages []*json.RawMessage
21990	err := json.Unmarshal(body, &rawMessages)
21991	if err != nil {
21992		return nil, err
21993	}
21994
21995	wiArray := make([]BasicWorkloadItem, len(rawMessages))
21996
21997	for index, rawMessage := range rawMessages {
21998		wi, err := unmarshalBasicWorkloadItem(*rawMessage)
21999		if err != nil {
22000			return nil, err
22001		}
22002		wiArray[index] = wi
22003	}
22004	return wiArray, nil
22005}
22006
22007// MarshalJSON is the custom marshaler for WorkloadItem.
22008func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
22009	wi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem
22010	objectMap := make(map[string]interface{})
22011	if wi.BackupManagementType != nil {
22012		objectMap["backupManagementType"] = wi.BackupManagementType
22013	}
22014	if wi.WorkloadType != nil {
22015		objectMap["workloadType"] = wi.WorkloadType
22016	}
22017	if wi.FriendlyName != nil {
22018		objectMap["friendlyName"] = wi.FriendlyName
22019	}
22020	if wi.ProtectionState != "" {
22021		objectMap["protectionState"] = wi.ProtectionState
22022	}
22023	if wi.WorkloadItemType != "" {
22024		objectMap["workloadItemType"] = wi.WorkloadItemType
22025	}
22026	return json.Marshal(objectMap)
22027}
22028
22029// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22030func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
22031	return nil, false
22032}
22033
22034// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22035func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
22036	return nil, false
22037}
22038
22039// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22040func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
22041	return nil, false
22042}
22043
22044// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22045func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
22046	return nil, false
22047}
22048
22049// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22050func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
22051	return nil, false
22052}
22053
22054// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22055func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
22056	return nil, false
22057}
22058
22059// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22060func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
22061	return nil, false
22062}
22063
22064// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22065func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
22066	return nil, false
22067}
22068
22069// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22070func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
22071	return &wi, true
22072}
22073
22074// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem.
22075func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
22076	return &wi, true
22077}
22078
22079// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this
22080// class.
22081type WorkloadItemResource struct {
22082	// Properties - WorkloadItemResource properties
22083	Properties BasicWorkloadItem `json:"properties,omitempty"`
22084	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
22085	ID *string `json:"id,omitempty"`
22086	// Name - READ-ONLY; Resource name associated with the resource.
22087	Name *string `json:"name,omitempty"`
22088	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
22089	Type *string `json:"type,omitempty"`
22090	// Location - Resource location.
22091	Location *string `json:"location,omitempty"`
22092	// Tags - Resource tags.
22093	Tags map[string]*string `json:"tags"`
22094	// ETag - Optional ETag.
22095	ETag *string `json:"eTag,omitempty"`
22096}
22097
22098// MarshalJSON is the custom marshaler for WorkloadItemResource.
22099func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
22100	objectMap := make(map[string]interface{})
22101	objectMap["properties"] = wir.Properties
22102	if wir.Location != nil {
22103		objectMap["location"] = wir.Location
22104	}
22105	if wir.Tags != nil {
22106		objectMap["tags"] = wir.Tags
22107	}
22108	if wir.ETag != nil {
22109		objectMap["eTag"] = wir.ETag
22110	}
22111	return json.Marshal(objectMap)
22112}
22113
22114// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct.
22115func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
22116	var m map[string]*json.RawMessage
22117	err := json.Unmarshal(body, &m)
22118	if err != nil {
22119		return err
22120	}
22121	for k, v := range m {
22122		switch k {
22123		case "properties":
22124			if v != nil {
22125				properties, err := unmarshalBasicWorkloadItem(*v)
22126				if err != nil {
22127					return err
22128				}
22129				wir.Properties = properties
22130			}
22131		case "id":
22132			if v != nil {
22133				var ID string
22134				err = json.Unmarshal(*v, &ID)
22135				if err != nil {
22136					return err
22137				}
22138				wir.ID = &ID
22139			}
22140		case "name":
22141			if v != nil {
22142				var name string
22143				err = json.Unmarshal(*v, &name)
22144				if err != nil {
22145					return err
22146				}
22147				wir.Name = &name
22148			}
22149		case "type":
22150			if v != nil {
22151				var typeVar string
22152				err = json.Unmarshal(*v, &typeVar)
22153				if err != nil {
22154					return err
22155				}
22156				wir.Type = &typeVar
22157			}
22158		case "location":
22159			if v != nil {
22160				var location string
22161				err = json.Unmarshal(*v, &location)
22162				if err != nil {
22163					return err
22164				}
22165				wir.Location = &location
22166			}
22167		case "tags":
22168			if v != nil {
22169				var tags map[string]*string
22170				err = json.Unmarshal(*v, &tags)
22171				if err != nil {
22172					return err
22173				}
22174				wir.Tags = tags
22175			}
22176		case "eTag":
22177			if v != nil {
22178				var eTag string
22179				err = json.Unmarshal(*v, &eTag)
22180				if err != nil {
22181					return err
22182				}
22183				wir.ETag = &eTag
22184			}
22185		}
22186	}
22187
22188	return nil
22189}
22190
22191// WorkloadItemResourceList list of WorkloadItem resources
22192type WorkloadItemResourceList struct {
22193	autorest.Response `json:"-"`
22194	// Value - List of resources.
22195	Value *[]WorkloadItemResource `json:"value,omitempty"`
22196	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
22197	NextLink *string `json:"nextLink,omitempty"`
22198}
22199
22200// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values.
22201type WorkloadItemResourceListIterator struct {
22202	i    int
22203	page WorkloadItemResourceListPage
22204}
22205
22206// NextWithContext advances to the next value.  If there was an error making
22207// the request the iterator does not advance and the error is returned.
22208func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22209	if tracing.IsEnabled() {
22210		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
22211		defer func() {
22212			sc := -1
22213			if iter.Response().Response.Response != nil {
22214				sc = iter.Response().Response.Response.StatusCode
22215			}
22216			tracing.EndSpan(ctx, sc, err)
22217		}()
22218	}
22219	iter.i++
22220	if iter.i < len(iter.page.Values()) {
22221		return nil
22222	}
22223	err = iter.page.NextWithContext(ctx)
22224	if err != nil {
22225		iter.i--
22226		return err
22227	}
22228	iter.i = 0
22229	return nil
22230}
22231
22232// Next advances to the next value.  If there was an error making
22233// the request the iterator does not advance and the error is returned.
22234// Deprecated: Use NextWithContext() instead.
22235func (iter *WorkloadItemResourceListIterator) Next() error {
22236	return iter.NextWithContext(context.Background())
22237}
22238
22239// NotDone returns true if the enumeration should be started or is not yet complete.
22240func (iter WorkloadItemResourceListIterator) NotDone() bool {
22241	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22242}
22243
22244// Response returns the raw server response from the last page request.
22245func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
22246	return iter.page.Response()
22247}
22248
22249// Value returns the current value or a zero-initialized value if the
22250// iterator has advanced beyond the end of the collection.
22251func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
22252	if !iter.page.NotDone() {
22253		return WorkloadItemResource{}
22254	}
22255	return iter.page.Values()[iter.i]
22256}
22257
22258// Creates a new instance of the WorkloadItemResourceListIterator type.
22259func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
22260	return WorkloadItemResourceListIterator{page: page}
22261}
22262
22263// IsEmpty returns true if the ListResult contains no values.
22264func (wirl WorkloadItemResourceList) IsEmpty() bool {
22265	return wirl.Value == nil || len(*wirl.Value) == 0
22266}
22267
22268// hasNextLink returns true if the NextLink is not empty.
22269func (wirl WorkloadItemResourceList) hasNextLink() bool {
22270	return wirl.NextLink != nil && len(*wirl.NextLink) != 0
22271}
22272
22273// workloadItemResourceListPreparer prepares a request to retrieve the next set of results.
22274// It returns nil if no more results exist.
22275func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22276	if !wirl.hasNextLink() {
22277		return nil, nil
22278	}
22279	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22280		autorest.AsJSON(),
22281		autorest.AsGet(),
22282		autorest.WithBaseURL(to.String(wirl.NextLink)))
22283}
22284
22285// WorkloadItemResourceListPage contains a page of WorkloadItemResource values.
22286type WorkloadItemResourceListPage struct {
22287	fn   func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
22288	wirl WorkloadItemResourceList
22289}
22290
22291// NextWithContext advances to the next page of values.  If there was an error making
22292// the request the page does not advance and the error is returned.
22293func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22294	if tracing.IsEnabled() {
22295		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
22296		defer func() {
22297			sc := -1
22298			if page.Response().Response.Response != nil {
22299				sc = page.Response().Response.Response.StatusCode
22300			}
22301			tracing.EndSpan(ctx, sc, err)
22302		}()
22303	}
22304	for {
22305		next, err := page.fn(ctx, page.wirl)
22306		if err != nil {
22307			return err
22308		}
22309		page.wirl = next
22310		if !next.hasNextLink() || !next.IsEmpty() {
22311			break
22312		}
22313	}
22314	return nil
22315}
22316
22317// Next advances to the next page of values.  If there was an error making
22318// the request the page does not advance and the error is returned.
22319// Deprecated: Use NextWithContext() instead.
22320func (page *WorkloadItemResourceListPage) Next() error {
22321	return page.NextWithContext(context.Background())
22322}
22323
22324// NotDone returns true if the page enumeration should be started or is not yet complete.
22325func (page WorkloadItemResourceListPage) NotDone() bool {
22326	return !page.wirl.IsEmpty()
22327}
22328
22329// Response returns the raw server response from the last page request.
22330func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
22331	return page.wirl
22332}
22333
22334// Values returns the slice of values for the current page or nil if there are no values.
22335func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
22336	if page.wirl.IsEmpty() {
22337		return nil
22338	}
22339	return *page.wirl.Value
22340}
22341
22342// Creates a new instance of the WorkloadItemResourceListPage type.
22343func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
22344	return WorkloadItemResourceListPage{
22345		fn:   getNextPage,
22346		wirl: cur,
22347	}
22348}
22349
22350// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class.
22351type BasicWorkloadProtectableItem interface {
22352	AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
22353	AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
22354	AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
22355	AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
22356	AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
22357	AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
22358	AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
22359	AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
22360	AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
22361	AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
22362	AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
22363	AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
22364	AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
22365	AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
22366}
22367
22368// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this
22369// class.
22370type WorkloadProtectableItem struct {
22371	// BackupManagementType - Type of backup management to backup an item.
22372	BackupManagementType *string `json:"backupManagementType,omitempty"`
22373	// WorkloadType - Type of workload for the backup management
22374	WorkloadType *string `json:"workloadType,omitempty"`
22375	// FriendlyName - Friendly name of the backup item.
22376	FriendlyName *string `json:"friendlyName,omitempty"`
22377	// ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed'
22378	ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22379	// ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem'
22380	ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
22381}
22382
22383func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
22384	var m map[string]interface{}
22385	err := json.Unmarshal(body, &m)
22386	if err != nil {
22387		return nil, err
22388	}
22389
22390	switch m["protectableItemType"] {
22391	case string(ProtectableItemTypeAzureFileShare):
22392		var afspi AzureFileShareProtectableItem
22393		err := json.Unmarshal(body, &afspi)
22394		return afspi, err
22395	case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
22396		var aisccvpi AzureIaaSClassicComputeVMProtectableItem
22397		err := json.Unmarshal(body, &aisccvpi)
22398		return aisccvpi, err
22399	case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
22400		var aiscvpi AzureIaaSComputeVMProtectableItem
22401		err := json.Unmarshal(body, &aiscvpi)
22402		return aiscvpi, err
22403	case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
22404		var avwpi AzureVMWorkloadProtectableItem
22405		err := json.Unmarshal(body, &avwpi)
22406		return avwpi, err
22407	case string(ProtectableItemTypeSAPAseSystem):
22408		var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
22409		err := json.Unmarshal(body, &avwsaspi)
22410		return avwsaspi, err
22411	case string(ProtectableItemTypeSAPHanaDatabase):
22412		var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
22413		err := json.Unmarshal(body, &avwshdpi)
22414		return avwshdpi, err
22415	case string(ProtectableItemTypeSAPHanaSystem):
22416		var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
22417		err := json.Unmarshal(body, &avwshspi)
22418		return avwshspi, err
22419	case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
22420		var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
22421		err := json.Unmarshal(body, &avwsagpi)
22422		return avwsagpi, err
22423	case string(ProtectableItemTypeSQLDataBase):
22424		var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
22425		err := json.Unmarshal(body, &avwsdpi)
22426		return avwsdpi, err
22427	case string(ProtectableItemTypeSQLInstance):
22428		var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
22429		err := json.Unmarshal(body, &avwsipi)
22430		return avwsipi, err
22431	case string(ProtectableItemTypeIaaSVMProtectableItem):
22432		var ispi IaaSVMProtectableItem
22433		err := json.Unmarshal(body, &ispi)
22434		return ispi, err
22435	default:
22436		var wpi WorkloadProtectableItem
22437		err := json.Unmarshal(body, &wpi)
22438		return wpi, err
22439	}
22440}
22441func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
22442	var rawMessages []*json.RawMessage
22443	err := json.Unmarshal(body, &rawMessages)
22444	if err != nil {
22445		return nil, err
22446	}
22447
22448	wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
22449
22450	for index, rawMessage := range rawMessages {
22451		wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
22452		if err != nil {
22453			return nil, err
22454		}
22455		wpiArray[index] = wpi
22456	}
22457	return wpiArray, nil
22458}
22459
22460// MarshalJSON is the custom marshaler for WorkloadProtectableItem.
22461func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
22462	wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
22463	objectMap := make(map[string]interface{})
22464	if wpi.BackupManagementType != nil {
22465		objectMap["backupManagementType"] = wpi.BackupManagementType
22466	}
22467	if wpi.WorkloadType != nil {
22468		objectMap["workloadType"] = wpi.WorkloadType
22469	}
22470	if wpi.FriendlyName != nil {
22471		objectMap["friendlyName"] = wpi.FriendlyName
22472	}
22473	if wpi.ProtectionState != "" {
22474		objectMap["protectionState"] = wpi.ProtectionState
22475	}
22476	if wpi.ProtectableItemType != "" {
22477		objectMap["protectableItemType"] = wpi.ProtectableItemType
22478	}
22479	return json.Marshal(objectMap)
22480}
22481
22482// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22483func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
22484	return nil, false
22485}
22486
22487// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22488func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
22489	return nil, false
22490}
22491
22492// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22493func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
22494	return nil, false
22495}
22496
22497// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22498func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
22499	return nil, false
22500}
22501
22502// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22503func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
22504	return nil, false
22505}
22506
22507// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22508func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
22509	return nil, false
22510}
22511
22512// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22513func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
22514	return nil, false
22515}
22516
22517// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22518func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
22519	return nil, false
22520}
22521
22522// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22523func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
22524	return nil, false
22525}
22526
22527// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22528func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
22529	return nil, false
22530}
22531
22532// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22533func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
22534	return nil, false
22535}
22536
22537// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22538func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
22539	return nil, false
22540}
22541
22542// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22543func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
22544	return nil, false
22545}
22546
22547// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22548func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
22549	return &wpi, true
22550}
22551
22552// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem.
22553func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
22554	return &wpi, true
22555}
22556
22557// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived
22558// from this class.
22559type WorkloadProtectableItemResource struct {
22560	// Properties - WorkloadProtectableItemResource properties
22561	Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
22562	// ID - READ-ONLY; Resource Id represents the complete path to the resource.
22563	ID *string `json:"id,omitempty"`
22564	// Name - READ-ONLY; Resource name associated with the resource.
22565	Name *string `json:"name,omitempty"`
22566	// Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
22567	Type *string `json:"type,omitempty"`
22568	// Location - Resource location.
22569	Location *string `json:"location,omitempty"`
22570	// Tags - Resource tags.
22571	Tags map[string]*string `json:"tags"`
22572	// ETag - Optional ETag.
22573	ETag *string `json:"eTag,omitempty"`
22574}
22575
22576// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource.
22577func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
22578	objectMap := make(map[string]interface{})
22579	objectMap["properties"] = wpir.Properties
22580	if wpir.Location != nil {
22581		objectMap["location"] = wpir.Location
22582	}
22583	if wpir.Tags != nil {
22584		objectMap["tags"] = wpir.Tags
22585	}
22586	if wpir.ETag != nil {
22587		objectMap["eTag"] = wpir.ETag
22588	}
22589	return json.Marshal(objectMap)
22590}
22591
22592// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct.
22593func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
22594	var m map[string]*json.RawMessage
22595	err := json.Unmarshal(body, &m)
22596	if err != nil {
22597		return err
22598	}
22599	for k, v := range m {
22600		switch k {
22601		case "properties":
22602			if v != nil {
22603				properties, err := unmarshalBasicWorkloadProtectableItem(*v)
22604				if err != nil {
22605					return err
22606				}
22607				wpir.Properties = properties
22608			}
22609		case "id":
22610			if v != nil {
22611				var ID string
22612				err = json.Unmarshal(*v, &ID)
22613				if err != nil {
22614					return err
22615				}
22616				wpir.ID = &ID
22617			}
22618		case "name":
22619			if v != nil {
22620				var name string
22621				err = json.Unmarshal(*v, &name)
22622				if err != nil {
22623					return err
22624				}
22625				wpir.Name = &name
22626			}
22627		case "type":
22628			if v != nil {
22629				var typeVar string
22630				err = json.Unmarshal(*v, &typeVar)
22631				if err != nil {
22632					return err
22633				}
22634				wpir.Type = &typeVar
22635			}
22636		case "location":
22637			if v != nil {
22638				var location string
22639				err = json.Unmarshal(*v, &location)
22640				if err != nil {
22641					return err
22642				}
22643				wpir.Location = &location
22644			}
22645		case "tags":
22646			if v != nil {
22647				var tags map[string]*string
22648				err = json.Unmarshal(*v, &tags)
22649				if err != nil {
22650					return err
22651				}
22652				wpir.Tags = tags
22653			}
22654		case "eTag":
22655			if v != nil {
22656				var eTag string
22657				err = json.Unmarshal(*v, &eTag)
22658				if err != nil {
22659					return err
22660				}
22661				wpir.ETag = &eTag
22662			}
22663		}
22664	}
22665
22666	return nil
22667}
22668
22669// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources
22670type WorkloadProtectableItemResourceList struct {
22671	autorest.Response `json:"-"`
22672	// Value - List of resources.
22673	Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
22674	// NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
22675	NextLink *string `json:"nextLink,omitempty"`
22676}
22677
22678// WorkloadProtectableItemResourceListIterator provides access to a complete listing of
22679// WorkloadProtectableItemResource values.
22680type WorkloadProtectableItemResourceListIterator struct {
22681	i    int
22682	page WorkloadProtectableItemResourceListPage
22683}
22684
22685// NextWithContext advances to the next value.  If there was an error making
22686// the request the iterator does not advance and the error is returned.
22687func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22688	if tracing.IsEnabled() {
22689		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
22690		defer func() {
22691			sc := -1
22692			if iter.Response().Response.Response != nil {
22693				sc = iter.Response().Response.Response.StatusCode
22694			}
22695			tracing.EndSpan(ctx, sc, err)
22696		}()
22697	}
22698	iter.i++
22699	if iter.i < len(iter.page.Values()) {
22700		return nil
22701	}
22702	err = iter.page.NextWithContext(ctx)
22703	if err != nil {
22704		iter.i--
22705		return err
22706	}
22707	iter.i = 0
22708	return nil
22709}
22710
22711// Next advances to the next value.  If there was an error making
22712// the request the iterator does not advance and the error is returned.
22713// Deprecated: Use NextWithContext() instead.
22714func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
22715	return iter.NextWithContext(context.Background())
22716}
22717
22718// NotDone returns true if the enumeration should be started or is not yet complete.
22719func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
22720	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22721}
22722
22723// Response returns the raw server response from the last page request.
22724func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
22725	return iter.page.Response()
22726}
22727
22728// Value returns the current value or a zero-initialized value if the
22729// iterator has advanced beyond the end of the collection.
22730func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
22731	if !iter.page.NotDone() {
22732		return WorkloadProtectableItemResource{}
22733	}
22734	return iter.page.Values()[iter.i]
22735}
22736
22737// Creates a new instance of the WorkloadProtectableItemResourceListIterator type.
22738func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
22739	return WorkloadProtectableItemResourceListIterator{page: page}
22740}
22741
22742// IsEmpty returns true if the ListResult contains no values.
22743func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
22744	return wpirl.Value == nil || len(*wpirl.Value) == 0
22745}
22746
22747// hasNextLink returns true if the NextLink is not empty.
22748func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
22749	return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
22750}
22751
22752// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results.
22753// It returns nil if no more results exist.
22754func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22755	if !wpirl.hasNextLink() {
22756		return nil, nil
22757	}
22758	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22759		autorest.AsJSON(),
22760		autorest.AsGet(),
22761		autorest.WithBaseURL(to.String(wpirl.NextLink)))
22762}
22763
22764// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values.
22765type WorkloadProtectableItemResourceListPage struct {
22766	fn    func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
22767	wpirl WorkloadProtectableItemResourceList
22768}
22769
22770// NextWithContext advances to the next page of values.  If there was an error making
22771// the request the page does not advance and the error is returned.
22772func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22773	if tracing.IsEnabled() {
22774		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
22775		defer func() {
22776			sc := -1
22777			if page.Response().Response.Response != nil {
22778				sc = page.Response().Response.Response.StatusCode
22779			}
22780			tracing.EndSpan(ctx, sc, err)
22781		}()
22782	}
22783	for {
22784		next, err := page.fn(ctx, page.wpirl)
22785		if err != nil {
22786			return err
22787		}
22788		page.wpirl = next
22789		if !next.hasNextLink() || !next.IsEmpty() {
22790			break
22791		}
22792	}
22793	return nil
22794}
22795
22796// Next advances to the next page of values.  If there was an error making
22797// the request the page does not advance and the error is returned.
22798// Deprecated: Use NextWithContext() instead.
22799func (page *WorkloadProtectableItemResourceListPage) Next() error {
22800	return page.NextWithContext(context.Background())
22801}
22802
22803// NotDone returns true if the page enumeration should be started or is not yet complete.
22804func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
22805	return !page.wpirl.IsEmpty()
22806}
22807
22808// Response returns the raw server response from the last page request.
22809func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
22810	return page.wpirl
22811}
22812
22813// Values returns the slice of values for the current page or nil if there are no values.
22814func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
22815	if page.wpirl.IsEmpty() {
22816		return nil
22817	}
22818	return *page.wpirl.Value
22819}
22820
22821// Creates a new instance of the WorkloadProtectableItemResourceListPage type.
22822func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
22823	return WorkloadProtectableItemResourceListPage{
22824		fn:    getNextPage,
22825		wpirl: cur,
22826	}
22827}
22828
22829// YearlyRetentionSchedule yearly retention schedule.
22830type YearlyRetentionSchedule struct {
22831	// RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly'
22832	RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
22833	// MonthsOfYear - List of months of year of yearly retention policy.
22834	MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
22835	// RetentionScheduleDaily - Daily retention format for yearly retention policy.
22836	RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
22837	// RetentionScheduleWeekly - Weekly retention format for yearly retention policy.
22838	RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
22839	// RetentionTimes - Retention times of retention policy.
22840	RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
22841	// RetentionDuration - Retention duration of retention Policy.
22842	RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
22843}
22844