1package storagesync
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/storagesync/mgmt/2019-06-01/storagesync"
22
23// APIError error type
24type APIError struct {
25	// Code - Error code of the given entry.
26	Code *string `json:"code,omitempty"`
27	// Message - Error message of the given entry.
28	Message *string `json:"message,omitempty"`
29	// Target - Target of the given error entry.
30	Target *string `json:"target,omitempty"`
31	// Details - Error details of the given entry.
32	Details *ErrorDetails `json:"details,omitempty"`
33}
34
35// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
36type AzureEntityResource struct {
37	// Etag - READ-ONLY; Resource Etag.
38	Etag *string `json:"etag,omitempty"`
39	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
40	ID *string `json:"id,omitempty"`
41	// Name - READ-ONLY; The name of the resource
42	Name *string `json:"name,omitempty"`
43	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
44	Type *string `json:"type,omitempty"`
45}
46
47// MarshalJSON is the custom marshaler for AzureEntityResource.
48func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
49	objectMap := make(map[string]interface{})
50	return json.Marshal(objectMap)
51}
52
53// BackupRequest backup request
54type BackupRequest struct {
55	// AzureFileShare - Azure File Share.
56	AzureFileShare *string `json:"azureFileShare,omitempty"`
57}
58
59// CheckNameAvailabilityParameters parameters for a check name availability request.
60type CheckNameAvailabilityParameters struct {
61	// Name - The name to check for availability
62	Name *string `json:"name,omitempty"`
63	// Type - The resource type. Must be set to Microsoft.StorageSync/storageSyncServices
64	Type *string `json:"type,omitempty"`
65}
66
67// CheckNameAvailabilityResult the CheckNameAvailability operation response.
68type CheckNameAvailabilityResult struct {
69	autorest.Response `json:"-"`
70	// NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used.
71	NameAvailable *bool `json:"nameAvailable,omitempty"`
72	// Reason - READ-ONLY; Gets the reason that a Storage Sync Service name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'Invalid', 'AlreadyExists'
73	Reason NameAvailabilityReason `json:"reason,omitempty"`
74	// Message - READ-ONLY; Gets an error message explaining the Reason value in more detail.
75	Message *string `json:"message,omitempty"`
76}
77
78// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult.
79func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) {
80	objectMap := make(map[string]interface{})
81	return json.Marshal(objectMap)
82}
83
84// CloudEndpoint cloud Endpoint object.
85type CloudEndpoint struct {
86	autorest.Response `json:"-"`
87	// CloudEndpointProperties - Cloud Endpoint properties.
88	*CloudEndpointProperties `json:"properties,omitempty"`
89	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
90	ID *string `json:"id,omitempty"`
91	// Name - READ-ONLY; The name of the resource
92	Name *string `json:"name,omitempty"`
93	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
94	Type *string `json:"type,omitempty"`
95}
96
97// MarshalJSON is the custom marshaler for CloudEndpoint.
98func (ce CloudEndpoint) MarshalJSON() ([]byte, error) {
99	objectMap := make(map[string]interface{})
100	if ce.CloudEndpointProperties != nil {
101		objectMap["properties"] = ce.CloudEndpointProperties
102	}
103	return json.Marshal(objectMap)
104}
105
106// UnmarshalJSON is the custom unmarshaler for CloudEndpoint struct.
107func (ce *CloudEndpoint) UnmarshalJSON(body []byte) error {
108	var m map[string]*json.RawMessage
109	err := json.Unmarshal(body, &m)
110	if err != nil {
111		return err
112	}
113	for k, v := range m {
114		switch k {
115		case "properties":
116			if v != nil {
117				var cloudEndpointProperties CloudEndpointProperties
118				err = json.Unmarshal(*v, &cloudEndpointProperties)
119				if err != nil {
120					return err
121				}
122				ce.CloudEndpointProperties = &cloudEndpointProperties
123			}
124		case "id":
125			if v != nil {
126				var ID string
127				err = json.Unmarshal(*v, &ID)
128				if err != nil {
129					return err
130				}
131				ce.ID = &ID
132			}
133		case "name":
134			if v != nil {
135				var name string
136				err = json.Unmarshal(*v, &name)
137				if err != nil {
138					return err
139				}
140				ce.Name = &name
141			}
142		case "type":
143			if v != nil {
144				var typeVar string
145				err = json.Unmarshal(*v, &typeVar)
146				if err != nil {
147					return err
148				}
149				ce.Type = &typeVar
150			}
151		}
152	}
153
154	return nil
155}
156
157// CloudEndpointArray array of CloudEndpoint
158type CloudEndpointArray struct {
159	autorest.Response `json:"-"`
160	// Value - Collection of CloudEndpoint.
161	Value *[]CloudEndpoint `json:"value,omitempty"`
162}
163
164// CloudEndpointCreateParameters the parameters used when creating a cloud endpoint.
165type CloudEndpointCreateParameters struct {
166	// CloudEndpointCreateParametersProperties - The parameters used to create the cloud endpoint.
167	*CloudEndpointCreateParametersProperties `json:"properties,omitempty"`
168	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
169	ID *string `json:"id,omitempty"`
170	// Name - READ-ONLY; The name of the resource
171	Name *string `json:"name,omitempty"`
172	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
173	Type *string `json:"type,omitempty"`
174}
175
176// MarshalJSON is the custom marshaler for CloudEndpointCreateParameters.
177func (cecp CloudEndpointCreateParameters) MarshalJSON() ([]byte, error) {
178	objectMap := make(map[string]interface{})
179	if cecp.CloudEndpointCreateParametersProperties != nil {
180		objectMap["properties"] = cecp.CloudEndpointCreateParametersProperties
181	}
182	return json.Marshal(objectMap)
183}
184
185// UnmarshalJSON is the custom unmarshaler for CloudEndpointCreateParameters struct.
186func (cecp *CloudEndpointCreateParameters) UnmarshalJSON(body []byte) error {
187	var m map[string]*json.RawMessage
188	err := json.Unmarshal(body, &m)
189	if err != nil {
190		return err
191	}
192	for k, v := range m {
193		switch k {
194		case "properties":
195			if v != nil {
196				var cloudEndpointCreateParametersProperties CloudEndpointCreateParametersProperties
197				err = json.Unmarshal(*v, &cloudEndpointCreateParametersProperties)
198				if err != nil {
199					return err
200				}
201				cecp.CloudEndpointCreateParametersProperties = &cloudEndpointCreateParametersProperties
202			}
203		case "id":
204			if v != nil {
205				var ID string
206				err = json.Unmarshal(*v, &ID)
207				if err != nil {
208					return err
209				}
210				cecp.ID = &ID
211			}
212		case "name":
213			if v != nil {
214				var name string
215				err = json.Unmarshal(*v, &name)
216				if err != nil {
217					return err
218				}
219				cecp.Name = &name
220			}
221		case "type":
222			if v != nil {
223				var typeVar string
224				err = json.Unmarshal(*v, &typeVar)
225				if err != nil {
226					return err
227				}
228				cecp.Type = &typeVar
229			}
230		}
231	}
232
233	return nil
234}
235
236// CloudEndpointCreateParametersProperties cloudEndpoint Properties object.
237type CloudEndpointCreateParametersProperties struct {
238	// StorageAccountResourceID - Storage Account Resource Id
239	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
240	// AzureFileShareName - Azure file share name
241	AzureFileShareName *string `json:"azureFileShareName,omitempty"`
242	// StorageAccountTenantID - Storage Account Tenant Id
243	StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"`
244	// FriendlyName - Friendly Name
245	FriendlyName *string `json:"friendlyName,omitempty"`
246}
247
248// CloudEndpointProperties cloudEndpoint Properties object.
249type CloudEndpointProperties struct {
250	// StorageAccountResourceID - Storage Account Resource Id
251	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
252	// AzureFileShareName - Azure file share name
253	AzureFileShareName *string `json:"azureFileShareName,omitempty"`
254	// StorageAccountTenantID - Storage Account Tenant Id
255	StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"`
256	// PartnershipID - Partnership Id
257	PartnershipID *string `json:"partnershipId,omitempty"`
258	// FriendlyName - Friendly Name
259	FriendlyName *string `json:"friendlyName,omitempty"`
260	// BackupEnabled - READ-ONLY; Backup Enabled
261	BackupEnabled *string `json:"backupEnabled,omitempty"`
262	// ProvisioningState - CloudEndpoint Provisioning State
263	ProvisioningState *string `json:"provisioningState,omitempty"`
264	// LastWorkflowID - CloudEndpoint lastWorkflowId
265	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
266	// LastOperationName - Resource Last Operation Name
267	LastOperationName *string `json:"lastOperationName,omitempty"`
268}
269
270// MarshalJSON is the custom marshaler for CloudEndpointProperties.
271func (cep CloudEndpointProperties) MarshalJSON() ([]byte, error) {
272	objectMap := make(map[string]interface{})
273	if cep.StorageAccountResourceID != nil {
274		objectMap["storageAccountResourceId"] = cep.StorageAccountResourceID
275	}
276	if cep.AzureFileShareName != nil {
277		objectMap["azureFileShareName"] = cep.AzureFileShareName
278	}
279	if cep.StorageAccountTenantID != nil {
280		objectMap["storageAccountTenantId"] = cep.StorageAccountTenantID
281	}
282	if cep.PartnershipID != nil {
283		objectMap["partnershipId"] = cep.PartnershipID
284	}
285	if cep.FriendlyName != nil {
286		objectMap["friendlyName"] = cep.FriendlyName
287	}
288	if cep.ProvisioningState != nil {
289		objectMap["provisioningState"] = cep.ProvisioningState
290	}
291	if cep.LastWorkflowID != nil {
292		objectMap["lastWorkflowId"] = cep.LastWorkflowID
293	}
294	if cep.LastOperationName != nil {
295		objectMap["lastOperationName"] = cep.LastOperationName
296	}
297	return json.Marshal(objectMap)
298}
299
300// CloudEndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
301// operation.
302type CloudEndpointsCreateFuture struct {
303	azure.FutureAPI
304	// Result returns the result of the asynchronous operation.
305	// If the operation has not completed it will return an error.
306	Result func(CloudEndpointsClient) (CloudEndpoint, error)
307}
308
309// UnmarshalJSON is the custom unmarshaller for CreateFuture.
310func (future *CloudEndpointsCreateFuture) UnmarshalJSON(body []byte) error {
311	var azFuture azure.Future
312	if err := json.Unmarshal(body, &azFuture); err != nil {
313		return err
314	}
315	future.FutureAPI = &azFuture
316	future.Result = future.result
317	return nil
318}
319
320// result is the default implementation for CloudEndpointsCreateFuture.Result.
321func (future *CloudEndpointsCreateFuture) result(client CloudEndpointsClient) (ce CloudEndpoint, err error) {
322	var done bool
323	done, err = future.DoneWithContext(context.Background(), client)
324	if err != nil {
325		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsCreateFuture", "Result", future.Response(), "Polling failure")
326		return
327	}
328	if !done {
329		ce.Response.Response = future.Response()
330		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsCreateFuture")
331		return
332	}
333	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
334	if ce.Response.Response, err = future.GetResult(sender); err == nil && ce.Response.Response.StatusCode != http.StatusNoContent {
335		ce, err = client.CreateResponder(ce.Response.Response)
336		if err != nil {
337			err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsCreateFuture", "Result", ce.Response.Response, "Failure responding to request")
338		}
339	}
340	return
341}
342
343// CloudEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
344// operation.
345type CloudEndpointsDeleteFuture struct {
346	azure.FutureAPI
347	// Result returns the result of the asynchronous operation.
348	// If the operation has not completed it will return an error.
349	Result func(CloudEndpointsClient) (autorest.Response, error)
350}
351
352// UnmarshalJSON is the custom unmarshaller for CreateFuture.
353func (future *CloudEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
354	var azFuture azure.Future
355	if err := json.Unmarshal(body, &azFuture); err != nil {
356		return err
357	}
358	future.FutureAPI = &azFuture
359	future.Result = future.result
360	return nil
361}
362
363// result is the default implementation for CloudEndpointsDeleteFuture.Result.
364func (future *CloudEndpointsDeleteFuture) result(client CloudEndpointsClient) (ar autorest.Response, err error) {
365	var done bool
366	done, err = future.DoneWithContext(context.Background(), client)
367	if err != nil {
368		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
369		return
370	}
371	if !done {
372		ar.Response = future.Response()
373		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsDeleteFuture")
374		return
375	}
376	ar.Response = future.Response()
377	return
378}
379
380// CloudEndpointsPostBackupFuture an abstraction for monitoring and retrieving the results of a
381// long-running operation.
382type CloudEndpointsPostBackupFuture struct {
383	azure.FutureAPI
384	// Result returns the result of the asynchronous operation.
385	// If the operation has not completed it will return an error.
386	Result func(CloudEndpointsClient) (PostBackupResponse, error)
387}
388
389// UnmarshalJSON is the custom unmarshaller for CreateFuture.
390func (future *CloudEndpointsPostBackupFuture) UnmarshalJSON(body []byte) error {
391	var azFuture azure.Future
392	if err := json.Unmarshal(body, &azFuture); err != nil {
393		return err
394	}
395	future.FutureAPI = &azFuture
396	future.Result = future.result
397	return nil
398}
399
400// result is the default implementation for CloudEndpointsPostBackupFuture.Result.
401func (future *CloudEndpointsPostBackupFuture) result(client CloudEndpointsClient) (pbr PostBackupResponse, err error) {
402	var done bool
403	done, err = future.DoneWithContext(context.Background(), client)
404	if err != nil {
405		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsPostBackupFuture", "Result", future.Response(), "Polling failure")
406		return
407	}
408	if !done {
409		pbr.Response.Response = future.Response()
410		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsPostBackupFuture")
411		return
412	}
413	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
414	if pbr.Response.Response, err = future.GetResult(sender); err == nil && pbr.Response.Response.StatusCode != http.StatusNoContent {
415		pbr, err = client.PostBackupResponder(pbr.Response.Response)
416		if err != nil {
417			err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsPostBackupFuture", "Result", pbr.Response.Response, "Failure responding to request")
418		}
419	}
420	return
421}
422
423// CloudEndpointsPostRestoreFuture an abstraction for monitoring and retrieving the results of a
424// long-running operation.
425type CloudEndpointsPostRestoreFuture struct {
426	azure.FutureAPI
427	// Result returns the result of the asynchronous operation.
428	// If the operation has not completed it will return an error.
429	Result func(CloudEndpointsClient) (autorest.Response, error)
430}
431
432// UnmarshalJSON is the custom unmarshaller for CreateFuture.
433func (future *CloudEndpointsPostRestoreFuture) UnmarshalJSON(body []byte) error {
434	var azFuture azure.Future
435	if err := json.Unmarshal(body, &azFuture); err != nil {
436		return err
437	}
438	future.FutureAPI = &azFuture
439	future.Result = future.result
440	return nil
441}
442
443// result is the default implementation for CloudEndpointsPostRestoreFuture.Result.
444func (future *CloudEndpointsPostRestoreFuture) result(client CloudEndpointsClient) (ar autorest.Response, err error) {
445	var done bool
446	done, err = future.DoneWithContext(context.Background(), client)
447	if err != nil {
448		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsPostRestoreFuture", "Result", future.Response(), "Polling failure")
449		return
450	}
451	if !done {
452		ar.Response = future.Response()
453		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsPostRestoreFuture")
454		return
455	}
456	ar.Response = future.Response()
457	return
458}
459
460// CloudEndpointsPreBackupFuture an abstraction for monitoring and retrieving the results of a long-running
461// operation.
462type CloudEndpointsPreBackupFuture struct {
463	azure.FutureAPI
464	// Result returns the result of the asynchronous operation.
465	// If the operation has not completed it will return an error.
466	Result func(CloudEndpointsClient) (autorest.Response, error)
467}
468
469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
470func (future *CloudEndpointsPreBackupFuture) UnmarshalJSON(body []byte) error {
471	var azFuture azure.Future
472	if err := json.Unmarshal(body, &azFuture); err != nil {
473		return err
474	}
475	future.FutureAPI = &azFuture
476	future.Result = future.result
477	return nil
478}
479
480// result is the default implementation for CloudEndpointsPreBackupFuture.Result.
481func (future *CloudEndpointsPreBackupFuture) result(client CloudEndpointsClient) (ar autorest.Response, err error) {
482	var done bool
483	done, err = future.DoneWithContext(context.Background(), client)
484	if err != nil {
485		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsPreBackupFuture", "Result", future.Response(), "Polling failure")
486		return
487	}
488	if !done {
489		ar.Response = future.Response()
490		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsPreBackupFuture")
491		return
492	}
493	ar.Response = future.Response()
494	return
495}
496
497// CloudEndpointsPreRestoreFuture an abstraction for monitoring and retrieving the results of a
498// long-running operation.
499type CloudEndpointsPreRestoreFuture struct {
500	azure.FutureAPI
501	// Result returns the result of the asynchronous operation.
502	// If the operation has not completed it will return an error.
503	Result func(CloudEndpointsClient) (autorest.Response, error)
504}
505
506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
507func (future *CloudEndpointsPreRestoreFuture) UnmarshalJSON(body []byte) error {
508	var azFuture azure.Future
509	if err := json.Unmarshal(body, &azFuture); err != nil {
510		return err
511	}
512	future.FutureAPI = &azFuture
513	future.Result = future.result
514	return nil
515}
516
517// result is the default implementation for CloudEndpointsPreRestoreFuture.Result.
518func (future *CloudEndpointsPreRestoreFuture) result(client CloudEndpointsClient) (ar autorest.Response, err error) {
519	var done bool
520	done, err = future.DoneWithContext(context.Background(), client)
521	if err != nil {
522		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsPreRestoreFuture", "Result", future.Response(), "Polling failure")
523		return
524	}
525	if !done {
526		ar.Response = future.Response()
527		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsPreRestoreFuture")
528		return
529	}
530	ar.Response = future.Response()
531	return
532}
533
534// CloudEndpointsTriggerChangeDetectionFuture an abstraction for monitoring and retrieving the results of a
535// long-running operation.
536type CloudEndpointsTriggerChangeDetectionFuture struct {
537	azure.FutureAPI
538	// Result returns the result of the asynchronous operation.
539	// If the operation has not completed it will return an error.
540	Result func(CloudEndpointsClient) (autorest.Response, error)
541}
542
543// UnmarshalJSON is the custom unmarshaller for CreateFuture.
544func (future *CloudEndpointsTriggerChangeDetectionFuture) UnmarshalJSON(body []byte) error {
545	var azFuture azure.Future
546	if err := json.Unmarshal(body, &azFuture); err != nil {
547		return err
548	}
549	future.FutureAPI = &azFuture
550	future.Result = future.result
551	return nil
552}
553
554// result is the default implementation for CloudEndpointsTriggerChangeDetectionFuture.Result.
555func (future *CloudEndpointsTriggerChangeDetectionFuture) result(client CloudEndpointsClient) (ar autorest.Response, err error) {
556	var done bool
557	done, err = future.DoneWithContext(context.Background(), client)
558	if err != nil {
559		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsTriggerChangeDetectionFuture", "Result", future.Response(), "Polling failure")
560		return
561	}
562	if !done {
563		ar.Response = future.Response()
564		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsTriggerChangeDetectionFuture")
565		return
566	}
567	ar.Response = future.Response()
568	return
569}
570
571// Error error type
572type Error struct {
573	// Error - Error details of the given entry.
574	Error *APIError `json:"error,omitempty"`
575	// Innererror - Error details of the given entry.
576	Innererror *APIError `json:"innererror,omitempty"`
577}
578
579// ErrorDetails error Details object.
580type ErrorDetails struct {
581	// Code - Error code of the given entry.
582	Code *string `json:"code,omitempty"`
583	// Message - Error message of the given entry.
584	Message *string `json:"message,omitempty"`
585	// Target - Target of the given entry.
586	Target *string `json:"target,omitempty"`
587}
588
589// OperationDisplayInfo the operation supported by storage sync.
590type OperationDisplayInfo struct {
591	// Description - The description of the operation.
592	Description *string `json:"description,omitempty"`
593	// Operation - The action that users can perform, based on their permission level.
594	Operation *string `json:"operation,omitempty"`
595	// Provider - Service provider: Microsoft StorageSync.
596	Provider *string `json:"provider,omitempty"`
597	// Resource - Resource on which the operation is performed.
598	Resource *string `json:"resource,omitempty"`
599}
600
601// OperationDisplayResource operation Display Resource object.
602type OperationDisplayResource struct {
603	// Provider - Operation Display Resource Provider.
604	Provider *string `json:"provider,omitempty"`
605	// Resource - Operation Display Resource.
606	Resource *string `json:"resource,omitempty"`
607	// Operation - Operation Display Resource Operation.
608	Operation *string `json:"operation,omitempty"`
609	// Description - Operation Display Resource Description.
610	Description *string `json:"description,omitempty"`
611}
612
613// OperationEntity the operation supported by storage sync.
614type OperationEntity struct {
615	// Name - Operation name: {provider}/{resource}/{operation}.
616	Name *string `json:"name,omitempty"`
617	// Display - The operation supported by storage sync.
618	Display *OperationDisplayInfo `json:"display,omitempty"`
619	// Origin - The origin.
620	Origin *string `json:"origin,omitempty"`
621}
622
623// OperationEntityListResult the list of storage sync operations.
624type OperationEntityListResult struct {
625	autorest.Response `json:"-"`
626	// NextLink - The link used to get the next page of operations.
627	NextLink *string `json:"nextLink,omitempty"`
628	// Value - The list of operations.
629	Value *[]OperationEntity `json:"value,omitempty"`
630}
631
632// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values.
633type OperationEntityListResultIterator struct {
634	i    int
635	page OperationEntityListResultPage
636}
637
638// NextWithContext advances to the next value.  If there was an error making
639// the request the iterator does not advance and the error is returned.
640func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
641	if tracing.IsEnabled() {
642		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext")
643		defer func() {
644			sc := -1
645			if iter.Response().Response.Response != nil {
646				sc = iter.Response().Response.Response.StatusCode
647			}
648			tracing.EndSpan(ctx, sc, err)
649		}()
650	}
651	iter.i++
652	if iter.i < len(iter.page.Values()) {
653		return nil
654	}
655	err = iter.page.NextWithContext(ctx)
656	if err != nil {
657		iter.i--
658		return err
659	}
660	iter.i = 0
661	return nil
662}
663
664// Next advances to the next value.  If there was an error making
665// the request the iterator does not advance and the error is returned.
666// Deprecated: Use NextWithContext() instead.
667func (iter *OperationEntityListResultIterator) Next() error {
668	return iter.NextWithContext(context.Background())
669}
670
671// NotDone returns true if the enumeration should be started or is not yet complete.
672func (iter OperationEntityListResultIterator) NotDone() bool {
673	return iter.page.NotDone() && iter.i < len(iter.page.Values())
674}
675
676// Response returns the raw server response from the last page request.
677func (iter OperationEntityListResultIterator) Response() OperationEntityListResult {
678	return iter.page.Response()
679}
680
681// Value returns the current value or a zero-initialized value if the
682// iterator has advanced beyond the end of the collection.
683func (iter OperationEntityListResultIterator) Value() OperationEntity {
684	if !iter.page.NotDone() {
685		return OperationEntity{}
686	}
687	return iter.page.Values()[iter.i]
688}
689
690// Creates a new instance of the OperationEntityListResultIterator type.
691func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator {
692	return OperationEntityListResultIterator{page: page}
693}
694
695// IsEmpty returns true if the ListResult contains no values.
696func (oelr OperationEntityListResult) IsEmpty() bool {
697	return oelr.Value == nil || len(*oelr.Value) == 0
698}
699
700// hasNextLink returns true if the NextLink is not empty.
701func (oelr OperationEntityListResult) hasNextLink() bool {
702	return oelr.NextLink != nil && len(*oelr.NextLink) != 0
703}
704
705// operationEntityListResultPreparer prepares a request to retrieve the next set of results.
706// It returns nil if no more results exist.
707func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) {
708	if !oelr.hasNextLink() {
709		return nil, nil
710	}
711	return autorest.Prepare((&http.Request{}).WithContext(ctx),
712		autorest.AsJSON(),
713		autorest.AsGet(),
714		autorest.WithBaseURL(to.String(oelr.NextLink)))
715}
716
717// OperationEntityListResultPage contains a page of OperationEntity values.
718type OperationEntityListResultPage struct {
719	fn   func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)
720	oelr OperationEntityListResult
721}
722
723// NextWithContext advances to the next page of values.  If there was an error making
724// the request the page does not advance and the error is returned.
725func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) {
726	if tracing.IsEnabled() {
727		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext")
728		defer func() {
729			sc := -1
730			if page.Response().Response.Response != nil {
731				sc = page.Response().Response.Response.StatusCode
732			}
733			tracing.EndSpan(ctx, sc, err)
734		}()
735	}
736	for {
737		next, err := page.fn(ctx, page.oelr)
738		if err != nil {
739			return err
740		}
741		page.oelr = next
742		if !next.hasNextLink() || !next.IsEmpty() {
743			break
744		}
745	}
746	return nil
747}
748
749// Next advances to the next page of values.  If there was an error making
750// the request the page does not advance and the error is returned.
751// Deprecated: Use NextWithContext() instead.
752func (page *OperationEntityListResultPage) Next() error {
753	return page.NextWithContext(context.Background())
754}
755
756// NotDone returns true if the page enumeration should be started or is not yet complete.
757func (page OperationEntityListResultPage) NotDone() bool {
758	return !page.oelr.IsEmpty()
759}
760
761// Response returns the raw server response from the last page request.
762func (page OperationEntityListResultPage) Response() OperationEntityListResult {
763	return page.oelr
764}
765
766// Values returns the slice of values for the current page or nil if there are no values.
767func (page OperationEntityListResultPage) Values() []OperationEntity {
768	if page.oelr.IsEmpty() {
769		return nil
770	}
771	return *page.oelr.Value
772}
773
774// Creates a new instance of the OperationEntityListResultPage type.
775func NewOperationEntityListResultPage(cur OperationEntityListResult, getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage {
776	return OperationEntityListResultPage{
777		fn:   getNextPage,
778		oelr: cur,
779	}
780}
781
782// OperationStatus operation status object
783type OperationStatus struct {
784	autorest.Response `json:"-"`
785	// Name - READ-ONLY; Operation Id
786	Name *string `json:"name,omitempty"`
787	// Status - READ-ONLY; Operation status
788	Status *string `json:"status,omitempty"`
789	// StartTime - READ-ONLY; Start time of the operation
790	StartTime *date.Time `json:"startTime,omitempty"`
791	// EndTime - READ-ONLY; End time of the operation
792	EndTime *date.Time `json:"endTime,omitempty"`
793	// Error - READ-ONLY; Error details.
794	Error *APIError `json:"error,omitempty"`
795}
796
797// MarshalJSON is the custom marshaler for OperationStatus.
798func (osVar OperationStatus) MarshalJSON() ([]byte, error) {
799	objectMap := make(map[string]interface{})
800	return json.Marshal(objectMap)
801}
802
803// PostBackupResponse post Backup Response
804type PostBackupResponse struct {
805	autorest.Response `json:"-"`
806	// PostBackupResponseProperties - Post Backup Response Properties
807	*PostBackupResponseProperties `json:"backupMetadata,omitempty"`
808}
809
810// MarshalJSON is the custom marshaler for PostBackupResponse.
811func (pbr PostBackupResponse) MarshalJSON() ([]byte, error) {
812	objectMap := make(map[string]interface{})
813	if pbr.PostBackupResponseProperties != nil {
814		objectMap["backupMetadata"] = pbr.PostBackupResponseProperties
815	}
816	return json.Marshal(objectMap)
817}
818
819// UnmarshalJSON is the custom unmarshaler for PostBackupResponse struct.
820func (pbr *PostBackupResponse) UnmarshalJSON(body []byte) error {
821	var m map[string]*json.RawMessage
822	err := json.Unmarshal(body, &m)
823	if err != nil {
824		return err
825	}
826	for k, v := range m {
827		switch k {
828		case "backupMetadata":
829			if v != nil {
830				var postBackupResponseProperties PostBackupResponseProperties
831				err = json.Unmarshal(*v, &postBackupResponseProperties)
832				if err != nil {
833					return err
834				}
835				pbr.PostBackupResponseProperties = &postBackupResponseProperties
836			}
837		}
838	}
839
840	return nil
841}
842
843// PostBackupResponseProperties post Backup Response Properties object.
844type PostBackupResponseProperties struct {
845	// CloudEndpointName - READ-ONLY; cloud endpoint Name.
846	CloudEndpointName *string `json:"cloudEndpointName,omitempty"`
847}
848
849// MarshalJSON is the custom marshaler for PostBackupResponseProperties.
850func (pbrp PostBackupResponseProperties) MarshalJSON() ([]byte, error) {
851	objectMap := make(map[string]interface{})
852	return json.Marshal(objectMap)
853}
854
855// PostRestoreRequest post Restore Request
856type PostRestoreRequest struct {
857	// Partition - Post Restore partition.
858	Partition *string `json:"partition,omitempty"`
859	// ReplicaGroup - Post Restore replica group.
860	ReplicaGroup *string `json:"replicaGroup,omitempty"`
861	// RequestID - Post Restore request id.
862	RequestID *string `json:"requestId,omitempty"`
863	// AzureFileShareURI - Post Restore Azure file share uri.
864	AzureFileShareURI *string `json:"azureFileShareUri,omitempty"`
865	// Status - Post Restore Azure status.
866	Status *string `json:"status,omitempty"`
867	// SourceAzureFileShareURI - Post Restore Azure source azure file share uri.
868	SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"`
869	// FailedFileList - Post Restore Azure failed file list.
870	FailedFileList *string `json:"failedFileList,omitempty"`
871	// RestoreFileSpec - Post Restore restore file spec array.
872	RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"`
873}
874
875// PreRestoreRequest pre Restore request object.
876type PreRestoreRequest struct {
877	// Partition - Pre Restore partition.
878	Partition *string `json:"partition,omitempty"`
879	// ReplicaGroup - Pre Restore replica group.
880	ReplicaGroup *string `json:"replicaGroup,omitempty"`
881	// RequestID - Pre Restore request id.
882	RequestID *string `json:"requestId,omitempty"`
883	// AzureFileShareURI - Pre Restore Azure file share uri.
884	AzureFileShareURI *string `json:"azureFileShareUri,omitempty"`
885	// Status - Pre Restore Azure status.
886	Status *string `json:"status,omitempty"`
887	// SourceAzureFileShareURI - Pre Restore Azure source azure file share uri.
888	SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"`
889	// BackupMetadataPropertyBag - Pre Restore backup metadata property bag.
890	BackupMetadataPropertyBag *string `json:"backupMetadataPropertyBag,omitempty"`
891	// RestoreFileSpec - Pre Restore restore file spec array.
892	RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"`
893	// PauseWaitForSyncDrainTimePeriodInSeconds - Pre Restore pause wait for sync drain time period in seconds.
894	PauseWaitForSyncDrainTimePeriodInSeconds *int32 `json:"pauseWaitForSyncDrainTimePeriodInSeconds,omitempty"`
895}
896
897// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
898// have tags and a location
899type ProxyResource struct {
900	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
901	ID *string `json:"id,omitempty"`
902	// Name - READ-ONLY; The name of the resource
903	Name *string `json:"name,omitempty"`
904	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
905	Type *string `json:"type,omitempty"`
906}
907
908// MarshalJSON is the custom marshaler for ProxyResource.
909func (pr ProxyResource) MarshalJSON() ([]byte, error) {
910	objectMap := make(map[string]interface{})
911	return json.Marshal(objectMap)
912}
913
914// RecallActionParameters the parameters used when calling recall action on server endpoint.
915type RecallActionParameters struct {
916	// Pattern - Pattern of the files.
917	Pattern *string `json:"pattern,omitempty"`
918	// RecallPath - Recall path.
919	RecallPath *string `json:"recallPath,omitempty"`
920}
921
922// RegisteredServer registered Server resource.
923type RegisteredServer struct {
924	autorest.Response `json:"-"`
925	// RegisteredServerProperties - RegisteredServer properties.
926	*RegisteredServerProperties `json:"properties,omitempty"`
927	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
928	ID *string `json:"id,omitempty"`
929	// Name - READ-ONLY; The name of the resource
930	Name *string `json:"name,omitempty"`
931	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
932	Type *string `json:"type,omitempty"`
933}
934
935// MarshalJSON is the custom marshaler for RegisteredServer.
936func (rs RegisteredServer) MarshalJSON() ([]byte, error) {
937	objectMap := make(map[string]interface{})
938	if rs.RegisteredServerProperties != nil {
939		objectMap["properties"] = rs.RegisteredServerProperties
940	}
941	return json.Marshal(objectMap)
942}
943
944// UnmarshalJSON is the custom unmarshaler for RegisteredServer struct.
945func (rs *RegisteredServer) UnmarshalJSON(body []byte) error {
946	var m map[string]*json.RawMessage
947	err := json.Unmarshal(body, &m)
948	if err != nil {
949		return err
950	}
951	for k, v := range m {
952		switch k {
953		case "properties":
954			if v != nil {
955				var registeredServerProperties RegisteredServerProperties
956				err = json.Unmarshal(*v, &registeredServerProperties)
957				if err != nil {
958					return err
959				}
960				rs.RegisteredServerProperties = &registeredServerProperties
961			}
962		case "id":
963			if v != nil {
964				var ID string
965				err = json.Unmarshal(*v, &ID)
966				if err != nil {
967					return err
968				}
969				rs.ID = &ID
970			}
971		case "name":
972			if v != nil {
973				var name string
974				err = json.Unmarshal(*v, &name)
975				if err != nil {
976					return err
977				}
978				rs.Name = &name
979			}
980		case "type":
981			if v != nil {
982				var typeVar string
983				err = json.Unmarshal(*v, &typeVar)
984				if err != nil {
985					return err
986				}
987				rs.Type = &typeVar
988			}
989		}
990	}
991
992	return nil
993}
994
995// RegisteredServerArray array of RegisteredServer
996type RegisteredServerArray struct {
997	autorest.Response `json:"-"`
998	// Value - Collection of Registered Server.
999	Value *[]RegisteredServer `json:"value,omitempty"`
1000}
1001
1002// RegisteredServerCreateParameters the parameters used when creating a registered server.
1003type RegisteredServerCreateParameters struct {
1004	// RegisteredServerCreateParametersProperties - The parameters used to create the registered server.
1005	*RegisteredServerCreateParametersProperties `json:"properties,omitempty"`
1006	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1007	ID *string `json:"id,omitempty"`
1008	// Name - READ-ONLY; The name of the resource
1009	Name *string `json:"name,omitempty"`
1010	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1011	Type *string `json:"type,omitempty"`
1012}
1013
1014// MarshalJSON is the custom marshaler for RegisteredServerCreateParameters.
1015func (rscp RegisteredServerCreateParameters) MarshalJSON() ([]byte, error) {
1016	objectMap := make(map[string]interface{})
1017	if rscp.RegisteredServerCreateParametersProperties != nil {
1018		objectMap["properties"] = rscp.RegisteredServerCreateParametersProperties
1019	}
1020	return json.Marshal(objectMap)
1021}
1022
1023// UnmarshalJSON is the custom unmarshaler for RegisteredServerCreateParameters struct.
1024func (rscp *RegisteredServerCreateParameters) UnmarshalJSON(body []byte) error {
1025	var m map[string]*json.RawMessage
1026	err := json.Unmarshal(body, &m)
1027	if err != nil {
1028		return err
1029	}
1030	for k, v := range m {
1031		switch k {
1032		case "properties":
1033			if v != nil {
1034				var registeredServerCreateParametersProperties RegisteredServerCreateParametersProperties
1035				err = json.Unmarshal(*v, &registeredServerCreateParametersProperties)
1036				if err != nil {
1037					return err
1038				}
1039				rscp.RegisteredServerCreateParametersProperties = &registeredServerCreateParametersProperties
1040			}
1041		case "id":
1042			if v != nil {
1043				var ID string
1044				err = json.Unmarshal(*v, &ID)
1045				if err != nil {
1046					return err
1047				}
1048				rscp.ID = &ID
1049			}
1050		case "name":
1051			if v != nil {
1052				var name string
1053				err = json.Unmarshal(*v, &name)
1054				if err != nil {
1055					return err
1056				}
1057				rscp.Name = &name
1058			}
1059		case "type":
1060			if v != nil {
1061				var typeVar string
1062				err = json.Unmarshal(*v, &typeVar)
1063				if err != nil {
1064					return err
1065				}
1066				rscp.Type = &typeVar
1067			}
1068		}
1069	}
1070
1071	return nil
1072}
1073
1074// RegisteredServerCreateParametersProperties ...
1075type RegisteredServerCreateParametersProperties struct {
1076	// ServerCertificate - Registered Server Certificate
1077	ServerCertificate *string `json:"serverCertificate,omitempty"`
1078	// AgentVersion - Registered Server Agent Version
1079	AgentVersion *string `json:"agentVersion,omitempty"`
1080	// ServerOSVersion - Registered Server OS Version
1081	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
1082	// LastHeartBeat - Registered Server last heart beat
1083	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
1084	// ServerRole - Registered Server serverRole
1085	ServerRole *string `json:"serverRole,omitempty"`
1086	// ClusterID - Registered Server clusterId
1087	ClusterID *string `json:"clusterId,omitempty"`
1088	// ClusterName - Registered Server clusterName
1089	ClusterName *string `json:"clusterName,omitempty"`
1090	// ServerID - Registered Server serverId
1091	ServerID *string `json:"serverId,omitempty"`
1092	// FriendlyName - Friendly Name
1093	FriendlyName *string `json:"friendlyName,omitempty"`
1094}
1095
1096// RegisteredServerProperties registeredServer Properties object.
1097type RegisteredServerProperties struct {
1098	// ServerCertificate - Registered Server Certificate
1099	ServerCertificate *string `json:"serverCertificate,omitempty"`
1100	// AgentVersion - Registered Server Agent Version
1101	AgentVersion *string `json:"agentVersion,omitempty"`
1102	// ServerOSVersion - Registered Server OS Version
1103	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
1104	// ServerManagementErrorCode - Registered Server Management Error Code
1105	ServerManagementErrorCode *int32 `json:"serverManagementErrorCode,omitempty"`
1106	// LastHeartBeat - Registered Server last heart beat
1107	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
1108	// ProvisioningState - Registered Server Provisioning State
1109	ProvisioningState *string `json:"provisioningState,omitempty"`
1110	// ServerRole - Registered Server serverRole
1111	ServerRole *string `json:"serverRole,omitempty"`
1112	// ClusterID - Registered Server clusterId
1113	ClusterID *string `json:"clusterId,omitempty"`
1114	// ClusterName - Registered Server clusterName
1115	ClusterName *string `json:"clusterName,omitempty"`
1116	// ServerID - Registered Server serverId
1117	ServerID *string `json:"serverId,omitempty"`
1118	// StorageSyncServiceUID - Registered Server storageSyncServiceUid
1119	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
1120	// LastWorkflowID - Registered Server lastWorkflowId
1121	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
1122	// LastOperationName - Resource Last Operation Name
1123	LastOperationName *string `json:"lastOperationName,omitempty"`
1124	// DiscoveryEndpointURI - Resource discoveryEndpointUri
1125	DiscoveryEndpointURI *string `json:"discoveryEndpointUri,omitempty"`
1126	// ResourceLocation - Resource Location
1127	ResourceLocation *string `json:"resourceLocation,omitempty"`
1128	// ServiceLocation - Service Location
1129	ServiceLocation *string `json:"serviceLocation,omitempty"`
1130	// FriendlyName - Friendly Name
1131	FriendlyName *string `json:"friendlyName,omitempty"`
1132	// ManagementEndpointURI - Management Endpoint Uri
1133	ManagementEndpointURI *string `json:"managementEndpointUri,omitempty"`
1134	// MonitoringConfiguration - Monitoring Configuration
1135	MonitoringConfiguration *string `json:"monitoringConfiguration,omitempty"`
1136}
1137
1138// RegisteredServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1139// operation.
1140type RegisteredServersCreateFuture struct {
1141	azure.FutureAPI
1142	// Result returns the result of the asynchronous operation.
1143	// If the operation has not completed it will return an error.
1144	Result func(RegisteredServersClient) (RegisteredServer, error)
1145}
1146
1147// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1148func (future *RegisteredServersCreateFuture) UnmarshalJSON(body []byte) error {
1149	var azFuture azure.Future
1150	if err := json.Unmarshal(body, &azFuture); err != nil {
1151		return err
1152	}
1153	future.FutureAPI = &azFuture
1154	future.Result = future.result
1155	return nil
1156}
1157
1158// result is the default implementation for RegisteredServersCreateFuture.Result.
1159func (future *RegisteredServersCreateFuture) result(client RegisteredServersClient) (rs RegisteredServer, err error) {
1160	var done bool
1161	done, err = future.DoneWithContext(context.Background(), client)
1162	if err != nil {
1163		err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersCreateFuture", "Result", future.Response(), "Polling failure")
1164		return
1165	}
1166	if !done {
1167		rs.Response.Response = future.Response()
1168		err = azure.NewAsyncOpIncompleteError("storagesync.RegisteredServersCreateFuture")
1169		return
1170	}
1171	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1172	if rs.Response.Response, err = future.GetResult(sender); err == nil && rs.Response.Response.StatusCode != http.StatusNoContent {
1173		rs, err = client.CreateResponder(rs.Response.Response)
1174		if err != nil {
1175			err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersCreateFuture", "Result", rs.Response.Response, "Failure responding to request")
1176		}
1177	}
1178	return
1179}
1180
1181// RegisteredServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1182// operation.
1183type RegisteredServersDeleteFuture struct {
1184	azure.FutureAPI
1185	// Result returns the result of the asynchronous operation.
1186	// If the operation has not completed it will return an error.
1187	Result func(RegisteredServersClient) (autorest.Response, error)
1188}
1189
1190// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1191func (future *RegisteredServersDeleteFuture) UnmarshalJSON(body []byte) error {
1192	var azFuture azure.Future
1193	if err := json.Unmarshal(body, &azFuture); err != nil {
1194		return err
1195	}
1196	future.FutureAPI = &azFuture
1197	future.Result = future.result
1198	return nil
1199}
1200
1201// result is the default implementation for RegisteredServersDeleteFuture.Result.
1202func (future *RegisteredServersDeleteFuture) result(client RegisteredServersClient) (ar autorest.Response, err error) {
1203	var done bool
1204	done, err = future.DoneWithContext(context.Background(), client)
1205	if err != nil {
1206		err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersDeleteFuture", "Result", future.Response(), "Polling failure")
1207		return
1208	}
1209	if !done {
1210		ar.Response = future.Response()
1211		err = azure.NewAsyncOpIncompleteError("storagesync.RegisteredServersDeleteFuture")
1212		return
1213	}
1214	ar.Response = future.Response()
1215	return
1216}
1217
1218// RegisteredServersTriggerRolloverFuture an abstraction for monitoring and retrieving the results of a
1219// long-running operation.
1220type RegisteredServersTriggerRolloverFuture struct {
1221	azure.FutureAPI
1222	// Result returns the result of the asynchronous operation.
1223	// If the operation has not completed it will return an error.
1224	Result func(RegisteredServersClient) (autorest.Response, error)
1225}
1226
1227// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1228func (future *RegisteredServersTriggerRolloverFuture) UnmarshalJSON(body []byte) error {
1229	var azFuture azure.Future
1230	if err := json.Unmarshal(body, &azFuture); err != nil {
1231		return err
1232	}
1233	future.FutureAPI = &azFuture
1234	future.Result = future.result
1235	return nil
1236}
1237
1238// result is the default implementation for RegisteredServersTriggerRolloverFuture.Result.
1239func (future *RegisteredServersTriggerRolloverFuture) result(client RegisteredServersClient) (ar autorest.Response, err error) {
1240	var done bool
1241	done, err = future.DoneWithContext(context.Background(), client)
1242	if err != nil {
1243		err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersTriggerRolloverFuture", "Result", future.Response(), "Polling failure")
1244		return
1245	}
1246	if !done {
1247		ar.Response = future.Response()
1248		err = azure.NewAsyncOpIncompleteError("storagesync.RegisteredServersTriggerRolloverFuture")
1249		return
1250	}
1251	ar.Response = future.Response()
1252	return
1253}
1254
1255// Resource common fields that are returned in the response for all Azure Resource Manager resources
1256type Resource struct {
1257	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1258	ID *string `json:"id,omitempty"`
1259	// Name - READ-ONLY; The name of the resource
1260	Name *string `json:"name,omitempty"`
1261	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1262	Type *string `json:"type,omitempty"`
1263}
1264
1265// MarshalJSON is the custom marshaler for Resource.
1266func (r Resource) MarshalJSON() ([]byte, error) {
1267	objectMap := make(map[string]interface{})
1268	return json.Marshal(objectMap)
1269}
1270
1271// ResourcesMoveInfo resource Move Info.
1272type ResourcesMoveInfo struct {
1273	// TargetResourceGroup - Target resource group.
1274	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
1275	// Resources - Collection of Resources.
1276	Resources *[]string `json:"resources,omitempty"`
1277}
1278
1279// RestoreFileSpec restore file spec.
1280type RestoreFileSpec struct {
1281	// Path - Restore file spec path
1282	Path *string `json:"path,omitempty"`
1283	// Isdir - Restore file spec isdir
1284	Isdir *bool `json:"isdir,omitempty"`
1285}
1286
1287// ServerEndpoint server Endpoint object.
1288type ServerEndpoint struct {
1289	autorest.Response `json:"-"`
1290	// ServerEndpointProperties - Server Endpoint properties.
1291	*ServerEndpointProperties `json:"properties,omitempty"`
1292	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1293	ID *string `json:"id,omitempty"`
1294	// Name - READ-ONLY; The name of the resource
1295	Name *string `json:"name,omitempty"`
1296	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1297	Type *string `json:"type,omitempty"`
1298}
1299
1300// MarshalJSON is the custom marshaler for ServerEndpoint.
1301func (se ServerEndpoint) MarshalJSON() ([]byte, error) {
1302	objectMap := make(map[string]interface{})
1303	if se.ServerEndpointProperties != nil {
1304		objectMap["properties"] = se.ServerEndpointProperties
1305	}
1306	return json.Marshal(objectMap)
1307}
1308
1309// UnmarshalJSON is the custom unmarshaler for ServerEndpoint struct.
1310func (se *ServerEndpoint) UnmarshalJSON(body []byte) error {
1311	var m map[string]*json.RawMessage
1312	err := json.Unmarshal(body, &m)
1313	if err != nil {
1314		return err
1315	}
1316	for k, v := range m {
1317		switch k {
1318		case "properties":
1319			if v != nil {
1320				var serverEndpointProperties ServerEndpointProperties
1321				err = json.Unmarshal(*v, &serverEndpointProperties)
1322				if err != nil {
1323					return err
1324				}
1325				se.ServerEndpointProperties = &serverEndpointProperties
1326			}
1327		case "id":
1328			if v != nil {
1329				var ID string
1330				err = json.Unmarshal(*v, &ID)
1331				if err != nil {
1332					return err
1333				}
1334				se.ID = &ID
1335			}
1336		case "name":
1337			if v != nil {
1338				var name string
1339				err = json.Unmarshal(*v, &name)
1340				if err != nil {
1341					return err
1342				}
1343				se.Name = &name
1344			}
1345		case "type":
1346			if v != nil {
1347				var typeVar string
1348				err = json.Unmarshal(*v, &typeVar)
1349				if err != nil {
1350					return err
1351				}
1352				se.Type = &typeVar
1353			}
1354		}
1355	}
1356
1357	return nil
1358}
1359
1360// ServerEndpointArray array of ServerEndpoint
1361type ServerEndpointArray struct {
1362	autorest.Response `json:"-"`
1363	// Value - Collection of ServerEndpoint.
1364	Value *[]ServerEndpoint `json:"value,omitempty"`
1365}
1366
1367// ServerEndpointCloudTieringStatus server endpoint cloud tiering status object.
1368type ServerEndpointCloudTieringStatus struct {
1369	// Health - READ-ONLY; Cloud tiering health state. Possible values include: 'HealthHealthy', 'HealthError'
1370	Health Health `json:"health,omitempty"`
1371	// LastUpdatedTimestamp - READ-ONLY; Last updated timestamp
1372	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1373	// LastCloudTieringResult - READ-ONLY; Last cloud tiering result (HResult)
1374	LastCloudTieringResult *int32 `json:"lastCloudTieringResult,omitempty"`
1375	// LastSuccessTimestamp - READ-ONLY; Last cloud tiering success timestamp
1376	LastSuccessTimestamp *date.Time `json:"lastSuccessTimestamp,omitempty"`
1377}
1378
1379// MarshalJSON is the custom marshaler for ServerEndpointCloudTieringStatus.
1380func (sects ServerEndpointCloudTieringStatus) MarshalJSON() ([]byte, error) {
1381	objectMap := make(map[string]interface{})
1382	return json.Marshal(objectMap)
1383}
1384
1385// ServerEndpointCreateParameters the parameters used when creating a server endpoint.
1386type ServerEndpointCreateParameters struct {
1387	// ServerEndpointCreateParametersProperties - The parameters used to create the server endpoint.
1388	*ServerEndpointCreateParametersProperties `json:"properties,omitempty"`
1389	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1390	ID *string `json:"id,omitempty"`
1391	// Name - READ-ONLY; The name of the resource
1392	Name *string `json:"name,omitempty"`
1393	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1394	Type *string `json:"type,omitempty"`
1395}
1396
1397// MarshalJSON is the custom marshaler for ServerEndpointCreateParameters.
1398func (secp ServerEndpointCreateParameters) MarshalJSON() ([]byte, error) {
1399	objectMap := make(map[string]interface{})
1400	if secp.ServerEndpointCreateParametersProperties != nil {
1401		objectMap["properties"] = secp.ServerEndpointCreateParametersProperties
1402	}
1403	return json.Marshal(objectMap)
1404}
1405
1406// UnmarshalJSON is the custom unmarshaler for ServerEndpointCreateParameters struct.
1407func (secp *ServerEndpointCreateParameters) UnmarshalJSON(body []byte) error {
1408	var m map[string]*json.RawMessage
1409	err := json.Unmarshal(body, &m)
1410	if err != nil {
1411		return err
1412	}
1413	for k, v := range m {
1414		switch k {
1415		case "properties":
1416			if v != nil {
1417				var serverEndpointCreateParametersProperties ServerEndpointCreateParametersProperties
1418				err = json.Unmarshal(*v, &serverEndpointCreateParametersProperties)
1419				if err != nil {
1420					return err
1421				}
1422				secp.ServerEndpointCreateParametersProperties = &serverEndpointCreateParametersProperties
1423			}
1424		case "id":
1425			if v != nil {
1426				var ID string
1427				err = json.Unmarshal(*v, &ID)
1428				if err != nil {
1429					return err
1430				}
1431				secp.ID = &ID
1432			}
1433		case "name":
1434			if v != nil {
1435				var name string
1436				err = json.Unmarshal(*v, &name)
1437				if err != nil {
1438					return err
1439				}
1440				secp.Name = &name
1441			}
1442		case "type":
1443			if v != nil {
1444				var typeVar string
1445				err = json.Unmarshal(*v, &typeVar)
1446				if err != nil {
1447					return err
1448				}
1449				secp.Type = &typeVar
1450			}
1451		}
1452	}
1453
1454	return nil
1455}
1456
1457// ServerEndpointCreateParametersProperties serverEndpoint Properties object.
1458type ServerEndpointCreateParametersProperties struct {
1459	// ServerLocalPath - Server Local path.
1460	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1461	// CloudTiering - Cloud Tiering. Possible values include: 'On', 'Off'
1462	CloudTiering CloudTiering `json:"cloudTiering,omitempty"`
1463	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1464	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1465	// TierFilesOlderThanDays - Tier files older than days.
1466	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1467	// FriendlyName - Friendly Name
1468	FriendlyName *string `json:"friendlyName,omitempty"`
1469	// ServerResourceID - Server Resource Id.
1470	ServerResourceID *string `json:"serverResourceId,omitempty"`
1471	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransferOn', 'OfflineDataTransferOff'
1472	OfflineDataTransfer OfflineDataTransfer `json:"offlineDataTransfer,omitempty"`
1473	// OfflineDataTransferShareName - Offline data transfer share name
1474	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1475}
1476
1477// ServerEndpointFilesNotSyncingError files not syncing error object
1478type ServerEndpointFilesNotSyncingError struct {
1479	// ErrorCode - READ-ONLY; Error code (HResult)
1480	ErrorCode *int32 `json:"errorCode,omitempty"`
1481	// PersistentCount - READ-ONLY; Count of persistent files not syncing with the specified error code
1482	PersistentCount *int64 `json:"persistentCount,omitempty"`
1483	// TransientCount - READ-ONLY; Count of transient files not syncing with the specified error code
1484	TransientCount *int64 `json:"transientCount,omitempty"`
1485}
1486
1487// MarshalJSON is the custom marshaler for ServerEndpointFilesNotSyncingError.
1488func (sefnse ServerEndpointFilesNotSyncingError) MarshalJSON() ([]byte, error) {
1489	objectMap := make(map[string]interface{})
1490	return json.Marshal(objectMap)
1491}
1492
1493// ServerEndpointProperties serverEndpoint Properties object.
1494type ServerEndpointProperties struct {
1495	// ServerLocalPath - Server Local path.
1496	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1497	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering2On', 'CloudTiering2Off'
1498	CloudTiering CloudTiering2 `json:"cloudTiering,omitempty"`
1499	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1500	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1501	// TierFilesOlderThanDays - Tier files older than days.
1502	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1503	// FriendlyName - Friendly Name
1504	FriendlyName *string `json:"friendlyName,omitempty"`
1505	// ServerResourceID - Server Resource Id.
1506	ServerResourceID *string `json:"serverResourceId,omitempty"`
1507	// ProvisioningState - READ-ONLY; ServerEndpoint Provisioning State
1508	ProvisioningState *string `json:"provisioningState,omitempty"`
1509	// LastWorkflowID - READ-ONLY; ServerEndpoint lastWorkflowId
1510	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
1511	// LastOperationName - READ-ONLY; Resource Last Operation Name
1512	LastOperationName *string `json:"lastOperationName,omitempty"`
1513	// SyncStatus - READ-ONLY; Server Endpoint sync status
1514	SyncStatus *ServerEndpointSyncStatus `json:"syncStatus,omitempty"`
1515	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer2On', 'OfflineDataTransfer2Off'
1516	OfflineDataTransfer OfflineDataTransfer2 `json:"offlineDataTransfer,omitempty"`
1517	// OfflineDataTransferStorageAccountResourceID - READ-ONLY; Offline data transfer storage account resource ID
1518	OfflineDataTransferStorageAccountResourceID *string `json:"offlineDataTransferStorageAccountResourceId,omitempty"`
1519	// OfflineDataTransferStorageAccountTenantID - READ-ONLY; Offline data transfer storage account tenant ID
1520	OfflineDataTransferStorageAccountTenantID *string `json:"offlineDataTransferStorageAccountTenantId,omitempty"`
1521	// OfflineDataTransferShareName - Offline data transfer share name
1522	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1523	// CloudTieringStatus - READ-ONLY; Cloud tiering status. Only populated if cloud tiering is enabled.
1524	CloudTieringStatus *ServerEndpointCloudTieringStatus `json:"cloudTieringStatus,omitempty"`
1525	// RecallStatus - READ-ONLY; Recall status. Only populated if cloud tiering is enabled.
1526	RecallStatus *ServerEndpointRecallStatus `json:"recallStatus,omitempty"`
1527}
1528
1529// MarshalJSON is the custom marshaler for ServerEndpointProperties.
1530func (sep ServerEndpointProperties) MarshalJSON() ([]byte, error) {
1531	objectMap := make(map[string]interface{})
1532	if sep.ServerLocalPath != nil {
1533		objectMap["serverLocalPath"] = sep.ServerLocalPath
1534	}
1535	if sep.CloudTiering != "" {
1536		objectMap["cloudTiering"] = sep.CloudTiering
1537	}
1538	if sep.VolumeFreeSpacePercent != nil {
1539		objectMap["volumeFreeSpacePercent"] = sep.VolumeFreeSpacePercent
1540	}
1541	if sep.TierFilesOlderThanDays != nil {
1542		objectMap["tierFilesOlderThanDays"] = sep.TierFilesOlderThanDays
1543	}
1544	if sep.FriendlyName != nil {
1545		objectMap["friendlyName"] = sep.FriendlyName
1546	}
1547	if sep.ServerResourceID != nil {
1548		objectMap["serverResourceId"] = sep.ServerResourceID
1549	}
1550	if sep.OfflineDataTransfer != "" {
1551		objectMap["offlineDataTransfer"] = sep.OfflineDataTransfer
1552	}
1553	if sep.OfflineDataTransferShareName != nil {
1554		objectMap["offlineDataTransferShareName"] = sep.OfflineDataTransferShareName
1555	}
1556	return json.Marshal(objectMap)
1557}
1558
1559// ServerEndpointRecallError server endpoint recall error object
1560type ServerEndpointRecallError struct {
1561	// ErrorCode - READ-ONLY; Error code (HResult)
1562	ErrorCode *int32 `json:"errorCode,omitempty"`
1563	// Count - READ-ONLY; Count of occurences of the error
1564	Count *int64 `json:"count,omitempty"`
1565}
1566
1567// MarshalJSON is the custom marshaler for ServerEndpointRecallError.
1568func (sere ServerEndpointRecallError) MarshalJSON() ([]byte, error) {
1569	objectMap := make(map[string]interface{})
1570	return json.Marshal(objectMap)
1571}
1572
1573// ServerEndpointRecallStatus server endpoint recall status object.
1574type ServerEndpointRecallStatus struct {
1575	// LastUpdatedTimestamp - READ-ONLY; Last updated timestamp
1576	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1577	// TotalRecallErrorsCount - READ-ONLY; Total count of recall errors.
1578	TotalRecallErrorsCount *int64 `json:"totalRecallErrorsCount,omitempty"`
1579	// RecallErrors - READ-ONLY; Array of recall errors
1580	RecallErrors *[]ServerEndpointRecallError `json:"recallErrors,omitempty"`
1581}
1582
1583// MarshalJSON is the custom marshaler for ServerEndpointRecallStatus.
1584func (sers ServerEndpointRecallStatus) MarshalJSON() ([]byte, error) {
1585	objectMap := make(map[string]interface{})
1586	return json.Marshal(objectMap)
1587}
1588
1589// ServerEndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1590// operation.
1591type ServerEndpointsCreateFuture struct {
1592	azure.FutureAPI
1593	// Result returns the result of the asynchronous operation.
1594	// If the operation has not completed it will return an error.
1595	Result func(ServerEndpointsClient) (ServerEndpoint, error)
1596}
1597
1598// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1599func (future *ServerEndpointsCreateFuture) UnmarshalJSON(body []byte) error {
1600	var azFuture azure.Future
1601	if err := json.Unmarshal(body, &azFuture); err != nil {
1602		return err
1603	}
1604	future.FutureAPI = &azFuture
1605	future.Result = future.result
1606	return nil
1607}
1608
1609// result is the default implementation for ServerEndpointsCreateFuture.Result.
1610func (future *ServerEndpointsCreateFuture) result(client ServerEndpointsClient) (se ServerEndpoint, err error) {
1611	var done bool
1612	done, err = future.DoneWithContext(context.Background(), client)
1613	if err != nil {
1614		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsCreateFuture", "Result", future.Response(), "Polling failure")
1615		return
1616	}
1617	if !done {
1618		se.Response.Response = future.Response()
1619		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsCreateFuture")
1620		return
1621	}
1622	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1623	if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
1624		se, err = client.CreateResponder(se.Response.Response)
1625		if err != nil {
1626			err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsCreateFuture", "Result", se.Response.Response, "Failure responding to request")
1627		}
1628	}
1629	return
1630}
1631
1632// ServerEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1633// operation.
1634type ServerEndpointsDeleteFuture struct {
1635	azure.FutureAPI
1636	// Result returns the result of the asynchronous operation.
1637	// If the operation has not completed it will return an error.
1638	Result func(ServerEndpointsClient) (autorest.Response, error)
1639}
1640
1641// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1642func (future *ServerEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
1643	var azFuture azure.Future
1644	if err := json.Unmarshal(body, &azFuture); err != nil {
1645		return err
1646	}
1647	future.FutureAPI = &azFuture
1648	future.Result = future.result
1649	return nil
1650}
1651
1652// result is the default implementation for ServerEndpointsDeleteFuture.Result.
1653func (future *ServerEndpointsDeleteFuture) result(client ServerEndpointsClient) (ar autorest.Response, err error) {
1654	var done bool
1655	done, err = future.DoneWithContext(context.Background(), client)
1656	if err != nil {
1657		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
1658		return
1659	}
1660	if !done {
1661		ar.Response = future.Response()
1662		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsDeleteFuture")
1663		return
1664	}
1665	ar.Response = future.Response()
1666	return
1667}
1668
1669// ServerEndpointsRecallActionFuture an abstraction for monitoring and retrieving the results of a
1670// long-running operation.
1671type ServerEndpointsRecallActionFuture struct {
1672	azure.FutureAPI
1673	// Result returns the result of the asynchronous operation.
1674	// If the operation has not completed it will return an error.
1675	Result func(ServerEndpointsClient) (autorest.Response, error)
1676}
1677
1678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1679func (future *ServerEndpointsRecallActionFuture) UnmarshalJSON(body []byte) error {
1680	var azFuture azure.Future
1681	if err := json.Unmarshal(body, &azFuture); err != nil {
1682		return err
1683	}
1684	future.FutureAPI = &azFuture
1685	future.Result = future.result
1686	return nil
1687}
1688
1689// result is the default implementation for ServerEndpointsRecallActionFuture.Result.
1690func (future *ServerEndpointsRecallActionFuture) result(client ServerEndpointsClient) (ar autorest.Response, err error) {
1691	var done bool
1692	done, err = future.DoneWithContext(context.Background(), client)
1693	if err != nil {
1694		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsRecallActionFuture", "Result", future.Response(), "Polling failure")
1695		return
1696	}
1697	if !done {
1698		ar.Response = future.Response()
1699		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsRecallActionFuture")
1700		return
1701	}
1702	ar.Response = future.Response()
1703	return
1704}
1705
1706// ServerEndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1707// operation.
1708type ServerEndpointsUpdateFuture struct {
1709	azure.FutureAPI
1710	// Result returns the result of the asynchronous operation.
1711	// If the operation has not completed it will return an error.
1712	Result func(ServerEndpointsClient) (ServerEndpoint, error)
1713}
1714
1715// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1716func (future *ServerEndpointsUpdateFuture) UnmarshalJSON(body []byte) error {
1717	var azFuture azure.Future
1718	if err := json.Unmarshal(body, &azFuture); err != nil {
1719		return err
1720	}
1721	future.FutureAPI = &azFuture
1722	future.Result = future.result
1723	return nil
1724}
1725
1726// result is the default implementation for ServerEndpointsUpdateFuture.Result.
1727func (future *ServerEndpointsUpdateFuture) result(client ServerEndpointsClient) (se ServerEndpoint, err error) {
1728	var done bool
1729	done, err = future.DoneWithContext(context.Background(), client)
1730	if err != nil {
1731		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsUpdateFuture", "Result", future.Response(), "Polling failure")
1732		return
1733	}
1734	if !done {
1735		se.Response.Response = future.Response()
1736		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsUpdateFuture")
1737		return
1738	}
1739	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1740	if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
1741		se, err = client.UpdateResponder(se.Response.Response)
1742		if err != nil {
1743			err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsUpdateFuture", "Result", se.Response.Response, "Failure responding to request")
1744		}
1745	}
1746	return
1747}
1748
1749// ServerEndpointSyncActivityStatus sync Session status object.
1750type ServerEndpointSyncActivityStatus struct {
1751	// Timestamp - READ-ONLY; Timestamp when properties were updated
1752	Timestamp *date.Time `json:"timestamp,omitempty"`
1753	// PerItemErrorCount - READ-ONLY; Per item error count
1754	PerItemErrorCount *int64 `json:"perItemErrorCount,omitempty"`
1755	// AppliedItemCount - READ-ONLY; Applied item count.
1756	AppliedItemCount *int64 `json:"appliedItemCount,omitempty"`
1757	// TotalItemCount - READ-ONLY; Total item count (if available)
1758	TotalItemCount *int64 `json:"totalItemCount,omitempty"`
1759	// AppliedBytes - READ-ONLY; Applied bytes
1760	AppliedBytes *int64 `json:"appliedBytes,omitempty"`
1761	// TotalBytes - READ-ONLY; Total bytes (if available)
1762	TotalBytes *int64 `json:"totalBytes,omitempty"`
1763}
1764
1765// MarshalJSON is the custom marshaler for ServerEndpointSyncActivityStatus.
1766func (sesas ServerEndpointSyncActivityStatus) MarshalJSON() ([]byte, error) {
1767	objectMap := make(map[string]interface{})
1768	return json.Marshal(objectMap)
1769}
1770
1771// ServerEndpointSyncSessionStatus sync Session status object.
1772type ServerEndpointSyncSessionStatus struct {
1773	// LastSyncResult - READ-ONLY; Last sync result (HResult)
1774	LastSyncResult *int32 `json:"lastSyncResult,omitempty"`
1775	// LastSyncTimestamp - READ-ONLY; Last sync timestamp
1776	LastSyncTimestamp *date.Time `json:"lastSyncTimestamp,omitempty"`
1777	// LastSyncSuccessTimestamp - READ-ONLY; Last sync success timestamp
1778	LastSyncSuccessTimestamp *date.Time `json:"lastSyncSuccessTimestamp,omitempty"`
1779	// LastSyncPerItemErrorCount - READ-ONLY; Last sync per item error count.
1780	LastSyncPerItemErrorCount *int64 `json:"lastSyncPerItemErrorCount,omitempty"`
1781	// PersistentFilesNotSyncingCount - READ-ONLY; Count of persistent files not syncing.
1782	PersistentFilesNotSyncingCount *int64 `json:"persistentFilesNotSyncingCount,omitempty"`
1783	// TransientFilesNotSyncingCount - READ-ONLY; Count of transient files not syncing.
1784	TransientFilesNotSyncingCount *int64 `json:"transientFilesNotSyncingCount,omitempty"`
1785	// FilesNotSyncingErrors - READ-ONLY; Array of per-item errors coming from the last sync session.
1786	FilesNotSyncingErrors *[]ServerEndpointFilesNotSyncingError `json:"filesNotSyncingErrors,omitempty"`
1787}
1788
1789// MarshalJSON is the custom marshaler for ServerEndpointSyncSessionStatus.
1790func (sesss ServerEndpointSyncSessionStatus) MarshalJSON() ([]byte, error) {
1791	objectMap := make(map[string]interface{})
1792	return json.Marshal(objectMap)
1793}
1794
1795// ServerEndpointSyncStatus server Endpoint sync status
1796type ServerEndpointSyncStatus struct {
1797	// DownloadHealth - READ-ONLY; Download Health Status. Possible values include: 'DownloadHealthHealthy', 'DownloadHealthError', 'DownloadHealthSyncBlockedForRestore', 'DownloadHealthSyncBlockedForChangeDetectionPostRestore', 'DownloadHealthNoActivity'
1798	DownloadHealth DownloadHealth `json:"downloadHealth,omitempty"`
1799	// UploadHealth - READ-ONLY; Upload Health Status. Possible values include: 'UploadHealthHealthy', 'UploadHealthError', 'UploadHealthSyncBlockedForRestore', 'UploadHealthSyncBlockedForChangeDetectionPostRestore', 'UploadHealthNoActivity'
1800	UploadHealth UploadHealth `json:"uploadHealth,omitempty"`
1801	// CombinedHealth - READ-ONLY; Combined Health Status. Possible values include: 'CombinedHealthHealthy', 'CombinedHealthError', 'CombinedHealthSyncBlockedForRestore', 'CombinedHealthSyncBlockedForChangeDetectionPostRestore', 'CombinedHealthNoActivity'
1802	CombinedHealth CombinedHealth `json:"combinedHealth,omitempty"`
1803	// SyncActivity - READ-ONLY; Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload'
1804	SyncActivity SyncActivity `json:"syncActivity,omitempty"`
1805	// TotalPersistentFilesNotSyncingCount - READ-ONLY; Total count of persistent files not syncing (combined upload + download).
1806	TotalPersistentFilesNotSyncingCount *int64 `json:"totalPersistentFilesNotSyncingCount,omitempty"`
1807	// LastUpdatedTimestamp - READ-ONLY; Last Updated Timestamp
1808	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1809	// UploadStatus - READ-ONLY; Upload Status
1810	UploadStatus *ServerEndpointSyncSessionStatus `json:"uploadStatus,omitempty"`
1811	// DownloadStatus - READ-ONLY; Download Status
1812	DownloadStatus *ServerEndpointSyncSessionStatus `json:"downloadStatus,omitempty"`
1813	// UploadActivity - READ-ONLY; Upload sync activity
1814	UploadActivity *ServerEndpointSyncActivityStatus `json:"uploadActivity,omitempty"`
1815	// DownloadActivity - READ-ONLY; Download sync activity
1816	DownloadActivity *ServerEndpointSyncActivityStatus `json:"downloadActivity,omitempty"`
1817	// OfflineDataTransferStatus - READ-ONLY; Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete'
1818	OfflineDataTransferStatus OfflineDataTransferStatus `json:"offlineDataTransferStatus,omitempty"`
1819}
1820
1821// MarshalJSON is the custom marshaler for ServerEndpointSyncStatus.
1822func (sess ServerEndpointSyncStatus) MarshalJSON() ([]byte, error) {
1823	objectMap := make(map[string]interface{})
1824	return json.Marshal(objectMap)
1825}
1826
1827// ServerEndpointUpdateParameters parameters for updating an Server Endpoint.
1828type ServerEndpointUpdateParameters struct {
1829	// ServerEndpointUpdateProperties - The properties of the server endpoint.
1830	*ServerEndpointUpdateProperties `json:"properties,omitempty"`
1831}
1832
1833// MarshalJSON is the custom marshaler for ServerEndpointUpdateParameters.
1834func (seup ServerEndpointUpdateParameters) MarshalJSON() ([]byte, error) {
1835	objectMap := make(map[string]interface{})
1836	if seup.ServerEndpointUpdateProperties != nil {
1837		objectMap["properties"] = seup.ServerEndpointUpdateProperties
1838	}
1839	return json.Marshal(objectMap)
1840}
1841
1842// UnmarshalJSON is the custom unmarshaler for ServerEndpointUpdateParameters struct.
1843func (seup *ServerEndpointUpdateParameters) UnmarshalJSON(body []byte) error {
1844	var m map[string]*json.RawMessage
1845	err := json.Unmarshal(body, &m)
1846	if err != nil {
1847		return err
1848	}
1849	for k, v := range m {
1850		switch k {
1851		case "properties":
1852			if v != nil {
1853				var serverEndpointUpdateProperties ServerEndpointUpdateProperties
1854				err = json.Unmarshal(*v, &serverEndpointUpdateProperties)
1855				if err != nil {
1856					return err
1857				}
1858				seup.ServerEndpointUpdateProperties = &serverEndpointUpdateProperties
1859			}
1860		}
1861	}
1862
1863	return nil
1864}
1865
1866// ServerEndpointUpdateProperties serverEndpoint Update Properties object.
1867type ServerEndpointUpdateProperties struct {
1868	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering1On', 'CloudTiering1Off'
1869	CloudTiering CloudTiering1 `json:"cloudTiering,omitempty"`
1870	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1871	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1872	// TierFilesOlderThanDays - Tier files older than days.
1873	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1874	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer1On', 'OfflineDataTransfer1Off'
1875	OfflineDataTransfer OfflineDataTransfer1 `json:"offlineDataTransfer,omitempty"`
1876	// OfflineDataTransferShareName - Offline data transfer share name
1877	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1878}
1879
1880// Service storage Sync Service object.
1881type Service struct {
1882	autorest.Response `json:"-"`
1883	// ServiceProperties - Storage Sync Service properties.
1884	*ServiceProperties `json:"properties,omitempty"`
1885	// Tags - Resource tags.
1886	Tags map[string]*string `json:"tags"`
1887	// Location - The geo-location where the resource lives
1888	Location *string `json:"location,omitempty"`
1889	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1890	ID *string `json:"id,omitempty"`
1891	// Name - READ-ONLY; The name of the resource
1892	Name *string `json:"name,omitempty"`
1893	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1894	Type *string `json:"type,omitempty"`
1895}
1896
1897// MarshalJSON is the custom marshaler for Service.
1898func (s Service) MarshalJSON() ([]byte, error) {
1899	objectMap := make(map[string]interface{})
1900	if s.ServiceProperties != nil {
1901		objectMap["properties"] = s.ServiceProperties
1902	}
1903	if s.Tags != nil {
1904		objectMap["tags"] = s.Tags
1905	}
1906	if s.Location != nil {
1907		objectMap["location"] = s.Location
1908	}
1909	return json.Marshal(objectMap)
1910}
1911
1912// UnmarshalJSON is the custom unmarshaler for Service struct.
1913func (s *Service) UnmarshalJSON(body []byte) error {
1914	var m map[string]*json.RawMessage
1915	err := json.Unmarshal(body, &m)
1916	if err != nil {
1917		return err
1918	}
1919	for k, v := range m {
1920		switch k {
1921		case "properties":
1922			if v != nil {
1923				var serviceProperties ServiceProperties
1924				err = json.Unmarshal(*v, &serviceProperties)
1925				if err != nil {
1926					return err
1927				}
1928				s.ServiceProperties = &serviceProperties
1929			}
1930		case "tags":
1931			if v != nil {
1932				var tags map[string]*string
1933				err = json.Unmarshal(*v, &tags)
1934				if err != nil {
1935					return err
1936				}
1937				s.Tags = tags
1938			}
1939		case "location":
1940			if v != nil {
1941				var location string
1942				err = json.Unmarshal(*v, &location)
1943				if err != nil {
1944					return err
1945				}
1946				s.Location = &location
1947			}
1948		case "id":
1949			if v != nil {
1950				var ID string
1951				err = json.Unmarshal(*v, &ID)
1952				if err != nil {
1953					return err
1954				}
1955				s.ID = &ID
1956			}
1957		case "name":
1958			if v != nil {
1959				var name string
1960				err = json.Unmarshal(*v, &name)
1961				if err != nil {
1962					return err
1963				}
1964				s.Name = &name
1965			}
1966		case "type":
1967			if v != nil {
1968				var typeVar string
1969				err = json.Unmarshal(*v, &typeVar)
1970				if err != nil {
1971					return err
1972				}
1973				s.Type = &typeVar
1974			}
1975		}
1976	}
1977
1978	return nil
1979}
1980
1981// ServiceArray array of StorageSyncServices
1982type ServiceArray struct {
1983	autorest.Response `json:"-"`
1984	// Value - Collection of StorageSyncServices.
1985	Value *[]Service `json:"value,omitempty"`
1986}
1987
1988// ServiceCreateParameters the parameters used when creating a storage sync service.
1989type ServiceCreateParameters struct {
1990	// Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
1991	Location *string `json:"location,omitempty"`
1992	// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.
1993	Tags       map[string]*string `json:"tags"`
1994	Properties interface{}        `json:"properties,omitempty"`
1995}
1996
1997// MarshalJSON is the custom marshaler for ServiceCreateParameters.
1998func (scp ServiceCreateParameters) MarshalJSON() ([]byte, error) {
1999	objectMap := make(map[string]interface{})
2000	if scp.Location != nil {
2001		objectMap["location"] = scp.Location
2002	}
2003	if scp.Tags != nil {
2004		objectMap["tags"] = scp.Tags
2005	}
2006	if scp.Properties != nil {
2007		objectMap["properties"] = scp.Properties
2008	}
2009	return json.Marshal(objectMap)
2010}
2011
2012// ServiceProperties storage Sync Service Properties object.
2013type ServiceProperties struct {
2014	// StorageSyncServiceStatus - READ-ONLY; Storage Sync service status.
2015	StorageSyncServiceStatus *int32 `json:"storageSyncServiceStatus,omitempty"`
2016	// StorageSyncServiceUID - READ-ONLY; Storage Sync service Uid
2017	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
2018}
2019
2020// MarshalJSON is the custom marshaler for ServiceProperties.
2021func (sp ServiceProperties) MarshalJSON() ([]byte, error) {
2022	objectMap := make(map[string]interface{})
2023	return json.Marshal(objectMap)
2024}
2025
2026// ServiceUpdateParameters parameters for updating an Storage sync service.
2027type ServiceUpdateParameters struct {
2028	// Tags - The user-specified tags associated with the storage sync service.
2029	Tags map[string]*string `json:"tags"`
2030	// Properties - The properties of the storage sync service.
2031	Properties interface{} `json:"properties,omitempty"`
2032}
2033
2034// MarshalJSON is the custom marshaler for ServiceUpdateParameters.
2035func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) {
2036	objectMap := make(map[string]interface{})
2037	if sup.Tags != nil {
2038		objectMap["tags"] = sup.Tags
2039	}
2040	if sup.Properties != nil {
2041		objectMap["properties"] = sup.Properties
2042	}
2043	return json.Marshal(objectMap)
2044}
2045
2046// SubscriptionState subscription State object.
2047type SubscriptionState struct {
2048	// State - State of Azure Subscription. Possible values include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted'
2049	State Reason `json:"state,omitempty"`
2050	// Istransitioning - READ-ONLY; Is Transitioning
2051	Istransitioning *bool `json:"istransitioning,omitempty"`
2052	// Properties - Subscription state properties.
2053	Properties interface{} `json:"properties,omitempty"`
2054}
2055
2056// MarshalJSON is the custom marshaler for SubscriptionState.
2057func (ss SubscriptionState) MarshalJSON() ([]byte, error) {
2058	objectMap := make(map[string]interface{})
2059	if ss.State != "" {
2060		objectMap["state"] = ss.State
2061	}
2062	if ss.Properties != nil {
2063		objectMap["properties"] = ss.Properties
2064	}
2065	return json.Marshal(objectMap)
2066}
2067
2068// SyncGroup sync Group object.
2069type SyncGroup struct {
2070	autorest.Response `json:"-"`
2071	// SyncGroupProperties - SyncGroup properties.
2072	*SyncGroupProperties `json:"properties,omitempty"`
2073	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2074	ID *string `json:"id,omitempty"`
2075	// Name - READ-ONLY; The name of the resource
2076	Name *string `json:"name,omitempty"`
2077	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2078	Type *string `json:"type,omitempty"`
2079}
2080
2081// MarshalJSON is the custom marshaler for SyncGroup.
2082func (sg SyncGroup) MarshalJSON() ([]byte, error) {
2083	objectMap := make(map[string]interface{})
2084	if sg.SyncGroupProperties != nil {
2085		objectMap["properties"] = sg.SyncGroupProperties
2086	}
2087	return json.Marshal(objectMap)
2088}
2089
2090// UnmarshalJSON is the custom unmarshaler for SyncGroup struct.
2091func (sg *SyncGroup) UnmarshalJSON(body []byte) error {
2092	var m map[string]*json.RawMessage
2093	err := json.Unmarshal(body, &m)
2094	if err != nil {
2095		return err
2096	}
2097	for k, v := range m {
2098		switch k {
2099		case "properties":
2100			if v != nil {
2101				var syncGroupProperties SyncGroupProperties
2102				err = json.Unmarshal(*v, &syncGroupProperties)
2103				if err != nil {
2104					return err
2105				}
2106				sg.SyncGroupProperties = &syncGroupProperties
2107			}
2108		case "id":
2109			if v != nil {
2110				var ID string
2111				err = json.Unmarshal(*v, &ID)
2112				if err != nil {
2113					return err
2114				}
2115				sg.ID = &ID
2116			}
2117		case "name":
2118			if v != nil {
2119				var name string
2120				err = json.Unmarshal(*v, &name)
2121				if err != nil {
2122					return err
2123				}
2124				sg.Name = &name
2125			}
2126		case "type":
2127			if v != nil {
2128				var typeVar string
2129				err = json.Unmarshal(*v, &typeVar)
2130				if err != nil {
2131					return err
2132				}
2133				sg.Type = &typeVar
2134			}
2135		}
2136	}
2137
2138	return nil
2139}
2140
2141// SyncGroupArray array of SyncGroup
2142type SyncGroupArray struct {
2143	autorest.Response `json:"-"`
2144	// Value - Collection of SyncGroup.
2145	Value *[]SyncGroup `json:"value,omitempty"`
2146}
2147
2148// SyncGroupCreateParameters the parameters used when creating a sync group.
2149type SyncGroupCreateParameters struct {
2150	// Properties - The parameters used to create the sync group
2151	Properties interface{} `json:"properties,omitempty"`
2152	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2153	ID *string `json:"id,omitempty"`
2154	// Name - READ-ONLY; The name of the resource
2155	Name *string `json:"name,omitempty"`
2156	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2157	Type *string `json:"type,omitempty"`
2158}
2159
2160// MarshalJSON is the custom marshaler for SyncGroupCreateParameters.
2161func (sgcp SyncGroupCreateParameters) MarshalJSON() ([]byte, error) {
2162	objectMap := make(map[string]interface{})
2163	if sgcp.Properties != nil {
2164		objectMap["properties"] = sgcp.Properties
2165	}
2166	return json.Marshal(objectMap)
2167}
2168
2169// SyncGroupProperties syncGroup Properties object.
2170type SyncGroupProperties struct {
2171	// UniqueID - READ-ONLY; Unique Id
2172	UniqueID *string `json:"uniqueId,omitempty"`
2173	// SyncGroupStatus - READ-ONLY; Sync group status
2174	SyncGroupStatus *string `json:"syncGroupStatus,omitempty"`
2175}
2176
2177// MarshalJSON is the custom marshaler for SyncGroupProperties.
2178func (sgp SyncGroupProperties) MarshalJSON() ([]byte, error) {
2179	objectMap := make(map[string]interface{})
2180	return json.Marshal(objectMap)
2181}
2182
2183// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
2184// which has 'tags' and a 'location'
2185type TrackedResource struct {
2186	// Tags - Resource tags.
2187	Tags map[string]*string `json:"tags"`
2188	// Location - The geo-location where the resource lives
2189	Location *string `json:"location,omitempty"`
2190	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2191	ID *string `json:"id,omitempty"`
2192	// Name - READ-ONLY; The name of the resource
2193	Name *string `json:"name,omitempty"`
2194	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2195	Type *string `json:"type,omitempty"`
2196}
2197
2198// MarshalJSON is the custom marshaler for TrackedResource.
2199func (tr TrackedResource) MarshalJSON() ([]byte, error) {
2200	objectMap := make(map[string]interface{})
2201	if tr.Tags != nil {
2202		objectMap["tags"] = tr.Tags
2203	}
2204	if tr.Location != nil {
2205		objectMap["location"] = tr.Location
2206	}
2207	return json.Marshal(objectMap)
2208}
2209
2210// TriggerChangeDetectionParameters the parameters used when calling trigger change detection action on
2211// cloud endpoint.
2212type TriggerChangeDetectionParameters struct {
2213	// DirectoryPath - Relative path to a directory Azure File share for which change detection is to be performed.
2214	DirectoryPath *string `json:"directoryPath,omitempty"`
2215	// ChangeDetectionMode - Change Detection Mode. Applies to a directory specified in directoryPath parameter. Possible values include: 'Default', 'Recursive'
2216	ChangeDetectionMode ChangeDetectionMode `json:"changeDetectionMode,omitempty"`
2217	// Paths - Array of relative paths on the Azure File share to be included in the change detection. Can be files and directories.
2218	Paths *[]string `json:"paths,omitempty"`
2219}
2220
2221// TriggerRolloverRequest trigger Rollover Request.
2222type TriggerRolloverRequest struct {
2223	// ServerCertificate - Certificate Data
2224	ServerCertificate *string `json:"serverCertificate,omitempty"`
2225}
2226
2227// Workflow workflow resource.
2228type Workflow struct {
2229	autorest.Response `json:"-"`
2230	// WorkflowProperties - Workflow properties.
2231	*WorkflowProperties `json:"properties,omitempty"`
2232	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2233	ID *string `json:"id,omitempty"`
2234	// Name - READ-ONLY; The name of the resource
2235	Name *string `json:"name,omitempty"`
2236	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2237	Type *string `json:"type,omitempty"`
2238}
2239
2240// MarshalJSON is the custom marshaler for Workflow.
2241func (w Workflow) MarshalJSON() ([]byte, error) {
2242	objectMap := make(map[string]interface{})
2243	if w.WorkflowProperties != nil {
2244		objectMap["properties"] = w.WorkflowProperties
2245	}
2246	return json.Marshal(objectMap)
2247}
2248
2249// UnmarshalJSON is the custom unmarshaler for Workflow struct.
2250func (w *Workflow) UnmarshalJSON(body []byte) error {
2251	var m map[string]*json.RawMessage
2252	err := json.Unmarshal(body, &m)
2253	if err != nil {
2254		return err
2255	}
2256	for k, v := range m {
2257		switch k {
2258		case "properties":
2259			if v != nil {
2260				var workflowProperties WorkflowProperties
2261				err = json.Unmarshal(*v, &workflowProperties)
2262				if err != nil {
2263					return err
2264				}
2265				w.WorkflowProperties = &workflowProperties
2266			}
2267		case "id":
2268			if v != nil {
2269				var ID string
2270				err = json.Unmarshal(*v, &ID)
2271				if err != nil {
2272					return err
2273				}
2274				w.ID = &ID
2275			}
2276		case "name":
2277			if v != nil {
2278				var name string
2279				err = json.Unmarshal(*v, &name)
2280				if err != nil {
2281					return err
2282				}
2283				w.Name = &name
2284			}
2285		case "type":
2286			if v != nil {
2287				var typeVar string
2288				err = json.Unmarshal(*v, &typeVar)
2289				if err != nil {
2290					return err
2291				}
2292				w.Type = &typeVar
2293			}
2294		}
2295	}
2296
2297	return nil
2298}
2299
2300// WorkflowArray array of Workflow
2301type WorkflowArray struct {
2302	autorest.Response `json:"-"`
2303	// Value - Collection of workflow items.
2304	Value *[]Workflow `json:"value,omitempty"`
2305}
2306
2307// WorkflowProperties workflow Properties object.
2308type WorkflowProperties struct {
2309	// LastStepName - last step name
2310	LastStepName *string `json:"lastStepName,omitempty"`
2311	// Status - workflow status. Possible values include: 'Active', 'Expired', 'Succeeded', 'Aborted', 'Failed'
2312	Status Status `json:"status,omitempty"`
2313	// Operation - operation direction. Possible values include: 'Do', 'Undo', 'Cancel'
2314	Operation Operation `json:"operation,omitempty"`
2315	// Steps - workflow steps
2316	Steps *string `json:"steps,omitempty"`
2317	// LastOperationID - workflow last operation identifier.
2318	LastOperationID *string `json:"lastOperationId,omitempty"`
2319}
2320