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-04-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// ErrorDetail ...
1602type ErrorDetail struct {
1603	Code    *string    `json:"code,omitempty"`
1604	Message *string    `json:"message,omitempty"`
1605	Details *[]Details `json:"details,omitempty"`
1606	Target  *string    `json:"target,omitempty"`
1607}
1608
1609// FilterFileDetails details of the filter files to be used for data transfer.
1610type FilterFileDetails struct {
1611	// FilterFileType - Type of the filter file. Possible values include: 'AzureBlob', 'AzureFile'
1612	FilterFileType FilterFileType `json:"filterFileType,omitempty"`
1613	// FilterFilePath - Path of the file that contains the details of all items to transfer.
1614	FilterFilePath *string `json:"filterFilePath,omitempty"`
1615}
1616
1617// HeavyAccountCopyLogDetails copy log details for a storage account for Databox heavy
1618type HeavyAccountCopyLogDetails struct {
1619	// AccountName - READ-ONLY; Account name.
1620	AccountName *string `json:"accountName,omitempty"`
1621	// CopyLogLink - READ-ONLY; Link for copy logs.
1622	CopyLogLink *[]string `json:"copyLogLink,omitempty"`
1623	// CopyVerboseLogLink - READ-ONLY; Link for copy verbose logs. This will be set only when the LogCollectionLevel is set to verbose.
1624	CopyVerboseLogLink *[]string `json:"copyVerboseLogLink,omitempty"`
1625	// CopyLogDetailsType - Possible values include: 'CopyLogDetailsTypeCopyLogDetails', 'CopyLogDetailsTypeDataBox', 'CopyLogDetailsTypeDataBoxDisk', 'CopyLogDetailsTypeDataBoxHeavy'
1626	CopyLogDetailsType CopyLogDetailsType `json:"copyLogDetailsType,omitempty"`
1627}
1628
1629// MarshalJSON is the custom marshaler for HeavyAccountCopyLogDetails.
1630func (hacld HeavyAccountCopyLogDetails) MarshalJSON() ([]byte, error) {
1631	hacld.CopyLogDetailsType = CopyLogDetailsTypeDataBoxHeavy
1632	objectMap := make(map[string]interface{})
1633	if hacld.CopyLogDetailsType != "" {
1634		objectMap["copyLogDetailsType"] = hacld.CopyLogDetailsType
1635	}
1636	return json.Marshal(objectMap)
1637}
1638
1639// AsAccountCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1640func (hacld HeavyAccountCopyLogDetails) AsAccountCopyLogDetails() (*AccountCopyLogDetails, bool) {
1641	return nil, false
1642}
1643
1644// AsDiskCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1645func (hacld HeavyAccountCopyLogDetails) AsDiskCopyLogDetails() (*DiskCopyLogDetails, bool) {
1646	return nil, false
1647}
1648
1649// AsHeavyAccountCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1650func (hacld HeavyAccountCopyLogDetails) AsHeavyAccountCopyLogDetails() (*HeavyAccountCopyLogDetails, bool) {
1651	return &hacld, true
1652}
1653
1654// AsCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1655func (hacld HeavyAccountCopyLogDetails) AsCopyLogDetails() (*CopyLogDetails, bool) {
1656	return nil, false
1657}
1658
1659// AsBasicCopyLogDetails is the BasicCopyLogDetails implementation for HeavyAccountCopyLogDetails.
1660func (hacld HeavyAccountCopyLogDetails) AsBasicCopyLogDetails() (BasicCopyLogDetails, bool) {
1661	return &hacld, true
1662}
1663
1664// HeavyJobDetails databox Heavy Device Job Details
1665type HeavyJobDetails struct {
1666	// CopyProgress - READ-ONLY; Copy progress per account.
1667	CopyProgress *[]CopyProgress `json:"copyProgress,omitempty"`
1668	// 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 : @#\-$%^!+=;:_()]+
1669	DevicePassword *string `json:"devicePassword,omitempty"`
1670	// JobStages - READ-ONLY; List of stages that run in the job.
1671	JobStages *[]JobStages `json:"jobStages,omitempty"`
1672	// ContactDetails - Contact details for notification and shipping.
1673	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
1674	// ShippingAddress - Shipping address of the customer.
1675	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
1676	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
1677	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
1678	// ReturnPackage - READ-ONLY; Return package shipping details.
1679	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
1680	// DataImportDetails - Details of the data to be imported into azure.
1681	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
1682	// DataExportDetails - Details of the data to be exported from azure.
1683	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
1684	// Preferences - Preferences for the order.
1685	Preferences *Preferences `json:"preferences,omitempty"`
1686	// CopyLogDetails - READ-ONLY; List of copy log details.
1687	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
1688	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
1689	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
1690	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
1691	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
1692	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
1693	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
1694	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
1695	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
1696	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
1697	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
1698}
1699
1700// MarshalJSON is the custom marshaler for HeavyJobDetails.
1701func (hjd HeavyJobDetails) MarshalJSON() ([]byte, error) {
1702	hjd.JobDetailsType = JobDetailsTypeDataBoxHeavy
1703	objectMap := make(map[string]interface{})
1704	if hjd.DevicePassword != nil {
1705		objectMap["devicePassword"] = hjd.DevicePassword
1706	}
1707	if hjd.ContactDetails != nil {
1708		objectMap["contactDetails"] = hjd.ContactDetails
1709	}
1710	if hjd.ShippingAddress != nil {
1711		objectMap["shippingAddress"] = hjd.ShippingAddress
1712	}
1713	if hjd.DataImportDetails != nil {
1714		objectMap["dataImportDetails"] = hjd.DataImportDetails
1715	}
1716	if hjd.DataExportDetails != nil {
1717		objectMap["dataExportDetails"] = hjd.DataExportDetails
1718	}
1719	if hjd.Preferences != nil {
1720		objectMap["preferences"] = hjd.Preferences
1721	}
1722	if hjd.ExpectedDataSizeInTerabytes != nil {
1723		objectMap["expectedDataSizeInTerabytes"] = hjd.ExpectedDataSizeInTerabytes
1724	}
1725	if hjd.JobDetailsType != "" {
1726		objectMap["jobDetailsType"] = hjd.JobDetailsType
1727	}
1728	return json.Marshal(objectMap)
1729}
1730
1731// AsDiskJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1732func (hjd HeavyJobDetails) AsDiskJobDetails() (*DiskJobDetails, bool) {
1733	return nil, false
1734}
1735
1736// AsHeavyJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1737func (hjd HeavyJobDetails) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
1738	return &hjd, true
1739}
1740
1741// AsJobDetailsType is the BasicJobDetails implementation for HeavyJobDetails.
1742func (hjd HeavyJobDetails) AsJobDetailsType() (*JobDetailsType, bool) {
1743	return nil, false
1744}
1745
1746// AsJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1747func (hjd HeavyJobDetails) AsJobDetails() (*JobDetails, bool) {
1748	return nil, false
1749}
1750
1751// AsBasicJobDetails is the BasicJobDetails implementation for HeavyJobDetails.
1752func (hjd HeavyJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
1753	return &hjd, true
1754}
1755
1756// UnmarshalJSON is the custom unmarshaler for HeavyJobDetails struct.
1757func (hjd *HeavyJobDetails) UnmarshalJSON(body []byte) error {
1758	var m map[string]*json.RawMessage
1759	err := json.Unmarshal(body, &m)
1760	if err != nil {
1761		return err
1762	}
1763	for k, v := range m {
1764		switch k {
1765		case "copyProgress":
1766			if v != nil {
1767				var copyProgress []CopyProgress
1768				err = json.Unmarshal(*v, &copyProgress)
1769				if err != nil {
1770					return err
1771				}
1772				hjd.CopyProgress = &copyProgress
1773			}
1774		case "devicePassword":
1775			if v != nil {
1776				var devicePassword string
1777				err = json.Unmarshal(*v, &devicePassword)
1778				if err != nil {
1779					return err
1780				}
1781				hjd.DevicePassword = &devicePassword
1782			}
1783		case "jobStages":
1784			if v != nil {
1785				var jobStages []JobStages
1786				err = json.Unmarshal(*v, &jobStages)
1787				if err != nil {
1788					return err
1789				}
1790				hjd.JobStages = &jobStages
1791			}
1792		case "contactDetails":
1793			if v != nil {
1794				var contactDetails ContactDetails
1795				err = json.Unmarshal(*v, &contactDetails)
1796				if err != nil {
1797					return err
1798				}
1799				hjd.ContactDetails = &contactDetails
1800			}
1801		case "shippingAddress":
1802			if v != nil {
1803				var shippingAddress ShippingAddress
1804				err = json.Unmarshal(*v, &shippingAddress)
1805				if err != nil {
1806					return err
1807				}
1808				hjd.ShippingAddress = &shippingAddress
1809			}
1810		case "deliveryPackage":
1811			if v != nil {
1812				var deliveryPackage PackageShippingDetails
1813				err = json.Unmarshal(*v, &deliveryPackage)
1814				if err != nil {
1815					return err
1816				}
1817				hjd.DeliveryPackage = &deliveryPackage
1818			}
1819		case "returnPackage":
1820			if v != nil {
1821				var returnPackage PackageShippingDetails
1822				err = json.Unmarshal(*v, &returnPackage)
1823				if err != nil {
1824					return err
1825				}
1826				hjd.ReturnPackage = &returnPackage
1827			}
1828		case "dataImportDetails":
1829			if v != nil {
1830				var dataImportDetails []DataImportDetails
1831				err = json.Unmarshal(*v, &dataImportDetails)
1832				if err != nil {
1833					return err
1834				}
1835				hjd.DataImportDetails = &dataImportDetails
1836			}
1837		case "dataExportDetails":
1838			if v != nil {
1839				var dataExportDetails []DataExportDetails
1840				err = json.Unmarshal(*v, &dataExportDetails)
1841				if err != nil {
1842					return err
1843				}
1844				hjd.DataExportDetails = &dataExportDetails
1845			}
1846		case "preferences":
1847			if v != nil {
1848				var preferences Preferences
1849				err = json.Unmarshal(*v, &preferences)
1850				if err != nil {
1851					return err
1852				}
1853				hjd.Preferences = &preferences
1854			}
1855		case "copyLogDetails":
1856			if v != nil {
1857				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
1858				if err != nil {
1859					return err
1860				}
1861				hjd.CopyLogDetails = &copyLogDetails
1862			}
1863		case "reverseShipmentLabelSasKey":
1864			if v != nil {
1865				var reverseShipmentLabelSasKey string
1866				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
1867				if err != nil {
1868					return err
1869				}
1870				hjd.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
1871			}
1872		case "chainOfCustodySasKey":
1873			if v != nil {
1874				var chainOfCustodySasKey string
1875				err = json.Unmarshal(*v, &chainOfCustodySasKey)
1876				if err != nil {
1877					return err
1878				}
1879				hjd.ChainOfCustodySasKey = &chainOfCustodySasKey
1880			}
1881		case "keyEncryptionKey":
1882			if v != nil {
1883				var keyEncryptionKey KeyEncryptionKey
1884				err = json.Unmarshal(*v, &keyEncryptionKey)
1885				if err != nil {
1886					return err
1887				}
1888				hjd.KeyEncryptionKey = &keyEncryptionKey
1889			}
1890		case "expectedDataSizeInTerabytes":
1891			if v != nil {
1892				var expectedDataSizeInTerabytes int32
1893				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
1894				if err != nil {
1895					return err
1896				}
1897				hjd.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
1898			}
1899		case "jobDetailsType":
1900			if v != nil {
1901				var jobDetailsType JobDetailsTypeEnum
1902				err = json.Unmarshal(*v, &jobDetailsType)
1903				if err != nil {
1904					return err
1905				}
1906				hjd.JobDetailsType = jobDetailsType
1907			}
1908		}
1909	}
1910
1911	return nil
1912}
1913
1914// HeavyJobSecrets the secrets related to a databox heavy job.
1915type HeavyJobSecrets struct {
1916	// CabinetPodSecrets - READ-ONLY; Contains the list of secret objects for a databox heavy job.
1917	CabinetPodSecrets *[]HeavySecret `json:"cabinetPodSecrets,omitempty"`
1918	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
1919	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
1920	// Error - READ-ONLY; Error while fetching the secrets.
1921	Error *CloudError `json:"error,omitempty"`
1922	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
1923	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
1924}
1925
1926// MarshalJSON is the custom marshaler for HeavyJobSecrets.
1927func (hjs HeavyJobSecrets) MarshalJSON() ([]byte, error) {
1928	hjs.JobSecretsType = JobSecretsTypeDataBoxHeavy
1929	objectMap := make(map[string]interface{})
1930	if hjs.JobSecretsType != "" {
1931		objectMap["jobSecretsType"] = hjs.JobSecretsType
1932	}
1933	return json.Marshal(objectMap)
1934}
1935
1936// AsDiskJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1937func (hjs HeavyJobSecrets) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
1938	return nil, false
1939}
1940
1941// AsHeavyJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1942func (hjs HeavyJobSecrets) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
1943	return &hjs, true
1944}
1945
1946// AsJobSecretsType is the BasicJobSecrets implementation for HeavyJobSecrets.
1947func (hjs HeavyJobSecrets) AsJobSecretsType() (*JobSecretsType, bool) {
1948	return nil, false
1949}
1950
1951// AsJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1952func (hjs HeavyJobSecrets) AsJobSecrets() (*JobSecrets, bool) {
1953	return nil, false
1954}
1955
1956// AsBasicJobSecrets is the BasicJobSecrets implementation for HeavyJobSecrets.
1957func (hjs HeavyJobSecrets) AsBasicJobSecrets() (BasicJobSecrets, bool) {
1958	return &hjs, true
1959}
1960
1961// HeavyScheduleAvailabilityRequest request body to get the availability for scheduling heavy orders.
1962type HeavyScheduleAvailabilityRequest struct {
1963	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
1964	StorageLocation *string `json:"storageLocation,omitempty"`
1965	// Country - Country in which storage location should be supported.
1966	Country *string `json:"country,omitempty"`
1967	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
1968	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
1969}
1970
1971// MarshalJSON is the custom marshaler for HeavyScheduleAvailabilityRequest.
1972func (hsar HeavyScheduleAvailabilityRequest) MarshalJSON() ([]byte, error) {
1973	hsar.SkuName = SkuNameDataBoxHeavy
1974	objectMap := make(map[string]interface{})
1975	if hsar.StorageLocation != nil {
1976		objectMap["storageLocation"] = hsar.StorageLocation
1977	}
1978	if hsar.Country != nil {
1979		objectMap["country"] = hsar.Country
1980	}
1981	if hsar.SkuName != "" {
1982		objectMap["skuName"] = hsar.SkuName
1983	}
1984	return json.Marshal(objectMap)
1985}
1986
1987// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
1988func (hsar HeavyScheduleAvailabilityRequest) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
1989	return nil, false
1990}
1991
1992// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
1993func (hsar HeavyScheduleAvailabilityRequest) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
1994	return nil, false
1995}
1996
1997// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
1998func (hsar HeavyScheduleAvailabilityRequest) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
1999	return &hsar, true
2000}
2001
2002// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
2003func (hsar HeavyScheduleAvailabilityRequest) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
2004	return nil, false
2005}
2006
2007// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for HeavyScheduleAvailabilityRequest.
2008func (hsar HeavyScheduleAvailabilityRequest) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
2009	return &hsar, true
2010}
2011
2012// HeavySecret the secrets related to a databox heavy.
2013type HeavySecret struct {
2014	// DeviceSerialNumber - READ-ONLY; Serial number of the assigned device.
2015	DeviceSerialNumber *string `json:"deviceSerialNumber,omitempty"`
2016	// DevicePassword - READ-ONLY; Password for out of the box experience on device.
2017	DevicePassword *string `json:"devicePassword,omitempty"`
2018	// NetworkConfigurations - READ-ONLY; Network configuration of the appliance.
2019	NetworkConfigurations *[]ApplianceNetworkConfiguration `json:"networkConfigurations,omitempty"`
2020	// EncodedValidationCertPubKey - READ-ONLY; The base 64 encoded public key to authenticate with the device
2021	EncodedValidationCertPubKey *string `json:"encodedValidationCertPubKey,omitempty"`
2022	// AccountCredentialDetails - READ-ONLY; Per account level access credentials.
2023	AccountCredentialDetails *[]AccountCredentialDetails `json:"accountCredentialDetails,omitempty"`
2024}
2025
2026// MarshalJSON is the custom marshaler for HeavySecret.
2027func (hs HeavySecret) MarshalJSON() ([]byte, error) {
2028	objectMap := make(map[string]interface{})
2029	return json.Marshal(objectMap)
2030}
2031
2032// JobDeliveryInfo additional delivery info.
2033type JobDeliveryInfo struct {
2034	// ScheduledDateTime - Scheduled date time.
2035	ScheduledDateTime *date.Time `json:"scheduledDateTime,omitempty"`
2036}
2037
2038// BasicJobDetails job details.
2039type BasicJobDetails interface {
2040	AsDiskJobDetails() (*DiskJobDetails, bool)
2041	AsHeavyJobDetails() (*HeavyJobDetails, bool)
2042	AsJobDetailsType() (*JobDetailsType, bool)
2043	AsJobDetails() (*JobDetails, bool)
2044}
2045
2046// JobDetails job details.
2047type JobDetails struct {
2048	// JobStages - READ-ONLY; List of stages that run in the job.
2049	JobStages *[]JobStages `json:"jobStages,omitempty"`
2050	// ContactDetails - Contact details for notification and shipping.
2051	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
2052	// ShippingAddress - Shipping address of the customer.
2053	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
2054	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
2055	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
2056	// ReturnPackage - READ-ONLY; Return package shipping details.
2057	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
2058	// DataImportDetails - Details of the data to be imported into azure.
2059	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
2060	// DataExportDetails - Details of the data to be exported from azure.
2061	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
2062	// Preferences - Preferences for the order.
2063	Preferences *Preferences `json:"preferences,omitempty"`
2064	// CopyLogDetails - READ-ONLY; List of copy log details.
2065	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
2066	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
2067	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
2068	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
2069	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
2070	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
2071	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
2072	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
2073	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
2074	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
2075	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
2076}
2077
2078func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) {
2079	var m map[string]interface{}
2080	err := json.Unmarshal(body, &m)
2081	if err != nil {
2082		return nil, err
2083	}
2084
2085	switch m["jobDetailsType"] {
2086	case string(JobDetailsTypeDataBoxDisk):
2087		var djd DiskJobDetails
2088		err := json.Unmarshal(body, &djd)
2089		return djd, err
2090	case string(JobDetailsTypeDataBoxHeavy):
2091		var hjd HeavyJobDetails
2092		err := json.Unmarshal(body, &hjd)
2093		return hjd, err
2094	case string(JobDetailsTypeDataBox):
2095		var jdt JobDetailsType
2096		err := json.Unmarshal(body, &jdt)
2097		return jdt, err
2098	default:
2099		var jd JobDetails
2100		err := json.Unmarshal(body, &jd)
2101		return jd, err
2102	}
2103}
2104func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) {
2105	var rawMessages []*json.RawMessage
2106	err := json.Unmarshal(body, &rawMessages)
2107	if err != nil {
2108		return nil, err
2109	}
2110
2111	jdArray := make([]BasicJobDetails, len(rawMessages))
2112
2113	for index, rawMessage := range rawMessages {
2114		jd, err := unmarshalBasicJobDetails(*rawMessage)
2115		if err != nil {
2116			return nil, err
2117		}
2118		jdArray[index] = jd
2119	}
2120	return jdArray, nil
2121}
2122
2123// MarshalJSON is the custom marshaler for JobDetails.
2124func (jd JobDetails) MarshalJSON() ([]byte, error) {
2125	jd.JobDetailsType = JobDetailsTypeJobDetails
2126	objectMap := make(map[string]interface{})
2127	if jd.ContactDetails != nil {
2128		objectMap["contactDetails"] = jd.ContactDetails
2129	}
2130	if jd.ShippingAddress != nil {
2131		objectMap["shippingAddress"] = jd.ShippingAddress
2132	}
2133	if jd.DataImportDetails != nil {
2134		objectMap["dataImportDetails"] = jd.DataImportDetails
2135	}
2136	if jd.DataExportDetails != nil {
2137		objectMap["dataExportDetails"] = jd.DataExportDetails
2138	}
2139	if jd.Preferences != nil {
2140		objectMap["preferences"] = jd.Preferences
2141	}
2142	if jd.ExpectedDataSizeInTerabytes != nil {
2143		objectMap["expectedDataSizeInTerabytes"] = jd.ExpectedDataSizeInTerabytes
2144	}
2145	if jd.JobDetailsType != "" {
2146		objectMap["jobDetailsType"] = jd.JobDetailsType
2147	}
2148	return json.Marshal(objectMap)
2149}
2150
2151// AsDiskJobDetails is the BasicJobDetails implementation for JobDetails.
2152func (jd JobDetails) AsDiskJobDetails() (*DiskJobDetails, bool) {
2153	return nil, false
2154}
2155
2156// AsHeavyJobDetails is the BasicJobDetails implementation for JobDetails.
2157func (jd JobDetails) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
2158	return nil, false
2159}
2160
2161// AsJobDetailsType is the BasicJobDetails implementation for JobDetails.
2162func (jd JobDetails) AsJobDetailsType() (*JobDetailsType, bool) {
2163	return nil, false
2164}
2165
2166// AsJobDetails is the BasicJobDetails implementation for JobDetails.
2167func (jd JobDetails) AsJobDetails() (*JobDetails, bool) {
2168	return &jd, true
2169}
2170
2171// AsBasicJobDetails is the BasicJobDetails implementation for JobDetails.
2172func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) {
2173	return &jd, true
2174}
2175
2176// UnmarshalJSON is the custom unmarshaler for JobDetails struct.
2177func (jd *JobDetails) UnmarshalJSON(body []byte) error {
2178	var m map[string]*json.RawMessage
2179	err := json.Unmarshal(body, &m)
2180	if err != nil {
2181		return err
2182	}
2183	for k, v := range m {
2184		switch k {
2185		case "jobStages":
2186			if v != nil {
2187				var jobStages []JobStages
2188				err = json.Unmarshal(*v, &jobStages)
2189				if err != nil {
2190					return err
2191				}
2192				jd.JobStages = &jobStages
2193			}
2194		case "contactDetails":
2195			if v != nil {
2196				var contactDetails ContactDetails
2197				err = json.Unmarshal(*v, &contactDetails)
2198				if err != nil {
2199					return err
2200				}
2201				jd.ContactDetails = &contactDetails
2202			}
2203		case "shippingAddress":
2204			if v != nil {
2205				var shippingAddress ShippingAddress
2206				err = json.Unmarshal(*v, &shippingAddress)
2207				if err != nil {
2208					return err
2209				}
2210				jd.ShippingAddress = &shippingAddress
2211			}
2212		case "deliveryPackage":
2213			if v != nil {
2214				var deliveryPackage PackageShippingDetails
2215				err = json.Unmarshal(*v, &deliveryPackage)
2216				if err != nil {
2217					return err
2218				}
2219				jd.DeliveryPackage = &deliveryPackage
2220			}
2221		case "returnPackage":
2222			if v != nil {
2223				var returnPackage PackageShippingDetails
2224				err = json.Unmarshal(*v, &returnPackage)
2225				if err != nil {
2226					return err
2227				}
2228				jd.ReturnPackage = &returnPackage
2229			}
2230		case "dataImportDetails":
2231			if v != nil {
2232				var dataImportDetails []DataImportDetails
2233				err = json.Unmarshal(*v, &dataImportDetails)
2234				if err != nil {
2235					return err
2236				}
2237				jd.DataImportDetails = &dataImportDetails
2238			}
2239		case "dataExportDetails":
2240			if v != nil {
2241				var dataExportDetails []DataExportDetails
2242				err = json.Unmarshal(*v, &dataExportDetails)
2243				if err != nil {
2244					return err
2245				}
2246				jd.DataExportDetails = &dataExportDetails
2247			}
2248		case "preferences":
2249			if v != nil {
2250				var preferences Preferences
2251				err = json.Unmarshal(*v, &preferences)
2252				if err != nil {
2253					return err
2254				}
2255				jd.Preferences = &preferences
2256			}
2257		case "copyLogDetails":
2258			if v != nil {
2259				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
2260				if err != nil {
2261					return err
2262				}
2263				jd.CopyLogDetails = &copyLogDetails
2264			}
2265		case "reverseShipmentLabelSasKey":
2266			if v != nil {
2267				var reverseShipmentLabelSasKey string
2268				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
2269				if err != nil {
2270					return err
2271				}
2272				jd.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
2273			}
2274		case "chainOfCustodySasKey":
2275			if v != nil {
2276				var chainOfCustodySasKey string
2277				err = json.Unmarshal(*v, &chainOfCustodySasKey)
2278				if err != nil {
2279					return err
2280				}
2281				jd.ChainOfCustodySasKey = &chainOfCustodySasKey
2282			}
2283		case "keyEncryptionKey":
2284			if v != nil {
2285				var keyEncryptionKey KeyEncryptionKey
2286				err = json.Unmarshal(*v, &keyEncryptionKey)
2287				if err != nil {
2288					return err
2289				}
2290				jd.KeyEncryptionKey = &keyEncryptionKey
2291			}
2292		case "expectedDataSizeInTerabytes":
2293			if v != nil {
2294				var expectedDataSizeInTerabytes int32
2295				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
2296				if err != nil {
2297					return err
2298				}
2299				jd.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
2300			}
2301		case "jobDetailsType":
2302			if v != nil {
2303				var jobDetailsType JobDetailsTypeEnum
2304				err = json.Unmarshal(*v, &jobDetailsType)
2305				if err != nil {
2306					return err
2307				}
2308				jd.JobDetailsType = jobDetailsType
2309			}
2310		}
2311	}
2312
2313	return nil
2314}
2315
2316// JobDetailsType databox Job Details
2317type JobDetailsType struct {
2318	// CopyProgress - READ-ONLY; Copy progress per storage account.
2319	CopyProgress *[]CopyProgress `json:"copyProgress,omitempty"`
2320	// 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 : @#\-$%^!+=;:_()]+
2321	DevicePassword *string `json:"devicePassword,omitempty"`
2322	// JobStages - READ-ONLY; List of stages that run in the job.
2323	JobStages *[]JobStages `json:"jobStages,omitempty"`
2324	// ContactDetails - Contact details for notification and shipping.
2325	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
2326	// ShippingAddress - Shipping address of the customer.
2327	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
2328	// DeliveryPackage - READ-ONLY; Delivery package shipping details.
2329	DeliveryPackage *PackageShippingDetails `json:"deliveryPackage,omitempty"`
2330	// ReturnPackage - READ-ONLY; Return package shipping details.
2331	ReturnPackage *PackageShippingDetails `json:"returnPackage,omitempty"`
2332	// DataImportDetails - Details of the data to be imported into azure.
2333	DataImportDetails *[]DataImportDetails `json:"dataImportDetails,omitempty"`
2334	// DataExportDetails - Details of the data to be exported from azure.
2335	DataExportDetails *[]DataExportDetails `json:"dataExportDetails,omitempty"`
2336	// Preferences - Preferences for the order.
2337	Preferences *Preferences `json:"preferences,omitempty"`
2338	// CopyLogDetails - READ-ONLY; List of copy log details.
2339	CopyLogDetails *[]BasicCopyLogDetails `json:"copyLogDetails,omitempty"`
2340	// ReverseShipmentLabelSasKey - READ-ONLY; Shared access key to download the return shipment label
2341	ReverseShipmentLabelSasKey *string `json:"reverseShipmentLabelSasKey,omitempty"`
2342	// ChainOfCustodySasKey - READ-ONLY; Shared access key to download the chain of custody logs
2343	ChainOfCustodySasKey *string `json:"chainOfCustodySasKey,omitempty"`
2344	// KeyEncryptionKey - READ-ONLY; Details about which key encryption type is being used.
2345	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
2346	// ExpectedDataSizeInTerabytes - The expected size of the data, which needs to be transferred in this job, in terabytes.
2347	ExpectedDataSizeInTerabytes *int32 `json:"expectedDataSizeInTerabytes,omitempty"`
2348	// JobDetailsType - Possible values include: 'JobDetailsTypeJobDetails', 'JobDetailsTypeDataBoxDisk', 'JobDetailsTypeDataBoxHeavy', 'JobDetailsTypeDataBox'
2349	JobDetailsType JobDetailsTypeEnum `json:"jobDetailsType,omitempty"`
2350}
2351
2352// MarshalJSON is the custom marshaler for JobDetailsType.
2353func (jdt JobDetailsType) MarshalJSON() ([]byte, error) {
2354	jdt.JobDetailsType = JobDetailsTypeDataBox
2355	objectMap := make(map[string]interface{})
2356	if jdt.DevicePassword != nil {
2357		objectMap["devicePassword"] = jdt.DevicePassword
2358	}
2359	if jdt.ContactDetails != nil {
2360		objectMap["contactDetails"] = jdt.ContactDetails
2361	}
2362	if jdt.ShippingAddress != nil {
2363		objectMap["shippingAddress"] = jdt.ShippingAddress
2364	}
2365	if jdt.DataImportDetails != nil {
2366		objectMap["dataImportDetails"] = jdt.DataImportDetails
2367	}
2368	if jdt.DataExportDetails != nil {
2369		objectMap["dataExportDetails"] = jdt.DataExportDetails
2370	}
2371	if jdt.Preferences != nil {
2372		objectMap["preferences"] = jdt.Preferences
2373	}
2374	if jdt.ExpectedDataSizeInTerabytes != nil {
2375		objectMap["expectedDataSizeInTerabytes"] = jdt.ExpectedDataSizeInTerabytes
2376	}
2377	if jdt.JobDetailsType != "" {
2378		objectMap["jobDetailsType"] = jdt.JobDetailsType
2379	}
2380	return json.Marshal(objectMap)
2381}
2382
2383// AsDiskJobDetails is the BasicJobDetails implementation for JobDetailsType.
2384func (jdt JobDetailsType) AsDiskJobDetails() (*DiskJobDetails, bool) {
2385	return nil, false
2386}
2387
2388// AsHeavyJobDetails is the BasicJobDetails implementation for JobDetailsType.
2389func (jdt JobDetailsType) AsHeavyJobDetails() (*HeavyJobDetails, bool) {
2390	return nil, false
2391}
2392
2393// AsJobDetailsType is the BasicJobDetails implementation for JobDetailsType.
2394func (jdt JobDetailsType) AsJobDetailsType() (*JobDetailsType, bool) {
2395	return &jdt, true
2396}
2397
2398// AsJobDetails is the BasicJobDetails implementation for JobDetailsType.
2399func (jdt JobDetailsType) AsJobDetails() (*JobDetails, bool) {
2400	return nil, false
2401}
2402
2403// AsBasicJobDetails is the BasicJobDetails implementation for JobDetailsType.
2404func (jdt JobDetailsType) AsBasicJobDetails() (BasicJobDetails, bool) {
2405	return &jdt, true
2406}
2407
2408// UnmarshalJSON is the custom unmarshaler for JobDetailsType struct.
2409func (jdt *JobDetailsType) UnmarshalJSON(body []byte) error {
2410	var m map[string]*json.RawMessage
2411	err := json.Unmarshal(body, &m)
2412	if err != nil {
2413		return err
2414	}
2415	for k, v := range m {
2416		switch k {
2417		case "copyProgress":
2418			if v != nil {
2419				var copyProgress []CopyProgress
2420				err = json.Unmarshal(*v, &copyProgress)
2421				if err != nil {
2422					return err
2423				}
2424				jdt.CopyProgress = &copyProgress
2425			}
2426		case "devicePassword":
2427			if v != nil {
2428				var devicePassword string
2429				err = json.Unmarshal(*v, &devicePassword)
2430				if err != nil {
2431					return err
2432				}
2433				jdt.DevicePassword = &devicePassword
2434			}
2435		case "jobStages":
2436			if v != nil {
2437				var jobStages []JobStages
2438				err = json.Unmarshal(*v, &jobStages)
2439				if err != nil {
2440					return err
2441				}
2442				jdt.JobStages = &jobStages
2443			}
2444		case "contactDetails":
2445			if v != nil {
2446				var contactDetails ContactDetails
2447				err = json.Unmarshal(*v, &contactDetails)
2448				if err != nil {
2449					return err
2450				}
2451				jdt.ContactDetails = &contactDetails
2452			}
2453		case "shippingAddress":
2454			if v != nil {
2455				var shippingAddress ShippingAddress
2456				err = json.Unmarshal(*v, &shippingAddress)
2457				if err != nil {
2458					return err
2459				}
2460				jdt.ShippingAddress = &shippingAddress
2461			}
2462		case "deliveryPackage":
2463			if v != nil {
2464				var deliveryPackage PackageShippingDetails
2465				err = json.Unmarshal(*v, &deliveryPackage)
2466				if err != nil {
2467					return err
2468				}
2469				jdt.DeliveryPackage = &deliveryPackage
2470			}
2471		case "returnPackage":
2472			if v != nil {
2473				var returnPackage PackageShippingDetails
2474				err = json.Unmarshal(*v, &returnPackage)
2475				if err != nil {
2476					return err
2477				}
2478				jdt.ReturnPackage = &returnPackage
2479			}
2480		case "dataImportDetails":
2481			if v != nil {
2482				var dataImportDetails []DataImportDetails
2483				err = json.Unmarshal(*v, &dataImportDetails)
2484				if err != nil {
2485					return err
2486				}
2487				jdt.DataImportDetails = &dataImportDetails
2488			}
2489		case "dataExportDetails":
2490			if v != nil {
2491				var dataExportDetails []DataExportDetails
2492				err = json.Unmarshal(*v, &dataExportDetails)
2493				if err != nil {
2494					return err
2495				}
2496				jdt.DataExportDetails = &dataExportDetails
2497			}
2498		case "preferences":
2499			if v != nil {
2500				var preferences Preferences
2501				err = json.Unmarshal(*v, &preferences)
2502				if err != nil {
2503					return err
2504				}
2505				jdt.Preferences = &preferences
2506			}
2507		case "copyLogDetails":
2508			if v != nil {
2509				copyLogDetails, err := unmarshalBasicCopyLogDetailsArray(*v)
2510				if err != nil {
2511					return err
2512				}
2513				jdt.CopyLogDetails = &copyLogDetails
2514			}
2515		case "reverseShipmentLabelSasKey":
2516			if v != nil {
2517				var reverseShipmentLabelSasKey string
2518				err = json.Unmarshal(*v, &reverseShipmentLabelSasKey)
2519				if err != nil {
2520					return err
2521				}
2522				jdt.ReverseShipmentLabelSasKey = &reverseShipmentLabelSasKey
2523			}
2524		case "chainOfCustodySasKey":
2525			if v != nil {
2526				var chainOfCustodySasKey string
2527				err = json.Unmarshal(*v, &chainOfCustodySasKey)
2528				if err != nil {
2529					return err
2530				}
2531				jdt.ChainOfCustodySasKey = &chainOfCustodySasKey
2532			}
2533		case "keyEncryptionKey":
2534			if v != nil {
2535				var keyEncryptionKey KeyEncryptionKey
2536				err = json.Unmarshal(*v, &keyEncryptionKey)
2537				if err != nil {
2538					return err
2539				}
2540				jdt.KeyEncryptionKey = &keyEncryptionKey
2541			}
2542		case "expectedDataSizeInTerabytes":
2543			if v != nil {
2544				var expectedDataSizeInTerabytes int32
2545				err = json.Unmarshal(*v, &expectedDataSizeInTerabytes)
2546				if err != nil {
2547					return err
2548				}
2549				jdt.ExpectedDataSizeInTerabytes = &expectedDataSizeInTerabytes
2550			}
2551		case "jobDetailsType":
2552			if v != nil {
2553				var jobDetailsType JobDetailsTypeEnum
2554				err = json.Unmarshal(*v, &jobDetailsType)
2555				if err != nil {
2556					return err
2557				}
2558				jdt.JobDetailsType = jobDetailsType
2559			}
2560		}
2561	}
2562
2563	return nil
2564}
2565
2566// JobProperties job Properties
2567type JobProperties struct {
2568	// TransferType - Type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
2569	TransferType TransferType `json:"transferType,omitempty"`
2570	// IsCancellable - READ-ONLY; Describes whether the job is cancellable or not.
2571	IsCancellable *bool `json:"isCancellable,omitempty"`
2572	// IsDeletable - READ-ONLY; Describes whether the job is deletable or not.
2573	IsDeletable *bool `json:"isDeletable,omitempty"`
2574	// IsShippingAddressEditable - READ-ONLY; Describes whether the shipping address is editable or not.
2575	IsShippingAddressEditable *bool `json:"isShippingAddressEditable,omitempty"`
2576	// IsPrepareToShipEnabled - READ-ONLY; Is Prepare To Ship Enabled on this job
2577	IsPrepareToShipEnabled *bool `json:"isPrepareToShipEnabled,omitempty"`
2578	// 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'
2579	Status StageName `json:"status,omitempty"`
2580	// StartTime - READ-ONLY; Time at which the job was started in UTC ISO 8601 format.
2581	StartTime *date.Time `json:"startTime,omitempty"`
2582	// Error - READ-ONLY; Top level error for the job.
2583	Error *CloudError `json:"error,omitempty"`
2584	// Details - Details of a job run. This field will only be sent for expand details filter.
2585	Details BasicJobDetails `json:"details,omitempty"`
2586	// CancellationReason - READ-ONLY; Reason for cancellation.
2587	CancellationReason *string `json:"cancellationReason,omitempty"`
2588	// DeliveryType - Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled'
2589	DeliveryType JobDeliveryType `json:"deliveryType,omitempty"`
2590	// DeliveryInfo - Delivery Info of Job.
2591	DeliveryInfo *JobDeliveryInfo `json:"deliveryInfo,omitempty"`
2592	// IsCancellableWithoutFee - READ-ONLY; Flag to indicate cancellation of scheduled job.
2593	IsCancellableWithoutFee *bool `json:"isCancellableWithoutFee,omitempty"`
2594}
2595
2596// MarshalJSON is the custom marshaler for JobProperties.
2597func (jp JobProperties) MarshalJSON() ([]byte, error) {
2598	objectMap := make(map[string]interface{})
2599	if jp.TransferType != "" {
2600		objectMap["transferType"] = jp.TransferType
2601	}
2602	objectMap["details"] = jp.Details
2603	if jp.DeliveryType != "" {
2604		objectMap["deliveryType"] = jp.DeliveryType
2605	}
2606	if jp.DeliveryInfo != nil {
2607		objectMap["deliveryInfo"] = jp.DeliveryInfo
2608	}
2609	return json.Marshal(objectMap)
2610}
2611
2612// UnmarshalJSON is the custom unmarshaler for JobProperties struct.
2613func (jp *JobProperties) UnmarshalJSON(body []byte) error {
2614	var m map[string]*json.RawMessage
2615	err := json.Unmarshal(body, &m)
2616	if err != nil {
2617		return err
2618	}
2619	for k, v := range m {
2620		switch k {
2621		case "transferType":
2622			if v != nil {
2623				var transferType TransferType
2624				err = json.Unmarshal(*v, &transferType)
2625				if err != nil {
2626					return err
2627				}
2628				jp.TransferType = transferType
2629			}
2630		case "isCancellable":
2631			if v != nil {
2632				var isCancellable bool
2633				err = json.Unmarshal(*v, &isCancellable)
2634				if err != nil {
2635					return err
2636				}
2637				jp.IsCancellable = &isCancellable
2638			}
2639		case "isDeletable":
2640			if v != nil {
2641				var isDeletable bool
2642				err = json.Unmarshal(*v, &isDeletable)
2643				if err != nil {
2644					return err
2645				}
2646				jp.IsDeletable = &isDeletable
2647			}
2648		case "isShippingAddressEditable":
2649			if v != nil {
2650				var isShippingAddressEditable bool
2651				err = json.Unmarshal(*v, &isShippingAddressEditable)
2652				if err != nil {
2653					return err
2654				}
2655				jp.IsShippingAddressEditable = &isShippingAddressEditable
2656			}
2657		case "isPrepareToShipEnabled":
2658			if v != nil {
2659				var isPrepareToShipEnabled bool
2660				err = json.Unmarshal(*v, &isPrepareToShipEnabled)
2661				if err != nil {
2662					return err
2663				}
2664				jp.IsPrepareToShipEnabled = &isPrepareToShipEnabled
2665			}
2666		case "status":
2667			if v != nil {
2668				var status StageName
2669				err = json.Unmarshal(*v, &status)
2670				if err != nil {
2671					return err
2672				}
2673				jp.Status = status
2674			}
2675		case "startTime":
2676			if v != nil {
2677				var startTime date.Time
2678				err = json.Unmarshal(*v, &startTime)
2679				if err != nil {
2680					return err
2681				}
2682				jp.StartTime = &startTime
2683			}
2684		case "error":
2685			if v != nil {
2686				var errorVar CloudError
2687				err = json.Unmarshal(*v, &errorVar)
2688				if err != nil {
2689					return err
2690				}
2691				jp.Error = &errorVar
2692			}
2693		case "details":
2694			if v != nil {
2695				details, err := unmarshalBasicJobDetails(*v)
2696				if err != nil {
2697					return err
2698				}
2699				jp.Details = details
2700			}
2701		case "cancellationReason":
2702			if v != nil {
2703				var cancellationReason string
2704				err = json.Unmarshal(*v, &cancellationReason)
2705				if err != nil {
2706					return err
2707				}
2708				jp.CancellationReason = &cancellationReason
2709			}
2710		case "deliveryType":
2711			if v != nil {
2712				var deliveryType JobDeliveryType
2713				err = json.Unmarshal(*v, &deliveryType)
2714				if err != nil {
2715					return err
2716				}
2717				jp.DeliveryType = deliveryType
2718			}
2719		case "deliveryInfo":
2720			if v != nil {
2721				var deliveryInfo JobDeliveryInfo
2722				err = json.Unmarshal(*v, &deliveryInfo)
2723				if err != nil {
2724					return err
2725				}
2726				jp.DeliveryInfo = &deliveryInfo
2727			}
2728		case "isCancellableWithoutFee":
2729			if v != nil {
2730				var isCancellableWithoutFee bool
2731				err = json.Unmarshal(*v, &isCancellableWithoutFee)
2732				if err != nil {
2733					return err
2734				}
2735				jp.IsCancellableWithoutFee = &isCancellableWithoutFee
2736			}
2737		}
2738	}
2739
2740	return nil
2741}
2742
2743// JobResource job Resource.
2744type JobResource struct {
2745	autorest.Response `json:"-"`
2746	// JobProperties - Properties of a job.
2747	*JobProperties `json:"properties,omitempty"`
2748	// Name - READ-ONLY; Name of the object.
2749	Name *string `json:"name,omitempty"`
2750	// ID - READ-ONLY; Id of the object.
2751	ID *string `json:"id,omitempty"`
2752	// Type - READ-ONLY; Type of the object.
2753	Type *string `json:"type,omitempty"`
2754	// 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.
2755	Location *string `json:"location,omitempty"`
2756	// 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).
2757	Tags map[string]*string `json:"tags"`
2758	// Sku - The sku type.
2759	Sku *Sku `json:"sku,omitempty"`
2760	// Identity - Msi identity of the resource
2761	Identity *ResourceIdentity `json:"identity,omitempty"`
2762}
2763
2764// MarshalJSON is the custom marshaler for JobResource.
2765func (jr JobResource) MarshalJSON() ([]byte, error) {
2766	objectMap := make(map[string]interface{})
2767	if jr.JobProperties != nil {
2768		objectMap["properties"] = jr.JobProperties
2769	}
2770	if jr.Location != nil {
2771		objectMap["location"] = jr.Location
2772	}
2773	if jr.Tags != nil {
2774		objectMap["tags"] = jr.Tags
2775	}
2776	if jr.Sku != nil {
2777		objectMap["sku"] = jr.Sku
2778	}
2779	if jr.Identity != nil {
2780		objectMap["identity"] = jr.Identity
2781	}
2782	return json.Marshal(objectMap)
2783}
2784
2785// UnmarshalJSON is the custom unmarshaler for JobResource struct.
2786func (jr *JobResource) UnmarshalJSON(body []byte) error {
2787	var m map[string]*json.RawMessage
2788	err := json.Unmarshal(body, &m)
2789	if err != nil {
2790		return err
2791	}
2792	for k, v := range m {
2793		switch k {
2794		case "properties":
2795			if v != nil {
2796				var jobProperties JobProperties
2797				err = json.Unmarshal(*v, &jobProperties)
2798				if err != nil {
2799					return err
2800				}
2801				jr.JobProperties = &jobProperties
2802			}
2803		case "name":
2804			if v != nil {
2805				var name string
2806				err = json.Unmarshal(*v, &name)
2807				if err != nil {
2808					return err
2809				}
2810				jr.Name = &name
2811			}
2812		case "id":
2813			if v != nil {
2814				var ID string
2815				err = json.Unmarshal(*v, &ID)
2816				if err != nil {
2817					return err
2818				}
2819				jr.ID = &ID
2820			}
2821		case "type":
2822			if v != nil {
2823				var typeVar string
2824				err = json.Unmarshal(*v, &typeVar)
2825				if err != nil {
2826					return err
2827				}
2828				jr.Type = &typeVar
2829			}
2830		case "location":
2831			if v != nil {
2832				var location string
2833				err = json.Unmarshal(*v, &location)
2834				if err != nil {
2835					return err
2836				}
2837				jr.Location = &location
2838			}
2839		case "tags":
2840			if v != nil {
2841				var tags map[string]*string
2842				err = json.Unmarshal(*v, &tags)
2843				if err != nil {
2844					return err
2845				}
2846				jr.Tags = tags
2847			}
2848		case "sku":
2849			if v != nil {
2850				var sku Sku
2851				err = json.Unmarshal(*v, &sku)
2852				if err != nil {
2853					return err
2854				}
2855				jr.Sku = &sku
2856			}
2857		case "identity":
2858			if v != nil {
2859				var identity ResourceIdentity
2860				err = json.Unmarshal(*v, &identity)
2861				if err != nil {
2862					return err
2863				}
2864				jr.Identity = &identity
2865			}
2866		}
2867	}
2868
2869	return nil
2870}
2871
2872// JobResourceList job Resource Collection
2873type JobResourceList struct {
2874	autorest.Response `json:"-"`
2875	// Value - List of job resources.
2876	Value *[]JobResource `json:"value,omitempty"`
2877	// NextLink - Link for the next set of job resources.
2878	NextLink *string `json:"nextLink,omitempty"`
2879}
2880
2881// JobResourceListIterator provides access to a complete listing of JobResource values.
2882type JobResourceListIterator struct {
2883	i    int
2884	page JobResourceListPage
2885}
2886
2887// NextWithContext advances to the next value.  If there was an error making
2888// the request the iterator does not advance and the error is returned.
2889func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
2890	if tracing.IsEnabled() {
2891		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
2892		defer func() {
2893			sc := -1
2894			if iter.Response().Response.Response != nil {
2895				sc = iter.Response().Response.Response.StatusCode
2896			}
2897			tracing.EndSpan(ctx, sc, err)
2898		}()
2899	}
2900	iter.i++
2901	if iter.i < len(iter.page.Values()) {
2902		return nil
2903	}
2904	err = iter.page.NextWithContext(ctx)
2905	if err != nil {
2906		iter.i--
2907		return err
2908	}
2909	iter.i = 0
2910	return nil
2911}
2912
2913// Next advances to the next value.  If there was an error making
2914// the request the iterator does not advance and the error is returned.
2915// Deprecated: Use NextWithContext() instead.
2916func (iter *JobResourceListIterator) Next() error {
2917	return iter.NextWithContext(context.Background())
2918}
2919
2920// NotDone returns true if the enumeration should be started or is not yet complete.
2921func (iter JobResourceListIterator) NotDone() bool {
2922	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2923}
2924
2925// Response returns the raw server response from the last page request.
2926func (iter JobResourceListIterator) Response() JobResourceList {
2927	return iter.page.Response()
2928}
2929
2930// Value returns the current value or a zero-initialized value if the
2931// iterator has advanced beyond the end of the collection.
2932func (iter JobResourceListIterator) Value() JobResource {
2933	if !iter.page.NotDone() {
2934		return JobResource{}
2935	}
2936	return iter.page.Values()[iter.i]
2937}
2938
2939// Creates a new instance of the JobResourceListIterator type.
2940func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
2941	return JobResourceListIterator{page: page}
2942}
2943
2944// IsEmpty returns true if the ListResult contains no values.
2945func (jrl JobResourceList) IsEmpty() bool {
2946	return jrl.Value == nil || len(*jrl.Value) == 0
2947}
2948
2949// hasNextLink returns true if the NextLink is not empty.
2950func (jrl JobResourceList) hasNextLink() bool {
2951	return jrl.NextLink != nil && len(*jrl.NextLink) != 0
2952}
2953
2954// jobResourceListPreparer prepares a request to retrieve the next set of results.
2955// It returns nil if no more results exist.
2956func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
2957	if !jrl.hasNextLink() {
2958		return nil, nil
2959	}
2960	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2961		autorest.AsJSON(),
2962		autorest.AsGet(),
2963		autorest.WithBaseURL(to.String(jrl.NextLink)))
2964}
2965
2966// JobResourceListPage contains a page of JobResource values.
2967type JobResourceListPage struct {
2968	fn  func(context.Context, JobResourceList) (JobResourceList, error)
2969	jrl JobResourceList
2970}
2971
2972// NextWithContext advances to the next page of values.  If there was an error making
2973// the request the page does not advance and the error is returned.
2974func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
2975	if tracing.IsEnabled() {
2976		ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
2977		defer func() {
2978			sc := -1
2979			if page.Response().Response.Response != nil {
2980				sc = page.Response().Response.Response.StatusCode
2981			}
2982			tracing.EndSpan(ctx, sc, err)
2983		}()
2984	}
2985	for {
2986		next, err := page.fn(ctx, page.jrl)
2987		if err != nil {
2988			return err
2989		}
2990		page.jrl = next
2991		if !next.hasNextLink() || !next.IsEmpty() {
2992			break
2993		}
2994	}
2995	return nil
2996}
2997
2998// Next advances to the next page of values.  If there was an error making
2999// the request the page does not advance and the error is returned.
3000// Deprecated: Use NextWithContext() instead.
3001func (page *JobResourceListPage) Next() error {
3002	return page.NextWithContext(context.Background())
3003}
3004
3005// NotDone returns true if the page enumeration should be started or is not yet complete.
3006func (page JobResourceListPage) NotDone() bool {
3007	return !page.jrl.IsEmpty()
3008}
3009
3010// Response returns the raw server response from the last page request.
3011func (page JobResourceListPage) Response() JobResourceList {
3012	return page.jrl
3013}
3014
3015// Values returns the slice of values for the current page or nil if there are no values.
3016func (page JobResourceListPage) Values() []JobResource {
3017	if page.jrl.IsEmpty() {
3018		return nil
3019	}
3020	return *page.jrl.Value
3021}
3022
3023// Creates a new instance of the JobResourceListPage type.
3024func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
3025	return JobResourceListPage{
3026		fn:  getNextPage,
3027		jrl: cur,
3028	}
3029}
3030
3031// JobResourceUpdateParameter the JobResourceUpdateParameter.
3032type JobResourceUpdateParameter struct {
3033	// UpdateJobProperties - Properties of a job to be updated.
3034	*UpdateJobProperties `json:"properties,omitempty"`
3035	// 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).
3036	Tags map[string]*string `json:"tags"`
3037	// Identity - Msi identity of the resource
3038	Identity *ResourceIdentity `json:"identity,omitempty"`
3039}
3040
3041// MarshalJSON is the custom marshaler for JobResourceUpdateParameter.
3042func (jrup JobResourceUpdateParameter) MarshalJSON() ([]byte, error) {
3043	objectMap := make(map[string]interface{})
3044	if jrup.UpdateJobProperties != nil {
3045		objectMap["properties"] = jrup.UpdateJobProperties
3046	}
3047	if jrup.Tags != nil {
3048		objectMap["tags"] = jrup.Tags
3049	}
3050	if jrup.Identity != nil {
3051		objectMap["identity"] = jrup.Identity
3052	}
3053	return json.Marshal(objectMap)
3054}
3055
3056// UnmarshalJSON is the custom unmarshaler for JobResourceUpdateParameter struct.
3057func (jrup *JobResourceUpdateParameter) UnmarshalJSON(body []byte) error {
3058	var m map[string]*json.RawMessage
3059	err := json.Unmarshal(body, &m)
3060	if err != nil {
3061		return err
3062	}
3063	for k, v := range m {
3064		switch k {
3065		case "properties":
3066			if v != nil {
3067				var updateJobProperties UpdateJobProperties
3068				err = json.Unmarshal(*v, &updateJobProperties)
3069				if err != nil {
3070					return err
3071				}
3072				jrup.UpdateJobProperties = &updateJobProperties
3073			}
3074		case "tags":
3075			if v != nil {
3076				var tags map[string]*string
3077				err = json.Unmarshal(*v, &tags)
3078				if err != nil {
3079					return err
3080				}
3081				jrup.Tags = tags
3082			}
3083		case "identity":
3084			if v != nil {
3085				var identity ResourceIdentity
3086				err = json.Unmarshal(*v, &identity)
3087				if err != nil {
3088					return err
3089				}
3090				jrup.Identity = &identity
3091			}
3092		}
3093	}
3094
3095	return nil
3096}
3097
3098// JobsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3099type JobsCreateFuture struct {
3100	azure.FutureAPI
3101	// Result returns the result of the asynchronous operation.
3102	// If the operation has not completed it will return an error.
3103	Result func(JobsClient) (JobResource, error)
3104}
3105
3106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3107func (future *JobsCreateFuture) UnmarshalJSON(body []byte) error {
3108	var azFuture azure.Future
3109	if err := json.Unmarshal(body, &azFuture); err != nil {
3110		return err
3111	}
3112	future.FutureAPI = &azFuture
3113	future.Result = future.result
3114	return nil
3115}
3116
3117// result is the default implementation for JobsCreateFuture.Result.
3118func (future *JobsCreateFuture) result(client JobsClient) (jr JobResource, err error) {
3119	var done bool
3120	done, err = future.DoneWithContext(context.Background(), client)
3121	if err != nil {
3122		err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", future.Response(), "Polling failure")
3123		return
3124	}
3125	if !done {
3126		jr.Response.Response = future.Response()
3127		err = azure.NewAsyncOpIncompleteError("databox.JobsCreateFuture")
3128		return
3129	}
3130	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3131	if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
3132		jr, err = client.CreateResponder(jr.Response.Response)
3133		if err != nil {
3134			err = autorest.NewErrorWithError(err, "databox.JobsCreateFuture", "Result", jr.Response.Response, "Failure responding to request")
3135		}
3136	}
3137	return
3138}
3139
3140// JobsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3141type JobsDeleteFuture struct {
3142	azure.FutureAPI
3143	// Result returns the result of the asynchronous operation.
3144	// If the operation has not completed it will return an error.
3145	Result func(JobsClient) (autorest.Response, error)
3146}
3147
3148// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3149func (future *JobsDeleteFuture) UnmarshalJSON(body []byte) error {
3150	var azFuture azure.Future
3151	if err := json.Unmarshal(body, &azFuture); err != nil {
3152		return err
3153	}
3154	future.FutureAPI = &azFuture
3155	future.Result = future.result
3156	return nil
3157}
3158
3159// result is the default implementation for JobsDeleteFuture.Result.
3160func (future *JobsDeleteFuture) result(client JobsClient) (ar autorest.Response, err error) {
3161	var done bool
3162	done, err = future.DoneWithContext(context.Background(), client)
3163	if err != nil {
3164		err = autorest.NewErrorWithError(err, "databox.JobsDeleteFuture", "Result", future.Response(), "Polling failure")
3165		return
3166	}
3167	if !done {
3168		ar.Response = future.Response()
3169		err = azure.NewAsyncOpIncompleteError("databox.JobsDeleteFuture")
3170		return
3171	}
3172	ar.Response = future.Response()
3173	return
3174}
3175
3176// BasicJobSecrets the base class for the secrets
3177type BasicJobSecrets interface {
3178	AsDiskJobSecrets() (*DiskJobSecrets, bool)
3179	AsHeavyJobSecrets() (*HeavyJobSecrets, bool)
3180	AsJobSecretsType() (*JobSecretsType, bool)
3181	AsJobSecrets() (*JobSecrets, bool)
3182}
3183
3184// JobSecrets the base class for the secrets
3185type JobSecrets struct {
3186	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
3187	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
3188	// Error - READ-ONLY; Error while fetching the secrets.
3189	Error *CloudError `json:"error,omitempty"`
3190	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
3191	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
3192}
3193
3194func unmarshalBasicJobSecrets(body []byte) (BasicJobSecrets, error) {
3195	var m map[string]interface{}
3196	err := json.Unmarshal(body, &m)
3197	if err != nil {
3198		return nil, err
3199	}
3200
3201	switch m["jobSecretsType"] {
3202	case string(JobSecretsTypeDataBoxDisk):
3203		var djs DiskJobSecrets
3204		err := json.Unmarshal(body, &djs)
3205		return djs, err
3206	case string(JobSecretsTypeDataBoxHeavy):
3207		var hjs HeavyJobSecrets
3208		err := json.Unmarshal(body, &hjs)
3209		return hjs, err
3210	case string(JobSecretsTypeDataBox):
3211		var jst JobSecretsType
3212		err := json.Unmarshal(body, &jst)
3213		return jst, err
3214	default:
3215		var js JobSecrets
3216		err := json.Unmarshal(body, &js)
3217		return js, err
3218	}
3219}
3220func unmarshalBasicJobSecretsArray(body []byte) ([]BasicJobSecrets, error) {
3221	var rawMessages []*json.RawMessage
3222	err := json.Unmarshal(body, &rawMessages)
3223	if err != nil {
3224		return nil, err
3225	}
3226
3227	jsArray := make([]BasicJobSecrets, len(rawMessages))
3228
3229	for index, rawMessage := range rawMessages {
3230		js, err := unmarshalBasicJobSecrets(*rawMessage)
3231		if err != nil {
3232			return nil, err
3233		}
3234		jsArray[index] = js
3235	}
3236	return jsArray, nil
3237}
3238
3239// MarshalJSON is the custom marshaler for JobSecrets.
3240func (js JobSecrets) MarshalJSON() ([]byte, error) {
3241	js.JobSecretsType = JobSecretsTypeJobSecrets
3242	objectMap := make(map[string]interface{})
3243	if js.JobSecretsType != "" {
3244		objectMap["jobSecretsType"] = js.JobSecretsType
3245	}
3246	return json.Marshal(objectMap)
3247}
3248
3249// AsDiskJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3250func (js JobSecrets) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
3251	return nil, false
3252}
3253
3254// AsHeavyJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3255func (js JobSecrets) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
3256	return nil, false
3257}
3258
3259// AsJobSecretsType is the BasicJobSecrets implementation for JobSecrets.
3260func (js JobSecrets) AsJobSecretsType() (*JobSecretsType, bool) {
3261	return nil, false
3262}
3263
3264// AsJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3265func (js JobSecrets) AsJobSecrets() (*JobSecrets, bool) {
3266	return &js, true
3267}
3268
3269// AsBasicJobSecrets is the BasicJobSecrets implementation for JobSecrets.
3270func (js JobSecrets) AsBasicJobSecrets() (BasicJobSecrets, bool) {
3271	return &js, true
3272}
3273
3274// JobSecretsType the secrets related to a databox job.
3275type JobSecretsType struct {
3276	// PodSecrets - Contains the list of secret objects for a job.
3277	PodSecrets *[]Secret `json:"podSecrets,omitempty"`
3278	// DcAccessSecurityCode - READ-ONLY; Dc Access Security Code for Customer Managed Shipping
3279	DcAccessSecurityCode *DcAccessSecurityCode `json:"dcAccessSecurityCode,omitempty"`
3280	// Error - READ-ONLY; Error while fetching the secrets.
3281	Error *CloudError `json:"error,omitempty"`
3282	// JobSecretsType - Possible values include: 'JobSecretsTypeJobSecrets', 'JobSecretsTypeDataBoxDisk', 'JobSecretsTypeDataBoxHeavy', 'JobSecretsTypeDataBox'
3283	JobSecretsType JobSecretsTypeEnum `json:"jobSecretsType,omitempty"`
3284}
3285
3286// MarshalJSON is the custom marshaler for JobSecretsType.
3287func (jst JobSecretsType) MarshalJSON() ([]byte, error) {
3288	jst.JobSecretsType = JobSecretsTypeDataBox
3289	objectMap := make(map[string]interface{})
3290	if jst.PodSecrets != nil {
3291		objectMap["podSecrets"] = jst.PodSecrets
3292	}
3293	if jst.JobSecretsType != "" {
3294		objectMap["jobSecretsType"] = jst.JobSecretsType
3295	}
3296	return json.Marshal(objectMap)
3297}
3298
3299// AsDiskJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3300func (jst JobSecretsType) AsDiskJobSecrets() (*DiskJobSecrets, bool) {
3301	return nil, false
3302}
3303
3304// AsHeavyJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3305func (jst JobSecretsType) AsHeavyJobSecrets() (*HeavyJobSecrets, bool) {
3306	return nil, false
3307}
3308
3309// AsJobSecretsType is the BasicJobSecrets implementation for JobSecretsType.
3310func (jst JobSecretsType) AsJobSecretsType() (*JobSecretsType, bool) {
3311	return &jst, true
3312}
3313
3314// AsJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3315func (jst JobSecretsType) AsJobSecrets() (*JobSecrets, bool) {
3316	return nil, false
3317}
3318
3319// AsBasicJobSecrets is the BasicJobSecrets implementation for JobSecretsType.
3320func (jst JobSecretsType) AsBasicJobSecrets() (BasicJobSecrets, bool) {
3321	return &jst, true
3322}
3323
3324// JobStages job stages.
3325type JobStages struct {
3326	// 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'
3327	StageName StageName `json:"stageName,omitempty"`
3328	// DisplayName - READ-ONLY; Display name of the job stage.
3329	DisplayName *string `json:"displayName,omitempty"`
3330	// StageStatus - READ-ONLY; Status of the job stage. Possible values include: 'StageStatusNone', 'StageStatusInProgress', 'StageStatusSucceeded', 'StageStatusFailed', 'StageStatusCancelled', 'StageStatusCancelling', 'StageStatusSucceededWithErrors', 'StageStatusWaitingForCustomerAction', 'StageStatusSucceededWithWarnings'
3331	StageStatus StageStatus `json:"stageStatus,omitempty"`
3332	// StageTime - READ-ONLY; Time for the job stage in UTC ISO 8601 format.
3333	StageTime *date.Time `json:"stageTime,omitempty"`
3334	// JobStageDetails - READ-ONLY; Job Stage Details
3335	JobStageDetails interface{} `json:"jobStageDetails,omitempty"`
3336}
3337
3338// MarshalJSON is the custom marshaler for JobStages.
3339func (js JobStages) MarshalJSON() ([]byte, error) {
3340	objectMap := make(map[string]interface{})
3341	return json.Marshal(objectMap)
3342}
3343
3344// JobsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3345type JobsUpdateFuture struct {
3346	azure.FutureAPI
3347	// Result returns the result of the asynchronous operation.
3348	// If the operation has not completed it will return an error.
3349	Result func(JobsClient) (JobResource, error)
3350}
3351
3352// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3353func (future *JobsUpdateFuture) UnmarshalJSON(body []byte) error {
3354	var azFuture azure.Future
3355	if err := json.Unmarshal(body, &azFuture); err != nil {
3356		return err
3357	}
3358	future.FutureAPI = &azFuture
3359	future.Result = future.result
3360	return nil
3361}
3362
3363// result is the default implementation for JobsUpdateFuture.Result.
3364func (future *JobsUpdateFuture) result(client JobsClient) (jr JobResource, err error) {
3365	var done bool
3366	done, err = future.DoneWithContext(context.Background(), client)
3367	if err != nil {
3368		err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", future.Response(), "Polling failure")
3369		return
3370	}
3371	if !done {
3372		jr.Response.Response = future.Response()
3373		err = azure.NewAsyncOpIncompleteError("databox.JobsUpdateFuture")
3374		return
3375	}
3376	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3377	if jr.Response.Response, err = future.GetResult(sender); err == nil && jr.Response.Response.StatusCode != http.StatusNoContent {
3378		jr, err = client.UpdateResponder(jr.Response.Response)
3379		if err != nil {
3380			err = autorest.NewErrorWithError(err, "databox.JobsUpdateFuture", "Result", jr.Response.Response, "Failure responding to request")
3381		}
3382	}
3383	return
3384}
3385
3386// KeyEncryptionKey encryption key containing details about key to encrypt different keys.
3387type KeyEncryptionKey struct {
3388	// KekType - Type of encryption key used for key encryption. Possible values include: 'MicrosoftManaged', 'CustomerManaged'
3389	KekType KekType `json:"kekType,omitempty"`
3390	// KekURL - Key encryption key. It is required in case of Customer managed KekType.
3391	KekURL *string `json:"kekUrl,omitempty"`
3392	// KekVaultResourceID - Kek vault resource id. It is required in case of Customer managed KekType.
3393	KekVaultResourceID *string `json:"kekVaultResourceID,omitempty"`
3394}
3395
3396// ManagedDiskDetails details of the managed disks.
3397type ManagedDiskDetails struct {
3398	// ResourceGroupID - Resource Group Id of the compute disks.
3399	ResourceGroupID *string `json:"resourceGroupId,omitempty"`
3400	// StagingStorageAccountID - Resource Id of the storage account that can be used to copy the vhd for staging.
3401	StagingStorageAccountID *string `json:"stagingStorageAccountId,omitempty"`
3402	// 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 : @#\-$%^!+=;:_()]+
3403	SharePassword *string `json:"sharePassword,omitempty"`
3404	// DataAccountType - Possible values include: 'DataAccountTypeDataAccountDetails', 'DataAccountTypeManagedDisk', 'DataAccountTypeStorageAccount'
3405	DataAccountType DataAccountTypeBasicDataAccountDetails `json:"dataAccountType,omitempty"`
3406}
3407
3408// MarshalJSON is the custom marshaler for ManagedDiskDetails.
3409func (mdd ManagedDiskDetails) MarshalJSON() ([]byte, error) {
3410	mdd.DataAccountType = DataAccountTypeManagedDisk
3411	objectMap := make(map[string]interface{})
3412	if mdd.ResourceGroupID != nil {
3413		objectMap["resourceGroupId"] = mdd.ResourceGroupID
3414	}
3415	if mdd.StagingStorageAccountID != nil {
3416		objectMap["stagingStorageAccountId"] = mdd.StagingStorageAccountID
3417	}
3418	if mdd.SharePassword != nil {
3419		objectMap["sharePassword"] = mdd.SharePassword
3420	}
3421	if mdd.DataAccountType != "" {
3422		objectMap["dataAccountType"] = mdd.DataAccountType
3423	}
3424	return json.Marshal(objectMap)
3425}
3426
3427// AsManagedDiskDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3428func (mdd ManagedDiskDetails) AsManagedDiskDetails() (*ManagedDiskDetails, bool) {
3429	return &mdd, true
3430}
3431
3432// AsStorageAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3433func (mdd ManagedDiskDetails) AsStorageAccountDetails() (*StorageAccountDetails, bool) {
3434	return nil, false
3435}
3436
3437// AsDataAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3438func (mdd ManagedDiskDetails) AsDataAccountDetails() (*DataAccountDetails, bool) {
3439	return nil, false
3440}
3441
3442// AsBasicDataAccountDetails is the BasicDataAccountDetails implementation for ManagedDiskDetails.
3443func (mdd ManagedDiskDetails) AsBasicDataAccountDetails() (BasicDataAccountDetails, bool) {
3444	return &mdd, true
3445}
3446
3447// NotificationPreference notification preference for a job stage.
3448type NotificationPreference struct {
3449	// StageName - Name of the stage. Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy'
3450	StageName NotificationStageName `json:"stageName,omitempty"`
3451	// SendNotification - Notification is required or not.
3452	SendNotification *bool `json:"sendNotification,omitempty"`
3453}
3454
3455// Operation operation entity.
3456type Operation struct {
3457	// Name - READ-ONLY; Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
3458	Name *string `json:"name,omitempty"`
3459	// Display - READ-ONLY; Operation display values.
3460	Display *OperationDisplay `json:"display,omitempty"`
3461	// Properties - READ-ONLY; Operation properties.
3462	Properties interface{} `json:"properties,omitempty"`
3463	// Origin - READ-ONLY; Origin of the operation. Can be : user|system|user,system
3464	Origin *string `json:"origin,omitempty"`
3465	// IsDataAction - Indicates whether the operation is a data action
3466	IsDataAction *bool `json:"isDataAction,omitempty"`
3467}
3468
3469// MarshalJSON is the custom marshaler for Operation.
3470func (o Operation) MarshalJSON() ([]byte, error) {
3471	objectMap := make(map[string]interface{})
3472	if o.IsDataAction != nil {
3473		objectMap["isDataAction"] = o.IsDataAction
3474	}
3475	return json.Marshal(objectMap)
3476}
3477
3478// OperationDisplay operation display
3479type OperationDisplay struct {
3480	// Provider - Provider name.
3481	Provider *string `json:"provider,omitempty"`
3482	// Resource - Resource name.
3483	Resource *string `json:"resource,omitempty"`
3484	// Operation - Localized name of the operation for display purpose.
3485	Operation *string `json:"operation,omitempty"`
3486	// Description - Localized description of the operation for display purpose.
3487	Description *string `json:"description,omitempty"`
3488}
3489
3490// OperationList operation Collection.
3491type OperationList struct {
3492	autorest.Response `json:"-"`
3493	// Value - READ-ONLY; List of operations.
3494	Value *[]Operation `json:"value,omitempty"`
3495	// NextLink - Link for the next set of operations.
3496	NextLink *string `json:"nextLink,omitempty"`
3497}
3498
3499// MarshalJSON is the custom marshaler for OperationList.
3500func (ol OperationList) MarshalJSON() ([]byte, error) {
3501	objectMap := make(map[string]interface{})
3502	if ol.NextLink != nil {
3503		objectMap["nextLink"] = ol.NextLink
3504	}
3505	return json.Marshal(objectMap)
3506}
3507
3508// OperationListIterator provides access to a complete listing of Operation values.
3509type OperationListIterator struct {
3510	i    int
3511	page OperationListPage
3512}
3513
3514// NextWithContext advances to the next value.  If there was an error making
3515// the request the iterator does not advance and the error is returned.
3516func (iter *OperationListIterator) NextWithContext(ctx context.Context) (err error) {
3517	if tracing.IsEnabled() {
3518		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListIterator.NextWithContext")
3519		defer func() {
3520			sc := -1
3521			if iter.Response().Response.Response != nil {
3522				sc = iter.Response().Response.Response.StatusCode
3523			}
3524			tracing.EndSpan(ctx, sc, err)
3525		}()
3526	}
3527	iter.i++
3528	if iter.i < len(iter.page.Values()) {
3529		return nil
3530	}
3531	err = iter.page.NextWithContext(ctx)
3532	if err != nil {
3533		iter.i--
3534		return err
3535	}
3536	iter.i = 0
3537	return nil
3538}
3539
3540// Next advances to the next value.  If there was an error making
3541// the request the iterator does not advance and the error is returned.
3542// Deprecated: Use NextWithContext() instead.
3543func (iter *OperationListIterator) Next() error {
3544	return iter.NextWithContext(context.Background())
3545}
3546
3547// NotDone returns true if the enumeration should be started or is not yet complete.
3548func (iter OperationListIterator) NotDone() bool {
3549	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3550}
3551
3552// Response returns the raw server response from the last page request.
3553func (iter OperationListIterator) Response() OperationList {
3554	return iter.page.Response()
3555}
3556
3557// Value returns the current value or a zero-initialized value if the
3558// iterator has advanced beyond the end of the collection.
3559func (iter OperationListIterator) Value() Operation {
3560	if !iter.page.NotDone() {
3561		return Operation{}
3562	}
3563	return iter.page.Values()[iter.i]
3564}
3565
3566// Creates a new instance of the OperationListIterator type.
3567func NewOperationListIterator(page OperationListPage) OperationListIterator {
3568	return OperationListIterator{page: page}
3569}
3570
3571// IsEmpty returns true if the ListResult contains no values.
3572func (ol OperationList) IsEmpty() bool {
3573	return ol.Value == nil || len(*ol.Value) == 0
3574}
3575
3576// hasNextLink returns true if the NextLink is not empty.
3577func (ol OperationList) hasNextLink() bool {
3578	return ol.NextLink != nil && len(*ol.NextLink) != 0
3579}
3580
3581// operationListPreparer prepares a request to retrieve the next set of results.
3582// It returns nil if no more results exist.
3583func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) {
3584	if !ol.hasNextLink() {
3585		return nil, nil
3586	}
3587	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3588		autorest.AsJSON(),
3589		autorest.AsGet(),
3590		autorest.WithBaseURL(to.String(ol.NextLink)))
3591}
3592
3593// OperationListPage contains a page of Operation values.
3594type OperationListPage struct {
3595	fn func(context.Context, OperationList) (OperationList, error)
3596	ol OperationList
3597}
3598
3599// NextWithContext advances to the next page of values.  If there was an error making
3600// the request the page does not advance and the error is returned.
3601func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) {
3602	if tracing.IsEnabled() {
3603		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListPage.NextWithContext")
3604		defer func() {
3605			sc := -1
3606			if page.Response().Response.Response != nil {
3607				sc = page.Response().Response.Response.StatusCode
3608			}
3609			tracing.EndSpan(ctx, sc, err)
3610		}()
3611	}
3612	for {
3613		next, err := page.fn(ctx, page.ol)
3614		if err != nil {
3615			return err
3616		}
3617		page.ol = next
3618		if !next.hasNextLink() || !next.IsEmpty() {
3619			break
3620		}
3621	}
3622	return nil
3623}
3624
3625// Next advances to the next page of values.  If there was an error making
3626// the request the page does not advance and the error is returned.
3627// Deprecated: Use NextWithContext() instead.
3628func (page *OperationListPage) Next() error {
3629	return page.NextWithContext(context.Background())
3630}
3631
3632// NotDone returns true if the page enumeration should be started or is not yet complete.
3633func (page OperationListPage) NotDone() bool {
3634	return !page.ol.IsEmpty()
3635}
3636
3637// Response returns the raw server response from the last page request.
3638func (page OperationListPage) Response() OperationList {
3639	return page.ol
3640}
3641
3642// Values returns the slice of values for the current page or nil if there are no values.
3643func (page OperationListPage) Values() []Operation {
3644	if page.ol.IsEmpty() {
3645		return nil
3646	}
3647	return *page.ol.Value
3648}
3649
3650// Creates a new instance of the OperationListPage type.
3651func NewOperationListPage(cur OperationList, getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage {
3652	return OperationListPage{
3653		fn: getNextPage,
3654		ol: cur,
3655	}
3656}
3657
3658// PackageShippingDetails shipping details.
3659type PackageShippingDetails struct {
3660	// CarrierName - READ-ONLY; Name of the carrier.
3661	CarrierName *string `json:"carrierName,omitempty"`
3662	// TrackingID - READ-ONLY; Tracking Id of shipment.
3663	TrackingID *string `json:"trackingId,omitempty"`
3664	// TrackingURL - READ-ONLY; Url where shipment can be tracked.
3665	TrackingURL *string `json:"trackingUrl,omitempty"`
3666}
3667
3668// MarshalJSON is the custom marshaler for PackageShippingDetails.
3669func (psd PackageShippingDetails) MarshalJSON() ([]byte, error) {
3670	objectMap := make(map[string]interface{})
3671	return json.Marshal(objectMap)
3672}
3673
3674// Preferences preferences related to the order
3675type Preferences struct {
3676	// PreferredDataCenterRegion - Preferred data center region.
3677	PreferredDataCenterRegion *[]string `json:"preferredDataCenterRegion,omitempty"`
3678	// TransportPreferences - Preferences related to the shipment logistics of the sku.
3679	TransportPreferences *TransportPreferences `json:"transportPreferences,omitempty"`
3680}
3681
3682// PreferencesValidationRequest request to validate preference of transport and data center.
3683type PreferencesValidationRequest struct {
3684	// Preference - Preference of transport and data center.
3685	Preference *Preferences `json:"preference,omitempty"`
3686	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
3687	DeviceType SkuName `json:"deviceType,omitempty"`
3688	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
3689	ValidationType ValidationType `json:"validationType,omitempty"`
3690}
3691
3692// MarshalJSON is the custom marshaler for PreferencesValidationRequest.
3693func (pvr PreferencesValidationRequest) MarshalJSON() ([]byte, error) {
3694	pvr.ValidationType = ValidationTypeValidatePreferences
3695	objectMap := make(map[string]interface{})
3696	if pvr.Preference != nil {
3697		objectMap["preference"] = pvr.Preference
3698	}
3699	if pvr.DeviceType != "" {
3700		objectMap["deviceType"] = pvr.DeviceType
3701	}
3702	if pvr.ValidationType != "" {
3703		objectMap["validationType"] = pvr.ValidationType
3704	}
3705	return json.Marshal(objectMap)
3706}
3707
3708// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3709func (pvr PreferencesValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
3710	return nil, false
3711}
3712
3713// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3714func (pvr PreferencesValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
3715	return nil, false
3716}
3717
3718// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3719func (pvr PreferencesValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
3720	return &pvr, true
3721}
3722
3723// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3724func (pvr PreferencesValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
3725	return nil, false
3726}
3727
3728// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3729func (pvr PreferencesValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
3730	return nil, false
3731}
3732
3733// AsValidateAddress is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3734func (pvr PreferencesValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
3735	return nil, false
3736}
3737
3738// AsValidationInputRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3739func (pvr PreferencesValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
3740	return nil, false
3741}
3742
3743// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for PreferencesValidationRequest.
3744func (pvr PreferencesValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
3745	return &pvr, true
3746}
3747
3748// PreferencesValidationResponseProperties properties of data center and transport preference validation
3749// response.
3750type PreferencesValidationResponseProperties struct {
3751	// Status - READ-ONLY; Validation status of requested data center and transport. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
3752	Status ValidationStatus `json:"status,omitempty"`
3753	// Error - READ-ONLY; Error code and message of validation response.
3754	Error *CloudError `json:"error,omitempty"`
3755	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
3756	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
3757}
3758
3759// MarshalJSON is the custom marshaler for PreferencesValidationResponseProperties.
3760func (pvrp PreferencesValidationResponseProperties) MarshalJSON() ([]byte, error) {
3761	pvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences
3762	objectMap := make(map[string]interface{})
3763	if pvrp.ValidationType != "" {
3764		objectMap["validationType"] = pvrp.ValidationType
3765	}
3766	return json.Marshal(objectMap)
3767}
3768
3769// AsAddressValidationProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3770func (pvrp PreferencesValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
3771	return nil, false
3772}
3773
3774// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3775func (pvrp PreferencesValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
3776	return nil, false
3777}
3778
3779// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3780func (pvrp PreferencesValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
3781	return nil, false
3782}
3783
3784// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3785func (pvrp PreferencesValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
3786	return &pvrp, true
3787}
3788
3789// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3790func (pvrp PreferencesValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
3791	return nil, false
3792}
3793
3794// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3795func (pvrp PreferencesValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
3796	return nil, false
3797}
3798
3799// AsValidationInputResponse is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3800func (pvrp PreferencesValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
3801	return nil, false
3802}
3803
3804// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for PreferencesValidationResponseProperties.
3805func (pvrp PreferencesValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
3806	return &pvrp, true
3807}
3808
3809// RegionConfigurationRequest request body to get the configuration for the region.
3810type RegionConfigurationRequest struct {
3811	// ScheduleAvailabilityRequest - Request body to get the availability for scheduling orders.
3812	ScheduleAvailabilityRequest BasicScheduleAvailabilityRequest `json:"scheduleAvailabilityRequest,omitempty"`
3813	// TransportAvailabilityRequest - Request body to get the transport availability for given sku.
3814	TransportAvailabilityRequest *TransportAvailabilityRequest `json:"transportAvailabilityRequest,omitempty"`
3815}
3816
3817// UnmarshalJSON is the custom unmarshaler for RegionConfigurationRequest struct.
3818func (rcr *RegionConfigurationRequest) UnmarshalJSON(body []byte) error {
3819	var m map[string]*json.RawMessage
3820	err := json.Unmarshal(body, &m)
3821	if err != nil {
3822		return err
3823	}
3824	for k, v := range m {
3825		switch k {
3826		case "scheduleAvailabilityRequest":
3827			if v != nil {
3828				scheduleAvailabilityRequest, err := unmarshalBasicScheduleAvailabilityRequest(*v)
3829				if err != nil {
3830					return err
3831				}
3832				rcr.ScheduleAvailabilityRequest = scheduleAvailabilityRequest
3833			}
3834		case "transportAvailabilityRequest":
3835			if v != nil {
3836				var transportAvailabilityRequest TransportAvailabilityRequest
3837				err = json.Unmarshal(*v, &transportAvailabilityRequest)
3838				if err != nil {
3839					return err
3840				}
3841				rcr.TransportAvailabilityRequest = &transportAvailabilityRequest
3842			}
3843		}
3844	}
3845
3846	return nil
3847}
3848
3849// RegionConfigurationResponse configuration response specific to a region.
3850type RegionConfigurationResponse struct {
3851	autorest.Response `json:"-"`
3852	// ScheduleAvailabilityResponse - READ-ONLY; Schedule availability for given sku in a region.
3853	ScheduleAvailabilityResponse *ScheduleAvailabilityResponse `json:"scheduleAvailabilityResponse,omitempty"`
3854	// TransportAvailabilityResponse - READ-ONLY; Transport options available for given sku in a region.
3855	TransportAvailabilityResponse *TransportAvailabilityResponse `json:"transportAvailabilityResponse,omitempty"`
3856}
3857
3858// MarshalJSON is the custom marshaler for RegionConfigurationResponse.
3859func (rcr RegionConfigurationResponse) MarshalJSON() ([]byte, error) {
3860	objectMap := make(map[string]interface{})
3861	return json.Marshal(objectMap)
3862}
3863
3864// Resource model of the Resource.
3865type Resource struct {
3866	// 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.
3867	Location *string `json:"location,omitempty"`
3868	// 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).
3869	Tags map[string]*string `json:"tags"`
3870	// Sku - The sku type.
3871	Sku *Sku `json:"sku,omitempty"`
3872	// Identity - Msi identity of the resource
3873	Identity *ResourceIdentity `json:"identity,omitempty"`
3874}
3875
3876// MarshalJSON is the custom marshaler for Resource.
3877func (r Resource) MarshalJSON() ([]byte, error) {
3878	objectMap := make(map[string]interface{})
3879	if r.Location != nil {
3880		objectMap["location"] = r.Location
3881	}
3882	if r.Tags != nil {
3883		objectMap["tags"] = r.Tags
3884	}
3885	if r.Sku != nil {
3886		objectMap["sku"] = r.Sku
3887	}
3888	if r.Identity != nil {
3889		objectMap["identity"] = r.Identity
3890	}
3891	return json.Marshal(objectMap)
3892}
3893
3894// ResourceIdentity msi identity details of the resource
3895type ResourceIdentity struct {
3896	// Type - Identity type
3897	Type *string `json:"type,omitempty"`
3898	// PrincipalID - READ-ONLY; Service Principal Id backing the Msi
3899	PrincipalID *string `json:"principalId,omitempty"`
3900	// TenantID - READ-ONLY; Home Tenant Id
3901	TenantID *string `json:"tenantId,omitempty"`
3902}
3903
3904// MarshalJSON is the custom marshaler for ResourceIdentity.
3905func (ri ResourceIdentity) MarshalJSON() ([]byte, error) {
3906	objectMap := make(map[string]interface{})
3907	if ri.Type != nil {
3908		objectMap["type"] = ri.Type
3909	}
3910	return json.Marshal(objectMap)
3911}
3912
3913// BasicScheduleAvailabilityRequest request body to get the availability for scheduling orders.
3914type BasicScheduleAvailabilityRequest interface {
3915	AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool)
3916	AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool)
3917	AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool)
3918	AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool)
3919}
3920
3921// ScheduleAvailabilityRequest request body to get the availability for scheduling orders.
3922type ScheduleAvailabilityRequest struct {
3923	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
3924	StorageLocation *string `json:"storageLocation,omitempty"`
3925	// Country - Country in which storage location should be supported.
3926	Country *string `json:"country,omitempty"`
3927	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
3928	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
3929}
3930
3931func unmarshalBasicScheduleAvailabilityRequest(body []byte) (BasicScheduleAvailabilityRequest, error) {
3932	var m map[string]interface{}
3933	err := json.Unmarshal(body, &m)
3934	if err != nil {
3935		return nil, err
3936	}
3937
3938	switch m["skuName"] {
3939	case string(SkuNameDataBox):
3940		var sart ScheduleAvailabilityRequestType
3941		err := json.Unmarshal(body, &sart)
3942		return sart, err
3943	case string(SkuNameDataBoxDisk):
3944		var dsar DiskScheduleAvailabilityRequest
3945		err := json.Unmarshal(body, &dsar)
3946		return dsar, err
3947	case string(SkuNameDataBoxHeavy):
3948		var hsar HeavyScheduleAvailabilityRequest
3949		err := json.Unmarshal(body, &hsar)
3950		return hsar, err
3951	default:
3952		var sar ScheduleAvailabilityRequest
3953		err := json.Unmarshal(body, &sar)
3954		return sar, err
3955	}
3956}
3957func unmarshalBasicScheduleAvailabilityRequestArray(body []byte) ([]BasicScheduleAvailabilityRequest, error) {
3958	var rawMessages []*json.RawMessage
3959	err := json.Unmarshal(body, &rawMessages)
3960	if err != nil {
3961		return nil, err
3962	}
3963
3964	sarArray := make([]BasicScheduleAvailabilityRequest, len(rawMessages))
3965
3966	for index, rawMessage := range rawMessages {
3967		sar, err := unmarshalBasicScheduleAvailabilityRequest(*rawMessage)
3968		if err != nil {
3969			return nil, err
3970		}
3971		sarArray[index] = sar
3972	}
3973	return sarArray, nil
3974}
3975
3976// MarshalJSON is the custom marshaler for ScheduleAvailabilityRequest.
3977func (sar ScheduleAvailabilityRequest) MarshalJSON() ([]byte, error) {
3978	sar.SkuName = SkuNameScheduleAvailabilityRequest
3979	objectMap := make(map[string]interface{})
3980	if sar.StorageLocation != nil {
3981		objectMap["storageLocation"] = sar.StorageLocation
3982	}
3983	if sar.Country != nil {
3984		objectMap["country"] = sar.Country
3985	}
3986	if sar.SkuName != "" {
3987		objectMap["skuName"] = sar.SkuName
3988	}
3989	return json.Marshal(objectMap)
3990}
3991
3992// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
3993func (sar ScheduleAvailabilityRequest) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
3994	return nil, false
3995}
3996
3997// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
3998func (sar ScheduleAvailabilityRequest) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
3999	return nil, false
4000}
4001
4002// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4003func (sar ScheduleAvailabilityRequest) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
4004	return nil, false
4005}
4006
4007// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4008func (sar ScheduleAvailabilityRequest) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
4009	return &sar, true
4010}
4011
4012// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequest.
4013func (sar ScheduleAvailabilityRequest) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
4014	return &sar, true
4015}
4016
4017// ScheduleAvailabilityRequestType request body to get the availability for scheduling data box orders
4018// orders.
4019type ScheduleAvailabilityRequestType struct {
4020	// StorageLocation - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
4021	StorageLocation *string `json:"storageLocation,omitempty"`
4022	// Country - Country in which storage location should be supported.
4023	Country *string `json:"country,omitempty"`
4024	// SkuName - Possible values include: 'SkuNameScheduleAvailabilityRequest', 'SkuNameDataBox', 'SkuNameDataBoxDisk', 'SkuNameDataBoxHeavy'
4025	SkuName SkuNameBasicScheduleAvailabilityRequest `json:"skuName,omitempty"`
4026}
4027
4028// MarshalJSON is the custom marshaler for ScheduleAvailabilityRequestType.
4029func (sart ScheduleAvailabilityRequestType) MarshalJSON() ([]byte, error) {
4030	sart.SkuName = SkuNameDataBox
4031	objectMap := make(map[string]interface{})
4032	if sart.StorageLocation != nil {
4033		objectMap["storageLocation"] = sart.StorageLocation
4034	}
4035	if sart.Country != nil {
4036		objectMap["country"] = sart.Country
4037	}
4038	if sart.SkuName != "" {
4039		objectMap["skuName"] = sart.SkuName
4040	}
4041	return json.Marshal(objectMap)
4042}
4043
4044// AsScheduleAvailabilityRequestType is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4045func (sart ScheduleAvailabilityRequestType) AsScheduleAvailabilityRequestType() (*ScheduleAvailabilityRequestType, bool) {
4046	return &sart, true
4047}
4048
4049// AsDiskScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4050func (sart ScheduleAvailabilityRequestType) AsDiskScheduleAvailabilityRequest() (*DiskScheduleAvailabilityRequest, bool) {
4051	return nil, false
4052}
4053
4054// AsHeavyScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4055func (sart ScheduleAvailabilityRequestType) AsHeavyScheduleAvailabilityRequest() (*HeavyScheduleAvailabilityRequest, bool) {
4056	return nil, false
4057}
4058
4059// AsScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4060func (sart ScheduleAvailabilityRequestType) AsScheduleAvailabilityRequest() (*ScheduleAvailabilityRequest, bool) {
4061	return nil, false
4062}
4063
4064// AsBasicScheduleAvailabilityRequest is the BasicScheduleAvailabilityRequest implementation for ScheduleAvailabilityRequestType.
4065func (sart ScheduleAvailabilityRequestType) AsBasicScheduleAvailabilityRequest() (BasicScheduleAvailabilityRequest, bool) {
4066	return &sart, true
4067}
4068
4069// ScheduleAvailabilityResponse schedule availability for given sku in a region.
4070type ScheduleAvailabilityResponse struct {
4071	// AvailableDates - READ-ONLY; List of dates available to schedule
4072	AvailableDates *[]date.Time `json:"availableDates,omitempty"`
4073}
4074
4075// MarshalJSON is the custom marshaler for ScheduleAvailabilityResponse.
4076func (sar ScheduleAvailabilityResponse) MarshalJSON() ([]byte, error) {
4077	objectMap := make(map[string]interface{})
4078	return json.Marshal(objectMap)
4079}
4080
4081// Secret the secrets related to a DataBox.
4082type Secret struct {
4083	// DeviceSerialNumber - READ-ONLY; Serial number of the assigned device.
4084	DeviceSerialNumber *string `json:"deviceSerialNumber,omitempty"`
4085	// DevicePassword - READ-ONLY; Password for out of the box experience on device.
4086	DevicePassword *string `json:"devicePassword,omitempty"`
4087	// NetworkConfigurations - READ-ONLY; Network configuration of the appliance.
4088	NetworkConfigurations *[]ApplianceNetworkConfiguration `json:"networkConfigurations,omitempty"`
4089	// EncodedValidationCertPubKey - READ-ONLY; The base 64 encoded public key to authenticate with the device
4090	EncodedValidationCertPubKey *string `json:"encodedValidationCertPubKey,omitempty"`
4091	// AccountCredentialDetails - READ-ONLY; Per account level access credentials.
4092	AccountCredentialDetails *[]AccountCredentialDetails `json:"accountCredentialDetails,omitempty"`
4093}
4094
4095// MarshalJSON is the custom marshaler for Secret.
4096func (s Secret) MarshalJSON() ([]byte, error) {
4097	objectMap := make(map[string]interface{})
4098	return json.Marshal(objectMap)
4099}
4100
4101// ShareCredentialDetails credential details of the shares in account.
4102type ShareCredentialDetails struct {
4103	// ShareName - READ-ONLY; Name of the share.
4104	ShareName *string `json:"shareName,omitempty"`
4105	// ShareType - READ-ONLY; Type of the share. Possible values include: 'ShareDestinationFormatTypeUnknownType', 'ShareDestinationFormatTypeHCS', 'ShareDestinationFormatTypeBlockBlob', 'ShareDestinationFormatTypePageBlob', 'ShareDestinationFormatTypeAzureFile', 'ShareDestinationFormatTypeManagedDisk'
4106	ShareType ShareDestinationFormatType `json:"shareType,omitempty"`
4107	// UserName - READ-ONLY; User name for the share.
4108	UserName *string `json:"userName,omitempty"`
4109	// Password - READ-ONLY; Password for the share.
4110	Password *string `json:"password,omitempty"`
4111	// SupportedAccessProtocols - READ-ONLY; Access protocols supported on the device.
4112	SupportedAccessProtocols *[]AccessProtocol `json:"supportedAccessProtocols,omitempty"`
4113}
4114
4115// MarshalJSON is the custom marshaler for ShareCredentialDetails.
4116func (scd ShareCredentialDetails) MarshalJSON() ([]byte, error) {
4117	objectMap := make(map[string]interface{})
4118	return json.Marshal(objectMap)
4119}
4120
4121// ShipmentPickUpRequest shipment pick up request details.
4122type ShipmentPickUpRequest struct {
4123	// StartTime - Minimum date after which the pick up should commence, this must be in local time of pick up area.
4124	StartTime *date.Time `json:"startTime,omitempty"`
4125	// EndTime - Maximum date before which the pick up should commence, this must be in local time of pick up area.
4126	EndTime *date.Time `json:"endTime,omitempty"`
4127	// ShipmentLocation - Shipment Location in the pickup place. Eg.front desk
4128	ShipmentLocation *string `json:"shipmentLocation,omitempty"`
4129}
4130
4131// ShipmentPickUpResponse shipment pick up response.
4132type ShipmentPickUpResponse struct {
4133	autorest.Response `json:"-"`
4134	// ConfirmationNumber - READ-ONLY; Confirmation number for the pick up request.
4135	ConfirmationNumber *string `json:"confirmationNumber,omitempty"`
4136	// ReadyByTime - READ-ONLY; Time by which shipment should be ready for pick up, this is in local time of pick up area.
4137	ReadyByTime *date.Time `json:"readyByTime,omitempty"`
4138}
4139
4140// MarshalJSON is the custom marshaler for ShipmentPickUpResponse.
4141func (spur ShipmentPickUpResponse) MarshalJSON() ([]byte, error) {
4142	objectMap := make(map[string]interface{})
4143	return json.Marshal(objectMap)
4144}
4145
4146// ShippingAddress shipping address where customer wishes to receive the device.
4147type ShippingAddress struct {
4148	// StreetAddress1 - Street Address line 1.
4149	StreetAddress1 *string `json:"streetAddress1,omitempty"`
4150	// StreetAddress2 - Street Address line 2.
4151	StreetAddress2 *string `json:"streetAddress2,omitempty"`
4152	// StreetAddress3 - Street Address line 3.
4153	StreetAddress3 *string `json:"streetAddress3,omitempty"`
4154	// City - Name of the City.
4155	City *string `json:"city,omitempty"`
4156	// StateOrProvince - Name of the State or Province.
4157	StateOrProvince *string `json:"stateOrProvince,omitempty"`
4158	// Country - Name of the Country.
4159	Country *string `json:"country,omitempty"`
4160	// PostalCode - Postal code.
4161	PostalCode *string `json:"postalCode,omitempty"`
4162	// ZipExtendedCode - Extended Zip Code.
4163	ZipExtendedCode *string `json:"zipExtendedCode,omitempty"`
4164	// CompanyName - Name of the company.
4165	CompanyName *string `json:"companyName,omitempty"`
4166	// AddressType - Type of address. Possible values include: 'None', 'Residential', 'Commercial'
4167	AddressType AddressType `json:"addressType,omitempty"`
4168}
4169
4170// Sku the Sku.
4171type Sku struct {
4172	// Name - The sku name. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4173	Name SkuName `json:"name,omitempty"`
4174	// DisplayName - The display name of the sku.
4175	DisplayName *string `json:"displayName,omitempty"`
4176	// Family - The sku family.
4177	Family *string `json:"family,omitempty"`
4178}
4179
4180// SkuAvailabilityValidationRequest request to validate sku availability.
4181type SkuAvailabilityValidationRequest struct {
4182	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4183	DeviceType SkuName `json:"deviceType,omitempty"`
4184	// TransferType - Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'
4185	TransferType TransferType `json:"transferType,omitempty"`
4186	// 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
4187	Country *string `json:"country,omitempty"`
4188	// Location - Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01
4189	Location *string `json:"location,omitempty"`
4190	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4191	ValidationType ValidationType `json:"validationType,omitempty"`
4192}
4193
4194// MarshalJSON is the custom marshaler for SkuAvailabilityValidationRequest.
4195func (savr SkuAvailabilityValidationRequest) MarshalJSON() ([]byte, error) {
4196	savr.ValidationType = ValidationTypeValidateSkuAvailability
4197	objectMap := make(map[string]interface{})
4198	if savr.DeviceType != "" {
4199		objectMap["deviceType"] = savr.DeviceType
4200	}
4201	if savr.TransferType != "" {
4202		objectMap["transferType"] = savr.TransferType
4203	}
4204	if savr.Country != nil {
4205		objectMap["country"] = savr.Country
4206	}
4207	if savr.Location != nil {
4208		objectMap["location"] = savr.Location
4209	}
4210	if savr.ValidationType != "" {
4211		objectMap["validationType"] = savr.ValidationType
4212	}
4213	return json.Marshal(objectMap)
4214}
4215
4216// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4217func (savr SkuAvailabilityValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4218	return nil, false
4219}
4220
4221// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4222func (savr SkuAvailabilityValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4223	return nil, false
4224}
4225
4226// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4227func (savr SkuAvailabilityValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4228	return nil, false
4229}
4230
4231// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4232func (savr SkuAvailabilityValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4233	return &savr, true
4234}
4235
4236// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4237func (savr SkuAvailabilityValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4238	return nil, false
4239}
4240
4241// AsValidateAddress is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4242func (savr SkuAvailabilityValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
4243	return nil, false
4244}
4245
4246// AsValidationInputRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4247func (savr SkuAvailabilityValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4248	return nil, false
4249}
4250
4251// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for SkuAvailabilityValidationRequest.
4252func (savr SkuAvailabilityValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4253	return &savr, true
4254}
4255
4256// SkuAvailabilityValidationResponseProperties properties of sku availability validation response.
4257type SkuAvailabilityValidationResponseProperties struct {
4258	// Status - READ-ONLY; Sku availability validation status. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
4259	Status ValidationStatus `json:"status,omitempty"`
4260	// Error - READ-ONLY; Error code and message of validation response.
4261	Error *CloudError `json:"error,omitempty"`
4262	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4263	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
4264}
4265
4266// MarshalJSON is the custom marshaler for SkuAvailabilityValidationResponseProperties.
4267func (savrp SkuAvailabilityValidationResponseProperties) MarshalJSON() ([]byte, error) {
4268	savrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability
4269	objectMap := make(map[string]interface{})
4270	if savrp.ValidationType != "" {
4271		objectMap["validationType"] = savrp.ValidationType
4272	}
4273	return json.Marshal(objectMap)
4274}
4275
4276// AsAddressValidationProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4277func (savrp SkuAvailabilityValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
4278	return nil, false
4279}
4280
4281// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4282func (savrp SkuAvailabilityValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
4283	return nil, false
4284}
4285
4286// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4287func (savrp SkuAvailabilityValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
4288	return nil, false
4289}
4290
4291// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4292func (savrp SkuAvailabilityValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
4293	return nil, false
4294}
4295
4296// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4297func (savrp SkuAvailabilityValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
4298	return &savrp, true
4299}
4300
4301// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4302func (savrp SkuAvailabilityValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
4303	return nil, false
4304}
4305
4306// AsValidationInputResponse is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4307func (savrp SkuAvailabilityValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
4308	return nil, false
4309}
4310
4311// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for SkuAvailabilityValidationResponseProperties.
4312func (savrp SkuAvailabilityValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
4313	return &savrp, true
4314}
4315
4316// SkuCapacity capacity of the sku.
4317type SkuCapacity struct {
4318	// Usable - READ-ONLY; Usable capacity in TB.
4319	Usable *string `json:"usable,omitempty"`
4320	// Maximum - READ-ONLY; Maximum capacity in TB.
4321	Maximum *string `json:"maximum,omitempty"`
4322}
4323
4324// MarshalJSON is the custom marshaler for SkuCapacity.
4325func (sc SkuCapacity) MarshalJSON() ([]byte, error) {
4326	objectMap := make(map[string]interface{})
4327	return json.Marshal(objectMap)
4328}
4329
4330// SkuCost describes metadata for retrieving price info.
4331type SkuCost struct {
4332	// MeterID - READ-ONLY; Meter id of the Sku.
4333	MeterID *string `json:"meterId,omitempty"`
4334	// MeterType - READ-ONLY; The type of the meter.
4335	MeterType *string `json:"meterType,omitempty"`
4336	// 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.
4337	Multiplier *float64 `json:"multiplier,omitempty"`
4338}
4339
4340// MarshalJSON is the custom marshaler for SkuCost.
4341func (sc SkuCost) MarshalJSON() ([]byte, error) {
4342	objectMap := make(map[string]interface{})
4343	return json.Marshal(objectMap)
4344}
4345
4346// SkuInformation information of the sku.
4347type SkuInformation struct {
4348	// Sku - READ-ONLY; The Sku.
4349	Sku *Sku `json:"sku,omitempty"`
4350	// Enabled - READ-ONLY; The sku is enabled or not.
4351	Enabled *bool `json:"enabled,omitempty"`
4352	// SkuProperties - READ-ONLY; Properties of the sku.
4353	*SkuProperties `json:"properties,omitempty"`
4354}
4355
4356// MarshalJSON is the custom marshaler for SkuInformation.
4357func (si SkuInformation) MarshalJSON() ([]byte, error) {
4358	objectMap := make(map[string]interface{})
4359	return json.Marshal(objectMap)
4360}
4361
4362// UnmarshalJSON is the custom unmarshaler for SkuInformation struct.
4363func (si *SkuInformation) UnmarshalJSON(body []byte) error {
4364	var m map[string]*json.RawMessage
4365	err := json.Unmarshal(body, &m)
4366	if err != nil {
4367		return err
4368	}
4369	for k, v := range m {
4370		switch k {
4371		case "sku":
4372			if v != nil {
4373				var sku Sku
4374				err = json.Unmarshal(*v, &sku)
4375				if err != nil {
4376					return err
4377				}
4378				si.Sku = &sku
4379			}
4380		case "enabled":
4381			if v != nil {
4382				var enabled bool
4383				err = json.Unmarshal(*v, &enabled)
4384				if err != nil {
4385					return err
4386				}
4387				si.Enabled = &enabled
4388			}
4389		case "properties":
4390			if v != nil {
4391				var skuProperties SkuProperties
4392				err = json.Unmarshal(*v, &skuProperties)
4393				if err != nil {
4394					return err
4395				}
4396				si.SkuProperties = &skuProperties
4397			}
4398		}
4399	}
4400
4401	return nil
4402}
4403
4404// SkuProperties properties of the sku.
4405type SkuProperties struct {
4406	// DataLocationToServiceLocationMap - READ-ONLY; The map of data location to service location.
4407	DataLocationToServiceLocationMap *[]DataLocationToServiceLocationMap `json:"dataLocationToServiceLocationMap,omitempty"`
4408	// Capacity - READ-ONLY; Capacity of the Sku.
4409	Capacity *SkuCapacity `json:"capacity,omitempty"`
4410	// Costs - READ-ONLY; Cost of the Sku.
4411	Costs *[]SkuCost `json:"costs,omitempty"`
4412	// APIVersions - READ-ONLY; Api versions that support this Sku.
4413	APIVersions *[]string `json:"apiVersions,omitempty"`
4414	// DisabledReason - READ-ONLY; Reason why the Sku is disabled. Possible values include: 'SkuDisabledReasonNone', 'SkuDisabledReasonCountry', 'SkuDisabledReasonRegion', 'SkuDisabledReasonFeature', 'SkuDisabledReasonOfferType', 'SkuDisabledReasonNoSubscriptionInfo'
4415	DisabledReason SkuDisabledReason `json:"disabledReason,omitempty"`
4416	// DisabledReasonMessage - READ-ONLY; Message for why the Sku is disabled.
4417	DisabledReasonMessage *string `json:"disabledReasonMessage,omitempty"`
4418	// RequiredFeature - READ-ONLY; Required feature to access the sku.
4419	RequiredFeature *string `json:"requiredFeature,omitempty"`
4420}
4421
4422// MarshalJSON is the custom marshaler for SkuProperties.
4423func (sp SkuProperties) MarshalJSON() ([]byte, error) {
4424	objectMap := make(map[string]interface{})
4425	return json.Marshal(objectMap)
4426}
4427
4428// StorageAccountDetails details for the storage account.
4429type StorageAccountDetails struct {
4430	// StorageAccountID - Storage Account Resource Id.
4431	StorageAccountID *string `json:"storageAccountId,omitempty"`
4432	// 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 : @#\-$%^!+=;:_()]+
4433	SharePassword *string `json:"sharePassword,omitempty"`
4434	// DataAccountType - Possible values include: 'DataAccountTypeDataAccountDetails', 'DataAccountTypeManagedDisk', 'DataAccountTypeStorageAccount'
4435	DataAccountType DataAccountTypeBasicDataAccountDetails `json:"dataAccountType,omitempty"`
4436}
4437
4438// MarshalJSON is the custom marshaler for StorageAccountDetails.
4439func (sad StorageAccountDetails) MarshalJSON() ([]byte, error) {
4440	sad.DataAccountType = DataAccountTypeStorageAccount
4441	objectMap := make(map[string]interface{})
4442	if sad.StorageAccountID != nil {
4443		objectMap["storageAccountId"] = sad.StorageAccountID
4444	}
4445	if sad.SharePassword != nil {
4446		objectMap["sharePassword"] = sad.SharePassword
4447	}
4448	if sad.DataAccountType != "" {
4449		objectMap["dataAccountType"] = sad.DataAccountType
4450	}
4451	return json.Marshal(objectMap)
4452}
4453
4454// AsManagedDiskDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4455func (sad StorageAccountDetails) AsManagedDiskDetails() (*ManagedDiskDetails, bool) {
4456	return nil, false
4457}
4458
4459// AsStorageAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4460func (sad StorageAccountDetails) AsStorageAccountDetails() (*StorageAccountDetails, bool) {
4461	return &sad, true
4462}
4463
4464// AsDataAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4465func (sad StorageAccountDetails) AsDataAccountDetails() (*DataAccountDetails, bool) {
4466	return nil, false
4467}
4468
4469// AsBasicDataAccountDetails is the BasicDataAccountDetails implementation for StorageAccountDetails.
4470func (sad StorageAccountDetails) AsBasicDataAccountDetails() (BasicDataAccountDetails, bool) {
4471	return &sad, true
4472}
4473
4474// SubscriptionIsAllowedToCreateJobValidationRequest request to validate subscription permission to create
4475// jobs.
4476type SubscriptionIsAllowedToCreateJobValidationRequest struct {
4477	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4478	ValidationType ValidationType `json:"validationType,omitempty"`
4479}
4480
4481// MarshalJSON is the custom marshaler for SubscriptionIsAllowedToCreateJobValidationRequest.
4482func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) MarshalJSON() ([]byte, error) {
4483	siatcjvr.ValidationType = ValidationTypeValidateSubscriptionIsAllowedToCreateJob
4484	objectMap := make(map[string]interface{})
4485	if siatcjvr.ValidationType != "" {
4486		objectMap["validationType"] = siatcjvr.ValidationType
4487	}
4488	return json.Marshal(objectMap)
4489}
4490
4491// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4492func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4493	return nil, false
4494}
4495
4496// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4497func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4498	return nil, false
4499}
4500
4501// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4502func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4503	return nil, false
4504}
4505
4506// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4507func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4508	return nil, false
4509}
4510
4511// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4512func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4513	return &siatcjvr, true
4514}
4515
4516// AsValidateAddress is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4517func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsValidateAddress() (*ValidateAddress, bool) {
4518	return nil, false
4519}
4520
4521// AsValidationInputRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4522func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4523	return nil, false
4524}
4525
4526// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for SubscriptionIsAllowedToCreateJobValidationRequest.
4527func (siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4528	return &siatcjvr, true
4529}
4530
4531// SubscriptionIsAllowedToCreateJobValidationResponseProperties properties of subscription permission to
4532// create job validation response.
4533type SubscriptionIsAllowedToCreateJobValidationResponseProperties struct {
4534	// Status - READ-ONLY; Validation status of subscription permission to create job. Possible values include: 'ValidationStatusValid', 'ValidationStatusInvalid', 'ValidationStatusSkipped'
4535	Status ValidationStatus `json:"status,omitempty"`
4536	// Error - READ-ONLY; Error code and message of validation response.
4537	Error *CloudError `json:"error,omitempty"`
4538	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4539	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
4540}
4541
4542// MarshalJSON is the custom marshaler for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4543func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) MarshalJSON() ([]byte, error) {
4544	siatcjvrp.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob
4545	objectMap := make(map[string]interface{})
4546	if siatcjvrp.ValidationType != "" {
4547		objectMap["validationType"] = siatcjvrp.ValidationType
4548	}
4549	return json.Marshal(objectMap)
4550}
4551
4552// AsAddressValidationProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4553func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
4554	return nil, false
4555}
4556
4557// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4558func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
4559	return nil, false
4560}
4561
4562// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4563func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
4564	return nil, false
4565}
4566
4567// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4568func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
4569	return nil, false
4570}
4571
4572// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4573func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
4574	return nil, false
4575}
4576
4577// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4578func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
4579	return &siatcjvrp, true
4580}
4581
4582// AsValidationInputResponse is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4583func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsValidationInputResponse() (*ValidationInputResponse, bool) {
4584	return nil, false
4585}
4586
4587// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for SubscriptionIsAllowedToCreateJobValidationResponseProperties.
4588func (siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
4589	return &siatcjvrp, true
4590}
4591
4592// TransferAllDetails details to transfer all data.
4593type TransferAllDetails struct {
4594	// DataAccountType - Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'
4595	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
4596	// TransferAllBlobs - To indicate if all Azure blobs have to be transferred
4597	TransferAllBlobs *bool `json:"transferAllBlobs,omitempty"`
4598	// TransferAllFiles - To indicate if all Azure Files have to be transferred
4599	TransferAllFiles *bool `json:"transferAllFiles,omitempty"`
4600}
4601
4602// TransferConfiguration configuration for defining the transfer of data.
4603type TransferConfiguration struct {
4604	// TransferConfigurationType - Type of the configuration for transfer. Possible values include: 'TransferAll', 'TransferUsingFilter'
4605	TransferConfigurationType TransferConfigurationType `json:"transferConfigurationType,omitempty"`
4606	// TransferFilterDetails - Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.
4607	TransferFilterDetails *TransferConfigurationTransferFilterDetails `json:"transferFilterDetails,omitempty"`
4608	// TransferAllDetails - Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll
4609	TransferAllDetails *TransferConfigurationTransferAllDetails `json:"transferAllDetails,omitempty"`
4610}
4611
4612// TransferConfigurationTransferAllDetails map of filter type and the details to transfer all data. This
4613// field is required only if the TransferConfigurationType is given as TransferAll
4614type TransferConfigurationTransferAllDetails struct {
4615	// Include - Details to transfer all data.
4616	Include *TransferAllDetails `json:"include,omitempty"`
4617}
4618
4619// TransferConfigurationTransferFilterDetails map of filter type and the details to filter. This field is
4620// required only if the TransferConfigurationType is given as TransferUsingFilter.
4621type TransferConfigurationTransferFilterDetails struct {
4622	// Include - Details of the filtering the transfer of data.
4623	Include *TransferFilterDetails `json:"include,omitempty"`
4624}
4625
4626// TransferFilterDetails details of the filtering the transfer of data.
4627type TransferFilterDetails struct {
4628	// DataAccountType - Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'
4629	DataAccountType DataAccountType `json:"dataAccountType,omitempty"`
4630	// BlobFilterDetails - Filter details to transfer blobs.
4631	BlobFilterDetails *BlobFilterDetails `json:"blobFilterDetails,omitempty"`
4632	// AzureFileFilterDetails - Filter details to transfer Azure files.
4633	AzureFileFilterDetails *AzureFileFilterDetails `json:"azureFileFilterDetails,omitempty"`
4634	// FilterFileDetails - Details of the filter files to be used for data transfer.
4635	FilterFileDetails *[]FilterFileDetails `json:"filterFileDetails,omitempty"`
4636}
4637
4638// TransportAvailabilityDetails transport options availability details for given region.
4639type TransportAvailabilityDetails struct {
4640	// ShipmentType - READ-ONLY; Transport Shipment Type supported for given region. Possible values include: 'TransportShipmentTypesCustomerManaged', 'TransportShipmentTypesMicrosoftManaged'
4641	ShipmentType TransportShipmentTypes `json:"shipmentType,omitempty"`
4642}
4643
4644// MarshalJSON is the custom marshaler for TransportAvailabilityDetails.
4645func (tad TransportAvailabilityDetails) MarshalJSON() ([]byte, error) {
4646	objectMap := make(map[string]interface{})
4647	return json.Marshal(objectMap)
4648}
4649
4650// TransportAvailabilityRequest request body to get the transport availability for given sku.
4651type TransportAvailabilityRequest struct {
4652	// SkuName - Type of the device. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4653	SkuName SkuName `json:"skuName,omitempty"`
4654}
4655
4656// TransportAvailabilityResponse transport options available for given sku in a region.
4657type TransportAvailabilityResponse struct {
4658	// TransportAvailabilityDetails - READ-ONLY; List of transport availability details for given region
4659	TransportAvailabilityDetails *[]TransportAvailabilityDetails `json:"transportAvailabilityDetails,omitempty"`
4660}
4661
4662// MarshalJSON is the custom marshaler for TransportAvailabilityResponse.
4663func (tarVar TransportAvailabilityResponse) MarshalJSON() ([]byte, error) {
4664	objectMap := make(map[string]interface{})
4665	return json.Marshal(objectMap)
4666}
4667
4668// TransportPreferences preferences related to the shipment logistics of the sku
4669type TransportPreferences struct {
4670	// PreferredShipmentType - Indicates Shipment Logistics type that the customer preferred. Possible values include: 'TransportShipmentTypesCustomerManaged', 'TransportShipmentTypesMicrosoftManaged'
4671	PreferredShipmentType TransportShipmentTypes `json:"preferredShipmentType,omitempty"`
4672}
4673
4674// UnencryptedCredentials unencrypted credentials for accessing device.
4675type UnencryptedCredentials struct {
4676	// JobName - READ-ONLY; Name of the job.
4677	JobName *string `json:"jobName,omitempty"`
4678	// JobSecrets - READ-ONLY; Secrets related to this job.
4679	JobSecrets BasicJobSecrets `json:"jobSecrets,omitempty"`
4680}
4681
4682// MarshalJSON is the custom marshaler for UnencryptedCredentials.
4683func (uc UnencryptedCredentials) MarshalJSON() ([]byte, error) {
4684	objectMap := make(map[string]interface{})
4685	return json.Marshal(objectMap)
4686}
4687
4688// UnmarshalJSON is the custom unmarshaler for UnencryptedCredentials struct.
4689func (uc *UnencryptedCredentials) UnmarshalJSON(body []byte) error {
4690	var m map[string]*json.RawMessage
4691	err := json.Unmarshal(body, &m)
4692	if err != nil {
4693		return err
4694	}
4695	for k, v := range m {
4696		switch k {
4697		case "jobName":
4698			if v != nil {
4699				var jobName string
4700				err = json.Unmarshal(*v, &jobName)
4701				if err != nil {
4702					return err
4703				}
4704				uc.JobName = &jobName
4705			}
4706		case "jobSecrets":
4707			if v != nil {
4708				jobSecrets, err := unmarshalBasicJobSecrets(*v)
4709				if err != nil {
4710					return err
4711				}
4712				uc.JobSecrets = jobSecrets
4713			}
4714		}
4715	}
4716
4717	return nil
4718}
4719
4720// UnencryptedCredentialsList list of unencrypted credentials for accessing device.
4721type UnencryptedCredentialsList struct {
4722	autorest.Response `json:"-"`
4723	// Value - List of unencrypted credentials.
4724	Value *[]UnencryptedCredentials `json:"value,omitempty"`
4725	// NextLink - Link for the next set of unencrypted credentials.
4726	NextLink *string `json:"nextLink,omitempty"`
4727}
4728
4729// UpdateJobDetails job details for update.
4730type UpdateJobDetails struct {
4731	// ContactDetails - Contact details for notification and shipping.
4732	ContactDetails *ContactDetails `json:"contactDetails,omitempty"`
4733	// ShippingAddress - Shipping address of the customer.
4734	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
4735	// KeyEncryptionKey - Key encryption key for the job.
4736	KeyEncryptionKey *KeyEncryptionKey `json:"keyEncryptionKey,omitempty"`
4737}
4738
4739// UpdateJobProperties job Properties for update
4740type UpdateJobProperties struct {
4741	// Details - Details of a job to be updated.
4742	Details *UpdateJobDetails `json:"details,omitempty"`
4743}
4744
4745// ValidateAddress the requirements to validate customer address where the device needs to be shipped.
4746type ValidateAddress struct {
4747	// ShippingAddress - Shipping address of the customer.
4748	ShippingAddress *ShippingAddress `json:"shippingAddress,omitempty"`
4749	// DeviceType - Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
4750	DeviceType SkuName `json:"deviceType,omitempty"`
4751	// TransportPreferences - Preferences related to the shipment logistics of the sku.
4752	TransportPreferences *TransportPreferences `json:"transportPreferences,omitempty"`
4753	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4754	ValidationType ValidationType `json:"validationType,omitempty"`
4755}
4756
4757// MarshalJSON is the custom marshaler for ValidateAddress.
4758func (va ValidateAddress) MarshalJSON() ([]byte, error) {
4759	va.ValidationType = ValidationTypeValidateAddress
4760	objectMap := make(map[string]interface{})
4761	if va.ShippingAddress != nil {
4762		objectMap["shippingAddress"] = va.ShippingAddress
4763	}
4764	if va.DeviceType != "" {
4765		objectMap["deviceType"] = va.DeviceType
4766	}
4767	if va.TransportPreferences != nil {
4768		objectMap["transportPreferences"] = va.TransportPreferences
4769	}
4770	if va.ValidationType != "" {
4771		objectMap["validationType"] = va.ValidationType
4772	}
4773	return json.Marshal(objectMap)
4774}
4775
4776// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4777func (va ValidateAddress) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4778	return nil, false
4779}
4780
4781// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4782func (va ValidateAddress) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4783	return nil, false
4784}
4785
4786// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4787func (va ValidateAddress) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4788	return nil, false
4789}
4790
4791// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4792func (va ValidateAddress) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4793	return nil, false
4794}
4795
4796// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4797func (va ValidateAddress) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4798	return nil, false
4799}
4800
4801// AsValidateAddress is the BasicValidationInputRequest implementation for ValidateAddress.
4802func (va ValidateAddress) AsValidateAddress() (*ValidateAddress, bool) {
4803	return &va, true
4804}
4805
4806// AsValidationInputRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4807func (va ValidateAddress) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4808	return nil, false
4809}
4810
4811// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for ValidateAddress.
4812func (va ValidateAddress) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4813	return &va, true
4814}
4815
4816// BasicValidationInputRequest minimum fields that must be present in any type of validation request.
4817type BasicValidationInputRequest interface {
4818	AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool)
4819	AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool)
4820	AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool)
4821	AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool)
4822	AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool)
4823	AsValidateAddress() (*ValidateAddress, bool)
4824	AsValidationInputRequest() (*ValidationInputRequest, bool)
4825}
4826
4827// ValidationInputRequest minimum fields that must be present in any type of validation request.
4828type ValidationInputRequest struct {
4829	// ValidationType - Possible values include: 'ValidationTypeValidationInputRequest', 'ValidationTypeValidateCreateOrderLimit', 'ValidationTypeValidateDataTransferDetails', 'ValidationTypeValidatePreferences', 'ValidationTypeValidateSkuAvailability', 'ValidationTypeValidateSubscriptionIsAllowedToCreateJob', 'ValidationTypeValidateAddress'
4830	ValidationType ValidationType `json:"validationType,omitempty"`
4831}
4832
4833func unmarshalBasicValidationInputRequest(body []byte) (BasicValidationInputRequest, error) {
4834	var m map[string]interface{}
4835	err := json.Unmarshal(body, &m)
4836	if err != nil {
4837		return nil, err
4838	}
4839
4840	switch m["validationType"] {
4841	case string(ValidationTypeValidateCreateOrderLimit):
4842		var colfsvr CreateOrderLimitForSubscriptionValidationRequest
4843		err := json.Unmarshal(body, &colfsvr)
4844		return colfsvr, err
4845	case string(ValidationTypeValidateDataTransferDetails):
4846		var dtdvr DataTransferDetailsValidationRequest
4847		err := json.Unmarshal(body, &dtdvr)
4848		return dtdvr, err
4849	case string(ValidationTypeValidatePreferences):
4850		var pvr PreferencesValidationRequest
4851		err := json.Unmarshal(body, &pvr)
4852		return pvr, err
4853	case string(ValidationTypeValidateSkuAvailability):
4854		var savr SkuAvailabilityValidationRequest
4855		err := json.Unmarshal(body, &savr)
4856		return savr, err
4857	case string(ValidationTypeValidateSubscriptionIsAllowedToCreateJob):
4858		var siatcjvr SubscriptionIsAllowedToCreateJobValidationRequest
4859		err := json.Unmarshal(body, &siatcjvr)
4860		return siatcjvr, err
4861	case string(ValidationTypeValidateAddress):
4862		var va ValidateAddress
4863		err := json.Unmarshal(body, &va)
4864		return va, err
4865	default:
4866		var vir ValidationInputRequest
4867		err := json.Unmarshal(body, &vir)
4868		return vir, err
4869	}
4870}
4871func unmarshalBasicValidationInputRequestArray(body []byte) ([]BasicValidationInputRequest, error) {
4872	var rawMessages []*json.RawMessage
4873	err := json.Unmarshal(body, &rawMessages)
4874	if err != nil {
4875		return nil, err
4876	}
4877
4878	virArray := make([]BasicValidationInputRequest, len(rawMessages))
4879
4880	for index, rawMessage := range rawMessages {
4881		vir, err := unmarshalBasicValidationInputRequest(*rawMessage)
4882		if err != nil {
4883			return nil, err
4884		}
4885		virArray[index] = vir
4886	}
4887	return virArray, nil
4888}
4889
4890// MarshalJSON is the custom marshaler for ValidationInputRequest.
4891func (vir ValidationInputRequest) MarshalJSON() ([]byte, error) {
4892	vir.ValidationType = ValidationTypeValidationInputRequest
4893	objectMap := make(map[string]interface{})
4894	if vir.ValidationType != "" {
4895		objectMap["validationType"] = vir.ValidationType
4896	}
4897	return json.Marshal(objectMap)
4898}
4899
4900// AsCreateOrderLimitForSubscriptionValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4901func (vir ValidationInputRequest) AsCreateOrderLimitForSubscriptionValidationRequest() (*CreateOrderLimitForSubscriptionValidationRequest, bool) {
4902	return nil, false
4903}
4904
4905// AsDataTransferDetailsValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4906func (vir ValidationInputRequest) AsDataTransferDetailsValidationRequest() (*DataTransferDetailsValidationRequest, bool) {
4907	return nil, false
4908}
4909
4910// AsPreferencesValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4911func (vir ValidationInputRequest) AsPreferencesValidationRequest() (*PreferencesValidationRequest, bool) {
4912	return nil, false
4913}
4914
4915// AsSkuAvailabilityValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4916func (vir ValidationInputRequest) AsSkuAvailabilityValidationRequest() (*SkuAvailabilityValidationRequest, bool) {
4917	return nil, false
4918}
4919
4920// AsSubscriptionIsAllowedToCreateJobValidationRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4921func (vir ValidationInputRequest) AsSubscriptionIsAllowedToCreateJobValidationRequest() (*SubscriptionIsAllowedToCreateJobValidationRequest, bool) {
4922	return nil, false
4923}
4924
4925// AsValidateAddress is the BasicValidationInputRequest implementation for ValidationInputRequest.
4926func (vir ValidationInputRequest) AsValidateAddress() (*ValidateAddress, bool) {
4927	return nil, false
4928}
4929
4930// AsValidationInputRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4931func (vir ValidationInputRequest) AsValidationInputRequest() (*ValidationInputRequest, bool) {
4932	return &vir, true
4933}
4934
4935// AsBasicValidationInputRequest is the BasicValidationInputRequest implementation for ValidationInputRequest.
4936func (vir ValidationInputRequest) AsBasicValidationInputRequest() (BasicValidationInputRequest, bool) {
4937	return &vir, true
4938}
4939
4940// BasicValidationInputResponse minimum properties that should be present in each individual validation response.
4941type BasicValidationInputResponse interface {
4942	AsAddressValidationProperties() (*AddressValidationProperties, bool)
4943	AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool)
4944	AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool)
4945	AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool)
4946	AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool)
4947	AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool)
4948	AsValidationInputResponse() (*ValidationInputResponse, bool)
4949}
4950
4951// ValidationInputResponse minimum properties that should be present in each individual validation response.
4952type ValidationInputResponse struct {
4953	// Error - READ-ONLY; Error code and message of validation response.
4954	Error *CloudError `json:"error,omitempty"`
4955	// ValidationType - Possible values include: 'ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails', 'ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability', 'ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob'
4956	ValidationType ValidationTypeBasicValidationInputResponse `json:"validationType,omitempty"`
4957}
4958
4959func unmarshalBasicValidationInputResponse(body []byte) (BasicValidationInputResponse, error) {
4960	var m map[string]interface{}
4961	err := json.Unmarshal(body, &m)
4962	if err != nil {
4963		return nil, err
4964	}
4965
4966	switch m["validationType"] {
4967	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateAddress):
4968		var avp AddressValidationProperties
4969		err := json.Unmarshal(body, &avp)
4970		return avp, err
4971	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateCreateOrderLimit):
4972		var colfsvrp CreateOrderLimitForSubscriptionValidationResponseProperties
4973		err := json.Unmarshal(body, &colfsvrp)
4974		return colfsvrp, err
4975	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateDataTransferDetails):
4976		var dtdvrp DataTransferDetailsValidationResponseProperties
4977		err := json.Unmarshal(body, &dtdvrp)
4978		return dtdvrp, err
4979	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidatePreferences):
4980		var pvrp PreferencesValidationResponseProperties
4981		err := json.Unmarshal(body, &pvrp)
4982		return pvrp, err
4983	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateSkuAvailability):
4984		var savrp SkuAvailabilityValidationResponseProperties
4985		err := json.Unmarshal(body, &savrp)
4986		return savrp, err
4987	case string(ValidationTypeBasicValidationInputResponseValidationTypeValidateSubscriptionIsAllowedToCreateJob):
4988		var siatcjvrp SubscriptionIsAllowedToCreateJobValidationResponseProperties
4989		err := json.Unmarshal(body, &siatcjvrp)
4990		return siatcjvrp, err
4991	default:
4992		var vir ValidationInputResponse
4993		err := json.Unmarshal(body, &vir)
4994		return vir, err
4995	}
4996}
4997func unmarshalBasicValidationInputResponseArray(body []byte) ([]BasicValidationInputResponse, error) {
4998	var rawMessages []*json.RawMessage
4999	err := json.Unmarshal(body, &rawMessages)
5000	if err != nil {
5001		return nil, err
5002	}
5003
5004	virArray := make([]BasicValidationInputResponse, len(rawMessages))
5005
5006	for index, rawMessage := range rawMessages {
5007		vir, err := unmarshalBasicValidationInputResponse(*rawMessage)
5008		if err != nil {
5009			return nil, err
5010		}
5011		virArray[index] = vir
5012	}
5013	return virArray, nil
5014}
5015
5016// MarshalJSON is the custom marshaler for ValidationInputResponse.
5017func (vir ValidationInputResponse) MarshalJSON() ([]byte, error) {
5018	vir.ValidationType = ValidationTypeBasicValidationInputResponseValidationTypeValidationInputResponse
5019	objectMap := make(map[string]interface{})
5020	if vir.ValidationType != "" {
5021		objectMap["validationType"] = vir.ValidationType
5022	}
5023	return json.Marshal(objectMap)
5024}
5025
5026// AsAddressValidationProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5027func (vir ValidationInputResponse) AsAddressValidationProperties() (*AddressValidationProperties, bool) {
5028	return nil, false
5029}
5030
5031// AsCreateOrderLimitForSubscriptionValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5032func (vir ValidationInputResponse) AsCreateOrderLimitForSubscriptionValidationResponseProperties() (*CreateOrderLimitForSubscriptionValidationResponseProperties, bool) {
5033	return nil, false
5034}
5035
5036// AsDataTransferDetailsValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5037func (vir ValidationInputResponse) AsDataTransferDetailsValidationResponseProperties() (*DataTransferDetailsValidationResponseProperties, bool) {
5038	return nil, false
5039}
5040
5041// AsPreferencesValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5042func (vir ValidationInputResponse) AsPreferencesValidationResponseProperties() (*PreferencesValidationResponseProperties, bool) {
5043	return nil, false
5044}
5045
5046// AsSkuAvailabilityValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5047func (vir ValidationInputResponse) AsSkuAvailabilityValidationResponseProperties() (*SkuAvailabilityValidationResponseProperties, bool) {
5048	return nil, false
5049}
5050
5051// AsSubscriptionIsAllowedToCreateJobValidationResponseProperties is the BasicValidationInputResponse implementation for ValidationInputResponse.
5052func (vir ValidationInputResponse) AsSubscriptionIsAllowedToCreateJobValidationResponseProperties() (*SubscriptionIsAllowedToCreateJobValidationResponseProperties, bool) {
5053	return nil, false
5054}
5055
5056// AsValidationInputResponse is the BasicValidationInputResponse implementation for ValidationInputResponse.
5057func (vir ValidationInputResponse) AsValidationInputResponse() (*ValidationInputResponse, bool) {
5058	return &vir, true
5059}
5060
5061// AsBasicValidationInputResponse is the BasicValidationInputResponse implementation for ValidationInputResponse.
5062func (vir ValidationInputResponse) AsBasicValidationInputResponse() (BasicValidationInputResponse, bool) {
5063	return &vir, true
5064}
5065
5066// BasicValidationRequest minimum request requirement of any validation category.
5067type BasicValidationRequest interface {
5068	AsCreateJobValidations() (*CreateJobValidations, bool)
5069	AsValidationRequest() (*ValidationRequest, bool)
5070}
5071
5072// ValidationRequest minimum request requirement of any validation category.
5073type ValidationRequest struct {
5074	// IndividualRequestDetails - List of request details contain validationType and its request as key and value respectively.
5075	IndividualRequestDetails *[]BasicValidationInputRequest `json:"individualRequestDetails,omitempty"`
5076	// ValidationCategory - Possible values include: 'ValidationCategoryValidationRequest', 'ValidationCategoryJobCreationValidation'
5077	ValidationCategory ValidationCategory `json:"validationCategory,omitempty"`
5078}
5079
5080func unmarshalBasicValidationRequest(body []byte) (BasicValidationRequest, error) {
5081	var m map[string]interface{}
5082	err := json.Unmarshal(body, &m)
5083	if err != nil {
5084		return nil, err
5085	}
5086
5087	switch m["validationCategory"] {
5088	case string(ValidationCategoryJobCreationValidation):
5089		var cjv CreateJobValidations
5090		err := json.Unmarshal(body, &cjv)
5091		return cjv, err
5092	default:
5093		var vr ValidationRequest
5094		err := json.Unmarshal(body, &vr)
5095		return vr, err
5096	}
5097}
5098func unmarshalBasicValidationRequestArray(body []byte) ([]BasicValidationRequest, error) {
5099	var rawMessages []*json.RawMessage
5100	err := json.Unmarshal(body, &rawMessages)
5101	if err != nil {
5102		return nil, err
5103	}
5104
5105	vrArray := make([]BasicValidationRequest, len(rawMessages))
5106
5107	for index, rawMessage := range rawMessages {
5108		vr, err := unmarshalBasicValidationRequest(*rawMessage)
5109		if err != nil {
5110			return nil, err
5111		}
5112		vrArray[index] = vr
5113	}
5114	return vrArray, nil
5115}
5116
5117// MarshalJSON is the custom marshaler for ValidationRequest.
5118func (vr ValidationRequest) MarshalJSON() ([]byte, error) {
5119	vr.ValidationCategory = ValidationCategoryValidationRequest
5120	objectMap := make(map[string]interface{})
5121	if vr.IndividualRequestDetails != nil {
5122		objectMap["individualRequestDetails"] = vr.IndividualRequestDetails
5123	}
5124	if vr.ValidationCategory != "" {
5125		objectMap["validationCategory"] = vr.ValidationCategory
5126	}
5127	return json.Marshal(objectMap)
5128}
5129
5130// AsCreateJobValidations is the BasicValidationRequest implementation for ValidationRequest.
5131func (vr ValidationRequest) AsCreateJobValidations() (*CreateJobValidations, bool) {
5132	return nil, false
5133}
5134
5135// AsValidationRequest is the BasicValidationRequest implementation for ValidationRequest.
5136func (vr ValidationRequest) AsValidationRequest() (*ValidationRequest, bool) {
5137	return &vr, true
5138}
5139
5140// AsBasicValidationRequest is the BasicValidationRequest implementation for ValidationRequest.
5141func (vr ValidationRequest) AsBasicValidationRequest() (BasicValidationRequest, bool) {
5142	return &vr, true
5143}
5144
5145// UnmarshalJSON is the custom unmarshaler for ValidationRequest struct.
5146func (vr *ValidationRequest) UnmarshalJSON(body []byte) error {
5147	var m map[string]*json.RawMessage
5148	err := json.Unmarshal(body, &m)
5149	if err != nil {
5150		return err
5151	}
5152	for k, v := range m {
5153		switch k {
5154		case "individualRequestDetails":
5155			if v != nil {
5156				individualRequestDetails, err := unmarshalBasicValidationInputRequestArray(*v)
5157				if err != nil {
5158					return err
5159				}
5160				vr.IndividualRequestDetails = &individualRequestDetails
5161			}
5162		case "validationCategory":
5163			if v != nil {
5164				var validationCategory ValidationCategory
5165				err = json.Unmarshal(*v, &validationCategory)
5166				if err != nil {
5167					return err
5168				}
5169				vr.ValidationCategory = validationCategory
5170			}
5171		}
5172	}
5173
5174	return nil
5175}
5176
5177// ValidationResponse response of pre job creation validations.
5178type ValidationResponse struct {
5179	autorest.Response `json:"-"`
5180	// ValidationResponseProperties - READ-ONLY; Properties of pre job creation validation response.
5181	*ValidationResponseProperties `json:"properties,omitempty"`
5182}
5183
5184// MarshalJSON is the custom marshaler for ValidationResponse.
5185func (vr ValidationResponse) MarshalJSON() ([]byte, error) {
5186	objectMap := make(map[string]interface{})
5187	return json.Marshal(objectMap)
5188}
5189
5190// UnmarshalJSON is the custom unmarshaler for ValidationResponse struct.
5191func (vr *ValidationResponse) UnmarshalJSON(body []byte) error {
5192	var m map[string]*json.RawMessage
5193	err := json.Unmarshal(body, &m)
5194	if err != nil {
5195		return err
5196	}
5197	for k, v := range m {
5198		switch k {
5199		case "properties":
5200			if v != nil {
5201				var validationResponseProperties ValidationResponseProperties
5202				err = json.Unmarshal(*v, &validationResponseProperties)
5203				if err != nil {
5204					return err
5205				}
5206				vr.ValidationResponseProperties = &validationResponseProperties
5207			}
5208		}
5209	}
5210
5211	return nil
5212}
5213
5214// ValidationResponseProperties properties of pre job creation validation response.
5215type ValidationResponseProperties struct {
5216	// Status - READ-ONLY; Overall validation status. Possible values include: 'AllValidToProceed', 'InputsRevisitRequired', 'CertainInputValidationsSkipped'
5217	Status OverallValidationStatus `json:"status,omitempty"`
5218	// IndividualResponseDetails - READ-ONLY; List of response details contain validationType and its response as key and value respectively.
5219	IndividualResponseDetails *[]BasicValidationInputResponse `json:"individualResponseDetails,omitempty"`
5220}
5221
5222// MarshalJSON is the custom marshaler for ValidationResponseProperties.
5223func (vrp ValidationResponseProperties) MarshalJSON() ([]byte, error) {
5224	objectMap := make(map[string]interface{})
5225	return json.Marshal(objectMap)
5226}
5227
5228// UnmarshalJSON is the custom unmarshaler for ValidationResponseProperties struct.
5229func (vrp *ValidationResponseProperties) UnmarshalJSON(body []byte) error {
5230	var m map[string]*json.RawMessage
5231	err := json.Unmarshal(body, &m)
5232	if err != nil {
5233		return err
5234	}
5235	for k, v := range m {
5236		switch k {
5237		case "status":
5238			if v != nil {
5239				var status OverallValidationStatus
5240				err = json.Unmarshal(*v, &status)
5241				if err != nil {
5242					return err
5243				}
5244				vrp.Status = status
5245			}
5246		case "individualResponseDetails":
5247			if v != nil {
5248				individualResponseDetails, err := unmarshalBasicValidationInputResponseArray(*v)
5249				if err != nil {
5250					return err
5251				}
5252				vrp.IndividualResponseDetails = &individualResponseDetails
5253			}
5254		}
5255	}
5256
5257	return nil
5258}
5259