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