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