1package databox
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/databox/mgmt/2020-11-01/databox"
22
23// AccountCopyLogDetails copy log details for a storage account of a DataBox job
24type AccountCopyLogDetails struct {
25	// AccountName - READ-ONLY; Account name.
26	AccountName *string `json:"accountName,omitempty"`
27	// CopyLogLink - READ-ONLY; Link for copy logs.
28	CopyLogLink *string `json:"copyLogLink,omitempty"`
29	// CopyVerboseLogLink - READ-ONLY; Link for copy verbose logs. This will be set only when LogCollectionLevel is set to Verbose.
30	CopyVerboseLogLink *string `json:"copyVerboseLogLink,omitempty"`
31	// CopyLogDetailsType - Possible values include: 'CopyLogDetailsTypeCopyLogDetails', 'CopyLogDetailsTypeDataBox', 'CopyLogDetailsTypeDataBoxDisk', 'CopyLogDetailsTypeDataBoxHeavy'
32	CopyLogDetailsType CopyLogDetailsType `json:"copyLogDetailsType,omitempty"`
33}
34
35// MarshalJSON is the custom marshaler for AccountCopyLogDetails.
36func (acld AccountCopyLogDetails) MarshalJSON() ([]byte, error) {
37	acld.CopyLogDetailsType = CopyLogDetailsTypeDataBox
38	objectMap := make(map[string]interface{})
39	if acld.CopyLogDetailsType != "" {
40		objectMap["copyLogDetailsType"] = acld.CopyLogDetailsType
41	}
42	return json.Marshal(objectMap)
43}
44
45// AsAccountCopyLogDetails is the BasicCopyLogDetails implementation for AccountCopyLogDetails.
46func (acld AccountCopyLogDetails) AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool) {
47	return &acld, true
48}
49
50// AsDiskCopyLogDetails is the BasicCopyLogDetails implementation for AccountCopyLogDetails.
51func (acld AccountCopyLogDetails) AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool) {
52	return nil, false
53}
54
55// AsHeavyAccountCopyLogDetails is the BasicCopyLogDetails implementation for AccountCopyLogDetails.
56func (acld AccountCopyLogDetails) AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool) {
57	return nil, false
58}
59
60// AsCopyLogDetails is the BasicCopyLogDetails implementation for AccountCopyLogDetails.
61func (acld AccountCopyLogDetails) AsCopyLogDetails() (*CopyLogDetails, bool) {
62	return nil, false
63}
64
65// AsBasicCopyLogDetails is the BasicCopyLogDetails implementation for AccountCopyLogDetails.
66func (acld AccountCopyLogDetails) AsBasicCopyLogDetails() (BasicCopyLogDetails, bool) {
67	return &acld, true
68}
69
70// AccountCredentialDetails credential details of the account.
71type AccountCredentialDetails struct {
72	// AccountName - READ-ONLY; Name of the account.
73	AccountName *string `json:"accountName,omitempty"`
74	// DataAccountType - READ-ONLY; Type of the account. Possible values include: 'StorageAccount', 'ManagedDisk'
75	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
76	// AccountConnectionString - READ-ONLY; Connection string of the account endpoint to use the account as a storage endpoint on the device.
77	AccountConnectionString *string `json:"accountConnectionString,omitempty"`
78	// ShareCredentialDetails - READ-ONLY; Per share level unencrypted access credentials.
79	ShareCredentialDetails *[]ShareCredentialDetails `json:"shareCredentialDetails,omitempty"`
80}
81
82// MarshalJSON is the custom marshaler for AccountCredentialDetails.
83func (acd AccountCredentialDetails) MarshalJSON() ([]byte, error) {
84	objectMap := make(map[string]interface{})
85	return json.Marshal(objectMap)
86}
87
88// AdditionalErrorInfo additional error info.
89type AdditionalErrorInfo struct {
90	// Type - Additional error type.
91	Type *string `json:"type,omitempty"`
92	// Info - Additional error info.
93	Info interface{} `json:"info,omitempty"`
94}
95
96// AddressValidationOutput output of the address validation api.
97type AddressValidationOutput struct {
98	autorest.Response `json:"-"`
99	// AddressValidationProperties - READ-ONLY; The address validation properties.
100	*AddressValidationProperties `json:"properties,omitempty"`
101}
102
103// MarshalJSON is the custom marshaler for AddressValidationOutput.
104func (avo AddressValidationOutput) MarshalJSON() ([]byte, error) {
105	objectMap := make(map[string]interface{})
106	return json.Marshal(objectMap)
107}
108
109// UnmarshalJSON is the custom unmarshaler for AddressValidationOutput struct.
110func (avo *AddressValidationOutput) UnmarshalJSON(body []byte) error {
111	var m map[string]*json.RawMessage
112	err := json.Unmarshal(body, &m)
113	if err != nil {
114		return err
115	}
116	for k, v := range m {
117		switch k {
118		case "properties":
119			if v != nil {
120				var addressValidationProperties AddressValidationProperties
121				err = json.Unmarshal(*v, &addressValidationProperties)
122				if err != nil {
123					return err
124				}
125				avo.AddressValidationProperties = &addressValidationProperties
126			}
127		}
128	}
129
130	return nil
131}
132
133// AddressValidationProperties the address validation output.
134type AddressValidationProperties struct {
135	// ValidationStatus - READ-ONLY; The address validation status. Possible values include: 'Valid', 'Invalid', 'Ambiguous'
136	ValidationStatus AddressValidationStatus `json:"validationStatus,omitempty"`
137	// AlternateAddresses - READ-ONLY; List of alternate addresses.
138	AlternateAddresses *[]ShippingAddress `json:"alternateAddresses,omitempty"`
139	// Error - READ-ONLY; Error code and message of validation response.
140	Error *CloudError `json:"error,omitempty"`
141	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
142	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
143}
144
145// MarshalJSON is the custom marshaler for AddressValidationProperties.
146func (avp AddressValidationProperties) MarshalJSON() ([]byte, error) {
147	avp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress
148	objectMap := make(map[string]interface{})
149	if avp.ValidationType != "" {
150		objectMap["validationType"] = avp.ValidationType
151	}
152	return json.Marshal(objectMap)
153}
154
155// AsAddressValidationProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
156func (avp AddressValidationProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
157	return &avp, true
158}
159
160// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
161func (avp AddressValidationProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
162	return nil, false
163}
164
165// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
166func (avp AddressValidationProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
167	return nil, false
168}
169
170// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
171func (avp AddressValidationProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
172	return nil, false
173}
174
175// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
176func (avp AddressValidationProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
177	return nil, false
178}
179
180// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for AddressValidationProperties.
181func (avp AddressValidationProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
182	return nil, false
183}
184
185// AsValidationInputResponse is the BasicValidationInputResponse implementation for AddressValidationProperties.
186func (avp AddressValidationProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
187	return nil, false
188}
189
190// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for AddressValidationProperties.
191func (avp AddressValidationProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
192	return &avp, true
193}
194
195// APIError ...
196type APIError struct {
197	Error *ErrorDetail `json:"error,omitempty"`
198}
199
200// ApplianceNetworkConfiguration the Network Adapter configuration of a DataBox.
201type ApplianceNetworkConfiguration struct {
202	// Name - READ-ONLY; Name of the network.
203	Name *string `json:"name,omitempty"`
204	// MacAddress - READ-ONLY; Mac Address.
205	MacAddress *string `json:"macAddress,omitempty"`
206}
207
208// MarshalJSON is the custom marshaler for ApplianceNetworkConfiguration.
209func (anc ApplianceNetworkConfiguration) MarshalJSON() ([]byte, error) {
210	objectMap := make(map[string]interface{})
211	return json.Marshal(objectMap)
212}
213
214// ArmBaseObject base class for all objects under resource.
215type ArmBaseObject struct {
216	// Name - READ-ONLY; Name of the object.
217	Name *string `json:"name,omitempty"`
218	// ID - READ-ONLY; Id of the object.
219	ID *string `json:"id,omitempty"`
220	// Type - READ-ONLY; Type of the object.
221	Type *string `json:"type,omitempty"`
222}
223
224// MarshalJSON is the custom marshaler for ArmBaseObject.
225func (abo ArmBaseObject) MarshalJSON() ([]byte, error) {
226	objectMap := make(map[string]interface{})
227	return json.Marshal(objectMap)
228}
229
230// AvailableSkuRequest the filters for showing the available skus.
231type AvailableSkuRequest struct {
232	// TransferType - Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
233	TransferType TransferType `json:"transferType,omitempty"`
234	// Country - ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
235	Country *string `json:"country,omitempty"`
236	// Location - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
237	Location *string `json:"location,omitempty"`
238	// SkuNames - Sku Names to filter for available skus
239	SkuNames *[]SkuName `json:"skuNames,omitempty"`
240}
241
242// AvailableSkusResult the available skus operation response.
243type AvailableSkusResult struct {
244	autorest.Response `json:"-"`
245	// Value - READ-ONLY; List of available skus.
246	Value *[]SkuInformation `json:"value,omitempty"`
247	// NextLink - Link for the next set of skus.
248	NextLink *string `json:"nextLink,omitempty"`
249}
250
251// MarshalJSON is the custom marshaler for AvailableSkusResult.
252func (asr AvailableSkusResult) MarshalJSON() ([]byte, error) {
253	objectMap := make(map[string]interface{})
254	if asr.NextLink != nil {
255		objectMap["nextLink"] = asr.NextLink
256	}
257	return json.Marshal(objectMap)
258}
259
260// AvailableSkusResultIterator provides access to a complete listing of SkuInformation values.
261type AvailableSkusResultIterator struct {
262	i    int
263	page AvailableSkusResultPage
264}
265
266// NextWithContext advances to the next value.  If there was an error making
267// the request the iterator does not advance and the error is returned.
268func (iter *AvailableSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
269	if tracing.IsEnabled() {
270		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableSkusResultIterator.NextWithContext")
271		defer func() {
272			sc := -1
273			if iter.Response().Response.Response != nil {
274				sc = iter.Response().Response.Response.StatusCode
275			}
276			tracing.EndSpan(ctx, sc, err)
277		}()
278	}
279	iter.i++
280	if iter.i < len(iter.page.Values()) {
281		return nil
282	}
283	err = iter.page.NextWithContext(ctx)
284	if err != nil {
285		iter.i--
286		return err
287	}
288	iter.i = 0
289	return nil
290}
291
292// Next advances to the next value.  If there was an error making
293// the request the iterator does not advance and the error is returned.
294// Deprecated: Use NextWithContext() instead.
295func (iter *AvailableSkusResultIterator) Next() error {
296	return iter.NextWithContext(context.Background())
297}
298
299// NotDone returns true if the enumeration should be started or is not yet complete.
300func (iter AvailableSkusResultIterator) NotDone() bool {
301	return iter.page.NotDone() && iter.i < len(iter.page.Values())
302}
303
304// Response returns the raw server response from the last page request.
305func (iter AvailableSkusResultIterator) Response() AvailableSkusResult {
306	return iter.page.Response()
307}
308
309// Value returns the current value or a zero-initialized value if the
310// iterator has advanced beyond the end of the collection.
311func (iter AvailableSkusResultIterator) Value() SkuInformation {
312	if !iter.page.NotDone() {
313		return SkuInformation{}
314	}
315	return iter.page.Values()[iter.i]
316}
317
318// Creates a new instance of the AvailableSkusResultIterator type.
319func NewAvailableSkusResultIterator(page AvailableSkusResultPage) AvailableSkusResultIterator {
320	return AvailableSkusResultIterator{page: page}
321}
322
323// IsEmpty returns true if the ListResult contains no values.
324func (asr AvailableSkusResult) IsEmpty() bool {
325	return asr.Value == nil || len(*asr.Value) == 0
326}
327
328// hasNextLink returns true if the NextLink is not empty.
329func (asr AvailableSkusResult) hasNextLink() bool {
330	return asr.NextLink != nil && len(*asr.NextLink) != 0
331}
332
333// availableSkusResultPreparer prepares a request to retrieve the next set of results.
334// It returns nil if no more results exist.
335func (asr AvailableSkusResult) availableSkusResultPreparer(ctx context.Context) (*http.Request, error) {
336	if !asr.hasNextLink() {
337		return nil, nil
338	}
339	return autorest.Prepare((&http.Request{}).WithContext(ctx),
340		autorest.AsJSON(),
341		autorest.AsGet(),
342		autorest.WithBaseURL(to.String(asr.NextLink)))
343}
344
345// AvailableSkusResultPage contains a page of SkuInformation values.
346type AvailableSkusResultPage struct {
347	fn  func(context.Context, AvailableSkusResult) (AvailableSkusResult, error)
348	asr AvailableSkusResult
349}
350
351// NextWithContext advances to the next page of values.  If there was an error making
352// the request the page does not advance and the error is returned.
353func (page *AvailableSkusResultPage) NextWithContext(ctx context.Context) (err error) {
354	if tracing.IsEnabled() {
355		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableSkusResultPage.NextWithContext")
356		defer func() {
357			sc := -1
358			if page.Response().Response.Response != nil {
359				sc = page.Response().Response.Response.StatusCode
360			}
361			tracing.EndSpan(ctx, sc, err)
362		}()
363	}
364	for {
365		next, err := page.fn(ctx, page.asr)
366		if err != nil {
367			return err
368		}
369		page.asr = next
370		if !next.hasNextLink() || !next.IsEmpty() {
371			break
372		}
373	}
374	return nil
375}
376
377// Next advances to the next page of values.  If there was an error making
378// the request the page does not advance and the error is returned.
379// Deprecated: Use NextWithContext() instead.
380func (page *AvailableSkusResultPage) Next() error {
381	return page.NextWithContext(context.Background())
382}
383
384// NotDone returns true if the page enumeration should be started or is not yet complete.
385func (page AvailableSkusResultPage) NotDone() bool {
386	return !page.asr.IsEmpty()
387}
388
389// Response returns the raw server response from the last page request.
390func (page AvailableSkusResultPage) Response() AvailableSkusResult {
391	return page.asr
392}
393
394// Values returns the slice of values for the current page or nil if there are no values.
395func (page AvailableSkusResultPage) Values() []SkuInformation {
396	if page.asr.IsEmpty() {
397		return nil
398	}
399	return *page.asr.Value
400}
401
402// Creates a new instance of the AvailableSkusResultPage type.
403func NewAvailableSkusResultPage(cur AvailableSkusResult, getNextPage func(context.Context, AvailableSkusResult) (AvailableSkusResult, error)) AvailableSkusResultPage {
404	return AvailableSkusResultPage{
405		fn:  getNextPage,
406		asr: cur,
407	}
408}
409
410// AzureFileFilterDetails filter details to transfer Azure files
411type AzureFileFilterDetails struct {
412	// FilePrefixList - Prefix list of the Azure files to be transferred.
413	FilePrefixList *[]string `json:"filePrefixList,omitempty"`
414	// FilePathList - List of full path of the files to be transferred.
415	FilePathList *[]string `json:"filePathList,omitempty"`
416	// FileShareList - List of file shares to be transferred.
417	FileShareList *[]string `json:"fileShareList,omitempty"`
418}
419
420// BlobFilterDetails filter details to transfer Azure Blobs
421type BlobFilterDetails struct {
422	// BlobPrefixList - Prefix list of the Azure blobs to be transferred.
423	BlobPrefixList *[]string `json:"blobPrefixList,omitempty"`
424	// BlobPathList - List of full path of the blobs to be transferred.
425	BlobPathList *[]string `json:"blobPathList,omitempty"`
426	// ContainerList - List of blob containers to be transferred.
427	ContainerList *[]string `json:"containerList,omitempty"`
428}
429
430// CancellationReason reason for cancellation.
431type CancellationReason struct {
432	// Reason - Reason for cancellation.
433	Reason *string `json:"reason,omitempty"`
434}
435
436// CloudError cloud error.
437type CloudError struct {
438	// Code - Cloud error code.
439	Code *string `json:"code,omitempty"`
440	// Message - Cloud error message.
441	Message *string `json:"message,omitempty"`
442	// Target - Cloud error target.
443	Target *string `json:"target,omitempty"`
444	// Details - READ-ONLY; Cloud error details.
445	Details *[]CloudError `json:"details,omitempty"`
446	// AdditionalInfo - READ-ONLY; Cloud error additional info.
447	AdditionalInfo *[]AdditionalErrorInfo `json:"additionalInfo,omitempty"`
448}
449
450// MarshalJSON is the custom marshaler for CloudError.
451func (ce CloudError) MarshalJSON() ([]byte, error) {
452	objectMap := make(map[string]interface{})
453	if ce.Code != nil {
454		objectMap["code"] = ce.Code
455	}
456	if ce.Message != nil {
457		objectMap["message"] = ce.Message
458	}
459	if ce.Target != nil {
460		objectMap["target"] = ce.Target
461	}
462	return json.Marshal(objectMap)
463}
464
465// ContactDetails contact Details.
466type ContactDetails struct {
467	// ContactName - Contact name of the person.
468	ContactName *string `json:"contactName,omitempty"`
469	// Phone - Phone number of the contact person.
470	Phone *string `json:"phone,omitempty"`
471	// PhoneExtension - Phone extension number of the contact person.
472	PhoneExtension *string `json:"phoneExtension,omitempty"`
473	// Mobile - Mobile number of the contact person.
474	Mobile *string `json:"mobile,omitempty"`
475	// EmailList - List of Email-ids to be notified about job progress.
476	EmailList *[]string `json:"emailList,omitempty"`
477	// NotificationPreference - Notification preference for a job stage.
478	NotificationPreference *[]NotificationPreference `json:"notificationPreference,omitempty"`
479}
480
481// BasicCopyLogDetails details for log generated during copy.
482type BasicCopyLogDetails interface {
483	AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool)
484	AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool)
485	AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool)
486	AsCopyLogDetails() (*CopyLogDetails, bool)
487}
488
489// CopyLogDetails details for log generated during copy.
490type CopyLogDetails struct {
491	// CopyLogDetailsType - Possible values include: 'CopyLogDetailsTypeCopyLogDetails', 'CopyLogDetailsTypeDataBox', 'CopyLogDetailsTypeDataBoxDisk', 'CopyLogDetailsTypeDataBoxHeavy'
492	CopyLogDetailsType CopyLogDetailsType `json:"copyLogDetailsType,omitempty"`
493}
494
495func unmarshalBasicCopyLogDetails(body []byte) (BasicCopyLogDetails, error) {
496	var m map[string]interface{}
497	err := json.Unmarshal(body, &m)
498	if err != nil {
499		return nil, err
500	}
501
502	switch m["copyLogDetailsType"] {
503	case string(CopyLogDetailsTypeDataBox):
504		var acld AccountCopyLogDetails
505		err := json.Unmarshal(body, &acld)
506		return acld, err
507	case string(CopyLogDetailsTypeDataBoxDisk):
508		var dcld DiskCopyLogDetails
509		err := json.Unmarshal(body, &dcld)
510		return dcld, err
511	case string(CopyLogDetailsTypeDataBoxHeavy):
512		var hacld HeavyAccountCopyLogDetails
513		err := json.Unmarshal(body, &hacld)
514		return hacld, err
515	default:
516		var cld CopyLogDetails
517		err := json.Unmarshal(body, &cld)
518		return cld, err
519	}
520}
521func unmarshalBasicCopyLogDetailsArray(body []byte) ([]BasicCopyLogDetails, error) {
522	var rawMessages []*json.RawMessage
523	err := json.Unmarshal(body, &rawMessages)
524	if err != nil {
525		return nil, err
526	}
527
528	cldArray := make([]BasicCopyLogDetails, len(rawMessages))
529
530	for index, rawMessage := range rawMessages {
531		cld, err := unmarshalBasicCopyLogDetails(*rawMessage)
532		if err != nil {
533			return nil, err
534		}
535		cldArray[index] = cld
536	}
537	return cldArray, nil
538}
539
540// MarshalJSON is the custom marshaler for CopyLogDetails.
541func (cld CopyLogDetails) MarshalJSON() ([]byte, error) {
542	cld.CopyLogDetailsType = CopyLogDetailsTypeCopyLogDetails
543	objectMap := make(map[string]interface{})
544	if cld.CopyLogDetailsType != "" {
545		objectMap["copyLogDetailsType"] = cld.CopyLogDetailsType
546	}
547	return json.Marshal(objectMap)
548}
549
550// AsAccountCopyLogDetails is the BasicCopyLogDetails implementation for CopyLogDetails.
551func (cld CopyLogDetails) AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool) {
552	return nil, false
553}
554
555// AsDiskCopyLogDetails is the BasicCopyLogDetails implementation for CopyLogDetails.
556func (cld CopyLogDetails) AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool) {
557	return nil, false
558}
559
560// AsHeavyAccountCopyLogDetails is the BasicCopyLogDetails implementation for CopyLogDetails.
561func (cld CopyLogDetails) AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool) {
562	return nil, false
563}
564
565// AsCopyLogDetails is the BasicCopyLogDetails implementation for CopyLogDetails.
566func (cld CopyLogDetails) AsCopyLogDetails() (*CopyLogDetails, bool) {
567	return &cld, true
568}
569
570// AsBasicCopyLogDetails is the BasicCopyLogDetails implementation for CopyLogDetails.
571func (cld CopyLogDetails) AsBasicCopyLogDetails() (BasicCopyLogDetails, bool) {
572	return &cld, true
573}
574
575// CopyProgress copy progress.
576type CopyProgress struct {
577	// StorageAccountName - READ-ONLY; Name of the storage account. This will be empty for data account types other than storage account.
578	StorageAccountName *string `json:"storageAccountName,omitempty"`
579	// TransferType - READ-ONLY; Transfer type of data. Possible values include: 'ImportToAzure', 'ExportFromAzure'
580	TransferType TransferType `json:"transferType,omitempty"`
581	// DataAccountType - READ-ONLY; Data Account Type. Possible values include: 'StorageAccount', 'ManagedDisk'
582	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
583	// AccountID - READ-ONLY; Id of the account where the data needs to be uploaded.
584	AccountID *string `json:"accountId,omitempty"`
585	// BytesProcessed - READ-ONLY; To indicate bytes transferred.
586	BytesProcessed *int64 `json:"bytesProcessed,omitempty"`
587	// TotalBytesToProcess - READ-ONLY; Total amount of data to be processed by the job.
588	TotalBytesToProcess *int64 `json:"totalBytesToProcess,omitempty"`
589	// FilesProcessed - READ-ONLY; Number of files processed
590	FilesProcessed *int64 `json:"filesProcessed,omitempty"`
591	// TotalFilesToProcess - READ-ONLY; Total files to process
592	TotalFilesToProcess *int64 `json:"totalFilesToProcess,omitempty"`
593	// InvalidFilesProcessed - READ-ONLY; Number of files not adhering to azure naming conventions which were processed by automatic renaming
594	InvalidFilesProcessed *int64 `json:"invalidFilesProcessed,omitempty"`
595	// InvalidFileBytesUploaded - READ-ONLY; Total amount of data not adhering to azure naming conventions which were processed by automatic renaming
596	InvalidFileBytesUploaded *int64 `json:"invalidFileBytesUploaded,omitempty"`
597	// RenamedContainerCount - READ-ONLY; Number of folders not adhering to azure naming conventions which were processed by automatic renaming
598	RenamedContainerCount *int64 `json:"renamedContainerCount,omitempty"`
599	// FilesErroredOut - READ-ONLY; Number of files which could not be copied
600	FilesErroredOut *int64 `json:"filesErroredOut,omitempty"`
601	// DirectoriesErroredOut - READ-ONLY; To indicate directories errored out in the job.
602	DirectoriesErroredOut *int64 `json:"directoriesErroredOut,omitempty"`
603	// InvalidDirectoriesProcessed - READ-ONLY; To indicate directories renamed
604	InvalidDirectoriesProcessed *int64 `json:"invalidDirectoriesProcessed,omitempty"`
605	// IsEnumerationInProgress - READ-ONLY; To indicate if enumeration of data is in progress.
606	// Until this is true, the TotalBytesToProcess may not be valid.
607	IsEnumerationInProgress *bool `json:"isEnumerationInProgress,omitempty"`
608}
609
610// MarshalJSON is the custom marshaler for CopyProgress.
611func (cp CopyProgress) MarshalJSON() ([]byte, error) {
612	objectMap := make(map[string]interface{})
613	return json.Marshal(objectMap)
614}
615
616// CreateJobValidations it does all pre-job creation validations.
617type CreateJobValidations struct {
618	// IndividualRequestDetails - List of request details contain validationType and its request as key and value respectively.
619	IndividualRequestDetails *[]BasicValidationInputRequest `json:"individualRequestDetails,omitempty"`
620	// ValidationCategory - Possible values include: 'ValidationCategoryValidationRequest', 'ValidationCategoryJobCreationValidation'
621	ValidationCategory ValidationCategory `json:"validationCategory,omitempty"`
622}
623
624// MarshalJSON is the custom marshaler for CreateJobValidations.
625func (cjv CreateJobValidations) MarshalJSON() ([]byte, error) {
626	cjv.ValidationCategory = ValidationCategoryJobCreationValidation
627	objectMap := make(map[string]interface{})
628	if cjv.IndividualRequestDetails != nil {
629		objectMap["individualRequestDetails"] = cjv.IndividualRequestDetails
630	}
631	if cjv.ValidationCategory != "" {
632		objectMap["validationCategory"] = cjv.ValidationCategory
633	}
634	return json.Marshal(objectMap)
635}
636
637// AsCreateJobValidations is the BasicValidationRequest implementation for CreateJobValidations.
638func (cjv CreateJobValidations) AsCreateJobValidations() (*CreateJobValidations, bool) {
639	return &cjv, true
640}
641
642// AsValidationRequest is the BasicValidationRequest implementation for CreateJobValidations.
643func (cjv CreateJobValidations) AsValidationRequest() (*ValidationRequest, bool) {
644	return nil, false
645}
646
647// AsBasicValidationRequest is the BasicValidationRequest implementation for CreateJobValidations.
648func (cjv CreateJobValidations) AsBasicValidationRequest() (BasicValidationRequest, bool) {
649	return &cjv, true
650}
651
652// UnmarshalJSON is the custom unmarshaler for CreateJobValidations struct.
653func (cjv *CreateJobValidations) UnmarshalJSON(body []byte) error {
654	var m map[string]*json.RawMessage
655	err := json.Unmarshal(body, &m)
656	if err != nil {
657		return err
658	}
659	for k, v := range m {
660		switch k {
661		case "individualRequestDetails":
662			if v != nil {
663				individualRequestDetails, err := unmarshalBasicValidationInputRequestArray(*v)
664				if err != nil {
665					return err
666				}
667				cjv.IndividualRequestDetails = &individualRequestDetails
668			}
669		case "validationCategory":
670			if v != nil {
671				var validationCategory ValidationCategory
672				err = json.Unmarshal(*v, &validationCategory)
673				if err != nil {
674					return err
675				}
676				cjv.ValidationCategory = validationCategory
677			}
678		}
679	}
680
681	return nil
682}
683
684// CreateOrderLimitForSubscriptionValidationRequest request to validate create order limit for current
685// subscription.
686type CreateOrderLimitForSubscriptionValidationRequest struct {
687	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
688	DeviceType SkuName `json:"deviceType,omitempty"`
689	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
690	ValidationType ValidationType `json:"validationType,omitempty"`
691}
692
693// MarshalJSON is the custom marshaler for CreateOrderLimitForSubscriptionValidationRequest.
694func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) MarshalJSON() ([]byte, error) {
695	colfsvr.ValidationType = ValidationTypeValidateCreateOrderLimit
696	objectMap := make(map[string]interface{})
697	if colfsvr.DeviceType != "" {
698		objectMap["deviceType"] = colfsvr.DeviceType
699	}
700	if colfsvr.ValidationType != "" {
701		objectMap["validationType"] = colfsvr.ValidationType
702	}
703	return json.Marshal(objectMap)
704}
705
706// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
707func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
708	return &colfsvr, true
709}
710
711// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
712func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
713	return nil, false
714}
715
716// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
717func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
718	return nil, false
719}
720
721// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
722func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
723	return nil, false
724}
725
726// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
727func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
728	return nil, false
729}
730
731// AsValidateAddress is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
732func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
733	return nil, false
734}
735
736// AsValidationInputRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
737func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
738	return nil, false
739}
740
741// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for CreateOrderLimitForSubscriptionValidationRequest.
742func (colfsvr CreateOrderLimitForSubscriptionValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
743	return &colfsvr, true
744}
745
746// CreateOrderLimitForSubscriptionValidationResponseProperties properties of create order limit for
747// subscription validation response.
748type CreateOrderLimitForSubscriptionValidationResponseProperties struct {
749	// Status - READ-ONLY; Create order limit validation status. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
750	Status ValidationStatus `json:"status,omitempty"`
751	// Error - READ-ONLY; Error code and message of validation response.
752	Error *CloudError `json:"error,omitempty"`
753	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
754	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
755}
756
757// MarshalJSON is the custom marshaler for CreateOrderLimitForSubscriptionValidationResponseProperties.
758func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) MarshalJSON() ([]byte, error) {
759	colfsvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit
760	objectMap := make(map[string]interface{})
761	if colfsvrp.ValidationType != "" {
762		objectMap["validationType"] = colfsvrp.ValidationType
763	}
764	return json.Marshal(objectMap)
765}
766
767// AsAddressValidationProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
768func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
769	return nil, false
770}
771
772// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
773func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
774	return &colfsvrp, true
775}
776
777// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
778func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
779	return nil, false
780}
781
782// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
783func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
784	return nil, false
785}
786
787// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
788func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
789	return nil, false
790}
791
792// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
793func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
794	return nil, false
795}
796
797// AsValidationInputResponse is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
798func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
799	return nil, false
800}
801
802// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for CreateOrderLimitForSubscriptionValidationResponseProperties.
803func (colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
804	return &colfsvrp, true
805}
806
807// BasicDataAccountDetails account details of the data to be transferred
808type BasicDataAccountDetails interface {
809	AsManagedDiskDetails() (*ManagedDiskDetails, bool)
810	AsStorageAccountDetails() (*StorageAccountDetails, bool)
811	AsDataAccountDetails() (*DataAccountDetails, bool)
812}
813
814// DataAccountDetails account details of the data to be transferred
815type DataAccountDetails struct {
816	// SharePassword - Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+
817	SharePassword *string `json:"sharePassword,omitempty"`
818	// DataAccountType - Possible values include: 'DataAccountTypeDataAccountDetails', 'DataAccountTypeManagedDisk', 'DataAccountTypeStorageAccount'
819	DataAccountType DataAccountTypeBasicDataAccountDetails `json:"dataAccountType,omitempty"`
820}
821
822func unmarshalBasicDataAccountDetails(body []byte) (BasicDataAccountDetails, error) {
823	var m map[string]interface{}
824	err := json.Unmarshal(body, &m)
825	if err != nil {
826		return nil, err
827	}
828
829	switch m["dataAccountType"] {
830	case string(DataAccountTypeManagedDisk):
831		var mdd ManagedDiskDetails
832		err := json.Unmarshal(body, &mdd)
833		return mdd, err
834	case string(DataAccountTypeStorageAccount):
835		var sad StorageAccountDetails
836		err := json.Unmarshal(body, &sad)
837		return sad, err
838	default:
839		var dad DataAccountDetails
840		err := json.Unmarshal(body, &dad)
841		return dad, err
842	}
843}
844func unmarshalBasicDataAccountDetailsArray(body []byte) ([]BasicDataAccountDetails, error) {
845	var rawMessages []*json.RawMessage
846	err := json.Unmarshal(body, &rawMessages)
847	if err != nil {
848		return nil, err
849	}
850
851	dadArray := make([]BasicDataAccountDetails, len(rawMessages))
852
853	for index, rawMessage := range rawMessages {
854		dad, err := unmarshalBasicDataAccountDetails(*rawMessage)
855		if err != nil {
856			return nil, err
857		}
858		dadArray[index] = dad
859	}
860	return dadArray, nil
861}
862
863// MarshalJSON is the custom marshaler for DataAccountDetails.
864func (dad DataAccountDetails) MarshalJSON() ([]byte, error) {
865	dad.DataAccountType = DataAccountTypeDataAccountDetails
866	objectMap := make(map[string]interface{})
867	if dad.SharePassword != nil {
868		objectMap["sharePassword"] = dad.SharePassword
869	}
870	if dad.DataAccountType != "" {
871		objectMap["dataAccountType"] = dad.DataAccountType
872	}
873	return json.Marshal(objectMap)
874}
875
876// AsManagedDiskDetails is the BasicDataAccountDetails implementation for DataAccountDetails.
877func (dad DataAccountDetails) AsManagedDiskDetails() (*ManagedDiskDetails, bool) {
878	return nil, false
879}
880
881// AsStorageAccountDetails is the BasicDataAccountDetails implementation for DataAccountDetails.
882func (dad DataAccountDetails) AsStorageAccountDetails() (*StorageAccountDetails, bool) {
883	return nil, false
884}
885
886// AsDataAccountDetails is the BasicDataAccountDetails implementation for DataAccountDetails.
887func (dad DataAccountDetails) AsDataAccountDetails() (*DataAccountDetails, bool) {
888	return &dad, true
889}
890
891// AsBasicDataAccountDetails is the BasicDataAccountDetails implementation for DataAccountDetails.
892func (dad DataAccountDetails) AsBasicDataAccountDetails() (BasicDataAccountDetails, bool) {
893	return &dad, true
894}
895
896// DataExportDetails details of the data to be used for exporting data from azure.
897type DataExportDetails struct {
898	// TransferConfiguration - Configuration for the data transfer.
899	TransferConfiguration *TransferConfiguration `json:"transferConfiguration,omitempty"`
900	// LogCollectionLevel - Level of the logs to be collected. Possible values include: 'Error', 'Verbose'
901	LogCollectionLevel LogCollectionLevel `json:"logCollectionLevel,omitempty"`
902	// AccountDetails - Account details of the data to be transferred
903	AccountDetails BasicDataAccountDetails `json:"accountDetails,omitempty"`
904}
905
906// UnmarshalJSON is the custom unmarshaler for DataExportDetails struct.
907func (ded *DataExportDetails) UnmarshalJSON(body []byte) error {
908	var m map[string]*json.RawMessage
909	err := json.Unmarshal(body, &m)
910	if err != nil {
911		return err
912	}
913	for k, v := range m {
914		switch k {
915		case "transferConfiguration":
916			if v != nil {
917				var transferConfiguration TransferConfiguration
918				err = json.Unmarshal(*v, &transferConfiguration)
919				if err != nil {
920					return err
921				}
922				ded.TransferConfiguration = &transferConfiguration
923			}
924		case "logCollectionLevel":
925			if v != nil {
926				var logCollectionLevel LogCollectionLevel
927				err = json.Unmarshal(*v, &logCollectionLevel)
928				if err != nil {
929					return err
930				}
931				ded.LogCollectionLevel = logCollectionLevel
932			}
933		case "accountDetails":
934			if v != nil {
935				accountDetails, err := unmarshalBasicDataAccountDetails(*v)
936				if err != nil {
937					return err
938				}
939				ded.AccountDetails = accountDetails
940			}
941		}
942	}
943
944	return nil
945}
946
947// DataImportDetails details of the data to be used for importing data to azure.
948type DataImportDetails struct {
949	// AccountDetails - Account details of the data to be transferred
950	AccountDetails BasicDataAccountDetails `json:"accountDetails,omitempty"`
951}
952
953// UnmarshalJSON is the custom unmarshaler for DataImportDetails struct.
954func (did *DataImportDetails) UnmarshalJSON(body []byte) error {
955	var m map[string]*json.RawMessage
956	err := json.Unmarshal(body, &m)
957	if err != nil {
958		return err
959	}
960	for k, v := range m {
961		switch k {
962		case "accountDetails":
963			if v != nil {
964				accountDetails, err := unmarshalBasicDataAccountDetails(*v)
965				if err != nil {
966					return err
967				}
968				did.AccountDetails = accountDetails
969			}
970		}
971	}
972
973	return nil
974}
975
976// DataLocationToServiceLocationMap map of data location to service location
977type DataLocationToServiceLocationMap struct {
978	// DataLocation - READ-ONLY; Location of the data.
979	DataLocation *string `json:"dataLocation,omitempty"`
980	// ServiceLocation - READ-ONLY; Location of the service.
981	ServiceLocation *string `json:"serviceLocation,omitempty"`
982}
983
984// MarshalJSON is the custom marshaler for DataLocationToServiceLocationMap.
985func (dltslm DataLocationToServiceLocationMap) MarshalJSON() ([]byte, error) {
986	objectMap := make(map[string]interface{})
987	return json.Marshal(objectMap)
988}
989
990// DataTransferDetailsValidationRequest request to validate export and import data details.
991type DataTransferDetailsValidationRequest struct {
992	// DataExportDetails - List of DataTransfer details to be used to export data from azure.
993	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
994	// DataImportDetails - List of DataTransfer details to be used to import data to azure.
995	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
996	// DeviceType - Device type. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
997	DeviceType SkuName `json:"deviceType,omitempty"`
998	// TransferType - Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
999	TransferType TransferType `json:"transferType,omitempty"`
1000	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
1001	ValidationType ValidationType `json:"validationType,omitempty"`
1002}
1003
1004// MarshalJSON is the custom marshaler for DataTransferDetailsValidationRequest.
1005func (dtdvr DataTransferDetailsValidationRequest) MarshalJSON() ([]byte, error) {
1006	dtdvr.ValidationType = ValidationTypeValidateDataTransferDetails
1007	objectMap := make(map[string]interface{})
1008	if dtdvr.DataExportDetails != nil {
1009		objectMap["dataExportDetails"] = dtdvr.DataExportDetails
1010	}
1011	if dtdvr.DataImportDetails != nil {
1012		objectMap["dataImportDetails"] = dtdvr.DataImportDetails
1013	}
1014	if dtdvr.DeviceType != "" {
1015		objectMap["deviceType"] = dtdvr.DeviceType
1016	}
1017	if dtdvr.TransferType != "" {
1018		objectMap["transferType"] = dtdvr.TransferType
1019	}
1020	if dtdvr.ValidationType != "" {
1021		objectMap["validationType"] = dtdvr.ValidationType
1022	}
1023	return json.Marshal(objectMap)
1024}
1025
1026// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1027func (dtdvr DataTransferDetailsValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
1028	return nil, false
1029}
1030
1031// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1032func (dtdvr DataTransferDetailsValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
1033	return &dtdvr, true
1034}
1035
1036// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1037func (dtdvr DataTransferDetailsValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
1038	return nil, false
1039}
1040
1041// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1042func (dtdvr DataTransferDetailsValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
1043	return nil, false
1044}
1045
1046// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1047func (dtdvr DataTransferDetailsValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
1048	return nil, false
1049}
1050
1051// AsValidateAddress is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1052func (dtdvr DataTransferDetailsValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
1053	return nil, false
1054}
1055
1056// AsValidationInputRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1057func (dtdvr DataTransferDetailsValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
1058	return nil, false
1059}
1060
1061// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for DataTransferDetailsValidationRequest.
1062func (dtdvr DataTransferDetailsValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
1063	return &dtdvr, true
1064}
1065
1066// DataTransferDetailsValidationResponseProperties properties of data transfer details validation response.
1067type DataTransferDetailsValidationResponseProperties struct {
1068	// Status - READ-ONLY; Data transfer details validation status. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
1069	Status ValidationStatus `json:"status,omitempty"`
1070	// Error - READ-ONLY; Error code and message of validation response.
1071	Error *CloudError `json:"error,omitempty"`
1072	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
1073	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
1074}
1075
1076// MarshalJSON is the custom marshaler for DataTransferDetailsValidationResponseProperties.
1077func (dtdvrp DataTransferDetailsValidationResponseProperties) MarshalJSON() ([]byte, error) {
1078	dtdvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails
1079	objectMap := make(map[string]interface{})
1080	if dtdvrp.ValidationType != "" {
1081		objectMap["validationType"] = dtdvrp.ValidationType
1082	}
1083	return json.Marshal(objectMap)
1084}
1085
1086// AsAddressValidationProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1087func (dtdvrp DataTransferDetailsValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
1088	return nil, false
1089}
1090
1091// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1092func (dtdvrp DataTransferDetailsValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
1093	return nil, false
1094}
1095
1096// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1097func (dtdvrp DataTransferDetailsValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
1098	return &dtdvrp, true
1099}
1100
1101// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1102func (dtdvrp DataTransferDetailsValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
1103	return nil, false
1104}
1105
1106// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1107func (dtdvrp DataTransferDetailsValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
1108	return nil, false
1109}
1110
1111// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1112func (dtdvrp DataTransferDetailsValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
1113	return nil, false
1114}
1115
1116// AsValidationInputResponse is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1117func (dtdvrp DataTransferDetailsValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
1118	return nil, false
1119}
1120
1121// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for DataTransferDetailsValidationResponseProperties.
1122func (dtdvrp DataTransferDetailsValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
1123	return &dtdvrp, true
1124}
1125
1126// DcAccessSecurityCode dc access security code
1127type DcAccessSecurityCode struct {
1128	// ReverseDcAccessCode - Reverse Dc access security code.
1129	ReverseDcAccessCode *string `json:"reverseDcAccessCode,omitempty"`
1130	// ForwardDcAccessCode - Forward Dc access security code.
1131	ForwardDcAccessCode *string `json:"forwardDcAccessCode,omitempty"`
1132}
1133
1134// Details ...
1135type Details struct {
1136	Code    *string `json:"code,omitempty"`
1137	Message *string `json:"message,omitempty"`
1138}
1139
1140// DiskCopyLogDetails copy Log Details for a disk
1141type DiskCopyLogDetails struct {
1142	// DiskSerialNumber - READ-ONLY; Disk Serial Number.
1143	DiskSerialNumber *string `json:"diskSerialNumber,omitempty"`
1144	// ErrorLogLink - READ-ONLY; Link for copy error logs.
1145	ErrorLogLink *string `json:"errorLogLink,omitempty"`
1146	// VerboseLogLink - READ-ONLY; Link for copy verbose logs.
1147	VerboseLogLink *string `json:"verboseLogLink,omitempty"`
1148	// CopyLogDetailsType - Possible values include: 'CopyLogDetailsTypeCopyLogDetails', 'CopyLogDetailsTypeDataBox', 'CopyLogDetailsTypeDataBoxDisk', 'CopyLogDetailsTypeDataBoxHeavy'
1149	CopyLogDetailsType CopyLogDetailsType `json:"copyLogDetailsType,omitempty"`
1150}
1151
1152// MarshalJSON is the custom marshaler for DiskCopyLogDetails.
1153func (dcld DiskCopyLogDetails) MarshalJSON() ([]byte, error) {
1154	dcld.CopyLogDetailsType = CopyLogDetailsTypeDataBoxDisk
1155	objectMap := make(map[string]interface{})
1156	if dcld.CopyLogDetailsType != "" {
1157		objectMap["copyLogDetailsType"] = dcld.CopyLogDetailsType
1158	}
1159	return json.Marshal(objectMap)
1160}
1161
1162// AsAccountCopyLogDetails is the BasicCopyLogDetails implementation for DiskCopyLogDetails.
1163func (dcld DiskCopyLogDetails) AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool) {
1164	return nil, false
1165}
1166
1167// AsDiskCopyLogDetails is the BasicCopyLogDetails implementation for DiskCopyLogDetails.
1168func (dcld DiskCopyLogDetails) AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool) {
1169	return &dcld, true
1170}
1171
1172// AsHeavyAccountCopyLogDetails is the BasicCopyLogDetails implementation for DiskCopyLogDetails.
1173func (dcld DiskCopyLogDetails) AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool) {
1174	return nil, false
1175}
1176
1177// AsCopyLogDetails is the BasicCopyLogDetails implementation for DiskCopyLogDetails.
1178func (dcld DiskCopyLogDetails) AsCopyLogDetails() (*CopyLogDetails, bool) {
1179	return nil, false
1180}
1181
1182// AsBasicCopyLogDetails is the BasicCopyLogDetails implementation for DiskCopyLogDetails.
1183func (dcld DiskCopyLogDetails) AsBasicCopyLogDetails() (BasicCopyLogDetails, bool) {
1184	return &dcld, true
1185}
1186
1187// DiskCopyProgress dataBox Disk Copy Progress
1188type DiskCopyProgress struct {
1189	// SerialNumber - READ-ONLY; The serial number of the disk
1190	SerialNumber *string `json:"serialNumber,omitempty"`
1191	// BytesCopied - READ-ONLY; Bytes copied during the copy of disk.
1192	BytesCopied *int64 `json:"bytesCopied,omitempty"`
1193	// PercentComplete - READ-ONLY; Indicates the percentage completed for the copy of the disk.
1194	PercentComplete *int32 `json:"percentComplete,omitempty"`
1195	// Status - READ-ONLY; The Status of the copy. Possible values include: 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', 'NotReturned', 'HardwareError', 'DeviceFormatted', 'DeviceMetadataModified', 'StorageAccountNotAccessible', 'UnsupportedData'
1196	Status CopyStatus `json:"status,omitempty"`
1197}
1198
1199// MarshalJSON is the custom marshaler for DiskCopyProgress.
1200func (dcp DiskCopyProgress) MarshalJSON() ([]byte, error) {
1201	objectMap := make(map[string]interface{})
1202	return json.Marshal(objectMap)
1203}
1204
1205// DiskJobDetails dataBox Disk Job Details.
1206type DiskJobDetails struct {
1207	// PreferredDisks - User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int.
1208	PreferredDisks map[string]*int32 `json:"preferredDisks"`
1209	// CopyProgress - READ-ONLY; Copy progress per disk.
1210	CopyProgress *[]DiskCopyProgress `json:"copyProgress,omitempty"`
1211	// DisksAndSizeDetails - READ-ONLY; Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer.
1212	DisksAndSizeDetails map[string]*int32 `json:"disksAndSizeDetails"`
1213	// Passkey - User entered passkey for DataBox Disk job.
1214	Passkey *string `json:"passkey,omitempty"`
1215	// JobStages - READ-ONLY; List of stages that run in the job.
1216	JobStages *[]JobStages `json:"jobStages,omitempty"`
1217	// ContactDetails - Contact details for notification and shipping.
1218	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
1219	// ShippingAddress - Shipping address of the customer.
1220	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
1221	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
1222	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
1223	// ReturnPackage - READ-ONLY; Return package shipping details.
1224	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
1225	// DataImportDetails - Details of the data to be imported into azure.
1226	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
1227	// DataExportDetails - Details of the data to be exported from azure.
1228	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
1229	// Preferences - Preferences for the order.
1230	Preferences *Preferences `json:"preferences,omitempty"`
1231	// CopyLogDetails - READ-ONLY; List of copy log details.
1232	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
1233	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
1234	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
1235	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
1236	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
1237	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
1238	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
1239	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
1240	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
1241	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
1242	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
1243}
1244
1245// MarshalJSON is the custom marshaler for DiskJobDetails.
1246func (djd DiskJobDetails) MarshalJSON() ([]byte, error) {
1247	djd.JobDetailsType = JobDetailsTypeDataBoxDisk
1248	objectMap := make(map[string]interface{})
1249	if djd.PreferredDisks != nil {
1250		objectMap["preferredDisks"] = djd.PreferredDisks
1251	}
1252	if djd.Passkey != nil {
1253		objectMap["passkey"] = djd.Passkey
1254	}
1255	if djd.ContactDetails != nil {
1256		objectMap["contactDetails"] = djd.ContactDetails
1257	}
1258	if djd.ShippingAddress != nil {
1259		objectMap["shippingAddress"] = djd.ShippingAddress
1260	}
1261	if djd.DataImportDetails != nil {
1262		objectMap["dataImportDetails"] = djd.DataImportDetails
1263	}
1264	if djd.DataExportDetails != nil {
1265		objectMap["dataExportDetails"] = djd.DataExportDetails
1266	}
1267	if djd.Preferences != nil {
1268		objectMap["preferences"] = djd.Preferences
1269	}
1270	if djd.ExpectedDataSizeInTerabytes != nil {
1271		objectMap["expectedDataSizeInTerabytes"] = djd.ExpectedDataSizeInTerabytes
1272	}
1273	if djd.JobDetailsType != "" {
1274		objectMap["jobDetailsType"] = djd.JobDetailsType
1275	}
1276	return json.Marshal(objectMap)
1277}
1278
1279// AsDiskJobDetails is the BasicJobDetails implementation for DiskJobDetails.
1280func (djd DiskJobDetails) AsDiskJobDetails() (*DiskJobDetails, bool) {
1281	return &djd, true
1282}
1283
1284// AsHeavyJobDetails is the BasicJobDetails implementation for DiskJobDetails.
1285func (djd DiskJobDetails) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
1286	return nil, false
1287}
1288
1289// AsJobDetailsType is the BasicJobDetails implementation for DiskJobDetails.
1290func (djd DiskJobDetails) AsJobDetailsType() (*JobDetailsType, bool) {
1291	return nil, false
1292}
1293
1294// AsJobDetails is the BasicJobDetails implementation for DiskJobDetails.
1295func (djd DiskJobDetails) AsJobDetails() (*JobDetails, bool) {
1296	return nil, false
1297}
1298
1299// AsBasicJobDetails is the BasicJobDetails implementation for DiskJobDetails.
1300func (djd DiskJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
1301	return &djd, true
1302}
1303
1304// UnmarshalJSON is the custom unmarshaler for DiskJobDetails struct.
1305func (djd *DiskJobDetails) UnmarshalJSON(body []byte) error {
1306	var m map[string]*json.RawMessage
1307	err := json.Unmarshal(body, &m)
1308	if err != nil {
1309		return err
1310	}
1311	for k, v := range m {
1312		switch k {
1313		case "preferredDisks":
1314			if v != nil {
1315				var preferredDisks map[string]*int32
1316				err = json.Unmarshal(*v, &preferredDisks)
1317				if err != nil {
1318					return err
1319				}
1320				djd.PreferredDisks = preferredDisks
1321			}
1322		case "copyProgress":
1323			if v != nil {
1324				var copyProgress []DiskCopyProgress
1325				err = json.Unmarshal(*v, &copyProgress)
1326				if err != nil {
1327					return err
1328				}
1329				djd.CopyProgress = &copyProgress
1330			}
1331		case "disksAndSizeDetails":
1332			if v != nil {
1333				var disksAndSizeDetails map[string]*int32
1334				err = json.Unmarshal(*v, &disksAndSizeDetails)
1335				if err != nil {
1336					return err
1337				}
1338				djd.DisksAndSizeDetails = disksAndSizeDetails
1339			}
1340		case "passkey":
1341			if v != nil {
1342				var passkey string
1343				err = json.Unmarshal(*v, &passkey)
1344				if err != nil {
1345					return err
1346				}
1347				djd.Passkey = &passkey
1348			}
1349		case "jobStages":
1350			if v != nil {
1351				var jobStages []JobStages
1352				err = json.Unmarshal(*v, &jobStages)
1353				if err != nil {
1354					return err
1355				}
1356				djd.JobStages = &jobStages
1357			}
1358		case "contactDetails":
1359			if v != nil {
1360				var contactDetails ContactDetails
1361				err = json.Unmarshal(*v, &contactDetails)
1362				if err != nil {
1363					return err
1364				}
1365				djd.ContactDetails = &contactDetails
1366			}
1367		case "shippingAddress":
1368			if v != nil {
1369				var shippingAddress ShippingAddress
1370				err = json.Unmarshal(*v, &shippingAddress)
1371				if err != nil {
1372					return err
1373				}
1374				djd.ShippingAddress = &shippingAddress
1375			}
1376		case "deliveryPackage":
1377			if v != nil {
1378				var deliveryPackage PackageShippingDetails
1379				err = json.Unmarshal(*v, &deliveryPackage)
1380				if err != nil {
1381					return err
1382				}
1383				djd.DeliveryPackage = &deliveryPackage
1384			}
1385		case "returnPackage":
1386			if v != nil {
1387				var returnPackage PackageShippingDetails
1388				err = json.Unmarshal(*v, &returnPackage)
1389				if err != nil {
1390					return err
1391				}
1392				djd.ReturnPackage = &returnPackage
1393			}
1394		case "dataImportDetails":
1395			if v != nil {
1396				var dataImportDetails []DataImportDetails
1397				err = json.Unmarshal(*v, &dataImportDetails)
1398				if err != nil {
1399					return err
1400				}
1401				djd.DataImportDetails = &dataImportDetails
1402			}
1403		case "dataExportDetails":
1404			if v != nil {
1405				var dataExportDetails []DataExportDetails
1406				err = json.Unmarshal(*v, &dataExportDetails)
1407				if err != nil {
1408					return err
1409				}
1410				djd.DataExportDetails = &dataExportDetails
1411			}
1412		case "preferences":
1413			if v != nil {
1414				var preferences Preferences
1415				err = json.Unmarshal(*v, &preferences)
1416				if err != nil {
1417					return err
1418				}
1419				djd.Preferences = &preferences
1420			}
1421		case "copyLogDetails":
1422			if v != nil {
1423				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
1424				if err != nil {
1425					return err
1426				}
1427				djd.CopyLogDetails = &copyLogDetails
1428			}
1429		case "reverseShipmentLabelSasKey":
1430			if v != nil {
1431				var reverseShipmentLabelSasKey string
1432				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
1433				if err != nil {
1434					return err
1435				}
1436				djd.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
1437			}
1438		case "chainOfCustodySasKey":
1439			if v != nil {
1440				var chainOfCustodySasKey string
1441				err = json.Unmarshal(*v, &chainOfCustodySasKey)
1442				if err != nil {
1443					return err
1444				}
1445				djd.ChainOfCustodySasKey = &chainOfCustodySasKey
1446			}
1447		case "keyEncryptionKey":
1448			if v != nil {
1449				var keyEncryptionKey KeyEncryptionKey
1450				err = json.Unmarshal(*v, &keyEncryptionKey)
1451				if err != nil {
1452					return err
1453				}
1454				djd.KeyEncryptionKey = &keyEncryptionKey
1455			}
1456		case "expectedDataSizeInTerabytes":
1457			if v != nil {
1458				var expectedDataSizeInTerabytes int32
1459				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
1460				if err != nil {
1461					return err
1462				}
1463				djd.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
1464			}
1465		case "jobDetailsType":
1466			if v != nil {
1467				var jobDetailsType JobDetailsTypeEnum
1468				err = json.Unmarshal(*v, &jobDetailsType)
1469				if err != nil {
1470					return err
1471				}
1472				djd.JobDetailsType = jobDetailsType
1473			}
1474		}
1475	}
1476
1477	return nil
1478}
1479
1480// DiskJobSecrets the secrets related to disk job.
1481type DiskJobSecrets struct {
1482	// DiskSecrets - READ-ONLY; Contains the list of secrets object for that device.
1483	DiskSecrets *[]DiskSecret `json:"diskSecrets,omitempty"`
1484	// PassKey - READ-ONLY; PassKey for the disk Job.
1485	PassKey *string `json:"passKey,omitempty"`
1486	// IsPasskeyUserDefined - READ-ONLY; Whether passkey was provided by user.
1487	IsPasskeyUserDefined *bool `json:"isPasskeyUserDefined,omitempty"`
1488	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
1489	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
1490	// Error - READ-ONLY; Error while fetching the secrets.
1491	Error *CloudError `json:"error,omitempty"`
1492	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
1493	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
1494}
1495
1496// MarshalJSON is the custom marshaler for DiskJobSecrets.
1497func (djs DiskJobSecrets) MarshalJSON() ([]byte, error) {
1498	djs.JobSecretsType = JobSecretsTypeDataBoxDisk
1499	objectMap := make(map[string]interface{})
1500	if djs.JobSecretsType != "" {
1501		objectMap["jobSecretsType"] = djs.JobSecretsType
1502	}
1503	return json.Marshal(objectMap)
1504}
1505
1506// AsDiskJobSecrets is the BasicJobSecrets implementation for DiskJobSecrets.
1507func (djs DiskJobSecrets) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
1508	return &djs, true
1509}
1510
1511// AsHeavyJobSecrets is the BasicJobSecrets implementation for DiskJobSecrets.
1512func (djs DiskJobSecrets) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
1513	return nil, false
1514}
1515
1516// AsJobSecretsType is the BasicJobSecrets implementation for DiskJobSecrets.
1517func (djs DiskJobSecrets) AsJobSecretsType() (*JobSecretsType, bool) {
1518	return nil, false
1519}
1520
1521// AsJobSecrets is the BasicJobSecrets implementation for DiskJobSecrets.
1522func (djs DiskJobSecrets) AsJobSecrets() (*JobSecrets, bool) {
1523	return nil, false
1524}
1525
1526// AsBasicJobSecrets is the BasicJobSecrets implementation for DiskJobSecrets.
1527func (djs DiskJobSecrets) AsBasicJobSecrets() (BasicJobSecrets, bool) {
1528	return &djs, true
1529}
1530
1531// DiskScheduleAvailabilityRequest request body to get the availability for scheduling disk orders.
1532type DiskScheduleAvailabilityRequest struct {
1533	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
1534	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
1535	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
1536	StorageLocation *string `json:"storageLocation,omitempty"`
1537	// Country - Country in which storage location should be supported.
1538	Country *string `json:"country,omitempty"`
1539	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
1540	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
1541}
1542
1543// MarshalJSON is the custom marshaler for DiskScheduleAvailabilityRequest.
1544func (dsar DiskScheduleAvailabilityRequest) MarshalJSON() ([]byte, error) {
1545	dsar.SkuName = SkuNameDataBoxDisk
1546	objectMap := make(map[string]interface{})
1547	if dsar.ExpectedDataSizeInTerabytes != nil {
1548		objectMap["expectedDataSizeInTerabytes"] = dsar.ExpectedDataSizeInTerabytes
1549	}
1550	if dsar.StorageLocation != nil {
1551		objectMap["storageLocation"] = dsar.StorageLocation
1552	}
1553	if dsar.Country != nil {
1554		objectMap["country"] = dsar.Country
1555	}
1556	if dsar.SkuName != "" {
1557		objectMap["skuName"] = dsar.SkuName
1558	}
1559	return json.Marshal(objectMap)
1560}
1561
1562// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for DiskScheduleAvailabilityRequest.
1563func (dsar DiskScheduleAvailabilityRequest) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
1564	return nil, false
1565}
1566
1567// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for DiskScheduleAvailabilityRequest.
1568func (dsar DiskScheduleAvailabilityRequest) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
1569	return &dsar, true
1570}
1571
1572// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for DiskScheduleAvailabilityRequest.
1573func (dsar DiskScheduleAvailabilityRequest) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
1574	return nil, false
1575}
1576
1577// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for DiskScheduleAvailabilityRequest.
1578func (dsar DiskScheduleAvailabilityRequest) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
1579	return nil, false
1580}
1581
1582// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for DiskScheduleAvailabilityRequest.
1583func (dsar DiskScheduleAvailabilityRequest) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
1584	return &dsar, true
1585}
1586
1587// DiskSecret contains all the secrets of a Disk.
1588type DiskSecret struct {
1589	// DiskSerialNumber - READ-ONLY; Serial number of the assigned disk.
1590	DiskSerialNumber *string `json:"diskSerialNumber,omitempty"`
1591	// BitLockerKey - READ-ONLY; Bit Locker key of the disk which can be used to unlock the disk to copy data.
1592	BitLockerKey *string `json:"bitLockerKey,omitempty"`
1593}
1594
1595// MarshalJSON is the custom marshaler for DiskSecret.
1596func (ds DiskSecret) MarshalJSON() ([]byte, error) {
1597	objectMap := make(map[string]interface{})
1598	return json.Marshal(objectMap)
1599}
1600
1601// EncryptionPreferences preferences related to the Encryption.
1602type EncryptionPreferences struct {
1603	// DoubleEncryption - Defines secondary layer of software-based encryption enablement. Possible values include: 'Enabled', 'Disabled'
1604	DoubleEncryption DoubleEncryption `json:"doubleEncryption,omitempty"`
1605}
1606
1607// ErrorDetail ...
1608type ErrorDetail struct {
1609	Code    *string    `json:"code,omitempty"`
1610	Message *string    `json:"message,omitempty"`
1611	Details *[]Details `json:"details,omitempty"`
1612	Target  *string    `json:"target,omitempty"`
1613}
1614
1615// FilterFileDetails details of the filter files to be used for data transfer.
1616type FilterFileDetails struct {
1617	// FilterFileType - Type of the filter file. Possible values include: 'AzureBlob', 'AzureFile'
1618	FilterFileType FilterFileType `json:"filterFileType,omitempty"`
1619	// FilterFilePath - Path of the file that contains the details of all items to transfer.
1620	FilterFilePath *string `json:"filterFilePath,omitempty"`
1621}
1622
1623// HeavyAccountCopyLogDetails copy log details for a storage account for Databox heavy
1624type HeavyAccountCopyLogDetails struct {
1625	// AccountName - READ-ONLY; Account name.
1626	AccountName *string `json:"accountName,omitempty"`
1627	// CopyLogLink - READ-ONLY; Link for copy logs.
1628	CopyLogLink *[]string `json:"copyLogLink,omitempty"`
1629	// CopyVerboseLogLink - READ-ONLY; Link for copy verbose logs. This will be set only when the LogCollectionLevel is set to verbose.
1630	CopyVerboseLogLink *[]string `json:"copyVerboseLogLink,omitempty"`
1631	// CopyLogDetailsType - Possible values include: 'CopyLogDetailsTypeCopyLogDetails', 'CopyLogDetailsTypeDataBox', 'CopyLogDetailsTypeDataBoxDisk', 'CopyLogDetailsTypeDataBoxHeavy'
1632	CopyLogDetailsType CopyLogDetailsType `json:"copyLogDetailsType,omitempty"`
1633}
1634
1635// MarshalJSON is the custom marshaler for HeavyAccountCopyLogDetails.
1636func (hacld HeavyAccountCopyLogDetails) MarshalJSON() ([]byte, error) {
1637	hacld.CopyLogDetailsType = CopyLogDetailsTypeDataBoxHeavy
1638	objectMap := make(map[string]interface{})
1639	if hacld.CopyLogDetailsType != "" {
1640		objectMap["copyLogDetailsType"] = hacld.CopyLogDetailsType
1641	}
1642	return json.Marshal(objectMap)
1643}
1644
1645// AsAccountCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1646func (hacld HeavyAccountCopyLogDetails) AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool) {
1647	return nil, false
1648}
1649
1650// AsDiskCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1651func (hacld HeavyAccountCopyLogDetails) AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool) {
1652	return nil, false
1653}
1654
1655// AsHeavyAccountCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1656func (hacld HeavyAccountCopyLogDetails) AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool) {
1657	return &hacld, true
1658}
1659
1660// AsCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1661func (hacld HeavyAccountCopyLogDetails) AsCopyLogDetails() (*CopyLogDetails, bool) {
1662	return nil, false
1663}
1664
1665// AsBasicCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1666func (hacld HeavyAccountCopyLogDetails) AsBasicCopyLogDetails() (BasicCopyLogDetails, bool) {
1667	return &hacld, true
1668}
1669
1670// HeavyJobDetails databox Heavy Device Job Details
1671type HeavyJobDetails struct {
1672	// CopyProgress - READ-ONLY; Copy progress per account.
1673	CopyProgress *[]CopyProgress `json:"copyProgress,omitempty"`
1674	// DevicePassword - Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+
1675	DevicePassword *string `json:"devicePassword,omitempty"`
1676	// JobStages - READ-ONLY; List of stages that run in the job.
1677	JobStages *[]JobStages `json:"jobStages,omitempty"`
1678	// ContactDetails - Contact details for notification and shipping.
1679	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
1680	// ShippingAddress - Shipping address of the customer.
1681	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
1682	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
1683	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
1684	// ReturnPackage - READ-ONLY; Return package shipping details.
1685	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
1686	// DataImportDetails - Details of the data to be imported into azure.
1687	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
1688	// DataExportDetails - Details of the data to be exported from azure.
1689	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
1690	// Preferences - Preferences for the order.
1691	Preferences *Preferences `json:"preferences,omitempty"`
1692	// CopyLogDetails - READ-ONLY; List of copy log details.
1693	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
1694	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
1695	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
1696	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
1697	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
1698	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
1699	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
1700	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
1701	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
1702	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
1703	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
1704}
1705
1706// MarshalJSON is the custom marshaler for HeavyJobDetails.
1707func (hjd HeavyJobDetails) MarshalJSON() ([]byte, error) {
1708	hjd.JobDetailsType = JobDetailsTypeDataBoxHeavy
1709	objectMap := make(map[string]interface{})
1710	if hjd.DevicePassword != nil {
1711		objectMap["devicePassword"] = hjd.DevicePassword
1712	}
1713	if hjd.ContactDetails != nil {
1714		objectMap["contactDetails"] = hjd.ContactDetails
1715	}
1716	if hjd.ShippingAddress != nil {
1717		objectMap["shippingAddress"] = hjd.ShippingAddress
1718	}
1719	if hjd.DataImportDetails != nil {
1720		objectMap["dataImportDetails"] = hjd.DataImportDetails
1721	}
1722	if hjd.DataExportDetails != nil {
1723		objectMap["dataExportDetails"] = hjd.DataExportDetails
1724	}
1725	if hjd.Preferences != nil {
1726		objectMap["preferences"] = hjd.Preferences
1727	}
1728	if hjd.ExpectedDataSizeInTerabytes != nil {
1729		objectMap["expectedDataSizeInTerabytes"] = hjd.ExpectedDataSizeInTerabytes
1730	}
1731	if hjd.JobDetailsType != "" {
1732		objectMap["jobDetailsType"] = hjd.JobDetailsType
1733	}
1734	return json.Marshal(objectMap)
1735}
1736
1737// AsDiskJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1738func (hjd HeavyJobDetails) AsDiskJobDetails() (*DiskJobDetails, bool) {
1739	return nil, false
1740}
1741
1742// AsHeavyJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1743func (hjd HeavyJobDetails) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
1744	return &hjd, true
1745}
1746
1747// AsJobDetailsType is the BasicJobDetails implementation for HeavyJobDetails.
1748func (hjd HeavyJobDetails) AsJobDetailsType() (*JobDetailsType, bool) {
1749	return nil, false
1750}
1751
1752// AsJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1753func (hjd HeavyJobDetails) AsJobDetails() (*JobDetails, bool) {
1754	return nil, false
1755}
1756
1757// AsBasicJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1758func (hjd HeavyJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
1759	return &hjd, true
1760}
1761
1762// UnmarshalJSON is the custom unmarshaler for HeavyJobDetails struct.
1763func (hjd *HeavyJobDetails) UnmarshalJSON(body []byte) error {
1764	var m map[string]*json.RawMessage
1765	err := json.Unmarshal(body, &m)
1766	if err != nil {
1767		return err
1768	}
1769	for k, v := range m {
1770		switch k {
1771		case "copyProgress":
1772			if v != nil {
1773				var copyProgress []CopyProgress
1774				err = json.Unmarshal(*v, &copyProgress)
1775				if err != nil {
1776					return err
1777				}
1778				hjd.CopyProgress = &copyProgress
1779			}
1780		case "devicePassword":
1781			if v != nil {
1782				var devicePassword string
1783				err = json.Unmarshal(*v, &devicePassword)
1784				if err != nil {
1785					return err
1786				}
1787				hjd.DevicePassword = &devicePassword
1788			}
1789		case "jobStages":
1790			if v != nil {
1791				var jobStages []JobStages
1792				err = json.Unmarshal(*v, &jobStages)
1793				if err != nil {
1794					return err
1795				}
1796				hjd.JobStages = &jobStages
1797			}
1798		case "contactDetails":
1799			if v != nil {
1800				var contactDetails ContactDetails
1801				err = json.Unmarshal(*v, &contactDetails)
1802				if err != nil {
1803					return err
1804				}
1805				hjd.ContactDetails = &contactDetails
1806			}
1807		case "shippingAddress":
1808			if v != nil {
1809				var shippingAddress ShippingAddress
1810				err = json.Unmarshal(*v, &shippingAddress)
1811				if err != nil {
1812					return err
1813				}
1814				hjd.ShippingAddress = &shippingAddress
1815			}
1816		case "deliveryPackage":
1817			if v != nil {
1818				var deliveryPackage PackageShippingDetails
1819				err = json.Unmarshal(*v, &deliveryPackage)
1820				if err != nil {
1821					return err
1822				}
1823				hjd.DeliveryPackage = &deliveryPackage
1824			}
1825		case "returnPackage":
1826			if v != nil {
1827				var returnPackage PackageShippingDetails
1828				err = json.Unmarshal(*v, &returnPackage)
1829				if err != nil {
1830					return err
1831				}
1832				hjd.ReturnPackage = &returnPackage
1833			}
1834		case "dataImportDetails":
1835			if v != nil {
1836				var dataImportDetails []DataImportDetails
1837				err = json.Unmarshal(*v, &dataImportDetails)
1838				if err != nil {
1839					return err
1840				}
1841				hjd.DataImportDetails = &dataImportDetails
1842			}
1843		case "dataExportDetails":
1844			if v != nil {
1845				var dataExportDetails []DataExportDetails
1846				err = json.Unmarshal(*v, &dataExportDetails)
1847				if err != nil {
1848					return err
1849				}
1850				hjd.DataExportDetails = &dataExportDetails
1851			}
1852		case "preferences":
1853			if v != nil {
1854				var preferences Preferences
1855				err = json.Unmarshal(*v, &preferences)
1856				if err != nil {
1857					return err
1858				}
1859				hjd.Preferences = &preferences
1860			}
1861		case "copyLogDetails":
1862			if v != nil {
1863				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
1864				if err != nil {
1865					return err
1866				}
1867				hjd.CopyLogDetails = &copyLogDetails
1868			}
1869		case "reverseShipmentLabelSasKey":
1870			if v != nil {
1871				var reverseShipmentLabelSasKey string
1872				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
1873				if err != nil {
1874					return err
1875				}
1876				hjd.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
1877			}
1878		case "chainOfCustodySasKey":
1879			if v != nil {
1880				var chainOfCustodySasKey string
1881				err = json.Unmarshal(*v, &chainOfCustodySasKey)
1882				if err != nil {
1883					return err
1884				}
1885				hjd.ChainOfCustodySasKey = &chainOfCustodySasKey
1886			}
1887		case "keyEncryptionKey":
1888			if v != nil {
1889				var keyEncryptionKey KeyEncryptionKey
1890				err = json.Unmarshal(*v, &keyEncryptionKey)
1891				if err != nil {
1892					return err
1893				}
1894				hjd.KeyEncryptionKey = &keyEncryptionKey
1895			}
1896		case "expectedDataSizeInTerabytes":
1897			if v != nil {
1898				var expectedDataSizeInTerabytes int32
1899				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
1900				if err != nil {
1901					return err
1902				}
1903				hjd.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
1904			}
1905		case "jobDetailsType":
1906			if v != nil {
1907				var jobDetailsType JobDetailsTypeEnum
1908				err = json.Unmarshal(*v, &jobDetailsType)
1909				if err != nil {
1910					return err
1911				}
1912				hjd.JobDetailsType = jobDetailsType
1913			}
1914		}
1915	}
1916
1917	return nil
1918}
1919
1920// HeavyJobSecrets the secrets related to a databox heavy job.
1921type HeavyJobSecrets struct {
1922	// CabinetPodSecrets - READ-ONLY; Contains the list of secret objects for a databox heavy job.
1923	CabinetPodSecrets *[]HeavySecret `json:"cabinetPodSecrets,omitempty"`
1924	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
1925	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
1926	// Error - READ-ONLY; Error while fetching the secrets.
1927	Error *CloudError `json:"error,omitempty"`
1928	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
1929	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
1930}
1931
1932// MarshalJSON is the custom marshaler for HeavyJobSecrets.
1933func (hjs HeavyJobSecrets) MarshalJSON() ([]byte, error) {
1934	hjs.JobSecretsType = JobSecretsTypeDataBoxHeavy
1935	objectMap := make(map[string]interface{})
1936	if hjs.JobSecretsType != "" {
1937		objectMap["jobSecretsType"] = hjs.JobSecretsType
1938	}
1939	return json.Marshal(objectMap)
1940}
1941
1942// AsDiskJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1943func (hjs HeavyJobSecrets) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
1944	return nil, false
1945}
1946
1947// AsHeavyJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1948func (hjs HeavyJobSecrets) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
1949	return &hjs, true
1950}
1951
1952// AsJobSecretsType is the BasicJobSecrets implementation for HeavyJobSecrets.
1953func (hjs HeavyJobSecrets) AsJobSecretsType() (*JobSecretsType, bool) {
1954	return nil, false
1955}
1956
1957// AsJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1958func (hjs HeavyJobSecrets) AsJobSecrets() (*JobSecrets, bool) {
1959	return nil, false
1960}
1961
1962// AsBasicJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1963func (hjs HeavyJobSecrets) AsBasicJobSecrets() (BasicJobSecrets, bool) {
1964	return &hjs, true
1965}
1966
1967// HeavyScheduleAvailabilityRequest request body to get the availability for scheduling heavy orders.
1968type HeavyScheduleAvailabilityRequest struct {
1969	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
1970	StorageLocation *string `json:"storageLocation,omitempty"`
1971	// Country - Country in which storage location should be supported.
1972	Country *string `json:"country,omitempty"`
1973	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
1974	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
1975}
1976
1977// MarshalJSON is the custom marshaler for HeavyScheduleAvailabilityRequest.
1978func (hsar HeavyScheduleAvailabilityRequest) MarshalJSON() ([]byte, error) {
1979	hsar.SkuName = SkuNameDataBoxHeavy
1980	objectMap := make(map[string]interface{})
1981	if hsar.StorageLocation != nil {
1982		objectMap["storageLocation"] = hsar.StorageLocation
1983	}
1984	if hsar.Country != nil {
1985		objectMap["country"] = hsar.Country
1986	}
1987	if hsar.SkuName != "" {
1988		objectMap["skuName"] = hsar.SkuName
1989	}
1990	return json.Marshal(objectMap)
1991}
1992
1993// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
1994func (hsar HeavyScheduleAvailabilityRequest) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
1995	return nil, false
1996}
1997
1998// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
1999func (hsar HeavyScheduleAvailabilityRequest) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
2000	return nil, false
2001}
2002
2003// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
2004func (hsar HeavyScheduleAvailabilityRequest) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
2005	return &hsar, true
2006}
2007
2008// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
2009func (hsar HeavyScheduleAvailabilityRequest) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
2010	return nil, false
2011}
2012
2013// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
2014func (hsar HeavyScheduleAvailabilityRequest) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
2015	return &hsar, true
2016}
2017
2018// HeavySecret the secrets related to a databox heavy.
2019type HeavySecret struct {
2020	// DeviceSerialNumber - READ-ONLY; Serial number of the assigned device.
2021	DeviceSerialNumber *string `json:"deviceSerialNumber,omitempty"`
2022	// DevicePassword - READ-ONLY; Password for out of the box experience on device.
2023	DevicePassword *string `json:"devicePassword,omitempty"`
2024	// NetworkConfigurations - READ-ONLY; Network configuration of the appliance.
2025	NetworkConfigurations *[]ApplianceNetworkConfiguration `json:"networkConfigurations,omitempty"`
2026	// EncodedValidationCertPubKey - READ-ONLY; The base 64 encoded public key to authenticate with the device
2027	EncodedValidationCertPubKey *string `json:"encodedValidationCertPubKey,omitempty"`
2028	// AccountCredentialDetails - READ-ONLY; Per account level access credentials.
2029	AccountCredentialDetails *[]AccountCredentialDetails `json:"accountCredentialDetails,omitempty"`
2030}
2031
2032// MarshalJSON is the custom marshaler for HeavySecret.
2033func (hs HeavySecret) MarshalJSON() ([]byte, error) {
2034	objectMap := make(map[string]interface{})
2035	return json.Marshal(objectMap)
2036}
2037
2038// IdentityProperties managed identity properties.
2039type IdentityProperties struct {
2040	// Type - Managed service identity type.
2041	Type *string `json:"type,omitempty"`
2042	// UserAssigned - User assigned identity properties.
2043	UserAssigned *UserAssignedProperties `json:"userAssigned,omitempty"`
2044}
2045
2046// JobDeliveryInfo additional delivery info.
2047type JobDeliveryInfo struct {
2048	// ScheduledDateTime - Scheduled date time.
2049	ScheduledDateTime *date.Time `json:"scheduledDateTime,omitempty"`
2050}
2051
2052// BasicJobDetails job details.
2053type BasicJobDetails interface {
2054	AsDiskJobDetails() (*DiskJobDetails, bool)
2055	AsHeavyJobDetails() (*HeavyJobDetails, bool)
2056	AsJobDetailsType() (*JobDetailsType, bool)
2057	AsJobDetails() (*JobDetails, bool)
2058}
2059
2060// JobDetails job details.
2061type JobDetails struct {
2062	// JobStages - READ-ONLY; List of stages that run in the job.
2063	JobStages *[]JobStages `json:"jobStages,omitempty"`
2064	// ContactDetails - Contact details for notification and shipping.
2065	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
2066	// ShippingAddress - Shipping address of the customer.
2067	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
2068	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
2069	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
2070	// ReturnPackage - READ-ONLY; Return package shipping details.
2071	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
2072	// DataImportDetails - Details of the data to be imported into azure.
2073	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
2074	// DataExportDetails - Details of the data to be exported from azure.
2075	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
2076	// Preferences - Preferences for the order.
2077	Preferences *Preferences `json:"preferences,omitempty"`
2078	// CopyLogDetails - READ-ONLY; List of copy log details.
2079	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
2080	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
2081	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
2082	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
2083	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
2084	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
2085	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
2086	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
2087	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
2088	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
2089	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
2090}
2091
2092func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) {
2093	var m map[string]interface{}
2094	err := json.Unmarshal(body, &m)
2095	if err != nil {
2096		return nil, err
2097	}
2098
2099	switch m["jobDetailsType"] {
2100	case string(JobDetailsTypeDataBoxDisk):
2101		var djd DiskJobDetails
2102		err := json.Unmarshal(body, &djd)
2103		return djd, err
2104	case string(JobDetailsTypeDataBoxHeavy):
2105		var hjd HeavyJobDetails
2106		err := json.Unmarshal(body, &hjd)
2107		return hjd, err
2108	case string(JobDetailsTypeDataBox):
2109		var jdt JobDetailsType
2110		err := json.Unmarshal(body, &jdt)
2111		return jdt, err
2112	default:
2113		var jd JobDetails
2114		err := json.Unmarshal(body, &jd)
2115		return jd, err
2116	}
2117}
2118func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) {
2119	var rawMessages []*json.RawMessage
2120	err := json.Unmarshal(body, &rawMessages)
2121	if err != nil {
2122		return nil, err
2123	}
2124
2125	jdArray := make([]BasicJobDetails, len(rawMessages))
2126
2127	for index, rawMessage := range rawMessages {
2128		jd, err := unmarshalBasicJobDetails(*rawMessage)
2129		if err != nil {
2130			return nil, err
2131		}
2132		jdArray[index] = jd
2133	}
2134	return jdArray, nil
2135}
2136
2137// MarshalJSON is the custom marshaler for JobDetails.
2138func (jd JobDetails) MarshalJSON() ([]byte, error) {
2139	jd.JobDetailsType = JobDetailsTypeJobDetails
2140	objectMap := make(map[string]interface{})
2141	if jd.ContactDetails != nil {
2142		objectMap["contactDetails"] = jd.ContactDetails
2143	}
2144	if jd.ShippingAddress != nil {
2145		objectMap["shippingAddress"] = jd.ShippingAddress
2146	}
2147	if jd.DataImportDetails != nil {
2148		objectMap["dataImportDetails"] = jd.DataImportDetails
2149	}
2150	if jd.DataExportDetails != nil {
2151		objectMap["dataExportDetails"] = jd.DataExportDetails
2152	}
2153	if jd.Preferences != nil {
2154		objectMap["preferences"] = jd.Preferences
2155	}
2156	if jd.ExpectedDataSizeInTerabytes != nil {
2157		objectMap["expectedDataSizeInTerabytes"] = jd.ExpectedDataSizeInTerabytes
2158	}
2159	if jd.JobDetailsType != "" {
2160		objectMap["jobDetailsType"] = jd.JobDetailsType
2161	}
2162	return json.Marshal(objectMap)
2163}
2164
2165// AsDiskJobDetails is the BasicJobDetails implementation for JobDetails.
2166func (jd JobDetails) AsDiskJobDetails() (*DiskJobDetails, bool) {
2167	return nil, false
2168}
2169
2170// AsHeavyJobDetails is the BasicJobDetails implementation for JobDetails.
2171func (jd JobDetails) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
2172	return nil, false
2173}
2174
2175// AsJobDetailsType is the BasicJobDetails implementation for JobDetails.
2176func (jd JobDetails) AsJobDetailsType() (*JobDetailsType, bool) {
2177	return nil, false
2178}
2179
2180// AsJobDetails is the BasicJobDetails implementation for JobDetails.
2181func (jd JobDetails) AsJobDetails() (*JobDetails, bool) {
2182	return &jd, true
2183}
2184
2185// AsBasicJobDetails is the BasicJobDetails implementation for JobDetails.
2186func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
2187	return &jd, true
2188}
2189
2190// UnmarshalJSON is the custom unmarshaler for JobDetails struct.
2191func (jd *JobDetails) UnmarshalJSON(body []byte) error {
2192	var m map[string]*json.RawMessage
2193	err := json.Unmarshal(body, &m)
2194	if err != nil {
2195		return err
2196	}
2197	for k, v := range m {
2198		switch k {
2199		case "jobStages":
2200			if v != nil {
2201				var jobStages []JobStages
2202				err = json.Unmarshal(*v, &jobStages)
2203				if err != nil {
2204					return err
2205				}
2206				jd.JobStages = &jobStages
2207			}
2208		case "contactDetails":
2209			if v != nil {
2210				var contactDetails ContactDetails
2211				err = json.Unmarshal(*v, &contactDetails)
2212				if err != nil {
2213					return err
2214				}
2215				jd.ContactDetails = &contactDetails
2216			}
2217		case "shippingAddress":
2218			if v != nil {
2219				var shippingAddress ShippingAddress
2220				err = json.Unmarshal(*v, &shippingAddress)
2221				if err != nil {
2222					return err
2223				}
2224				jd.ShippingAddress = &shippingAddress
2225			}
2226		case "deliveryPackage":
2227			if v != nil {
2228				var deliveryPackage PackageShippingDetails
2229				err = json.Unmarshal(*v, &deliveryPackage)
2230				if err != nil {
2231					return err
2232				}
2233				jd.DeliveryPackage = &deliveryPackage
2234			}
2235		case "returnPackage":
2236			if v != nil {
2237				var returnPackage PackageShippingDetails
2238				err = json.Unmarshal(*v, &returnPackage)
2239				if err != nil {
2240					return err
2241				}
2242				jd.ReturnPackage = &returnPackage
2243			}
2244		case "dataImportDetails":
2245			if v != nil {
2246				var dataImportDetails []DataImportDetails
2247				err = json.Unmarshal(*v, &dataImportDetails)
2248				if err != nil {
2249					return err
2250				}
2251				jd.DataImportDetails = &dataImportDetails
2252			}
2253		case "dataExportDetails":
2254			if v != nil {
2255				var dataExportDetails []DataExportDetails
2256				err = json.Unmarshal(*v, &dataExportDetails)
2257				if err != nil {
2258					return err
2259				}
2260				jd.DataExportDetails = &dataExportDetails
2261			}
2262		case "preferences":
2263			if v != nil {
2264				var preferences Preferences
2265				err = json.Unmarshal(*v, &preferences)
2266				if err != nil {
2267					return err
2268				}
2269				jd.Preferences = &preferences
2270			}
2271		case "copyLogDetails":
2272			if v != nil {
2273				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
2274				if err != nil {
2275					return err
2276				}
2277				jd.CopyLogDetails = &copyLogDetails
2278			}
2279		case "reverseShipmentLabelSasKey":
2280			if v != nil {
2281				var reverseShipmentLabelSasKey string
2282				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
2283				if err != nil {
2284					return err
2285				}
2286				jd.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
2287			}
2288		case "chainOfCustodySasKey":
2289			if v != nil {
2290				var chainOfCustodySasKey string
2291				err = json.Unmarshal(*v, &chainOfCustodySasKey)
2292				if err != nil {
2293					return err
2294				}
2295				jd.ChainOfCustodySasKey = &chainOfCustodySasKey
2296			}
2297		case "keyEncryptionKey":
2298			if v != nil {
2299				var keyEncryptionKey KeyEncryptionKey
2300				err = json.Unmarshal(*v, &keyEncryptionKey)
2301				if err != nil {
2302					return err
2303				}
2304				jd.KeyEncryptionKey = &keyEncryptionKey
2305			}
2306		case "expectedDataSizeInTerabytes":
2307			if v != nil {
2308				var expectedDataSizeInTerabytes int32
2309				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
2310				if err != nil {
2311					return err
2312				}
2313				jd.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
2314			}
2315		case "jobDetailsType":
2316			if v != nil {
2317				var jobDetailsType JobDetailsTypeEnum
2318				err = json.Unmarshal(*v, &jobDetailsType)
2319				if err != nil {
2320					return err
2321				}
2322				jd.JobDetailsType = jobDetailsType
2323			}
2324		}
2325	}
2326
2327	return nil
2328}
2329
2330// JobDetailsType databox Job Details
2331type JobDetailsType struct {
2332	// CopyProgress - READ-ONLY; Copy progress per storage account.
2333	CopyProgress *[]CopyProgress `json:"copyProgress,omitempty"`
2334	// DevicePassword - Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+
2335	DevicePassword *string `json:"devicePassword,omitempty"`
2336	// JobStages - READ-ONLY; List of stages that run in the job.
2337	JobStages *[]JobStages `json:"jobStages,omitempty"`
2338	// ContactDetails - Contact details for notification and shipping.
2339	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
2340	// ShippingAddress - Shipping address of the customer.
2341	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
2342	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
2343	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
2344	// ReturnPackage - READ-ONLY; Return package shipping details.
2345	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
2346	// DataImportDetails - Details of the data to be imported into azure.
2347	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
2348	// DataExportDetails - Details of the data to be exported from azure.
2349	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
2350	// Preferences - Preferences for the order.
2351	Preferences *Preferences `json:"preferences,omitempty"`
2352	// CopyLogDetails - READ-ONLY; List of copy log details.
2353	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
2354	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
2355	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
2356	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
2357	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
2358	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
2359	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
2360	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
2361	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
2362	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
2363	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
2364}
2365
2366// MarshalJSON is the custom marshaler for JobDetailsType.
2367func (jdt JobDetailsType) MarshalJSON() ([]byte, error) {
2368	jdt.JobDetailsType = JobDetailsTypeDataBox
2369	objectMap := make(map[string]interface{})
2370	if jdt.DevicePassword != nil {
2371		objectMap["devicePassword"] = jdt.DevicePassword
2372	}
2373	if jdt.ContactDetails != nil {
2374		objectMap["contactDetails"] = jdt.ContactDetails
2375	}
2376	if jdt.ShippingAddress != nil {
2377		objectMap["shippingAddress"] = jdt.ShippingAddress
2378	}
2379	if jdt.DataImportDetails != nil {
2380		objectMap["dataImportDetails"] = jdt.DataImportDetails
2381	}
2382	if jdt.DataExportDetails != nil {
2383		objectMap["dataExportDetails"] = jdt.DataExportDetails
2384	}
2385	if jdt.Preferences != nil {
2386		objectMap["preferences"] = jdt.Preferences
2387	}
2388	if jdt.ExpectedDataSizeInTerabytes != nil {
2389		objectMap["expectedDataSizeInTerabytes"] = jdt.ExpectedDataSizeInTerabytes
2390	}
2391	if jdt.JobDetailsType != "" {
2392		objectMap["jobDetailsType"] = jdt.JobDetailsType
2393	}
2394	return json.Marshal(objectMap)
2395}
2396
2397// AsDiskJobDetails is the BasicJobDetails implementation for JobDetailsType.
2398func (jdt JobDetailsType) AsDiskJobDetails() (*DiskJobDetails, bool) {
2399	return nil, false
2400}
2401
2402// AsHeavyJobDetails is the BasicJobDetails implementation for JobDetailsType.
2403func (jdt JobDetailsType) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
2404	return nil, false
2405}
2406
2407// AsJobDetailsType is the BasicJobDetails implementation for JobDetailsType.
2408func (jdt JobDetailsType) AsJobDetailsType() (*JobDetailsType, bool) {
2409	return &jdt, true
2410}
2411
2412// AsJobDetails is the BasicJobDetails implementation for JobDetailsType.
2413func (jdt JobDetailsType) AsJobDetails() (*JobDetails, bool) {
2414	return nil, false
2415}
2416
2417// AsBasicJobDetails is the BasicJobDetails implementation for JobDetailsType.
2418func (jdt JobDetailsType) AsBasicJobDetails() (BasicJobDetails, bool) {
2419	return &jdt, true
2420}
2421
2422// UnmarshalJSON is the custom unmarshaler for JobDetailsType struct.
2423func (jdt *JobDetailsType) UnmarshalJSON(body []byte) error {
2424	var m map[string]*json.RawMessage
2425	err := json.Unmarshal(body, &m)
2426	if err != nil {
2427		return err
2428	}
2429	for k, v := range m {
2430		switch k {
2431		case "copyProgress":
2432			if v != nil {
2433				var copyProgress []CopyProgress
2434				err = json.Unmarshal(*v, &copyProgress)
2435				if err != nil {
2436					return err
2437				}
2438				jdt.CopyProgress = &copyProgress
2439			}
2440		case "devicePassword":
2441			if v != nil {
2442				var devicePassword string
2443				err = json.Unmarshal(*v, &devicePassword)
2444				if err != nil {
2445					return err
2446				}
2447				jdt.DevicePassword = &devicePassword
2448			}
2449		case "jobStages":
2450			if v != nil {
2451				var jobStages []JobStages
2452				err = json.Unmarshal(*v, &jobStages)
2453				if err != nil {
2454					return err
2455				}
2456				jdt.JobStages = &jobStages
2457			}
2458		case "contactDetails":
2459			if v != nil {
2460				var contactDetails ContactDetails
2461				err = json.Unmarshal(*v, &contactDetails)
2462				if err != nil {
2463					return err
2464				}
2465				jdt.ContactDetails = &contactDetails
2466			}
2467		case "shippingAddress":
2468			if v != nil {
2469				var shippingAddress ShippingAddress
2470				err = json.Unmarshal(*v, &shippingAddress)
2471				if err != nil {
2472					return err
2473				}
2474				jdt.ShippingAddress = &shippingAddress
2475			}
2476		case "deliveryPackage":
2477			if v != nil {
2478				var deliveryPackage PackageShippingDetails
2479				err = json.Unmarshal(*v, &deliveryPackage)
2480				if err != nil {
2481					return err
2482				}
2483				jdt.DeliveryPackage = &deliveryPackage
2484			}
2485		case "returnPackage":
2486			if v != nil {
2487				var returnPackage PackageShippingDetails
2488				err = json.Unmarshal(*v, &returnPackage)
2489				if err != nil {
2490					return err
2491				}
2492				jdt.ReturnPackage = &returnPackage
2493			}
2494		case "dataImportDetails":
2495			if v != nil {
2496				var dataImportDetails []DataImportDetails
2497				err = json.Unmarshal(*v, &dataImportDetails)
2498				if err != nil {
2499					return err
2500				}
2501				jdt.DataImportDetails = &dataImportDetails
2502			}
2503		case "dataExportDetails":
2504			if v != nil {
2505				var dataExportDetails []DataExportDetails
2506				err = json.Unmarshal(*v, &dataExportDetails)
2507				if err != nil {
2508					return err
2509				}
2510				jdt.DataExportDetails = &dataExportDetails
2511			}
2512		case "preferences":
2513			if v != nil {
2514				var preferences Preferences
2515				err = json.Unmarshal(*v, &preferences)
2516				if err != nil {
2517					return err
2518				}
2519				jdt.Preferences = &preferences
2520			}
2521		case "copyLogDetails":
2522			if v != nil {
2523				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
2524				if err != nil {
2525					return err
2526				}
2527				jdt.CopyLogDetails = &copyLogDetails
2528			}
2529		case "reverseShipmentLabelSasKey":
2530			if v != nil {
2531				var reverseShipmentLabelSasKey string
2532				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
2533				if err != nil {
2534					return err
2535				}
2536				jdt.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
2537			}
2538		case "chainOfCustodySasKey":
2539			if v != nil {
2540				var chainOfCustodySasKey string
2541				err = json.Unmarshal(*v, &chainOfCustodySasKey)
2542				if err != nil {
2543					return err
2544				}
2545				jdt.ChainOfCustodySasKey = &chainOfCustodySasKey
2546			}
2547		case "keyEncryptionKey":
2548			if v != nil {
2549				var keyEncryptionKey KeyEncryptionKey
2550				err = json.Unmarshal(*v, &keyEncryptionKey)
2551				if err != nil {
2552					return err
2553				}
2554				jdt.KeyEncryptionKey = &keyEncryptionKey
2555			}
2556		case "expectedDataSizeInTerabytes":
2557			if v != nil {
2558				var expectedDataSizeInTerabytes int32
2559				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
2560				if err != nil {
2561					return err
2562				}
2563				jdt.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
2564			}
2565		case "jobDetailsType":
2566			if v != nil {
2567				var jobDetailsType JobDetailsTypeEnum
2568				err = json.Unmarshal(*v, &jobDetailsType)
2569				if err != nil {
2570					return err
2571				}
2572				jdt.JobDetailsType = jobDetailsType
2573			}
2574		}
2575	}
2576
2577	return nil
2578}
2579
2580// JobProperties job Properties
2581type JobProperties struct {
2582	// TransferType - Type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
2583	TransferType TransferType `json:"transferType,omitempty"`
2584	// IsCancellable - READ-ONLY; Describes whether the job is cancellable or not.
2585	IsCancellable *bool `json:"isCancellable,omitempty"`
2586	// IsDeletable - READ-ONLY; Describes whether the job is deletable or not.
2587	IsDeletable *bool `json:"isDeletable,omitempty"`
2588	// IsShippingAddressEditable - READ-ONLY; Describes whether the shipping address is editable or not.
2589	IsShippingAddressEditable *bool `json:"isShippingAddressEditable,omitempty"`
2590	// IsPrepareToShipEnabled - READ-ONLY; Is Prepare To Ship Enabled on this job
2591	IsPrepareToShipEnabled *bool `json:"isPrepareToShipEnabled,omitempty"`
2592	// Status - READ-ONLY; Name of the stage which is in progress. Possible values include: 'StageNameDeviceOrdered', 'StageNameDevicePrepared', 'StageNameDispatched', 'StageNameDelivered', 'StageNamePickedUp', 'StageNameAtAzureDC', 'StageNameDataCopy', 'StageNameCompleted', 'StageNameCompletedWithErrors', 'StageNameCancelled', 'StageNameFailedIssueReportedAtCustomer', 'StageNameFailedIssueDetectedAtAzureDC', 'StageNameAborted', 'StageNameCompletedWithWarnings', 'StageNameReadyToDispatchFromAzureDC', 'StageNameReadyToReceiveAtAzureDC'
2593	Status StageName `json:"status,omitempty"`
2594	// StartTime - READ-ONLY; Time at which the job was started in UTC ISO 8601 format.
2595	StartTime *date.Time `json:"startTime,omitempty"`
2596	// Error - READ-ONLY; Top level error for the job.
2597	Error *CloudError `json:"error,omitempty"`
2598	// Details - Details of a job run. This field will only be sent for expand details filter.
2599	Details BasicJobDetails `json:"details,omitempty"`
2600	// CancellationReason - READ-ONLY; Reason for cancellation.
2601	CancellationReason *string `json:"cancellationReason,omitempty"`
2602	// DeliveryType - Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled'
2603	DeliveryType JobDeliveryType `json:"deliveryType,omitempty"`
2604	// DeliveryInfo - Delivery Info of Job.
2605	DeliveryInfo *JobDeliveryInfo `json:"deliveryInfo,omitempty"`
2606	// IsCancellableWithoutFee - READ-ONLY; Flag to indicate cancellation of scheduled job.
2607	IsCancellableWithoutFee *bool `json:"isCancellableWithoutFee,omitempty"`
2608}
2609
2610// MarshalJSON is the custom marshaler for JobProperties.
2611func (jp JobProperties) MarshalJSON() ([]byte, error) {
2612	objectMap := make(map[string]interface{})
2613	if jp.TransferType != "" {
2614		objectMap["transferType"] = jp.TransferType
2615	}
2616	objectMap["details"] = jp.Details
2617	if jp.DeliveryType != "" {
2618		objectMap["deliveryType"] = jp.DeliveryType
2619	}
2620	if jp.DeliveryInfo != nil {
2621		objectMap["deliveryInfo"] = jp.DeliveryInfo
2622	}
2623	return json.Marshal(objectMap)
2624}
2625
2626// UnmarshalJSON is the custom unmarshaler for JobProperties struct.
2627func (jp *JobProperties) UnmarshalJSON(body []byte) error {
2628	var m map[string]*json.RawMessage
2629	err := json.Unmarshal(body, &m)
2630	if err != nil {
2631		return err
2632	}
2633	for k, v := range m {
2634		switch k {
2635		case "transferType":
2636			if v != nil {
2637				var transferType TransferType
2638				err = json.Unmarshal(*v, &transferType)
2639				if err != nil {
2640					return err
2641				}
2642				jp.TransferType = transferType
2643			}
2644		case "isCancellable":
2645			if v != nil {
2646				var isCancellable bool
2647				err = json.Unmarshal(*v, &isCancellable)
2648				if err != nil {
2649					return err
2650				}
2651				jp.IsCancellable = &isCancellable
2652			}
2653		case "isDeletable":
2654			if v != nil {
2655				var isDeletable bool
2656				err = json.Unmarshal(*v, &isDeletable)
2657				if err != nil {
2658					return err
2659				}
2660				jp.IsDeletable = &isDeletable
2661			}
2662		case "isShippingAddressEditable":
2663			if v != nil {
2664				var isShippingAddressEditable bool
2665				err = json.Unmarshal(*v, &isShippingAddressEditable)
2666				if err != nil {
2667					return err
2668				}
2669				jp.IsShippingAddressEditable = &isShippingAddressEditable
2670			}
2671		case "isPrepareToShipEnabled":
2672			if v != nil {
2673				var isPrepareToShipEnabled bool
2674				err = json.Unmarshal(*v, &isPrepareToShipEnabled)
2675				if err != nil {
2676					return err
2677				}
2678				jp.IsPrepareToShipEnabled = &isPrepareToShipEnabled
2679			}
2680		case "status":
2681			if v != nil {
2682				var status StageName
2683				err = json.Unmarshal(*v, &status)
2684				if err != nil {
2685					return err
2686				}
2687				jp.Status = status
2688			}
2689		case "startTime":
2690			if v != nil {
2691				var startTime date.Time
2692				err = json.Unmarshal(*v, &startTime)
2693				if err != nil {
2694					return err
2695				}
2696				jp.StartTime = &startTime
2697			}
2698		case "error":
2699			if v != nil {
2700				var errorVar CloudError
2701				err = json.Unmarshal(*v, &errorVar)
2702				if err != nil {
2703					return err
2704				}
2705				jp.Error = &errorVar
2706			}
2707		case "details":
2708			if v != nil {
2709				details, err := unmarshalBasicJobDetails(*v)
2710				if err != nil {
2711					return err
2712				}
2713				jp.Details = details
2714			}
2715		case "cancellationReason":
2716			if v != nil {
2717				var cancellationReason string
2718				err = json.Unmarshal(*v, &cancellationReason)
2719				if err != nil {
2720					return err
2721				}
2722				jp.CancellationReason = &cancellationReason
2723			}
2724		case "deliveryType":
2725			if v != nil {
2726				var deliveryType JobDeliveryType
2727				err = json.Unmarshal(*v, &deliveryType)
2728				if err != nil {
2729					return err
2730				}
2731				jp.DeliveryType = deliveryType
2732			}
2733		case "deliveryInfo":
2734			if v != nil {
2735				var deliveryInfo JobDeliveryInfo
2736				err = json.Unmarshal(*v, &deliveryInfo)
2737				if err != nil {
2738					return err
2739				}
2740				jp.DeliveryInfo = &deliveryInfo
2741			}
2742		case "isCancellableWithoutFee":
2743			if v != nil {
2744				var isCancellableWithoutFee bool
2745				err = json.Unmarshal(*v, &isCancellableWithoutFee)
2746				if err != nil {
2747					return err
2748				}
2749				jp.IsCancellableWithoutFee = &isCancellableWithoutFee
2750			}
2751		}
2752	}
2753
2754	return nil
2755}
2756
2757// JobResource job Resource.
2758type JobResource struct {
2759	autorest.Response `json:"-"`
2760	// JobProperties - Properties of a job.
2761	*JobProperties `json:"properties,omitempty"`
2762	// Name - READ-ONLY; Name of the object.
2763	Name *string `json:"name,omitempty"`
2764	// ID - READ-ONLY; Id of the object.
2765	ID *string `json:"id,omitempty"`
2766	// Type - READ-ONLY; Type of the object.
2767	Type *string `json:"type,omitempty"`
2768	// Location - The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
2769	Location *string `json:"location,omitempty"`
2770	// Tags - The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
2771	Tags map[string]*string `json:"tags"`
2772	// Sku - The sku type.
2773	Sku *Sku `json:"sku,omitempty"`
2774	// Identity - Msi identity of the resource
2775	Identity *ResourceIdentity `json:"identity,omitempty"`
2776}
2777
2778// MarshalJSON is the custom marshaler for JobResource.
2779func (jr JobResource) MarshalJSON() ([]byte, error) {
2780	objectMap := make(map[string]interface{})
2781	if jr.JobProperties != nil {
2782		objectMap["properties"] = jr.JobProperties
2783	}
2784	if jr.Location != nil {
2785		objectMap["location"] = jr.Location
2786	}
2787	if jr.Tags != nil {
2788		objectMap["tags"] = jr.Tags
2789	}
2790	if jr.Sku != nil {
2791		objectMap["sku"] = jr.Sku
2792	}
2793	if jr.Identity != nil {
2794		objectMap["identity"] = jr.Identity
2795	}
2796	return json.Marshal(objectMap)
2797}
2798
2799// UnmarshalJSON is the custom unmarshaler for JobResource struct.
2800func (jr *JobResource) UnmarshalJSON(body []byte) error {
2801	var m map[string]*json.RawMessage
2802	err := json.Unmarshal(body, &m)
2803	if err != nil {
2804		return err
2805	}
2806	for k, v := range m {
2807		switch k {
2808		case "properties":
2809			if v != nil {
2810				var jobProperties JobProperties
2811				err = json.Unmarshal(*v, &jobProperties)
2812				if err != nil {
2813					return err
2814				}
2815				jr.JobProperties = &jobProperties
2816			}
2817		case "name":
2818			if v != nil {
2819				var name string
2820				err = json.Unmarshal(*v, &name)
2821				if err != nil {
2822					return err
2823				}
2824				jr.Name = &name
2825			}
2826		case "id":
2827			if v != nil {
2828				var ID string
2829				err = json.Unmarshal(*v, &ID)
2830				if err != nil {
2831					return err
2832				}
2833				jr.ID = &ID
2834			}
2835		case "type":
2836			if v != nil {
2837				var typeVar string
2838				err = json.Unmarshal(*v, &typeVar)
2839				if err != nil {
2840					return err
2841				}
2842				jr.Type = &typeVar
2843			}
2844		case "location":
2845			if v != nil {
2846				var location string
2847				err = json.Unmarshal(*v, &location)
2848				if err != nil {
2849					return err
2850				}
2851				jr.Location = &location
2852			}
2853		case "tags":
2854			if v != nil {
2855				var tags map[string]*string
2856				err = json.Unmarshal(*v, &tags)
2857				if err != nil {
2858					return err
2859				}
2860				jr.Tags = tags
2861			}
2862		case "sku":
2863			if v != nil {
2864				var sku Sku
2865				err = json.Unmarshal(*v, &sku)
2866				if err != nil {
2867					return err
2868				}
2869				jr.Sku = &sku
2870			}
2871		case "identity":
2872			if v != nil {
2873				var identity ResourceIdentity
2874				err = json.Unmarshal(*v, &identity)
2875				if err != nil {
2876					return err
2877				}
2878				jr.Identity = &identity
2879			}
2880		}
2881	}
2882
2883	return nil
2884}
2885
2886// JobResourceList job Resource Collection
2887type JobResourceList struct {
2888	autorest.Response `json:"-"`
2889	// Value - List of job resources.
2890	Value *[]JobResource `json:"value,omitempty"`
2891	// NextLink - Link for the next set of job resources.
2892	NextLink *string `json:"nextLink,omitempty"`
2893}
2894
2895// JobResourceListIterator provides access to a complete listing of JobResource values.
2896type JobResourceListIterator struct {
2897	i    int
2898	page JobResourceListPage
2899}
2900
2901// NextWithContext advances to the next value.  If there was an error making
2902// the request the iterator does not advance and the error is returned.
2903func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
2904	if tracing.IsEnabled() {
2905		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
2906		defer func() {
2907			sc := -1
2908			if iter.Response().Response.Response != nil {
2909				sc = iter.Response().Response.Response.StatusCode
2910			}
2911			tracing.EndSpan(ctx, sc, err)
2912		}()
2913	}
2914	iter.i++
2915	if iter.i < len(iter.page.Values()) {
2916		return nil
2917	}
2918	err = iter.page.NextWithContext(ctx)
2919	if err != nil {
2920		iter.i--
2921		return err
2922	}
2923	iter.i = 0
2924	return nil
2925}
2926
2927// Next advances to the next value.  If there was an error making
2928// the request the iterator does not advance and the error is returned.
2929// Deprecated: Use NextWithContext() instead.
2930func (iter *JobResourceListIterator) Next() error {
2931	return iter.NextWithContext(context.Background())
2932}
2933
2934// NotDone returns true if the enumeration should be started or is not yet complete.
2935func (iter JobResourceListIterator) NotDone() bool {
2936	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2937}
2938
2939// Response returns the raw server response from the last page request.
2940func (iter JobResourceListIterator) Response() JobResourceList {
2941	return iter.page.Response()
2942}
2943
2944// Value returns the current value or a zero-initialized value if the
2945// iterator has advanced beyond the end of the collection.
2946func (iter JobResourceListIterator) Value() JobResource {
2947	if !iter.page.NotDone() {
2948		return JobResource{}
2949	}
2950	return iter.page.Values()[iter.i]
2951}
2952
2953// Creates a new instance of the JobResourceListIterator type.
2954func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
2955	return JobResourceListIterator{page: page}
2956}
2957
2958// IsEmpty returns true if the ListResult contains no values.
2959func (jrl JobResourceList) IsEmpty() bool {
2960	return jrl.Value == nil || len(*jrl.Value) == 0
2961}
2962
2963// hasNextLink returns true if the NextLink is not empty.
2964func (jrl JobResourceList) hasNextLink() bool {
2965	return jrl.NextLink != nil && len(*jrl.NextLink) != 0
2966}
2967
2968// jobResourceListPreparer prepares a request to retrieve the next set of results.
2969// It returns nil if no more results exist.
2970func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
2971	if !jrl.hasNextLink() {
2972		return nil, nil
2973	}
2974	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2975		autorest.AsJSON(),
2976		autorest.AsGet(),
2977		autorest.WithBaseURL(to.String(jrl.NextLink)))
2978}
2979
2980// JobResourceListPage contains a page of JobResource values.
2981type JobResourceListPage struct {
2982	fn  func(context.Context, JobResourceList) (JobResourceList, error)
2983	jrl JobResourceList
2984}
2985
2986// NextWithContext advances to the next page of values.  If there was an error making
2987// the request the page does not advance and the error is returned.
2988func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
2989	if tracing.IsEnabled() {
2990		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
2991		defer func() {
2992			sc := -1
2993			if page.Response().Response.Response != nil {
2994				sc = page.Response().Response.Response.StatusCode
2995			}
2996			tracing.EndSpan(ctx, sc, err)
2997		}()
2998	}
2999	for {
3000		next, err := page.fn(ctx, page.jrl)
3001		if err != nil {
3002			return err
3003		}
3004		page.jrl = next
3005		if !next.hasNextLink() || !next.IsEmpty() {
3006			break
3007		}
3008	}
3009	return nil
3010}
3011
3012// Next advances to the next page of values.  If there was an error making
3013// the request the page does not advance and the error is returned.
3014// Deprecated: Use NextWithContext() instead.
3015func (page *JobResourceListPage) Next() error {
3016	return page.NextWithContext(context.Background())
3017}
3018
3019// NotDone returns true if the page enumeration should be started or is not yet complete.
3020func (page JobResourceListPage) NotDone() bool {
3021	return !page.jrl.IsEmpty()
3022}
3023
3024// Response returns the raw server response from the last page request.
3025func (page JobResourceListPage) Response() JobResourceList {
3026	return page.jrl
3027}
3028
3029// Values returns the slice of values for the current page or nil if there are no values.
3030func (page JobResourceListPage) Values() []JobResource {
3031	if page.jrl.IsEmpty() {
3032		return nil
3033	}
3034	return *page.jrl.Value
3035}
3036
3037// Creates a new instance of the JobResourceListPage type.
3038func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
3039	return JobResourceListPage{
3040		fn:  getNextPage,
3041		jrl: cur,
3042	}
3043}
3044
3045// JobResourceUpdateParameter the JobResourceUpdateParameter.
3046type JobResourceUpdateParameter struct {
3047	// UpdateJobProperties - Properties of a job to be updated.
3048	*UpdateJobProperties `json:"properties,omitempty"`
3049	// Tags - The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
3050	Tags map[string]*string `json:"tags"`
3051	// Identity - Msi identity of the resource
3052	Identity *ResourceIdentity `json:"identity,omitempty"`
3053}
3054
3055// MarshalJSON is the custom marshaler for JobResourceUpdateParameter.
3056func (jrup JobResourceUpdateParameter) MarshalJSON() ([]byte, error) {
3057	objectMap := make(map[string]interface{})
3058	if jrup.UpdateJobProperties != nil {
3059		objectMap["properties"] = jrup.UpdateJobProperties
3060	}
3061	if jrup.Tags != nil {
3062		objectMap["tags"] = jrup.Tags
3063	}
3064	if jrup.Identity != nil {
3065		objectMap["identity"] = jrup.Identity
3066	}
3067	return json.Marshal(objectMap)
3068}
3069
3070// UnmarshalJSON is the custom unmarshaler for JobResourceUpdateParameter struct.
3071func (jrup *JobResourceUpdateParameter) UnmarshalJSON(body []byte) error {
3072	var m map[string]*json.RawMessage
3073	err := json.Unmarshal(body, &m)
3074	if err != nil {
3075		return err
3076	}
3077	for k, v := range m {
3078		switch k {
3079		case "properties":
3080			if v != nil {
3081				var updateJobProperties UpdateJobProperties
3082				err = json.Unmarshal(*v, &updateJobProperties)
3083				if err != nil {
3084					return err
3085				}
3086				jrup.UpdateJobProperties = &updateJobProperties
3087			}
3088		case "tags":
3089			if v != nil {
3090				var tags map[string]*string
3091				err = json.Unmarshal(*v, &tags)
3092				if err != nil {
3093					return err
3094				}
3095				jrup.Tags = tags
3096			}
3097		case "identity":
3098			if v != nil {
3099				var identity ResourceIdentity
3100				err = json.Unmarshal(*v, &identity)
3101				if err != nil {
3102					return err
3103				}
3104				jrup.Identity = &identity
3105			}
3106		}
3107	}
3108
3109	return nil
3110}
3111
3112// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3113type JobsCreateFuture struct {
3114	azure.FutureAPI
3115	// Result returns the result of the asynchronous operation.
3116	// If the operation has not completed it will return an error.
3117	Result func(JobsClient) (JobResource, error)
3118}
3119
3120// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3121func (future *JobsCreateFuture) UnmarshalJSON(body []byte) error {
3122	var azFuture azure.Future
3123	if err := json.Unmarshal(body, &azFuture); err != nil {
3124		return err
3125	}
3126	future.FutureAPI = &azFuture
3127	future.Result = future.result
3128	return nil
3129}
3130
3131// result is the default implementation for JobsCreateFuture.Result.
3132func (future *JobsCreateFuture) result(client JobsClient) (jr JobResource, err error) {
3133	var done bool
3134	done, err = future.DoneWithContext(context.Background(), client)
3135	if err != nil {
3136		err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", future.Response(), "Polling failure")
3137		return
3138	}
3139	if !done {
3140		jr.Response.Response = future.Response()
3141		err = azure.NewAsyncOpIncompleteError("databox.JobsCreateFuture")
3142		return
3143	}
3144	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3145	if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
3146		jr, err = client.CreateResponder(jr.Response.Response)
3147		if err != nil {
3148			err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", jr.Response.Response, "Failure responding to request")
3149		}
3150	}
3151	return
3152}
3153
3154// JobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3155type JobsDeleteFuture struct {
3156	azure.FutureAPI
3157	// Result returns the result of the asynchronous operation.
3158	// If the operation has not completed it will return an error.
3159	Result func(JobsClient) (autorest.Response, error)
3160}
3161
3162// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3163func (future *JobsDeleteFuture) UnmarshalJSON(body []byte) error {
3164	var azFuture azure.Future
3165	if err := json.Unmarshal(body, &azFuture); err != nil {
3166		return err
3167	}
3168	future.FutureAPI = &azFuture
3169	future.Result = future.result
3170	return nil
3171}
3172
3173// result is the default implementation for JobsDeleteFuture.Result.
3174func (future *JobsDeleteFuture) result(client JobsClient) (ar autorest.Response, err error) {
3175	var done bool
3176	done, err = future.DoneWithContext(context.Background(), client)
3177	if err != nil {
3178		err = autorest.NewErrorWithError(err, "databox.JobsDeleteFuture", "Result", future.Response(), "Polling failure")
3179		return
3180	}
3181	if !done {
3182		ar.Response = future.Response()
3183		err = azure.NewAsyncOpIncompleteError("databox.JobsDeleteFuture")
3184		return
3185	}
3186	ar.Response = future.Response()
3187	return
3188}
3189
3190// BasicJobSecrets the base class for the secrets
3191type BasicJobSecrets interface {
3192	AsDiskJobSecrets() (*DiskJobSecrets, bool)
3193	AsHeavyJobSecrets() (*HeavyJobSecrets, bool)
3194	AsJobSecretsType() (*JobSecretsType, bool)
3195	AsJobSecrets() (*JobSecrets, bool)
3196}
3197
3198// JobSecrets the base class for the secrets
3199type JobSecrets struct {
3200	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
3201	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
3202	// Error - READ-ONLY; Error while fetching the secrets.
3203	Error *CloudError `json:"error,omitempty"`
3204	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
3205	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
3206}
3207
3208func unmarshalBasicJobSecrets(body []byte) (BasicJobSecrets, error) {
3209	var m map[string]interface{}
3210	err := json.Unmarshal(body, &m)
3211	if err != nil {
3212		return nil, err
3213	}
3214
3215	switch m["jobSecretsType"] {
3216	case string(JobSecretsTypeDataBoxDisk):
3217		var djs DiskJobSecrets
3218		err := json.Unmarshal(body, &djs)
3219		return djs, err
3220	case string(JobSecretsTypeDataBoxHeavy):
3221		var hjs HeavyJobSecrets
3222		err := json.Unmarshal(body, &hjs)
3223		return hjs, err
3224	case string(JobSecretsTypeDataBox):
3225		var jst JobSecretsType
3226		err := json.Unmarshal(body, &jst)
3227		return jst, err
3228	default:
3229		var js JobSecrets
3230		err := json.Unmarshal(body, &js)
3231		return js, err
3232	}
3233}
3234func unmarshalBasicJobSecretsArray(body []byte) ([]BasicJobSecrets, error) {
3235	var rawMessages []*json.RawMessage
3236	err := json.Unmarshal(body, &rawMessages)
3237	if err != nil {
3238		return nil, err
3239	}
3240
3241	jsArray := make([]BasicJobSecrets, len(rawMessages))
3242
3243	for index, rawMessage := range rawMessages {
3244		js, err := unmarshalBasicJobSecrets(*rawMessage)
3245		if err != nil {
3246			return nil, err
3247		}
3248		jsArray[index] = js
3249	}
3250	return jsArray, nil
3251}
3252
3253// MarshalJSON is the custom marshaler for JobSecrets.
3254func (js JobSecrets) MarshalJSON() ([]byte, error) {
3255	js.JobSecretsType = JobSecretsTypeJobSecrets
3256	objectMap := make(map[string]interface{})
3257	if js.JobSecretsType != "" {
3258		objectMap["jobSecretsType"] = js.JobSecretsType
3259	}
3260	return json.Marshal(objectMap)
3261}
3262
3263// AsDiskJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3264func (js JobSecrets) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
3265	return nil, false
3266}
3267
3268// AsHeavyJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3269func (js JobSecrets) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
3270	return nil, false
3271}
3272
3273// AsJobSecretsType is the BasicJobSecrets implementation for JobSecrets.
3274func (js JobSecrets) AsJobSecretsType() (*JobSecretsType, bool) {
3275	return nil, false
3276}
3277
3278// AsJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3279func (js JobSecrets) AsJobSecrets() (*JobSecrets, bool) {
3280	return &js, true
3281}
3282
3283// AsBasicJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3284func (js JobSecrets) AsBasicJobSecrets() (BasicJobSecrets, bool) {
3285	return &js, true
3286}
3287
3288// JobSecretsType the secrets related to a databox job.
3289type JobSecretsType struct {
3290	// PodSecrets - Contains the list of secret objects for a job.
3291	PodSecrets *[]Secret `json:"podSecrets,omitempty"`
3292	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
3293	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
3294	// Error - READ-ONLY; Error while fetching the secrets.
3295	Error *CloudError `json:"error,omitempty"`
3296	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
3297	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
3298}
3299
3300// MarshalJSON is the custom marshaler for JobSecretsType.
3301func (jst JobSecretsType) MarshalJSON() ([]byte, error) {
3302	jst.JobSecretsType = JobSecretsTypeDataBox
3303	objectMap := make(map[string]interface{})
3304	if jst.PodSecrets != nil {
3305		objectMap["podSecrets"] = jst.PodSecrets
3306	}
3307	if jst.JobSecretsType != "" {
3308		objectMap["jobSecretsType"] = jst.JobSecretsType
3309	}
3310	return json.Marshal(objectMap)
3311}
3312
3313// AsDiskJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3314func (jst JobSecretsType) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
3315	return nil, false
3316}
3317
3318// AsHeavyJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3319func (jst JobSecretsType) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
3320	return nil, false
3321}
3322
3323// AsJobSecretsType is the BasicJobSecrets implementation for JobSecretsType.
3324func (jst JobSecretsType) AsJobSecretsType() (*JobSecretsType, bool) {
3325	return &jst, true
3326}
3327
3328// AsJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3329func (jst JobSecretsType) AsJobSecrets() (*JobSecrets, bool) {
3330	return nil, false
3331}
3332
3333// AsBasicJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3334func (jst JobSecretsType) AsBasicJobSecrets() (BasicJobSecrets, bool) {
3335	return &jst, true
3336}
3337
3338// JobStages job stages.
3339type JobStages struct {
3340	// StageName - READ-ONLY; Name of the job stage. Possible values include: 'StageNameDeviceOrdered', 'StageNameDevicePrepared', 'StageNameDispatched', 'StageNameDelivered', 'StageNamePickedUp', 'StageNameAtAzureDC', 'StageNameDataCopy', 'StageNameCompleted', 'StageNameCompletedWithErrors', 'StageNameCancelled', 'StageNameFailedIssueReportedAtCustomer', 'StageNameFailedIssueDetectedAtAzureDC', 'StageNameAborted', 'StageNameCompletedWithWarnings', 'StageNameReadyToDispatchFromAzureDC', 'StageNameReadyToReceiveAtAzureDC'
3341	StageName StageName `json:"stageName,omitempty"`
3342	// DisplayName - READ-ONLY; Display name of the job stage.
3343	DisplayName *string `json:"displayName,omitempty"`
3344	// StageStatus - READ-ONLY; Status of the job stage. Possible values include: 'StageStatusNone', 'StageStatusInProgress', 'StageStatusSucceeded', 'StageStatusFailed', 'StageStatusCancelled', 'StageStatusCancelling', 'StageStatusSucceededWithErrors', 'StageStatusWaitingForCustomerAction', 'StageStatusSucceededWithWarnings'
3345	StageStatus StageStatus `json:"stageStatus,omitempty"`
3346	// StageTime - READ-ONLY; Time for the job stage in UTC ISO 8601 format.
3347	StageTime *date.Time `json:"stageTime,omitempty"`
3348	// JobStageDetails - READ-ONLY; Job Stage Details
3349	JobStageDetails interface{} `json:"jobStageDetails,omitempty"`
3350}
3351
3352// MarshalJSON is the custom marshaler for JobStages.
3353func (js JobStages) MarshalJSON() ([]byte, error) {
3354	objectMap := make(map[string]interface{})
3355	return json.Marshal(objectMap)
3356}
3357
3358// JobsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3359type JobsUpdateFuture struct {
3360	azure.FutureAPI
3361	// Result returns the result of the asynchronous operation.
3362	// If the operation has not completed it will return an error.
3363	Result func(JobsClient) (JobResource, error)
3364}
3365
3366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3367func (future *JobsUpdateFuture) UnmarshalJSON(body []byte) error {
3368	var azFuture azure.Future
3369	if err := json.Unmarshal(body, &azFuture); err != nil {
3370		return err
3371	}
3372	future.FutureAPI = &azFuture
3373	future.Result = future.result
3374	return nil
3375}
3376
3377// result is the default implementation for JobsUpdateFuture.Result.
3378func (future *JobsUpdateFuture) result(client JobsClient) (jr JobResource, err error) {
3379	var done bool
3380	done, err = future.DoneWithContext(context.Background(), client)
3381	if err != nil {
3382		err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", future.Response(), "Polling failure")
3383		return
3384	}
3385	if !done {
3386		jr.Response.Response = future.Response()
3387		err = azure.NewAsyncOpIncompleteError("databox.JobsUpdateFuture")
3388		return
3389	}
3390	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3391	if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
3392		jr, err = client.UpdateResponder(jr.Response.Response)
3393		if err != nil {
3394			err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", jr.Response.Response, "Failure responding to request")
3395		}
3396	}
3397	return
3398}
3399
3400// KeyEncryptionKey encryption key containing details about key to encrypt different keys.
3401type KeyEncryptionKey struct {
3402	// KekType - Type of encryption key used for key encryption. Possible values include: 'MicrosoftManaged', 'CustomerManaged'
3403	KekType KekType `json:"kekType,omitempty"`
3404	// IdentityProperties - Managed identity properties used for key encryption.
3405	IdentityProperties *IdentityProperties `json:"identityProperties,omitempty"`
3406	// KekURL - Key encryption key. It is required in case of Customer managed KekType.
3407	KekURL *string `json:"kekUrl,omitempty"`
3408	// KekVaultResourceID - Kek vault resource id. It is required in case of Customer managed KekType.
3409	KekVaultResourceID *string `json:"kekVaultResourceID,omitempty"`
3410}
3411
3412// ManagedDiskDetails details of the managed disks.
3413type ManagedDiskDetails struct {
3414	// ResourceGroupID - Resource Group Id of the compute disks.
3415	ResourceGroupID *string `json:"resourceGroupId,omitempty"`
3416	// StagingStorageAccountID - Resource Id of the storage account that can be used to copy the vhd for staging.
3417	StagingStorageAccountID *string `json:"stagingStorageAccountId,omitempty"`
3418	// SharePassword - Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+
3419	SharePassword *string `json:"sharePassword,omitempty"`
3420	// DataAccountType - Possible values include: 'DataAccountTypeDataAccountDetails', 'DataAccountTypeManagedDisk', 'DataAccountTypeStorageAccount'
3421	DataAccountType DataAccountTypeBasicDataAccountDetails `json:"dataAccountType,omitempty"`
3422}
3423
3424// MarshalJSON is the custom marshaler for ManagedDiskDetails.
3425func (mdd ManagedDiskDetails) MarshalJSON() ([]byte, error) {
3426	mdd.DataAccountType = DataAccountTypeManagedDisk
3427	objectMap := make(map[string]interface{})
3428	if mdd.ResourceGroupID != nil {
3429		objectMap["resourceGroupId"] = mdd.ResourceGroupID
3430	}
3431	if mdd.StagingStorageAccountID != nil {
3432		objectMap["stagingStorageAccountId"] = mdd.StagingStorageAccountID
3433	}
3434	if mdd.SharePassword != nil {
3435		objectMap["sharePassword"] = mdd.SharePassword
3436	}
3437	if mdd.DataAccountType != "" {
3438		objectMap["dataAccountType"] = mdd.DataAccountType
3439	}
3440	return json.Marshal(objectMap)
3441}
3442
3443// AsManagedDiskDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3444func (mdd ManagedDiskDetails) AsManagedDiskDetails() (*ManagedDiskDetails, bool) {
3445	return &mdd, true
3446}
3447
3448// AsStorageAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3449func (mdd ManagedDiskDetails) AsStorageAccountDetails() (*StorageAccountDetails, bool) {
3450	return nil, false
3451}
3452
3453// AsDataAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3454func (mdd ManagedDiskDetails) AsDataAccountDetails() (*DataAccountDetails, bool) {
3455	return nil, false
3456}
3457
3458// AsBasicDataAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3459func (mdd ManagedDiskDetails) AsBasicDataAccountDetails() (BasicDataAccountDetails, bool) {
3460	return &mdd, true
3461}
3462
3463// NotificationPreference notification preference for a job stage.
3464type NotificationPreference struct {
3465	// StageName - Name of the stage. Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy'
3466	StageName NotificationStageName `json:"stageName,omitempty"`
3467	// SendNotification - Notification is required or not.
3468	SendNotification *bool `json:"sendNotification,omitempty"`
3469}
3470
3471// Operation operation entity.
3472type Operation struct {
3473	// Name - READ-ONLY; Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
3474	Name *string `json:"name,omitempty"`
3475	// Display - READ-ONLY; Operation display values.
3476	Display *OperationDisplay `json:"display,omitempty"`
3477	// Properties - READ-ONLY; Operation properties.
3478	Properties interface{} `json:"properties,omitempty"`
3479	// Origin - READ-ONLY; Origin of the operation. Can be : user|system|user,system
3480	Origin *string `json:"origin,omitempty"`
3481	// IsDataAction - Indicates whether the operation is a data action
3482	IsDataAction *bool `json:"isDataAction,omitempty"`
3483}
3484
3485// MarshalJSON is the custom marshaler for Operation.
3486func (o Operation) MarshalJSON() ([]byte, error) {
3487	objectMap := make(map[string]interface{})
3488	if o.IsDataAction != nil {
3489		objectMap["isDataAction"] = o.IsDataAction
3490	}
3491	return json.Marshal(objectMap)
3492}
3493
3494// OperationDisplay operation display
3495type OperationDisplay struct {
3496	// Provider - Provider name.
3497	Provider *string `json:"provider,omitempty"`
3498	// Resource - Resource name.
3499	Resource *string `json:"resource,omitempty"`
3500	// Operation - Localized name of the operation for display purpose.
3501	Operation *string `json:"operation,omitempty"`
3502	// Description - Localized description of the operation for display purpose.
3503	Description *string `json:"description,omitempty"`
3504}
3505
3506// OperationList operation Collection.
3507type OperationList struct {
3508	autorest.Response `json:"-"`
3509	// Value - READ-ONLY; List of operations.
3510	Value *[]Operation `json:"value,omitempty"`
3511	// NextLink - Link for the next set of operations.
3512	NextLink *string `json:"nextLink,omitempty"`
3513}
3514
3515// MarshalJSON is the custom marshaler for OperationList.
3516func (ol OperationList) MarshalJSON() ([]byte, error) {
3517	objectMap := make(map[string]interface{})
3518	if ol.NextLink != nil {
3519		objectMap["nextLink"] = ol.NextLink
3520	}
3521	return json.Marshal(objectMap)
3522}
3523
3524// OperationListIterator provides access to a complete listing of Operation values.
3525type OperationListIterator struct {
3526	i    int
3527	page OperationListPage
3528}
3529
3530// NextWithContext advances to the next value.  If there was an error making
3531// the request the iterator does not advance and the error is returned.
3532func (iter *OperationListIterator) NextWithContext(ctx context.Context) (err error) {
3533	if tracing.IsEnabled() {
3534		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListIterator.NextWithContext")
3535		defer func() {
3536			sc := -1
3537			if iter.Response().Response.Response != nil {
3538				sc = iter.Response().Response.Response.StatusCode
3539			}
3540			tracing.EndSpan(ctx, sc, err)
3541		}()
3542	}
3543	iter.i++
3544	if iter.i < len(iter.page.Values()) {
3545		return nil
3546	}
3547	err = iter.page.NextWithContext(ctx)
3548	if err != nil {
3549		iter.i--
3550		return err
3551	}
3552	iter.i = 0
3553	return nil
3554}
3555
3556// Next advances to the next value.  If there was an error making
3557// the request the iterator does not advance and the error is returned.
3558// Deprecated: Use NextWithContext() instead.
3559func (iter *OperationListIterator) Next() error {
3560	return iter.NextWithContext(context.Background())
3561}
3562
3563// NotDone returns true if the enumeration should be started or is not yet complete.
3564func (iter OperationListIterator) NotDone() bool {
3565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3566}
3567
3568// Response returns the raw server response from the last page request.
3569func (iter OperationListIterator) Response() OperationList {
3570	return iter.page.Response()
3571}
3572
3573// Value returns the current value or a zero-initialized value if the
3574// iterator has advanced beyond the end of the collection.
3575func (iter OperationListIterator) Value() Operation {
3576	if !iter.page.NotDone() {
3577		return Operation{}
3578	}
3579	return iter.page.Values()[iter.i]
3580}
3581
3582// Creates a new instance of the OperationListIterator type.
3583func NewOperationListIterator(page OperationListPage) OperationListIterator {
3584	return OperationListIterator{page: page}
3585}
3586
3587// IsEmpty returns true if the ListResult contains no values.
3588func (ol OperationList) IsEmpty() bool {
3589	return ol.Value == nil || len(*ol.Value) == 0
3590}
3591
3592// hasNextLink returns true if the NextLink is not empty.
3593func (ol OperationList) hasNextLink() bool {
3594	return ol.NextLink != nil && len(*ol.NextLink) != 0
3595}
3596
3597// operationListPreparer prepares a request to retrieve the next set of results.
3598// It returns nil if no more results exist.
3599func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) {
3600	if !ol.hasNextLink() {
3601		return nil, nil
3602	}
3603	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3604		autorest.AsJSON(),
3605		autorest.AsGet(),
3606		autorest.WithBaseURL(to.String(ol.NextLink)))
3607}
3608
3609// OperationListPage contains a page of Operation values.
3610type OperationListPage struct {
3611	fn func(context.Context, OperationList) (OperationList, error)
3612	ol OperationList
3613}
3614
3615// NextWithContext advances to the next page of values.  If there was an error making
3616// the request the page does not advance and the error is returned.
3617func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) {
3618	if tracing.IsEnabled() {
3619		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListPage.NextWithContext")
3620		defer func() {
3621			sc := -1
3622			if page.Response().Response.Response != nil {
3623				sc = page.Response().Response.Response.StatusCode
3624			}
3625			tracing.EndSpan(ctx, sc, err)
3626		}()
3627	}
3628	for {
3629		next, err := page.fn(ctx, page.ol)
3630		if err != nil {
3631			return err
3632		}
3633		page.ol = next
3634		if !next.hasNextLink() || !next.IsEmpty() {
3635			break
3636		}
3637	}
3638	return nil
3639}
3640
3641// Next advances to the next page of values.  If there was an error making
3642// the request the page does not advance and the error is returned.
3643// Deprecated: Use NextWithContext() instead.
3644func (page *OperationListPage) Next() error {
3645	return page.NextWithContext(context.Background())
3646}
3647
3648// NotDone returns true if the page enumeration should be started or is not yet complete.
3649func (page OperationListPage) NotDone() bool {
3650	return !page.ol.IsEmpty()
3651}
3652
3653// Response returns the raw server response from the last page request.
3654func (page OperationListPage) Response() OperationList {
3655	return page.ol
3656}
3657
3658// Values returns the slice of values for the current page or nil if there are no values.
3659func (page OperationListPage) Values() []Operation {
3660	if page.ol.IsEmpty() {
3661		return nil
3662	}
3663	return *page.ol.Value
3664}
3665
3666// Creates a new instance of the OperationListPage type.
3667func NewOperationListPage(cur OperationList, getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage {
3668	return OperationListPage{
3669		fn: getNextPage,
3670		ol: cur,
3671	}
3672}
3673
3674// PackageShippingDetails shipping details.
3675type PackageShippingDetails struct {
3676	// CarrierName - READ-ONLY; Name of the carrier.
3677	CarrierName *string `json:"carrierName,omitempty"`
3678	// TrackingID - READ-ONLY; Tracking Id of shipment.
3679	TrackingID *string `json:"trackingId,omitempty"`
3680	// TrackingURL - READ-ONLY; Url where shipment can be tracked.
3681	TrackingURL *string `json:"trackingUrl,omitempty"`
3682}
3683
3684// MarshalJSON is the custom marshaler for PackageShippingDetails.
3685func (psd PackageShippingDetails) MarshalJSON() ([]byte, error) {
3686	objectMap := make(map[string]interface{})
3687	return json.Marshal(objectMap)
3688}
3689
3690// Preferences preferences related to the order
3691type Preferences struct {
3692	// PreferredDataCenterRegion - Preferred data center region.
3693	PreferredDataCenterRegion *[]string `json:"preferredDataCenterRegion,omitempty"`
3694	// TransportPreferences - Preferences related to the shipment logistics of the sku.
3695	TransportPreferences *TransportPreferences `json:"transportPreferences,omitempty"`
3696	// EncryptionPreferences - Preferences related to the Encryption.
3697	EncryptionPreferences *EncryptionPreferences `json:"encryptionPreferences,omitempty"`
3698}
3699
3700// PreferencesValidationRequest request to validate preference of transport and data center.
3701type PreferencesValidationRequest struct {
3702	// Preference - Preference of transport and data center.
3703	Preference *Preferences `json:"preference,omitempty"`
3704	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
3705	DeviceType SkuName `json:"deviceType,omitempty"`
3706	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
3707	ValidationType ValidationType `json:"validationType,omitempty"`
3708}
3709
3710// MarshalJSON is the custom marshaler for PreferencesValidationRequest.
3711func (pvr PreferencesValidationRequest) MarshalJSON() ([]byte, error) {
3712	pvr.ValidationType = ValidationTypeValidatePreferences
3713	objectMap := make(map[string]interface{})
3714	if pvr.Preference != nil {
3715		objectMap["preference"] = pvr.Preference
3716	}
3717	if pvr.DeviceType != "" {
3718		objectMap["deviceType"] = pvr.DeviceType
3719	}
3720	if pvr.ValidationType != "" {
3721		objectMap["validationType"] = pvr.ValidationType
3722	}
3723	return json.Marshal(objectMap)
3724}
3725
3726// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3727func (pvr PreferencesValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
3728	return nil, false
3729}
3730
3731// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3732func (pvr PreferencesValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
3733	return nil, false
3734}
3735
3736// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3737func (pvr PreferencesValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
3738	return &pvr, true
3739}
3740
3741// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3742func (pvr PreferencesValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
3743	return nil, false
3744}
3745
3746// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3747func (pvr PreferencesValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
3748	return nil, false
3749}
3750
3751// AsValidateAddress is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3752func (pvr PreferencesValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
3753	return nil, false
3754}
3755
3756// AsValidationInputRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3757func (pvr PreferencesValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
3758	return nil, false
3759}
3760
3761// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3762func (pvr PreferencesValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
3763	return &pvr, true
3764}
3765
3766// PreferencesValidationResponseProperties properties of data center and transport preference validation
3767// response.
3768type PreferencesValidationResponseProperties struct {
3769	// Status - READ-ONLY; Validation status of requested data center and transport. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
3770	Status ValidationStatus `json:"status,omitempty"`
3771	// Error - READ-ONLY; Error code and message of validation response.
3772	Error *CloudError `json:"error,omitempty"`
3773	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
3774	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
3775}
3776
3777// MarshalJSON is the custom marshaler for PreferencesValidationResponseProperties.
3778func (pvrp PreferencesValidationResponseProperties) MarshalJSON() ([]byte, error) {
3779	pvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences
3780	objectMap := make(map[string]interface{})
3781	if pvrp.ValidationType != "" {
3782		objectMap["validationType"] = pvrp.ValidationType
3783	}
3784	return json.Marshal(objectMap)
3785}
3786
3787// AsAddressValidationProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3788func (pvrp PreferencesValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
3789	return nil, false
3790}
3791
3792// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3793func (pvrp PreferencesValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
3794	return nil, false
3795}
3796
3797// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3798func (pvrp PreferencesValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
3799	return nil, false
3800}
3801
3802// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3803func (pvrp PreferencesValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
3804	return &pvrp, true
3805}
3806
3807// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3808func (pvrp PreferencesValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
3809	return nil, false
3810}
3811
3812// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3813func (pvrp PreferencesValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
3814	return nil, false
3815}
3816
3817// AsValidationInputResponse is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3818func (pvrp PreferencesValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
3819	return nil, false
3820}
3821
3822// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3823func (pvrp PreferencesValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
3824	return &pvrp, true
3825}
3826
3827// RegionConfigurationRequest request body to get the configuration for the region.
3828type RegionConfigurationRequest struct {
3829	// ScheduleAvailabilityRequest - Request body to get the availability for scheduling orders.
3830	ScheduleAvailabilityRequest BasicScheduleAvailabilityRequest `json:"scheduleAvailabilityRequest,omitempty"`
3831	// TransportAvailabilityRequest - Request body to get the transport availability for given sku.
3832	TransportAvailabilityRequest *TransportAvailabilityRequest `json:"transportAvailabilityRequest,omitempty"`
3833}
3834
3835// UnmarshalJSON is the custom unmarshaler for RegionConfigurationRequest struct.
3836func (rcr *RegionConfigurationRequest) UnmarshalJSON(body []byte) error {
3837	var m map[string]*json.RawMessage
3838	err := json.Unmarshal(body, &m)
3839	if err != nil {
3840		return err
3841	}
3842	for k, v := range m {
3843		switch k {
3844		case "scheduleAvailabilityRequest":
3845			if v != nil {
3846				scheduleAvailabilityRequest, err := unmarshalBasicScheduleAvailabilityRequest(*v)
3847				if err != nil {
3848					return err
3849				}
3850				rcr.ScheduleAvailabilityRequest = scheduleAvailabilityRequest
3851			}
3852		case "transportAvailabilityRequest":
3853			if v != nil {
3854				var transportAvailabilityRequest TransportAvailabilityRequest
3855				err = json.Unmarshal(*v, &transportAvailabilityRequest)
3856				if err != nil {
3857					return err
3858				}
3859				rcr.TransportAvailabilityRequest = &transportAvailabilityRequest
3860			}
3861		}
3862	}
3863
3864	return nil
3865}
3866
3867// RegionConfigurationResponse configuration response specific to a region.
3868type RegionConfigurationResponse struct {
3869	autorest.Response `json:"-"`
3870	// ScheduleAvailabilityResponse - READ-ONLY; Schedule availability for given sku in a region.
3871	ScheduleAvailabilityResponse *ScheduleAvailabilityResponse `json:"scheduleAvailabilityResponse,omitempty"`
3872	// TransportAvailabilityResponse - READ-ONLY; Transport options available for given sku in a region.
3873	TransportAvailabilityResponse *TransportAvailabilityResponse `json:"transportAvailabilityResponse,omitempty"`
3874}
3875
3876// MarshalJSON is the custom marshaler for RegionConfigurationResponse.
3877func (rcr RegionConfigurationResponse) MarshalJSON() ([]byte, error) {
3878	objectMap := make(map[string]interface{})
3879	return json.Marshal(objectMap)
3880}
3881
3882// Resource model of the Resource.
3883type Resource struct {
3884	// Location - The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
3885	Location *string `json:"location,omitempty"`
3886	// Tags - The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
3887	Tags map[string]*string `json:"tags"`
3888	// Sku - The sku type.
3889	Sku *Sku `json:"sku,omitempty"`
3890	// Identity - Msi identity of the resource
3891	Identity *ResourceIdentity `json:"identity,omitempty"`
3892}
3893
3894// MarshalJSON is the custom marshaler for Resource.
3895func (r Resource) MarshalJSON() ([]byte, error) {
3896	objectMap := make(map[string]interface{})
3897	if r.Location != nil {
3898		objectMap["location"] = r.Location
3899	}
3900	if r.Tags != nil {
3901		objectMap["tags"] = r.Tags
3902	}
3903	if r.Sku != nil {
3904		objectMap["sku"] = r.Sku
3905	}
3906	if r.Identity != nil {
3907		objectMap["identity"] = r.Identity
3908	}
3909	return json.Marshal(objectMap)
3910}
3911
3912// ResourceIdentity msi identity details of the resource
3913type ResourceIdentity struct {
3914	// Type - Identity type
3915	Type *string `json:"type,omitempty"`
3916	// PrincipalID - READ-ONLY; Service Principal Id backing the Msi
3917	PrincipalID *string `json:"principalId,omitempty"`
3918	// TenantID - READ-ONLY; Home Tenant Id
3919	TenantID *string `json:"tenantId,omitempty"`
3920	// UserAssignedIdentities - User Assigned Identities
3921	UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"`
3922}
3923
3924// MarshalJSON is the custom marshaler for ResourceIdentity.
3925func (ri ResourceIdentity) MarshalJSON() ([]byte, error) {
3926	objectMap := make(map[string]interface{})
3927	if ri.Type != nil {
3928		objectMap["type"] = ri.Type
3929	}
3930	if ri.UserAssignedIdentities != nil {
3931		objectMap["userAssignedIdentities"] = ri.UserAssignedIdentities
3932	}
3933	return json.Marshal(objectMap)
3934}
3935
3936// BasicScheduleAvailabilityRequest request body to get the availability for scheduling orders.
3937type BasicScheduleAvailabilityRequest interface {
3938	AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool)
3939	AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool)
3940	AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool)
3941	AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool)
3942}
3943
3944// ScheduleAvailabilityRequest request body to get the availability for scheduling orders.
3945type ScheduleAvailabilityRequest struct {
3946	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
3947	StorageLocation *string `json:"storageLocation,omitempty"`
3948	// Country - Country in which storage location should be supported.
3949	Country *string `json:"country,omitempty"`
3950	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
3951	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
3952}
3953
3954func unmarshalBasicScheduleAvailabilityRequest(body []byte) (BasicScheduleAvailabilityRequest, error) {
3955	var m map[string]interface{}
3956	err := json.Unmarshal(body, &m)
3957	if err != nil {
3958		return nil, err
3959	}
3960
3961	switch m["skuName"] {
3962	case string(SkuNameDataBox):
3963		var sart ScheduleAvailabilityRequestType
3964		err := json.Unmarshal(body, &sart)
3965		return sart, err
3966	case string(SkuNameDataBoxDisk):
3967		var dsar DiskScheduleAvailabilityRequest
3968		err := json.Unmarshal(body, &dsar)
3969		return dsar, err
3970	case string(SkuNameDataBoxHeavy):
3971		var hsar HeavyScheduleAvailabilityRequest
3972		err := json.Unmarshal(body, &hsar)
3973		return hsar, err
3974	default:
3975		var sar ScheduleAvailabilityRequest
3976		err := json.Unmarshal(body, &sar)
3977		return sar, err
3978	}
3979}
3980func unmarshalBasicScheduleAvailabilityRequestArray(body []byte) ([]BasicScheduleAvailabilityRequest, error) {
3981	var rawMessages []*json.RawMessage
3982	err := json.Unmarshal(body, &rawMessages)
3983	if err != nil {
3984		return nil, err
3985	}
3986
3987	sarArray := make([]BasicScheduleAvailabilityRequest, len(rawMessages))
3988
3989	for index, rawMessage := range rawMessages {
3990		sar, err := unmarshalBasicScheduleAvailabilityRequest(*rawMessage)
3991		if err != nil {
3992			return nil, err
3993		}
3994		sarArray[index] = sar
3995	}
3996	return sarArray, nil
3997}
3998
3999// MarshalJSON is the custom marshaler for ScheduleAvailabilityRequest.
4000func (sar ScheduleAvailabilityRequest) MarshalJSON() ([]byte, error) {
4001	sar.SkuName = SkuNameScheduleAvailabilityRequest
4002	objectMap := make(map[string]interface{})
4003	if sar.StorageLocation != nil {
4004		objectMap["storageLocation"] = sar.StorageLocation
4005	}
4006	if sar.Country != nil {
4007		objectMap["country"] = sar.Country
4008	}
4009	if sar.SkuName != "" {
4010		objectMap["skuName"] = sar.SkuName
4011	}
4012	return json.Marshal(objectMap)
4013}
4014
4015// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4016func (sar ScheduleAvailabilityRequest) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
4017	return nil, false
4018}
4019
4020// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4021func (sar ScheduleAvailabilityRequest) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
4022	return nil, false
4023}
4024
4025// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4026func (sar ScheduleAvailabilityRequest) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
4027	return nil, false
4028}
4029
4030// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4031func (sar ScheduleAvailabilityRequest) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
4032	return &sar, true
4033}
4034
4035// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4036func (sar ScheduleAvailabilityRequest) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
4037	return &sar, true
4038}
4039
4040// ScheduleAvailabilityRequestType request body to get the availability for scheduling data box orders
4041// orders.
4042type ScheduleAvailabilityRequestType struct {
4043	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
4044	StorageLocation *string `json:"storageLocation,omitempty"`
4045	// Country - Country in which storage location should be supported.
4046	Country *string `json:"country,omitempty"`
4047	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
4048	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
4049}
4050
4051// MarshalJSON is the custom marshaler for ScheduleAvailabilityRequestType.
4052func (sart ScheduleAvailabilityRequestType) MarshalJSON() ([]byte, error) {
4053	sart.SkuName = SkuNameDataBox
4054	objectMap := make(map[string]interface{})
4055	if sart.StorageLocation != nil {
4056		objectMap["storageLocation"] = sart.StorageLocation
4057	}
4058	if sart.Country != nil {
4059		objectMap["country"] = sart.Country
4060	}
4061	if sart.SkuName != "" {
4062		objectMap["skuName"] = sart.SkuName
4063	}
4064	return json.Marshal(objectMap)
4065}
4066
4067// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4068func (sart ScheduleAvailabilityRequestType) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
4069	return &sart, true
4070}
4071
4072// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4073func (sart ScheduleAvailabilityRequestType) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
4074	return nil, false
4075}
4076
4077// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4078func (sart ScheduleAvailabilityRequestType) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
4079	return nil, false
4080}
4081
4082// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4083func (sart ScheduleAvailabilityRequestType) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
4084	return nil, false
4085}
4086
4087// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4088func (sart ScheduleAvailabilityRequestType) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
4089	return &sart, true
4090}
4091
4092// ScheduleAvailabilityResponse schedule availability for given sku in a region.
4093type ScheduleAvailabilityResponse struct {
4094	// AvailableDates - READ-ONLY; List of dates available to schedule
4095	AvailableDates *[]date.Time `json:"availableDates,omitempty"`
4096}
4097
4098// MarshalJSON is the custom marshaler for ScheduleAvailabilityResponse.
4099func (sar ScheduleAvailabilityResponse) MarshalJSON() ([]byte, error) {
4100	objectMap := make(map[string]interface{})
4101	return json.Marshal(objectMap)
4102}
4103
4104// Secret the secrets related to a DataBox.
4105type Secret struct {
4106	// DeviceSerialNumber - READ-ONLY; Serial number of the assigned device.
4107	DeviceSerialNumber *string `json:"deviceSerialNumber,omitempty"`
4108	// DevicePassword - READ-ONLY; Password for out of the box experience on device.
4109	DevicePassword *string `json:"devicePassword,omitempty"`
4110	// NetworkConfigurations - READ-ONLY; Network configuration of the appliance.
4111	NetworkConfigurations *[]ApplianceNetworkConfiguration `json:"networkConfigurations,omitempty"`
4112	// EncodedValidationCertPubKey - READ-ONLY; The base 64 encoded public key to authenticate with the device
4113	EncodedValidationCertPubKey *string `json:"encodedValidationCertPubKey,omitempty"`
4114	// AccountCredentialDetails - READ-ONLY; Per account level access credentials.
4115	AccountCredentialDetails *[]AccountCredentialDetails `json:"accountCredentialDetails,omitempty"`
4116}
4117
4118// MarshalJSON is the custom marshaler for Secret.
4119func (s Secret) MarshalJSON() ([]byte, error) {
4120	objectMap := make(map[string]interface{})
4121	return json.Marshal(objectMap)
4122}
4123
4124// ShareCredentialDetails credential details of the shares in account.
4125type ShareCredentialDetails struct {
4126	// ShareName - READ-ONLY; Name of the share.
4127	ShareName *string `json:"shareName,omitempty"`
4128	// ShareType - READ-ONLY; Type of the share. Possible values include: 'ShareDestinationFormatTypeUnknownType', 'ShareDestinationFormatTypeHCS', 'ShareDestinationFormatTypeBlockBlob', 'ShareDestinationFormatTypePageBlob', 'ShareDestinationFormatTypeAzureFile', 'ShareDestinationFormatTypeManagedDisk', 'ShareDestinationFormatTypeAzurePremiumFiles'
4129	ShareType ShareDestinationFormatType `json:"shareType,omitempty"`
4130	// UserName - READ-ONLY; User name for the share.
4131	UserName *string `json:"userName,omitempty"`
4132	// Password - READ-ONLY; Password for the share.
4133	Password *string `json:"password,omitempty"`
4134	// SupportedAccessProtocols - READ-ONLY; Access protocols supported on the device.
4135	SupportedAccessProtocols *[]AccessProtocol `json:"supportedAccessProtocols,omitempty"`
4136}
4137
4138// MarshalJSON is the custom marshaler for ShareCredentialDetails.
4139func (scd ShareCredentialDetails) MarshalJSON() ([]byte, error) {
4140	objectMap := make(map[string]interface{})
4141	return json.Marshal(objectMap)
4142}
4143
4144// ShipmentPickUpRequest shipment pick up request details.
4145type ShipmentPickUpRequest struct {
4146	// StartTime - Minimum date after which the pick up should commence, this must be in local time of pick up area.
4147	StartTime *date.Time `json:"startTime,omitempty"`
4148	// EndTime - Maximum date before which the pick up should commence, this must be in local time of pick up area.
4149	EndTime *date.Time `json:"endTime,omitempty"`
4150	// ShipmentLocation - Shipment Location in the pickup place. Eg.front desk
4151	ShipmentLocation *string `json:"shipmentLocation,omitempty"`
4152}
4153
4154// ShipmentPickUpResponse shipment pick up response.
4155type ShipmentPickUpResponse struct {
4156	autorest.Response `json:"-"`
4157	// ConfirmationNumber - READ-ONLY; Confirmation number for the pick up request.
4158	ConfirmationNumber *string `json:"confirmationNumber,omitempty"`
4159	// ReadyByTime - READ-ONLY; Time by which shipment should be ready for pick up, this is in local time of pick up area.
4160	ReadyByTime *date.Time `json:"readyByTime,omitempty"`
4161}
4162
4163// MarshalJSON is the custom marshaler for ShipmentPickUpResponse.
4164func (spur ShipmentPickUpResponse) MarshalJSON() ([]byte, error) {
4165	objectMap := make(map[string]interface{})
4166	return json.Marshal(objectMap)
4167}
4168
4169// ShippingAddress shipping address where customer wishes to receive the device.
4170type ShippingAddress struct {
4171	// StreetAddress1 - Street Address line 1.
4172	StreetAddress1 *string `json:"streetAddress1,omitempty"`
4173	// StreetAddress2 - Street Address line 2.
4174	StreetAddress2 *string `json:"streetAddress2,omitempty"`
4175	// StreetAddress3 - Street Address line 3.
4176	StreetAddress3 *string `json:"streetAddress3,omitempty"`
4177	// City - Name of the City.
4178	City *string `json:"city,omitempty"`
4179	// StateOrProvince - Name of the State or Province.
4180	StateOrProvince *string `json:"stateOrProvince,omitempty"`
4181	// Country - Name of the Country.
4182	Country *string `json:"country,omitempty"`
4183	// PostalCode - Postal code.
4184	PostalCode *string `json:"postalCode,omitempty"`
4185	// ZipExtendedCode - Extended Zip Code.
4186	ZipExtendedCode *string `json:"zipExtendedCode,omitempty"`
4187	// CompanyName - Name of the company.
4188	CompanyName *string `json:"companyName,omitempty"`
4189	// AddressType - Type of address. Possible values include: 'None', 'Residential', 'Commercial'
4190	AddressType AddressType `json:"addressType,omitempty"`
4191}
4192
4193// Sku the Sku.
4194type Sku struct {
4195	// Name - The sku name. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4196	Name SkuName `json:"name,omitempty"`
4197	// DisplayName - The display name of the sku.
4198	DisplayName *string `json:"displayName,omitempty"`
4199	// Family - The sku family.
4200	Family *string `json:"family,omitempty"`
4201}
4202
4203// SkuAvailabilityValidationRequest request to validate sku availability.
4204type SkuAvailabilityValidationRequest struct {
4205	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4206	DeviceType SkuName `json:"deviceType,omitempty"`
4207	// TransferType - Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
4208	TransferType TransferType `json:"transferType,omitempty"`
4209	// Country - ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
4210	Country *string `json:"country,omitempty"`
4211	// Location - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
4212	Location *string `json:"location,omitempty"`
4213	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4214	ValidationType ValidationType `json:"validationType,omitempty"`
4215}
4216
4217// MarshalJSON is the custom marshaler for SkuAvailabilityValidationRequest.
4218func (savr SkuAvailabilityValidationRequest) MarshalJSON() ([]byte, error) {
4219	savr.ValidationType = ValidationTypeValidateSkuAvailability
4220	objectMap := make(map[string]interface{})
4221	if savr.DeviceType != "" {
4222		objectMap["deviceType"] = savr.DeviceType
4223	}
4224	if savr.TransferType != "" {
4225		objectMap["transferType"] = savr.TransferType
4226	}
4227	if savr.Country != nil {
4228		objectMap["country"] = savr.Country
4229	}
4230	if savr.Location != nil {
4231		objectMap["location"] = savr.Location
4232	}
4233	if savr.ValidationType != "" {
4234		objectMap["validationType"] = savr.ValidationType
4235	}
4236	return json.Marshal(objectMap)
4237}
4238
4239// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4240func (savr SkuAvailabilityValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4241	return nil, false
4242}
4243
4244// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4245func (savr SkuAvailabilityValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4246	return nil, false
4247}
4248
4249// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4250func (savr SkuAvailabilityValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4251	return nil, false
4252}
4253
4254// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4255func (savr SkuAvailabilityValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4256	return &savr, true
4257}
4258
4259// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4260func (savr SkuAvailabilityValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4261	return nil, false
4262}
4263
4264// AsValidateAddress is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4265func (savr SkuAvailabilityValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
4266	return nil, false
4267}
4268
4269// AsValidationInputRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4270func (savr SkuAvailabilityValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4271	return nil, false
4272}
4273
4274// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4275func (savr SkuAvailabilityValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4276	return &savr, true
4277}
4278
4279// SkuAvailabilityValidationResponseProperties properties of sku availability validation response.
4280type SkuAvailabilityValidationResponseProperties struct {
4281	// Status - READ-ONLY; Sku availability validation status. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
4282	Status ValidationStatus `json:"status,omitempty"`
4283	// Error - READ-ONLY; Error code and message of validation response.
4284	Error *CloudError `json:"error,omitempty"`
4285	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4286	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
4287}
4288
4289// MarshalJSON is the custom marshaler for SkuAvailabilityValidationResponseProperties.
4290func (savrp SkuAvailabilityValidationResponseProperties) MarshalJSON() ([]byte, error) {
4291	savrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability
4292	objectMap := make(map[string]interface{})
4293	if savrp.ValidationType != "" {
4294		objectMap["validationType"] = savrp.ValidationType
4295	}
4296	return json.Marshal(objectMap)
4297}
4298
4299// AsAddressValidationProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4300func (savrp SkuAvailabilityValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
4301	return nil, false
4302}
4303
4304// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4305func (savrp SkuAvailabilityValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
4306	return nil, false
4307}
4308
4309// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4310func (savrp SkuAvailabilityValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
4311	return nil, false
4312}
4313
4314// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4315func (savrp SkuAvailabilityValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
4316	return nil, false
4317}
4318
4319// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4320func (savrp SkuAvailabilityValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
4321	return &savrp, true
4322}
4323
4324// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4325func (savrp SkuAvailabilityValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
4326	return nil, false
4327}
4328
4329// AsValidationInputResponse is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4330func (savrp SkuAvailabilityValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
4331	return nil, false
4332}
4333
4334// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4335func (savrp SkuAvailabilityValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
4336	return &savrp, true
4337}
4338
4339// SkuCapacity capacity of the sku.
4340type SkuCapacity struct {
4341	// Usable - READ-ONLY; Usable capacity in TB.
4342	Usable *string `json:"usable,omitempty"`
4343	// Maximum - READ-ONLY; Maximum capacity in TB.
4344	Maximum *string `json:"maximum,omitempty"`
4345}
4346
4347// MarshalJSON is the custom marshaler for SkuCapacity.
4348func (sc SkuCapacity) MarshalJSON() ([]byte, error) {
4349	objectMap := make(map[string]interface{})
4350	return json.Marshal(objectMap)
4351}
4352
4353// SkuCost describes metadata for retrieving price info.
4354type SkuCost struct {
4355	// MeterID - READ-ONLY; Meter id of the Sku.
4356	MeterID *string `json:"meterId,omitempty"`
4357	// MeterType - READ-ONLY; The type of the meter.
4358	MeterType *string `json:"meterType,omitempty"`
4359	// Multiplier - READ-ONLY; Multiplier specifies the region specific value to be multiplied with 1$ guid. Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to region.
4360	Multiplier *float64 `json:"multiplier,omitempty"`
4361}
4362
4363// MarshalJSON is the custom marshaler for SkuCost.
4364func (sc SkuCost) MarshalJSON() ([]byte, error) {
4365	objectMap := make(map[string]interface{})
4366	return json.Marshal(objectMap)
4367}
4368
4369// SkuInformation information of the sku.
4370type SkuInformation struct {
4371	// Sku - READ-ONLY; The Sku.
4372	Sku *Sku `json:"sku,omitempty"`
4373	// Enabled - READ-ONLY; The sku is enabled or not.
4374	Enabled *bool `json:"enabled,omitempty"`
4375	// SkuProperties - READ-ONLY; Properties of the sku.
4376	*SkuProperties `json:"properties,omitempty"`
4377}
4378
4379// MarshalJSON is the custom marshaler for SkuInformation.
4380func (si SkuInformation) MarshalJSON() ([]byte, error) {
4381	objectMap := make(map[string]interface{})
4382	return json.Marshal(objectMap)
4383}
4384
4385// UnmarshalJSON is the custom unmarshaler for SkuInformation struct.
4386func (si *SkuInformation) UnmarshalJSON(body []byte) error {
4387	var m map[string]*json.RawMessage
4388	err := json.Unmarshal(body, &m)
4389	if err != nil {
4390		return err
4391	}
4392	for k, v := range m {
4393		switch k {
4394		case "sku":
4395			if v != nil {
4396				var sku Sku
4397				err = json.Unmarshal(*v, &sku)
4398				if err != nil {
4399					return err
4400				}
4401				si.Sku = &sku
4402			}
4403		case "enabled":
4404			if v != nil {
4405				var enabled bool
4406				err = json.Unmarshal(*v, &enabled)
4407				if err != nil {
4408					return err
4409				}
4410				si.Enabled = &enabled
4411			}
4412		case "properties":
4413			if v != nil {
4414				var skuProperties SkuProperties
4415				err = json.Unmarshal(*v, &skuProperties)
4416				if err != nil {
4417					return err
4418				}
4419				si.SkuProperties = &skuProperties
4420			}
4421		}
4422	}
4423
4424	return nil
4425}
4426
4427// SkuProperties properties of the sku.
4428type SkuProperties struct {
4429	// DataLocationToServiceLocationMap - READ-ONLY; The map of data location to service location.
4430	DataLocationToServiceLocationMap *[]DataLocationToServiceLocationMap `json:"dataLocationToServiceLocationMap,omitempty"`
4431	// Capacity - READ-ONLY; Capacity of the Sku.
4432	Capacity *SkuCapacity `json:"capacity,omitempty"`
4433	// Costs - READ-ONLY; Cost of the Sku.
4434	Costs *[]SkuCost `json:"costs,omitempty"`
4435	// APIVersions - READ-ONLY; Api versions that support this Sku.
4436	APIVersions *[]string `json:"apiVersions,omitempty"`
4437	// DisabledReason - READ-ONLY; Reason why the Sku is disabled. Possible values include: 'SkuDisabledReasonNone', 'SkuDisabledReasonCountry', 'SkuDisabledReasonRegion', 'SkuDisabledReasonFeature', 'SkuDisabledReasonOfferType', 'SkuDisabledReasonNoSubscriptionInfo'
4438	DisabledReason SkuDisabledReason `json:"disabledReason,omitempty"`
4439	// DisabledReasonMessage - READ-ONLY; Message for why the Sku is disabled.
4440	DisabledReasonMessage *string `json:"disabledReasonMessage,omitempty"`
4441	// RequiredFeature - READ-ONLY; Required feature to access the sku.
4442	RequiredFeature *string `json:"requiredFeature,omitempty"`
4443}
4444
4445// MarshalJSON is the custom marshaler for SkuProperties.
4446func (sp SkuProperties) MarshalJSON() ([]byte, error) {
4447	objectMap := make(map[string]interface{})
4448	return json.Marshal(objectMap)
4449}
4450
4451// StorageAccountDetails details for the storage account.
4452type StorageAccountDetails struct {
4453	// StorageAccountID - Storage Account Resource Id.
4454	StorageAccountID *string `json:"storageAccountId,omitempty"`
4455	// SharePassword - Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements :  Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+
4456	SharePassword *string `json:"sharePassword,omitempty"`
4457	// DataAccountType - Possible values include: 'DataAccountTypeDataAccountDetails', 'DataAccountTypeManagedDisk', 'DataAccountTypeStorageAccount'
4458	DataAccountType DataAccountTypeBasicDataAccountDetails `json:"dataAccountType,omitempty"`
4459}
4460
4461// MarshalJSON is the custom marshaler for StorageAccountDetails.
4462func (sad StorageAccountDetails) MarshalJSON() ([]byte, error) {
4463	sad.DataAccountType = DataAccountTypeStorageAccount
4464	objectMap := make(map[string]interface{})
4465	if sad.StorageAccountID != nil {
4466		objectMap["storageAccountId"] = sad.StorageAccountID
4467	}
4468	if sad.SharePassword != nil {
4469		objectMap["sharePassword"] = sad.SharePassword
4470	}
4471	if sad.DataAccountType != "" {
4472		objectMap["dataAccountType"] = sad.DataAccountType
4473	}
4474	return json.Marshal(objectMap)
4475}
4476
4477// AsManagedDiskDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4478func (sad StorageAccountDetails) AsManagedDiskDetails() (*ManagedDiskDetails, bool) {
4479	return nil, false
4480}
4481
4482// AsStorageAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4483func (sad StorageAccountDetails) AsStorageAccountDetails() (*StorageAccountDetails, bool) {
4484	return &sad, true
4485}
4486
4487// AsDataAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4488func (sad StorageAccountDetails) AsDataAccountDetails() (*DataAccountDetails, bool) {
4489	return nil, false
4490}
4491
4492// AsBasicDataAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4493func (sad StorageAccountDetails) AsBasicDataAccountDetails() (BasicDataAccountDetails, bool) {
4494	return &sad, true
4495}
4496
4497// SubscriptionIsAllowedToCreateJobValidationRequest request to validate subscription permission to create
4498// jobs.
4499type SubscriptionIsAllowedToCreateJobValidationRequest struct {
4500	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4501	ValidationType ValidationType `json:"validationType,omitempty"`
4502}
4503
4504// MarshalJSON is the custom marshaler for SubscriptionIsAllowedToCreateJobValidationRequest.
4505func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) MarshalJSON() ([]byte, error) {
4506	siatcjvr.ValidationType = ValidationTypeValidateSubscriptionIsAllowedToCreateJob
4507	objectMap := make(map[string]interface{})
4508	if siatcjvr.ValidationType != "" {
4509		objectMap["validationType"] = siatcjvr.ValidationType
4510	}
4511	return json.Marshal(objectMap)
4512}
4513
4514// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4515func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4516	return nil, false
4517}
4518
4519// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4520func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4521	return nil, false
4522}
4523
4524// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4525func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4526	return nil, false
4527}
4528
4529// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4530func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4531	return nil, false
4532}
4533
4534// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4535func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4536	return &siatcjvr, true
4537}
4538
4539// AsValidateAddress is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4540func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
4541	return nil, false
4542}
4543
4544// AsValidationInputRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4545func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4546	return nil, false
4547}
4548
4549// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4550func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4551	return &siatcjvr, true
4552}
4553
4554// SubscriptionIsAllowedToCreateJobValidationResponseProperties properties of subscription permission to
4555// create job validation response.
4556type SubscriptionIsAllowedToCreateJobValidationResponseProperties struct {
4557	// Status - READ-ONLY; Validation status of subscription permission to create job. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
4558	Status ValidationStatus `json:"status,omitempty"`
4559	// Error - READ-ONLY; Error code and message of validation response.
4560	Error *CloudError `json:"error,omitempty"`
4561	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4562	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
4563}
4564
4565// MarshalJSON is the custom marshaler for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4566func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) MarshalJSON() ([]byte, error) {
4567	siatcjvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob
4568	objectMap := make(map[string]interface{})
4569	if siatcjvrp.ValidationType != "" {
4570		objectMap["validationType"] = siatcjvrp.ValidationType
4571	}
4572	return json.Marshal(objectMap)
4573}
4574
4575// AsAddressValidationProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4576func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
4577	return nil, false
4578}
4579
4580// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4581func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
4582	return nil, false
4583}
4584
4585// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4586func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
4587	return nil, false
4588}
4589
4590// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4591func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
4592	return nil, false
4593}
4594
4595// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4596func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
4597	return nil, false
4598}
4599
4600// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4601func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
4602	return &siatcjvrp, true
4603}
4604
4605// AsValidationInputResponse is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4606func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
4607	return nil, false
4608}
4609
4610// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4611func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
4612	return &siatcjvrp, true
4613}
4614
4615// TransferAllDetails details to transfer all data.
4616type TransferAllDetails struct {
4617	// DataAccountType - Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'
4618	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
4619	// TransferAllBlobs - To indicate if all Azure blobs have to be transferred
4620	TransferAllBlobs *bool `json:"transferAllBlobs,omitempty"`
4621	// TransferAllFiles - To indicate if all Azure Files have to be transferred
4622	TransferAllFiles *bool `json:"transferAllFiles,omitempty"`
4623}
4624
4625// TransferConfiguration configuration for defining the transfer of data.
4626type TransferConfiguration struct {
4627	// TransferConfigurationType - Type of the configuration for transfer. Possible values include: 'TransferAll', 'TransferUsingFilter'
4628	TransferConfigurationType TransferConfigurationType `json:"transferConfigurationType,omitempty"`
4629	// TransferFilterDetails - Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.
4630	TransferFilterDetails *TransferConfigurationTransferFilterDetails `json:"transferFilterDetails,omitempty"`
4631	// TransferAllDetails - Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll
4632	TransferAllDetails *TransferConfigurationTransferAllDetails `json:"transferAllDetails,omitempty"`
4633}
4634
4635// TransferConfigurationTransferAllDetails map of filter type and the details to transfer all data. This
4636// field is required only if the TransferConfigurationType is given as TransferAll
4637type TransferConfigurationTransferAllDetails struct {
4638	// Include - Details to transfer all data.
4639	Include *TransferAllDetails `json:"include,omitempty"`
4640}
4641
4642// TransferConfigurationTransferFilterDetails map of filter type and the details to filter. This field is
4643// required only if the TransferConfigurationType is given as TransferUsingFilter.
4644type TransferConfigurationTransferFilterDetails struct {
4645	// Include - Details of the filtering the transfer of data.
4646	Include *TransferFilterDetails `json:"include,omitempty"`
4647}
4648
4649// TransferFilterDetails details of the filtering the transfer of data.
4650type TransferFilterDetails struct {
4651	// DataAccountType - Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'
4652	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
4653	// BlobFilterDetails - Filter details to transfer blobs.
4654	BlobFilterDetails *BlobFilterDetails `json:"blobFilterDetails,omitempty"`
4655	// AzureFileFilterDetails - Filter details to transfer Azure files.
4656	AzureFileFilterDetails *AzureFileFilterDetails `json:"azureFileFilterDetails,omitempty"`
4657	// FilterFileDetails - Details of the filter files to be used for data transfer.
4658	FilterFileDetails *[]FilterFileDetails `json:"filterFileDetails,omitempty"`
4659}
4660
4661// TransportAvailabilityDetails transport options availability details for given region.
4662type TransportAvailabilityDetails struct {
4663	// ShipmentType - READ-ONLY; Transport Shipment Type supported for given region. Possible values include: 'TransportShipmentTypesCustomerManaged', 'TransportShipmentTypesMicrosoftManaged'
4664	ShipmentType TransportShipmentTypes `json:"shipmentType,omitempty"`
4665}
4666
4667// MarshalJSON is the custom marshaler for TransportAvailabilityDetails.
4668func (tad TransportAvailabilityDetails) MarshalJSON() ([]byte, error) {
4669	objectMap := make(map[string]interface{})
4670	return json.Marshal(objectMap)
4671}
4672
4673// TransportAvailabilityRequest request body to get the transport availability for given sku.
4674type TransportAvailabilityRequest struct {
4675	// SkuName - Type of the device. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4676	SkuName SkuName `json:"skuName,omitempty"`
4677}
4678
4679// TransportAvailabilityResponse transport options available for given sku in a region.
4680type TransportAvailabilityResponse struct {
4681	// TransportAvailabilityDetails - READ-ONLY; List of transport availability details for given region
4682	TransportAvailabilityDetails *[]TransportAvailabilityDetails `json:"transportAvailabilityDetails,omitempty"`
4683}
4684
4685// MarshalJSON is the custom marshaler for TransportAvailabilityResponse.
4686func (tarVar TransportAvailabilityResponse) MarshalJSON() ([]byte, error) {
4687	objectMap := make(map[string]interface{})
4688	return json.Marshal(objectMap)
4689}
4690
4691// TransportPreferences preferences related to the shipment logistics of the sku
4692type TransportPreferences struct {
4693	// PreferredShipmentType - Indicates Shipment Logistics type that the customer preferred. Possible values include: 'TransportShipmentTypesCustomerManaged', 'TransportShipmentTypesMicrosoftManaged'
4694	PreferredShipmentType TransportShipmentTypes `json:"preferredShipmentType,omitempty"`
4695}
4696
4697// UnencryptedCredentials unencrypted credentials for accessing device.
4698type UnencryptedCredentials struct {
4699	// JobName - READ-ONLY; Name of the job.
4700	JobName *string `json:"jobName,omitempty"`
4701	// JobSecrets - READ-ONLY; Secrets related to this job.
4702	JobSecrets BasicJobSecrets `json:"jobSecrets,omitempty"`
4703}
4704
4705// MarshalJSON is the custom marshaler for UnencryptedCredentials.
4706func (uc UnencryptedCredentials) MarshalJSON() ([]byte, error) {
4707	objectMap := make(map[string]interface{})
4708	return json.Marshal(objectMap)
4709}
4710
4711// UnmarshalJSON is the custom unmarshaler for UnencryptedCredentials struct.
4712func (uc *UnencryptedCredentials) UnmarshalJSON(body []byte) error {
4713	var m map[string]*json.RawMessage
4714	err := json.Unmarshal(body, &m)
4715	if err != nil {
4716		return err
4717	}
4718	for k, v := range m {
4719		switch k {
4720		case "jobName":
4721			if v != nil {
4722				var jobName string
4723				err = json.Unmarshal(*v, &jobName)
4724				if err != nil {
4725					return err
4726				}
4727				uc.JobName = &jobName
4728			}
4729		case "jobSecrets":
4730			if v != nil {
4731				jobSecrets, err := unmarshalBasicJobSecrets(*v)
4732				if err != nil {
4733					return err
4734				}
4735				uc.JobSecrets = jobSecrets
4736			}
4737		}
4738	}
4739
4740	return nil
4741}
4742
4743// UnencryptedCredentialsList list of unencrypted credentials for accessing device.
4744type UnencryptedCredentialsList struct {
4745	autorest.Response `json:"-"`
4746	// Value - List of unencrypted credentials.
4747	Value *[]UnencryptedCredentials `json:"value,omitempty"`
4748	// NextLink - Link for the next set of unencrypted credentials.
4749	NextLink *string `json:"nextLink,omitempty"`
4750}
4751
4752// UpdateJobDetails job details for update.
4753type UpdateJobDetails struct {
4754	// ContactDetails - Contact details for notification and shipping.
4755	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
4756	// ShippingAddress - Shipping address of the customer.
4757	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
4758	// KeyEncryptionKey - Key encryption key for the job.
4759	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
4760}
4761
4762// UpdateJobProperties job Properties for update
4763type UpdateJobProperties struct {
4764	// Details - Details of a job to be updated.
4765	Details *UpdateJobDetails `json:"details,omitempty"`
4766}
4767
4768// UserAssignedIdentity class defining User assigned identity details.
4769type UserAssignedIdentity struct {
4770	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
4771	PrincipalID *string `json:"principalId,omitempty"`
4772	// ClientID - READ-ONLY; The client id of user assigned identity.
4773	ClientID *string `json:"clientId,omitempty"`
4774}
4775
4776// MarshalJSON is the custom marshaler for UserAssignedIdentity.
4777func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) {
4778	objectMap := make(map[string]interface{})
4779	return json.Marshal(objectMap)
4780}
4781
4782// UserAssignedProperties user assigned identity properties.
4783type UserAssignedProperties struct {
4784	// ResourceID - Arm resource id for user assigned identity to be used to fetch MSI token.
4785	ResourceID *string `json:"resourceId,omitempty"`
4786}
4787
4788// ValidateAddress the requirements to validate customer address where the device needs to be shipped.
4789type ValidateAddress struct {
4790	// ShippingAddress - Shipping address of the customer.
4791	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
4792	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4793	DeviceType SkuName `json:"deviceType,omitempty"`
4794	// TransportPreferences - Preferences related to the shipment logistics of the sku.
4795	TransportPreferences *TransportPreferences `json:"transportPreferences,omitempty"`
4796	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4797	ValidationType ValidationType `json:"validationType,omitempty"`
4798}
4799
4800// MarshalJSON is the custom marshaler for ValidateAddress.
4801func (va ValidateAddress) MarshalJSON() ([]byte, error) {
4802	va.ValidationType = ValidationTypeValidateAddress
4803	objectMap := make(map[string]interface{})
4804	if va.ShippingAddress != nil {
4805		objectMap["shippingAddress"] = va.ShippingAddress
4806	}
4807	if va.DeviceType != "" {
4808		objectMap["deviceType"] = va.DeviceType
4809	}
4810	if va.TransportPreferences != nil {
4811		objectMap["transportPreferences"] = va.TransportPreferences
4812	}
4813	if va.ValidationType != "" {
4814		objectMap["validationType"] = va.ValidationType
4815	}
4816	return json.Marshal(objectMap)
4817}
4818
4819// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4820func (va ValidateAddress) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4821	return nil, false
4822}
4823
4824// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4825func (va ValidateAddress) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4826	return nil, false
4827}
4828
4829// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4830func (va ValidateAddress) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4831	return nil, false
4832}
4833
4834// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4835func (va ValidateAddress) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4836	return nil, false
4837}
4838
4839// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4840func (va ValidateAddress) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4841	return nil, false
4842}
4843
4844// AsValidateAddress is the BasicValidationInputRequest implementation for ValidateAddress.
4845func (va ValidateAddress) AsValidateAddress() (*ValidateAddress, bool) {
4846	return &va, true
4847}
4848
4849// AsValidationInputRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4850func (va ValidateAddress) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4851	return nil, false
4852}
4853
4854// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4855func (va ValidateAddress) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4856	return &va, true
4857}
4858
4859// BasicValidationInputRequest minimum fields that must be present in any type of validation request.
4860type BasicValidationInputRequest interface {
4861	AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool)
4862	AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool)
4863	AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool)
4864	AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool)
4865	AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool)
4866	AsValidateAddress() (*ValidateAddress, bool)
4867	AsValidationInputRequest() (*ValidationInputRequest, bool)
4868}
4869
4870// ValidationInputRequest minimum fields that must be present in any type of validation request.
4871type ValidationInputRequest struct {
4872	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4873	ValidationType ValidationType `json:"validationType,omitempty"`
4874}
4875
4876func unmarshalBasicValidationInputRequest(body []byte) (BasicValidationInputRequest, error) {
4877	var m map[string]interface{}
4878	err := json.Unmarshal(body, &m)
4879	if err != nil {
4880		return nil, err
4881	}
4882
4883	switch m["validationType"] {
4884	case string(ValidationTypeValidateCreateOrderLimit):
4885		var colfsvr CreateOrderLimitForSubscriptionValidationRequest
4886		err := json.Unmarshal(body, &colfsvr)
4887		return colfsvr, err
4888	case string(ValidationTypeValidateDataTransferDetails):
4889		var dtdvr DataTransferDetailsValidationRequest
4890		err := json.Unmarshal(body, &dtdvr)
4891		return dtdvr, err
4892	case string(ValidationTypeValidatePreferences):
4893		var pvr PreferencesValidationRequest
4894		err := json.Unmarshal(body, &pvr)
4895		return pvr, err
4896	case string(ValidationTypeValidateSkuAvailability):
4897		var savr SkuAvailabilityValidationRequest
4898		err := json.Unmarshal(body, &savr)
4899		return savr, err
4900	case string(ValidationTypeValidateSubscriptionIsAllowedToCreateJob):
4901		var siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest
4902		err := json.Unmarshal(body, &siatcjvr)
4903		return siatcjvr, err
4904	case string(ValidationTypeValidateAddress):
4905		var va ValidateAddress
4906		err := json.Unmarshal(body, &va)
4907		return va, err
4908	default:
4909		var vir ValidationInputRequest
4910		err := json.Unmarshal(body, &vir)
4911		return vir, err
4912	}
4913}
4914func unmarshalBasicValidationInputRequestArray(body []byte) ([]BasicValidationInputRequest, error) {
4915	var rawMessages []*json.RawMessage
4916	err := json.Unmarshal(body, &rawMessages)
4917	if err != nil {
4918		return nil, err
4919	}
4920
4921	virArray := make([]BasicValidationInputRequest, len(rawMessages))
4922
4923	for index, rawMessage := range rawMessages {
4924		vir, err := unmarshalBasicValidationInputRequest(*rawMessage)
4925		if err != nil {
4926			return nil, err
4927		}
4928		virArray[index] = vir
4929	}
4930	return virArray, nil
4931}
4932
4933// MarshalJSON is the custom marshaler for ValidationInputRequest.
4934func (vir ValidationInputRequest) MarshalJSON() ([]byte, error) {
4935	vir.ValidationType = ValidationTypeValidationInputRequest
4936	objectMap := make(map[string]interface{})
4937	if vir.ValidationType != "" {
4938		objectMap["validationType"] = vir.ValidationType
4939	}
4940	return json.Marshal(objectMap)
4941}
4942
4943// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4944func (vir ValidationInputRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4945	return nil, false
4946}
4947
4948// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4949func (vir ValidationInputRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4950	return nil, false
4951}
4952
4953// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4954func (vir ValidationInputRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4955	return nil, false
4956}
4957
4958// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4959func (vir ValidationInputRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4960	return nil, false
4961}
4962
4963// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4964func (vir ValidationInputRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4965	return nil, false
4966}
4967
4968// AsValidateAddress is the BasicValidationInputRequest implementation for ValidationInputRequest.
4969func (vir ValidationInputRequest) AsValidateAddress() (*ValidateAddress, bool) {
4970	return nil, false
4971}
4972
4973// AsValidationInputRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4974func (vir ValidationInputRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4975	return &vir, true
4976}
4977
4978// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4979func (vir ValidationInputRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4980	return &vir, true
4981}
4982
4983// BasicValidationInputResponse minimum properties that should be present in each individual validation response.
4984type BasicValidationInputResponse interface {
4985	AsAddressValidationProperties() (*AddressValidationProperties, bool)
4986	AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool)
4987	AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool)
4988	AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool)
4989	AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool)
4990	AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool)
4991	AsValidationInputResponse() (*ValidationInputResponse, bool)
4992}
4993
4994// ValidationInputResponse minimum properties that should be present in each individual validation response.
4995type ValidationInputResponse struct {
4996	// Error - READ-ONLY; Error code and message of validation response.
4997	Error *CloudError `json:"error,omitempty"`
4998	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4999	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
5000}
5001
5002func unmarshalBasicValidationInputResponse(body []byte) (BasicValidationInputResponse, error) {
5003	var m map[string]interface{}
5004	err := json.Unmarshal(body, &m)
5005	if err != nil {
5006		return nil, err
5007	}
5008
5009	switch m["validationType"] {
5010	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress):
5011		var avp AddressValidationProperties
5012		err := json.Unmarshal(body, &avp)
5013		return avp, err
5014	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit):
5015		var colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties
5016		err := json.Unmarshal(body, &colfsvrp)
5017		return colfsvrp, err
5018	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails):
5019		var dtdvrp DataTransferDetailsValidationResponseProperties
5020		err := json.Unmarshal(body, &dtdvrp)
5021		return dtdvrp, err
5022	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences):
5023		var pvrp PreferencesValidationResponseProperties
5024		err := json.Unmarshal(body, &pvrp)
5025		return pvrp, err
5026	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability):
5027		var savrp SkuAvailabilityValidationResponseProperties
5028		err := json.Unmarshal(body, &savrp)
5029		return savrp, err
5030	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob):
5031		var siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties
5032		err := json.Unmarshal(body, &siatcjvrp)
5033		return siatcjvrp, err
5034	default:
5035		var vir ValidationInputResponse
5036		err := json.Unmarshal(body, &vir)
5037		return vir, err
5038	}
5039}
5040func unmarshalBasicValidationInputResponseArray(body []byte) ([]BasicValidationInputResponse, error) {
5041	var rawMessages []*json.RawMessage
5042	err := json.Unmarshal(body, &rawMessages)
5043	if err != nil {
5044		return nil, err
5045	}
5046
5047	virArray := make([]BasicValidationInputResponse, len(rawMessages))
5048
5049	for index, rawMessage := range rawMessages {
5050		vir, err := unmarshalBasicValidationInputResponse(*rawMessage)
5051		if err != nil {
5052			return nil, err
5053		}
5054		virArray[index] = vir
5055	}
5056	return virArray, nil
5057}
5058
5059// MarshalJSON is the custom marshaler for ValidationInputResponse.
5060func (vir ValidationInputResponse) MarshalJSON() ([]byte, error) {
5061	vir.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse
5062	objectMap := make(map[string]interface{})
5063	if vir.ValidationType != "" {
5064		objectMap["validationType"] = vir.ValidationType
5065	}
5066	return json.Marshal(objectMap)
5067}
5068
5069// AsAddressValidationProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5070func (vir ValidationInputResponse) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
5071	return nil, false
5072}
5073
5074// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5075func (vir ValidationInputResponse) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
5076	return nil, false
5077}
5078
5079// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5080func (vir ValidationInputResponse) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
5081	return nil, false
5082}
5083
5084// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5085func (vir ValidationInputResponse) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
5086	return nil, false
5087}
5088
5089// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5090func (vir ValidationInputResponse) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
5091	return nil, false
5092}
5093
5094// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5095func (vir ValidationInputResponse) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
5096	return nil, false
5097}
5098
5099// AsValidationInputResponse is the BasicValidationInputResponse implementation for ValidationInputResponse.
5100func (vir ValidationInputResponse) AsValidationInputResponse() (*ValidationInputResponse, bool) {
5101	return &vir, true
5102}
5103
5104// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for ValidationInputResponse.
5105func (vir ValidationInputResponse) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
5106	return &vir, true
5107}
5108
5109// BasicValidationRequest minimum request requirement of any validation category.
5110type BasicValidationRequest interface {
5111	AsCreateJobValidations() (*CreateJobValidations, bool)
5112	AsValidationRequest() (*ValidationRequest, bool)
5113}
5114
5115// ValidationRequest minimum request requirement of any validation category.
5116type ValidationRequest struct {
5117	// IndividualRequestDetails - List of request details contain validationType and its request as key and value respectively.
5118	IndividualRequestDetails *[]BasicValidationInputRequest `json:"individualRequestDetails,omitempty"`
5119	// ValidationCategory - Possible values include: 'ValidationCategoryValidationRequest', 'ValidationCategoryJobCreationValidation'
5120	ValidationCategory ValidationCategory `json:"validationCategory,omitempty"`
5121}
5122
5123func unmarshalBasicValidationRequest(body []byte) (BasicValidationRequest, error) {
5124	var m map[string]interface{}
5125	err := json.Unmarshal(body, &m)
5126	if err != nil {
5127		return nil, err
5128	}
5129
5130	switch m["validationCategory"] {
5131	case string(ValidationCategoryJobCreationValidation):
5132		var cjv CreateJobValidations
5133		err := json.Unmarshal(body, &cjv)
5134		return cjv, err
5135	default:
5136		var vr ValidationRequest
5137		err := json.Unmarshal(body, &vr)
5138		return vr, err
5139	}
5140}
5141func unmarshalBasicValidationRequestArray(body []byte) ([]BasicValidationRequest, error) {
5142	var rawMessages []*json.RawMessage
5143	err := json.Unmarshal(body, &rawMessages)
5144	if err != nil {
5145		return nil, err
5146	}
5147
5148	vrArray := make([]BasicValidationRequest, len(rawMessages))
5149
5150	for index, rawMessage := range rawMessages {
5151		vr, err := unmarshalBasicValidationRequest(*rawMessage)
5152		if err != nil {
5153			return nil, err
5154		}
5155		vrArray[index] = vr
5156	}
5157	return vrArray, nil
5158}
5159
5160// MarshalJSON is the custom marshaler for ValidationRequest.
5161func (vr ValidationRequest) MarshalJSON() ([]byte, error) {
5162	vr.ValidationCategory = ValidationCategoryValidationRequest
5163	objectMap := make(map[string]interface{})
5164	if vr.IndividualRequestDetails != nil {
5165		objectMap["individualRequestDetails"] = vr.IndividualRequestDetails
5166	}
5167	if vr.ValidationCategory != "" {
5168		objectMap["validationCategory"] = vr.ValidationCategory
5169	}
5170	return json.Marshal(objectMap)
5171}
5172
5173// AsCreateJobValidations is the BasicValidationRequest implementation for ValidationRequest.
5174func (vr ValidationRequest) AsCreateJobValidations() (*CreateJobValidations, bool) {
5175	return nil, false
5176}
5177
5178// AsValidationRequest is the BasicValidationRequest implementation for ValidationRequest.
5179func (vr ValidationRequest) AsValidationRequest() (*ValidationRequest, bool) {
5180	return &vr, true
5181}
5182
5183// AsBasicValidationRequest is the BasicValidationRequest implementation for ValidationRequest.
5184func (vr ValidationRequest) AsBasicValidationRequest() (BasicValidationRequest, bool) {
5185	return &vr, true
5186}
5187
5188// UnmarshalJSON is the custom unmarshaler for ValidationRequest struct.
5189func (vr *ValidationRequest) UnmarshalJSON(body []byte) error {
5190	var m map[string]*json.RawMessage
5191	err := json.Unmarshal(body, &m)
5192	if err != nil {
5193		return err
5194	}
5195	for k, v := range m {
5196		switch k {
5197		case "individualRequestDetails":
5198			if v != nil {
5199				individualRequestDetails, err := unmarshalBasicValidationInputRequestArray(*v)
5200				if err != nil {
5201					return err
5202				}
5203				vr.IndividualRequestDetails = &individualRequestDetails
5204			}
5205		case "validationCategory":
5206			if v != nil {
5207				var validationCategory ValidationCategory
5208				err = json.Unmarshal(*v, &validationCategory)
5209				if err != nil {
5210					return err
5211				}
5212				vr.ValidationCategory = validationCategory
5213			}
5214		}
5215	}
5216
5217	return nil
5218}
5219
5220// ValidationResponse response of pre job creation validations.
5221type ValidationResponse struct {
5222	autorest.Response `json:"-"`
5223	// ValidationResponseProperties - READ-ONLY; Properties of pre job creation validation response.
5224	*ValidationResponseProperties `json:"properties,omitempty"`
5225}
5226
5227// MarshalJSON is the custom marshaler for ValidationResponse.
5228func (vr ValidationResponse) MarshalJSON() ([]byte, error) {
5229	objectMap := make(map[string]interface{})
5230	return json.Marshal(objectMap)
5231}
5232
5233// UnmarshalJSON is the custom unmarshaler for ValidationResponse struct.
5234func (vr *ValidationResponse) UnmarshalJSON(body []byte) error {
5235	var m map[string]*json.RawMessage
5236	err := json.Unmarshal(body, &m)
5237	if err != nil {
5238		return err
5239	}
5240	for k, v := range m {
5241		switch k {
5242		case "properties":
5243			if v != nil {
5244				var validationResponseProperties ValidationResponseProperties
5245				err = json.Unmarshal(*v, &validationResponseProperties)
5246				if err != nil {
5247					return err
5248				}
5249				vr.ValidationResponseProperties = &validationResponseProperties
5250			}
5251		}
5252	}
5253
5254	return nil
5255}
5256
5257// ValidationResponseProperties properties of pre job creation validation response.
5258type ValidationResponseProperties struct {
5259	// Status - READ-ONLY; Overall validation status. Possible values include: 'AllValidToProceed', 'InputsRevisitRequired', 'CertainInputValidationsSkipped'
5260	Status OverallValidationStatus `json:"status,omitempty"`
5261	// IndividualResponseDetails - READ-ONLY; List of response details contain validationType and its response as key and value respectively.
5262	IndividualResponseDetails *[]BasicValidationInputResponse `json:"individualResponseDetails,omitempty"`
5263}
5264
5265// MarshalJSON is the custom marshaler for ValidationResponseProperties.
5266func (vrp ValidationResponseProperties) MarshalJSON() ([]byte, error) {
5267	objectMap := make(map[string]interface{})
5268	return json.Marshal(objectMap)
5269}
5270
5271// UnmarshalJSON is the custom unmarshaler for ValidationResponseProperties struct.
5272func (vrp *ValidationResponseProperties) UnmarshalJSON(body []byte) error {
5273	var m map[string]*json.RawMessage
5274	err := json.Unmarshal(body, &m)
5275	if err != nil {
5276		return err
5277	}
5278	for k, v := range m {
5279		switch k {
5280		case "status":
5281			if v != nil {
5282				var status OverallValidationStatus
5283				err = json.Unmarshal(*v, &status)
5284				if err != nil {
5285					return err
5286				}
5287				vrp.Status = status
5288			}
5289		case "individualResponseDetails":
5290			if v != nil {
5291				individualResponseDetails, err := unmarshalBasicValidationInputResponseArray(*v)
5292				if err != nil {
5293					return err
5294				}
5295				vrp.IndividualResponseDetails = &individualResponseDetails
5296			}
5297		}
5298	}
5299
5300	return nil
5301}
5302