1package storagesync
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/storagesync/mgmt/2019-10-01/storagesync"
33
34// 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// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
741// have tags and a location
742type ProxyResource struct {
743	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
744	ID *string `json:"id,omitempty"`
745	// Name - READ-ONLY; The name of the resource
746	Name *string `json:"name,omitempty"`
747	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
748	Type *string `json:"type,omitempty"`
749}
750
751// RecallActionParameters the parameters used when calling recall action on server endpoint.
752type RecallActionParameters struct {
753	// Pattern - Pattern of the files.
754	Pattern *string `json:"pattern,omitempty"`
755	// RecallPath - Recall path.
756	RecallPath *string `json:"recallPath,omitempty"`
757}
758
759// RegisteredServer registered Server resource.
760type RegisteredServer struct {
761	autorest.Response `json:"-"`
762	// RegisteredServerProperties - RegisteredServer properties.
763	*RegisteredServerProperties `json:"properties,omitempty"`
764	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
765	ID *string `json:"id,omitempty"`
766	// Name - READ-ONLY; The name of the resource
767	Name *string `json:"name,omitempty"`
768	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
769	Type *string `json:"type,omitempty"`
770}
771
772// MarshalJSON is the custom marshaler for RegisteredServer.
773func (rs RegisteredServer) MarshalJSON() ([]byte, error) {
774	objectMap := make(map[string]interface{})
775	if rs.RegisteredServerProperties != nil {
776		objectMap["properties"] = rs.RegisteredServerProperties
777	}
778	return json.Marshal(objectMap)
779}
780
781// UnmarshalJSON is the custom unmarshaler for RegisteredServer struct.
782func (rs *RegisteredServer) UnmarshalJSON(body []byte) error {
783	var m map[string]*json.RawMessage
784	err := json.Unmarshal(body, &m)
785	if err != nil {
786		return err
787	}
788	for k, v := range m {
789		switch k {
790		case "properties":
791			if v != nil {
792				var registeredServerProperties RegisteredServerProperties
793				err = json.Unmarshal(*v, &registeredServerProperties)
794				if err != nil {
795					return err
796				}
797				rs.RegisteredServerProperties = &registeredServerProperties
798			}
799		case "id":
800			if v != nil {
801				var ID string
802				err = json.Unmarshal(*v, &ID)
803				if err != nil {
804					return err
805				}
806				rs.ID = &ID
807			}
808		case "name":
809			if v != nil {
810				var name string
811				err = json.Unmarshal(*v, &name)
812				if err != nil {
813					return err
814				}
815				rs.Name = &name
816			}
817		case "type":
818			if v != nil {
819				var typeVar string
820				err = json.Unmarshal(*v, &typeVar)
821				if err != nil {
822					return err
823				}
824				rs.Type = &typeVar
825			}
826		}
827	}
828
829	return nil
830}
831
832// RegisteredServerArray array of RegisteredServer
833type RegisteredServerArray struct {
834	autorest.Response `json:"-"`
835	// Value - Collection of Registered Server.
836	Value *[]RegisteredServer `json:"value,omitempty"`
837}
838
839// RegisteredServerCreateParameters the parameters used when creating a registered server.
840type RegisteredServerCreateParameters struct {
841	// RegisteredServerCreateParametersProperties - The parameters used to create the registered server.
842	*RegisteredServerCreateParametersProperties `json:"properties,omitempty"`
843	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
844	ID *string `json:"id,omitempty"`
845	// Name - READ-ONLY; The name of the resource
846	Name *string `json:"name,omitempty"`
847	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
848	Type *string `json:"type,omitempty"`
849}
850
851// MarshalJSON is the custom marshaler for RegisteredServerCreateParameters.
852func (rscp RegisteredServerCreateParameters) MarshalJSON() ([]byte, error) {
853	objectMap := make(map[string]interface{})
854	if rscp.RegisteredServerCreateParametersProperties != nil {
855		objectMap["properties"] = rscp.RegisteredServerCreateParametersProperties
856	}
857	return json.Marshal(objectMap)
858}
859
860// UnmarshalJSON is the custom unmarshaler for RegisteredServerCreateParameters struct.
861func (rscp *RegisteredServerCreateParameters) UnmarshalJSON(body []byte) error {
862	var m map[string]*json.RawMessage
863	err := json.Unmarshal(body, &m)
864	if err != nil {
865		return err
866	}
867	for k, v := range m {
868		switch k {
869		case "properties":
870			if v != nil {
871				var registeredServerCreateParametersProperties RegisteredServerCreateParametersProperties
872				err = json.Unmarshal(*v, &registeredServerCreateParametersProperties)
873				if err != nil {
874					return err
875				}
876				rscp.RegisteredServerCreateParametersProperties = &registeredServerCreateParametersProperties
877			}
878		case "id":
879			if v != nil {
880				var ID string
881				err = json.Unmarshal(*v, &ID)
882				if err != nil {
883					return err
884				}
885				rscp.ID = &ID
886			}
887		case "name":
888			if v != nil {
889				var name string
890				err = json.Unmarshal(*v, &name)
891				if err != nil {
892					return err
893				}
894				rscp.Name = &name
895			}
896		case "type":
897			if v != nil {
898				var typeVar string
899				err = json.Unmarshal(*v, &typeVar)
900				if err != nil {
901					return err
902				}
903				rscp.Type = &typeVar
904			}
905		}
906	}
907
908	return nil
909}
910
911// RegisteredServerCreateParametersProperties ...
912type RegisteredServerCreateParametersProperties struct {
913	// ServerCertificate - Registered Server Certificate
914	ServerCertificate *string `json:"serverCertificate,omitempty"`
915	// AgentVersion - Registered Server Agent Version
916	AgentVersion *string `json:"agentVersion,omitempty"`
917	// ServerOSVersion - Registered Server OS Version
918	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
919	// LastHeartBeat - Registered Server last heart beat
920	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
921	// ServerRole - Registered Server serverRole
922	ServerRole *string `json:"serverRole,omitempty"`
923	// ClusterID - Registered Server clusterId
924	ClusterID *string `json:"clusterId,omitempty"`
925	// ClusterName - Registered Server clusterName
926	ClusterName *string `json:"clusterName,omitempty"`
927	// ServerID - Registered Server serverId
928	ServerID *string `json:"serverId,omitempty"`
929	// FriendlyName - Friendly Name
930	FriendlyName *string `json:"friendlyName,omitempty"`
931}
932
933// RegisteredServerProperties registeredServer Properties object.
934type RegisteredServerProperties struct {
935	// ServerCertificate - Registered Server Certificate
936	ServerCertificate *string `json:"serverCertificate,omitempty"`
937	// AgentVersion - Registered Server Agent Version
938	AgentVersion *string `json:"agentVersion,omitempty"`
939	// ServerOSVersion - Registered Server OS Version
940	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
941	// ServerManagementErrorCode - Registered Server Management Error Code
942	ServerManagementErrorCode *int32 `json:"serverManagementErrorCode,omitempty"`
943	// LastHeartBeat - Registered Server last heart beat
944	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
945	// ProvisioningState - Registered Server Provisioning State
946	ProvisioningState *string `json:"provisioningState,omitempty"`
947	// ServerRole - Registered Server serverRole
948	ServerRole *string `json:"serverRole,omitempty"`
949	// ClusterID - Registered Server clusterId
950	ClusterID *string `json:"clusterId,omitempty"`
951	// ClusterName - Registered Server clusterName
952	ClusterName *string `json:"clusterName,omitempty"`
953	// ServerID - Registered Server serverId
954	ServerID *string `json:"serverId,omitempty"`
955	// StorageSyncServiceUID - Registered Server storageSyncServiceUid
956	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
957	// LastWorkflowID - Registered Server lastWorkflowId
958	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
959	// LastOperationName - Resource Last Operation Name
960	LastOperationName *string `json:"lastOperationName,omitempty"`
961	// DiscoveryEndpointURI - Resource discoveryEndpointUri
962	DiscoveryEndpointURI *string `json:"discoveryEndpointUri,omitempty"`
963	// ResourceLocation - Resource Location
964	ResourceLocation *string `json:"resourceLocation,omitempty"`
965	// ServiceLocation - Service Location
966	ServiceLocation *string `json:"serviceLocation,omitempty"`
967	// FriendlyName - Friendly Name
968	FriendlyName *string `json:"friendlyName,omitempty"`
969	// ManagementEndpointURI - Management Endpoint Uri
970	ManagementEndpointURI *string `json:"managementEndpointUri,omitempty"`
971	// MonitoringConfiguration - Monitoring Configuration
972	MonitoringConfiguration *string `json:"monitoringConfiguration,omitempty"`
973}
974
975// RegisteredServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
976// operation.
977type RegisteredServersCreateFuture struct {
978	azure.FutureAPI
979	// Result returns the result of the asynchronous operation.
980	// If the operation has not completed it will return an error.
981	Result func(RegisteredServersClient) (RegisteredServer, error)
982}
983
984// RegisteredServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
985// operation.
986type RegisteredServersDeleteFuture struct {
987	azure.FutureAPI
988	// Result returns the result of the asynchronous operation.
989	// If the operation has not completed it will return an error.
990	Result func(RegisteredServersClient) (autorest.Response, error)
991}
992
993// RegisteredServersTriggerRolloverFuture an abstraction for monitoring and retrieving the results of a
994// long-running operation.
995type RegisteredServersTriggerRolloverFuture struct {
996	azure.FutureAPI
997	// Result returns the result of the asynchronous operation.
998	// If the operation has not completed it will return an error.
999	Result func(RegisteredServersClient) (autorest.Response, error)
1000}
1001
1002// Resource common fields that are returned in the response for all Azure Resource Manager resources
1003type Resource struct {
1004	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1005	ID *string `json:"id,omitempty"`
1006	// Name - READ-ONLY; The name of the resource
1007	Name *string `json:"name,omitempty"`
1008	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1009	Type *string `json:"type,omitempty"`
1010}
1011
1012// ResourcesMoveInfo resource Move Info.
1013type ResourcesMoveInfo struct {
1014	// TargetResourceGroup - Target resource group.
1015	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
1016	// Resources - Collection of Resources.
1017	Resources *[]string `json:"resources,omitempty"`
1018}
1019
1020// RestoreFileSpec restore file spec.
1021type RestoreFileSpec struct {
1022	// Path - Restore file spec path
1023	Path *string `json:"path,omitempty"`
1024	// Isdir - Restore file spec isdir
1025	Isdir *bool `json:"isdir,omitempty"`
1026}
1027
1028// ServerEndpoint server Endpoint object.
1029type ServerEndpoint struct {
1030	autorest.Response `json:"-"`
1031	// ServerEndpointProperties - Server Endpoint properties.
1032	*ServerEndpointProperties `json:"properties,omitempty"`
1033	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1034	ID *string `json:"id,omitempty"`
1035	// Name - READ-ONLY; The name of the resource
1036	Name *string `json:"name,omitempty"`
1037	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1038	Type *string `json:"type,omitempty"`
1039}
1040
1041// MarshalJSON is the custom marshaler for ServerEndpoint.
1042func (se ServerEndpoint) MarshalJSON() ([]byte, error) {
1043	objectMap := make(map[string]interface{})
1044	if se.ServerEndpointProperties != nil {
1045		objectMap["properties"] = se.ServerEndpointProperties
1046	}
1047	return json.Marshal(objectMap)
1048}
1049
1050// UnmarshalJSON is the custom unmarshaler for ServerEndpoint struct.
1051func (se *ServerEndpoint) UnmarshalJSON(body []byte) error {
1052	var m map[string]*json.RawMessage
1053	err := json.Unmarshal(body, &m)
1054	if err != nil {
1055		return err
1056	}
1057	for k, v := range m {
1058		switch k {
1059		case "properties":
1060			if v != nil {
1061				var serverEndpointProperties ServerEndpointProperties
1062				err = json.Unmarshal(*v, &serverEndpointProperties)
1063				if err != nil {
1064					return err
1065				}
1066				se.ServerEndpointProperties = &serverEndpointProperties
1067			}
1068		case "id":
1069			if v != nil {
1070				var ID string
1071				err = json.Unmarshal(*v, &ID)
1072				if err != nil {
1073					return err
1074				}
1075				se.ID = &ID
1076			}
1077		case "name":
1078			if v != nil {
1079				var name string
1080				err = json.Unmarshal(*v, &name)
1081				if err != nil {
1082					return err
1083				}
1084				se.Name = &name
1085			}
1086		case "type":
1087			if v != nil {
1088				var typeVar string
1089				err = json.Unmarshal(*v, &typeVar)
1090				if err != nil {
1091					return err
1092				}
1093				se.Type = &typeVar
1094			}
1095		}
1096	}
1097
1098	return nil
1099}
1100
1101// ServerEndpointArray array of ServerEndpoint
1102type ServerEndpointArray struct {
1103	autorest.Response `json:"-"`
1104	// Value - Collection of ServerEndpoint.
1105	Value *[]ServerEndpoint `json:"value,omitempty"`
1106}
1107
1108// ServerEndpointCloudTieringStatus server endpoint cloud tiering status object.
1109type ServerEndpointCloudTieringStatus struct {
1110	// LastUpdatedTimestamp - READ-ONLY; Last updated timestamp
1111	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1112	// Health - READ-ONLY; Cloud tiering health state. Possible values include: 'HealthHealthy', 'HealthError'
1113	Health Health `json:"health,omitempty"`
1114	// HealthLastUpdatedTimestamp - READ-ONLY; The last updated timestamp of health state
1115	HealthLastUpdatedTimestamp *date.Time `json:"healthLastUpdatedTimestamp,omitempty"`
1116	// LastCloudTieringResult - READ-ONLY; Last cloud tiering result (HResult)
1117	LastCloudTieringResult *int32 `json:"lastCloudTieringResult,omitempty"`
1118	// LastSuccessTimestamp - READ-ONLY; Last cloud tiering success timestamp
1119	LastSuccessTimestamp *date.Time `json:"lastSuccessTimestamp,omitempty"`
1120	// SpaceSavings - READ-ONLY; Information regarding how much local space cloud tiering is saving.
1121	SpaceSavings *CloudTieringSpaceSavings `json:"spaceSavings,omitempty"`
1122	// CachePerformance - READ-ONLY; Information regarding how well the local cache on the server is performing.
1123	CachePerformance *CloudTieringCachePerformance `json:"cachePerformance,omitempty"`
1124	// FilesNotTiering - READ-ONLY; Information regarding files that failed to be tiered
1125	FilesNotTiering *CloudTieringFilesNotTiering `json:"filesNotTiering,omitempty"`
1126	// VolumeFreeSpacePolicyStatus - READ-ONLY; Status of the volume free space policy
1127	VolumeFreeSpacePolicyStatus *CloudTieringVolumeFreeSpacePolicyStatus `json:"volumeFreeSpacePolicyStatus,omitempty"`
1128	// DatePolicyStatus - READ-ONLY; Status of the date policy
1129	DatePolicyStatus *CloudTieringDatePolicyStatus `json:"datePolicyStatus,omitempty"`
1130}
1131
1132// ServerEndpointCreateParameters the parameters used when creating a server endpoint.
1133type ServerEndpointCreateParameters struct {
1134	// ServerEndpointCreateParametersProperties - The parameters used to create the server endpoint.
1135	*ServerEndpointCreateParametersProperties `json:"properties,omitempty"`
1136	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1137	ID *string `json:"id,omitempty"`
1138	// Name - READ-ONLY; The name of the resource
1139	Name *string `json:"name,omitempty"`
1140	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1141	Type *string `json:"type,omitempty"`
1142}
1143
1144// MarshalJSON is the custom marshaler for ServerEndpointCreateParameters.
1145func (secp ServerEndpointCreateParameters) MarshalJSON() ([]byte, error) {
1146	objectMap := make(map[string]interface{})
1147	if secp.ServerEndpointCreateParametersProperties != nil {
1148		objectMap["properties"] = secp.ServerEndpointCreateParametersProperties
1149	}
1150	return json.Marshal(objectMap)
1151}
1152
1153// UnmarshalJSON is the custom unmarshaler for ServerEndpointCreateParameters struct.
1154func (secp *ServerEndpointCreateParameters) UnmarshalJSON(body []byte) error {
1155	var m map[string]*json.RawMessage
1156	err := json.Unmarshal(body, &m)
1157	if err != nil {
1158		return err
1159	}
1160	for k, v := range m {
1161		switch k {
1162		case "properties":
1163			if v != nil {
1164				var serverEndpointCreateParametersProperties ServerEndpointCreateParametersProperties
1165				err = json.Unmarshal(*v, &serverEndpointCreateParametersProperties)
1166				if err != nil {
1167					return err
1168				}
1169				secp.ServerEndpointCreateParametersProperties = &serverEndpointCreateParametersProperties
1170			}
1171		case "id":
1172			if v != nil {
1173				var ID string
1174				err = json.Unmarshal(*v, &ID)
1175				if err != nil {
1176					return err
1177				}
1178				secp.ID = &ID
1179			}
1180		case "name":
1181			if v != nil {
1182				var name string
1183				err = json.Unmarshal(*v, &name)
1184				if err != nil {
1185					return err
1186				}
1187				secp.Name = &name
1188			}
1189		case "type":
1190			if v != nil {
1191				var typeVar string
1192				err = json.Unmarshal(*v, &typeVar)
1193				if err != nil {
1194					return err
1195				}
1196				secp.Type = &typeVar
1197			}
1198		}
1199	}
1200
1201	return nil
1202}
1203
1204// ServerEndpointCreateParametersProperties serverEndpoint Properties object.
1205type ServerEndpointCreateParametersProperties struct {
1206	// ServerLocalPath - Server Local path.
1207	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1208	// CloudTiering - Cloud Tiering. Possible values include: 'On', 'Off'
1209	CloudTiering CloudTiering `json:"cloudTiering,omitempty"`
1210	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1211	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1212	// TierFilesOlderThanDays - Tier files older than days.
1213	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1214	// FriendlyName - Friendly Name
1215	FriendlyName *string `json:"friendlyName,omitempty"`
1216	// ServerResourceID - Server Resource Id.
1217	ServerResourceID *string `json:"serverResourceId,omitempty"`
1218	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransferOn', 'OfflineDataTransferOff'
1219	OfflineDataTransfer OfflineDataTransfer `json:"offlineDataTransfer,omitempty"`
1220	// OfflineDataTransferShareName - Offline data transfer share name
1221	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1222}
1223
1224// ServerEndpointFilesNotSyncingError files not syncing error object
1225type ServerEndpointFilesNotSyncingError struct {
1226	// ErrorCode - READ-ONLY; Error code (HResult)
1227	ErrorCode *int32 `json:"errorCode,omitempty"`
1228	// PersistentCount - READ-ONLY; Count of persistent files not syncing with the specified error code
1229	PersistentCount *int64 `json:"persistentCount,omitempty"`
1230	// TransientCount - READ-ONLY; Count of transient files not syncing with the specified error code
1231	TransientCount *int64 `json:"transientCount,omitempty"`
1232}
1233
1234// ServerEndpointProperties serverEndpoint Properties object.
1235type ServerEndpointProperties struct {
1236	// ServerLocalPath - Server Local path.
1237	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1238	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering2On', 'CloudTiering2Off'
1239	CloudTiering CloudTiering2 `json:"cloudTiering,omitempty"`
1240	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1241	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1242	// TierFilesOlderThanDays - Tier files older than days.
1243	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1244	// FriendlyName - Friendly Name
1245	FriendlyName *string `json:"friendlyName,omitempty"`
1246	// ServerResourceID - Server Resource Id.
1247	ServerResourceID *string `json:"serverResourceId,omitempty"`
1248	// ProvisioningState - READ-ONLY; ServerEndpoint Provisioning State
1249	ProvisioningState *string `json:"provisioningState,omitempty"`
1250	// LastWorkflowID - READ-ONLY; ServerEndpoint lastWorkflowId
1251	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
1252	// LastOperationName - READ-ONLY; Resource Last Operation Name
1253	LastOperationName *string `json:"lastOperationName,omitempty"`
1254	// SyncStatus - READ-ONLY; Server Endpoint sync status
1255	SyncStatus *ServerEndpointSyncStatus `json:"syncStatus,omitempty"`
1256	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer2On', 'OfflineDataTransfer2Off'
1257	OfflineDataTransfer OfflineDataTransfer2 `json:"offlineDataTransfer,omitempty"`
1258	// OfflineDataTransferStorageAccountResourceID - READ-ONLY; Offline data transfer storage account resource ID
1259	OfflineDataTransferStorageAccountResourceID *string `json:"offlineDataTransferStorageAccountResourceId,omitempty"`
1260	// OfflineDataTransferStorageAccountTenantID - READ-ONLY; Offline data transfer storage account tenant ID
1261	OfflineDataTransferStorageAccountTenantID *string `json:"offlineDataTransferStorageAccountTenantId,omitempty"`
1262	// OfflineDataTransferShareName - Offline data transfer share name
1263	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1264	// CloudTieringStatus - READ-ONLY; Cloud tiering status. Only populated if cloud tiering is enabled.
1265	CloudTieringStatus *ServerEndpointCloudTieringStatus `json:"cloudTieringStatus,omitempty"`
1266	// RecallStatus - READ-ONLY; Recall status. Only populated if cloud tiering is enabled.
1267	RecallStatus *ServerEndpointRecallStatus `json:"recallStatus,omitempty"`
1268}
1269
1270// MarshalJSON is the custom marshaler for ServerEndpointProperties.
1271func (sep ServerEndpointProperties) MarshalJSON() ([]byte, error) {
1272	objectMap := make(map[string]interface{})
1273	if sep.ServerLocalPath != nil {
1274		objectMap["serverLocalPath"] = sep.ServerLocalPath
1275	}
1276	if sep.CloudTiering != "" {
1277		objectMap["cloudTiering"] = sep.CloudTiering
1278	}
1279	if sep.VolumeFreeSpacePercent != nil {
1280		objectMap["volumeFreeSpacePercent"] = sep.VolumeFreeSpacePercent
1281	}
1282	if sep.TierFilesOlderThanDays != nil {
1283		objectMap["tierFilesOlderThanDays"] = sep.TierFilesOlderThanDays
1284	}
1285	if sep.FriendlyName != nil {
1286		objectMap["friendlyName"] = sep.FriendlyName
1287	}
1288	if sep.ServerResourceID != nil {
1289		objectMap["serverResourceId"] = sep.ServerResourceID
1290	}
1291	if sep.OfflineDataTransfer != "" {
1292		objectMap["offlineDataTransfer"] = sep.OfflineDataTransfer
1293	}
1294	if sep.OfflineDataTransferShareName != nil {
1295		objectMap["offlineDataTransferShareName"] = sep.OfflineDataTransferShareName
1296	}
1297	return json.Marshal(objectMap)
1298}
1299
1300// ServerEndpointRecallError server endpoint recall error object
1301type ServerEndpointRecallError struct {
1302	// ErrorCode - READ-ONLY; Error code (HResult)
1303	ErrorCode *int32 `json:"errorCode,omitempty"`
1304	// Count - READ-ONLY; Count of occurences of the error
1305	Count *int64 `json:"count,omitempty"`
1306}
1307
1308// ServerEndpointRecallStatus server endpoint recall status object.
1309type ServerEndpointRecallStatus struct {
1310	// LastUpdatedTimestamp - READ-ONLY; Last updated timestamp
1311	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1312	// TotalRecallErrorsCount - READ-ONLY; Total count of recall errors.
1313	TotalRecallErrorsCount *int64 `json:"totalRecallErrorsCount,omitempty"`
1314	// RecallErrors - READ-ONLY; Array of recall errors
1315	RecallErrors *[]ServerEndpointRecallError `json:"recallErrors,omitempty"`
1316}
1317
1318// ServerEndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1319// operation.
1320type ServerEndpointsCreateFuture struct {
1321	azure.FutureAPI
1322	// Result returns the result of the asynchronous operation.
1323	// If the operation has not completed it will return an error.
1324	Result func(ServerEndpointsClient) (ServerEndpoint, error)
1325}
1326
1327// ServerEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1328// operation.
1329type ServerEndpointsDeleteFuture struct {
1330	azure.FutureAPI
1331	// Result returns the result of the asynchronous operation.
1332	// If the operation has not completed it will return an error.
1333	Result func(ServerEndpointsClient) (autorest.Response, error)
1334}
1335
1336// ServerEndpointsRecallActionFuture an abstraction for monitoring and retrieving the results of a
1337// long-running operation.
1338type ServerEndpointsRecallActionFuture struct {
1339	azure.FutureAPI
1340	// Result returns the result of the asynchronous operation.
1341	// If the operation has not completed it will return an error.
1342	Result func(ServerEndpointsClient) (autorest.Response, error)
1343}
1344
1345// ServerEndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1346// operation.
1347type ServerEndpointsUpdateFuture struct {
1348	azure.FutureAPI
1349	// Result returns the result of the asynchronous operation.
1350	// If the operation has not completed it will return an error.
1351	Result func(ServerEndpointsClient) (ServerEndpoint, error)
1352}
1353
1354// ServerEndpointSyncStatus server Endpoint sync status
1355type ServerEndpointSyncStatus struct {
1356	// DownloadHealth - READ-ONLY; Download Health Status. Possible values include: 'DownloadHealthHealthy', 'DownloadHealthError', 'DownloadHealthSyncBlockedForRestore', 'DownloadHealthSyncBlockedForChangeDetectionPostRestore', 'DownloadHealthNoActivity'
1357	DownloadHealth DownloadHealth `json:"downloadHealth,omitempty"`
1358	// UploadHealth - READ-ONLY; Upload Health Status. Possible values include: 'UploadHealthHealthy', 'UploadHealthError', 'UploadHealthSyncBlockedForRestore', 'UploadHealthSyncBlockedForChangeDetectionPostRestore', 'UploadHealthNoActivity'
1359	UploadHealth UploadHealth `json:"uploadHealth,omitempty"`
1360	// CombinedHealth - READ-ONLY; Combined Health Status. Possible values include: 'CombinedHealthHealthy', 'CombinedHealthError', 'CombinedHealthSyncBlockedForRestore', 'CombinedHealthSyncBlockedForChangeDetectionPostRestore', 'CombinedHealthNoActivity'
1361	CombinedHealth CombinedHealth `json:"combinedHealth,omitempty"`
1362	// SyncActivity - READ-ONLY; Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload'
1363	SyncActivity SyncActivity `json:"syncActivity,omitempty"`
1364	// TotalPersistentFilesNotSyncingCount - READ-ONLY; Total count of persistent files not syncing (combined upload + download).
1365	TotalPersistentFilesNotSyncingCount *int64 `json:"totalPersistentFilesNotSyncingCount,omitempty"`
1366	// LastUpdatedTimestamp - READ-ONLY; Last Updated Timestamp
1367	LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"`
1368	// UploadStatus - READ-ONLY; Upload Status
1369	UploadStatus *SyncSessionStatus `json:"uploadStatus,omitempty"`
1370	// DownloadStatus - READ-ONLY; Download Status
1371	DownloadStatus *SyncSessionStatus `json:"downloadStatus,omitempty"`
1372	// UploadActivity - READ-ONLY; Upload sync activity
1373	UploadActivity *SyncActivityStatus `json:"uploadActivity,omitempty"`
1374	// DownloadActivity - READ-ONLY; Download sync activity
1375	DownloadActivity *SyncActivityStatus `json:"downloadActivity,omitempty"`
1376	// OfflineDataTransferStatus - READ-ONLY; Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete'
1377	OfflineDataTransferStatus OfflineDataTransferStatus `json:"offlineDataTransferStatus,omitempty"`
1378}
1379
1380// ServerEndpointUpdateParameters parameters for updating an Server Endpoint.
1381type ServerEndpointUpdateParameters struct {
1382	// ServerEndpointUpdateProperties - The properties of the server endpoint.
1383	*ServerEndpointUpdateProperties `json:"properties,omitempty"`
1384}
1385
1386// MarshalJSON is the custom marshaler for ServerEndpointUpdateParameters.
1387func (seup ServerEndpointUpdateParameters) MarshalJSON() ([]byte, error) {
1388	objectMap := make(map[string]interface{})
1389	if seup.ServerEndpointUpdateProperties != nil {
1390		objectMap["properties"] = seup.ServerEndpointUpdateProperties
1391	}
1392	return json.Marshal(objectMap)
1393}
1394
1395// UnmarshalJSON is the custom unmarshaler for ServerEndpointUpdateParameters struct.
1396func (seup *ServerEndpointUpdateParameters) UnmarshalJSON(body []byte) error {
1397	var m map[string]*json.RawMessage
1398	err := json.Unmarshal(body, &m)
1399	if err != nil {
1400		return err
1401	}
1402	for k, v := range m {
1403		switch k {
1404		case "properties":
1405			if v != nil {
1406				var serverEndpointUpdateProperties ServerEndpointUpdateProperties
1407				err = json.Unmarshal(*v, &serverEndpointUpdateProperties)
1408				if err != nil {
1409					return err
1410				}
1411				seup.ServerEndpointUpdateProperties = &serverEndpointUpdateProperties
1412			}
1413		}
1414	}
1415
1416	return nil
1417}
1418
1419// ServerEndpointUpdateProperties serverEndpoint Update Properties object.
1420type ServerEndpointUpdateProperties struct {
1421	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering1On', 'CloudTiering1Off'
1422	CloudTiering CloudTiering1 `json:"cloudTiering,omitempty"`
1423	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1424	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1425	// TierFilesOlderThanDays - Tier files older than days.
1426	TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"`
1427	// OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer1On', 'OfflineDataTransfer1Off'
1428	OfflineDataTransfer OfflineDataTransfer1 `json:"offlineDataTransfer,omitempty"`
1429	// OfflineDataTransferShareName - Offline data transfer share name
1430	OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"`
1431}
1432
1433// Service storage Sync Service object.
1434type Service struct {
1435	autorest.Response `json:"-"`
1436	// ServiceProperties - Storage Sync Service properties.
1437	*ServiceProperties `json:"properties,omitempty"`
1438	// Tags - Resource tags.
1439	Tags map[string]*string `json:"tags"`
1440	// Location - The geo-location where the resource lives
1441	Location *string `json:"location,omitempty"`
1442	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1443	ID *string `json:"id,omitempty"`
1444	// Name - READ-ONLY; The name of the resource
1445	Name *string `json:"name,omitempty"`
1446	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1447	Type *string `json:"type,omitempty"`
1448}
1449
1450// MarshalJSON is the custom marshaler for Service.
1451func (s Service) MarshalJSON() ([]byte, error) {
1452	objectMap := make(map[string]interface{})
1453	if s.ServiceProperties != nil {
1454		objectMap["properties"] = s.ServiceProperties
1455	}
1456	if s.Tags != nil {
1457		objectMap["tags"] = s.Tags
1458	}
1459	if s.Location != nil {
1460		objectMap["location"] = s.Location
1461	}
1462	return json.Marshal(objectMap)
1463}
1464
1465// UnmarshalJSON is the custom unmarshaler for Service struct.
1466func (s *Service) UnmarshalJSON(body []byte) error {
1467	var m map[string]*json.RawMessage
1468	err := json.Unmarshal(body, &m)
1469	if err != nil {
1470		return err
1471	}
1472	for k, v := range m {
1473		switch k {
1474		case "properties":
1475			if v != nil {
1476				var serviceProperties ServiceProperties
1477				err = json.Unmarshal(*v, &serviceProperties)
1478				if err != nil {
1479					return err
1480				}
1481				s.ServiceProperties = &serviceProperties
1482			}
1483		case "tags":
1484			if v != nil {
1485				var tags map[string]*string
1486				err = json.Unmarshal(*v, &tags)
1487				if err != nil {
1488					return err
1489				}
1490				s.Tags = tags
1491			}
1492		case "location":
1493			if v != nil {
1494				var location string
1495				err = json.Unmarshal(*v, &location)
1496				if err != nil {
1497					return err
1498				}
1499				s.Location = &location
1500			}
1501		case "id":
1502			if v != nil {
1503				var ID string
1504				err = json.Unmarshal(*v, &ID)
1505				if err != nil {
1506					return err
1507				}
1508				s.ID = &ID
1509			}
1510		case "name":
1511			if v != nil {
1512				var name string
1513				err = json.Unmarshal(*v, &name)
1514				if err != nil {
1515					return err
1516				}
1517				s.Name = &name
1518			}
1519		case "type":
1520			if v != nil {
1521				var typeVar string
1522				err = json.Unmarshal(*v, &typeVar)
1523				if err != nil {
1524					return err
1525				}
1526				s.Type = &typeVar
1527			}
1528		}
1529	}
1530
1531	return nil
1532}
1533
1534// ServiceArray array of StorageSyncServices
1535type ServiceArray struct {
1536	autorest.Response `json:"-"`
1537	// Value - Collection of StorageSyncServices.
1538	Value *[]Service `json:"value,omitempty"`
1539}
1540
1541// ServiceCreateParameters the parameters used when creating a storage sync service.
1542type ServiceCreateParameters struct {
1543	// 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.
1544	Location *string `json:"location,omitempty"`
1545	// 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.
1546	Tags       map[string]*string `json:"tags"`
1547	Properties interface{}        `json:"properties,omitempty"`
1548}
1549
1550// MarshalJSON is the custom marshaler for ServiceCreateParameters.
1551func (scp ServiceCreateParameters) MarshalJSON() ([]byte, error) {
1552	objectMap := make(map[string]interface{})
1553	if scp.Location != nil {
1554		objectMap["location"] = scp.Location
1555	}
1556	if scp.Tags != nil {
1557		objectMap["tags"] = scp.Tags
1558	}
1559	if scp.Properties != nil {
1560		objectMap["properties"] = scp.Properties
1561	}
1562	return json.Marshal(objectMap)
1563}
1564
1565// ServiceProperties storage Sync Service Properties object.
1566type ServiceProperties struct {
1567	// StorageSyncServiceStatus - READ-ONLY; Storage Sync service status.
1568	StorageSyncServiceStatus *int32 `json:"storageSyncServiceStatus,omitempty"`
1569	// StorageSyncServiceUID - READ-ONLY; Storage Sync service Uid
1570	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
1571}
1572
1573// ServiceUpdateParameters parameters for updating an Storage sync service.
1574type ServiceUpdateParameters struct {
1575	// Tags - The user-specified tags associated with the storage sync service.
1576	Tags map[string]*string `json:"tags"`
1577	// Properties - The properties of the storage sync service.
1578	Properties interface{} `json:"properties,omitempty"`
1579}
1580
1581// MarshalJSON is the custom marshaler for ServiceUpdateParameters.
1582func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) {
1583	objectMap := make(map[string]interface{})
1584	if sup.Tags != nil {
1585		objectMap["tags"] = sup.Tags
1586	}
1587	if sup.Properties != nil {
1588		objectMap["properties"] = sup.Properties
1589	}
1590	return json.Marshal(objectMap)
1591}
1592
1593// SubscriptionState subscription State object.
1594type SubscriptionState struct {
1595	// State - State of Azure Subscription. Possible values include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted'
1596	State Reason `json:"state,omitempty"`
1597	// Istransitioning - READ-ONLY; Is Transitioning
1598	Istransitioning *bool `json:"istransitioning,omitempty"`
1599	// Properties - Subscription state properties.
1600	Properties interface{} `json:"properties,omitempty"`
1601}
1602
1603// MarshalJSON is the custom marshaler for SubscriptionState.
1604func (ss SubscriptionState) MarshalJSON() ([]byte, error) {
1605	objectMap := make(map[string]interface{})
1606	if ss.State != "" {
1607		objectMap["state"] = ss.State
1608	}
1609	if ss.Properties != nil {
1610		objectMap["properties"] = ss.Properties
1611	}
1612	return json.Marshal(objectMap)
1613}
1614
1615// SyncActivityStatus sync Session status object.
1616type SyncActivityStatus struct {
1617	// Timestamp - READ-ONLY; Timestamp when properties were updated
1618	Timestamp *date.Time `json:"timestamp,omitempty"`
1619	// PerItemErrorCount - READ-ONLY; Per item error count
1620	PerItemErrorCount *int64 `json:"perItemErrorCount,omitempty"`
1621	// AppliedItemCount - READ-ONLY; Applied item count.
1622	AppliedItemCount *int64 `json:"appliedItemCount,omitempty"`
1623	// TotalItemCount - READ-ONLY; Total item count (if available)
1624	TotalItemCount *int64 `json:"totalItemCount,omitempty"`
1625	// AppliedBytes - READ-ONLY; Applied bytes
1626	AppliedBytes *int64 `json:"appliedBytes,omitempty"`
1627	// TotalBytes - READ-ONLY; Total bytes (if available)
1628	TotalBytes *int64 `json:"totalBytes,omitempty"`
1629}
1630
1631// SyncGroup sync Group object.
1632type SyncGroup struct {
1633	autorest.Response `json:"-"`
1634	// SyncGroupProperties - SyncGroup properties.
1635	*SyncGroupProperties `json:"properties,omitempty"`
1636	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1637	ID *string `json:"id,omitempty"`
1638	// Name - READ-ONLY; The name of the resource
1639	Name *string `json:"name,omitempty"`
1640	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1641	Type *string `json:"type,omitempty"`
1642}
1643
1644// MarshalJSON is the custom marshaler for SyncGroup.
1645func (sg SyncGroup) MarshalJSON() ([]byte, error) {
1646	objectMap := make(map[string]interface{})
1647	if sg.SyncGroupProperties != nil {
1648		objectMap["properties"] = sg.SyncGroupProperties
1649	}
1650	return json.Marshal(objectMap)
1651}
1652
1653// UnmarshalJSON is the custom unmarshaler for SyncGroup struct.
1654func (sg *SyncGroup) UnmarshalJSON(body []byte) error {
1655	var m map[string]*json.RawMessage
1656	err := json.Unmarshal(body, &m)
1657	if err != nil {
1658		return err
1659	}
1660	for k, v := range m {
1661		switch k {
1662		case "properties":
1663			if v != nil {
1664				var syncGroupProperties SyncGroupProperties
1665				err = json.Unmarshal(*v, &syncGroupProperties)
1666				if err != nil {
1667					return err
1668				}
1669				sg.SyncGroupProperties = &syncGroupProperties
1670			}
1671		case "id":
1672			if v != nil {
1673				var ID string
1674				err = json.Unmarshal(*v, &ID)
1675				if err != nil {
1676					return err
1677				}
1678				sg.ID = &ID
1679			}
1680		case "name":
1681			if v != nil {
1682				var name string
1683				err = json.Unmarshal(*v, &name)
1684				if err != nil {
1685					return err
1686				}
1687				sg.Name = &name
1688			}
1689		case "type":
1690			if v != nil {
1691				var typeVar string
1692				err = json.Unmarshal(*v, &typeVar)
1693				if err != nil {
1694					return err
1695				}
1696				sg.Type = &typeVar
1697			}
1698		}
1699	}
1700
1701	return nil
1702}
1703
1704// SyncGroupArray array of SyncGroup
1705type SyncGroupArray struct {
1706	autorest.Response `json:"-"`
1707	// Value - Collection of SyncGroup.
1708	Value *[]SyncGroup `json:"value,omitempty"`
1709}
1710
1711// SyncGroupCreateParameters the parameters used when creating a sync group.
1712type SyncGroupCreateParameters struct {
1713	// Properties - The parameters used to create the sync group
1714	Properties interface{} `json:"properties,omitempty"`
1715	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1716	ID *string `json:"id,omitempty"`
1717	// Name - READ-ONLY; The name of the resource
1718	Name *string `json:"name,omitempty"`
1719	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1720	Type *string `json:"type,omitempty"`
1721}
1722
1723// MarshalJSON is the custom marshaler for SyncGroupCreateParameters.
1724func (sgcp SyncGroupCreateParameters) MarshalJSON() ([]byte, error) {
1725	objectMap := make(map[string]interface{})
1726	if sgcp.Properties != nil {
1727		objectMap["properties"] = sgcp.Properties
1728	}
1729	return json.Marshal(objectMap)
1730}
1731
1732// SyncGroupProperties syncGroup Properties object.
1733type SyncGroupProperties struct {
1734	// UniqueID - READ-ONLY; Unique Id
1735	UniqueID *string `json:"uniqueId,omitempty"`
1736	// SyncGroupStatus - READ-ONLY; Sync group status
1737	SyncGroupStatus *string `json:"syncGroupStatus,omitempty"`
1738}
1739
1740// SyncSessionStatus sync Session status object.
1741type SyncSessionStatus struct {
1742	// LastSyncResult - READ-ONLY; Last sync result (HResult)
1743	LastSyncResult *int32 `json:"lastSyncResult,omitempty"`
1744	// LastSyncTimestamp - READ-ONLY; Last sync timestamp
1745	LastSyncTimestamp *date.Time `json:"lastSyncTimestamp,omitempty"`
1746	// LastSyncSuccessTimestamp - READ-ONLY; Last sync success timestamp
1747	LastSyncSuccessTimestamp *date.Time `json:"lastSyncSuccessTimestamp,omitempty"`
1748	// LastSyncPerItemErrorCount - READ-ONLY; Last sync per item error count.
1749	LastSyncPerItemErrorCount *int64 `json:"lastSyncPerItemErrorCount,omitempty"`
1750	// PersistentFilesNotSyncingCount - READ-ONLY; Count of persistent files not syncing.
1751	PersistentFilesNotSyncingCount *int64 `json:"persistentFilesNotSyncingCount,omitempty"`
1752	// TransientFilesNotSyncingCount - READ-ONLY; Count of transient files not syncing.
1753	TransientFilesNotSyncingCount *int64 `json:"transientFilesNotSyncingCount,omitempty"`
1754	// FilesNotSyncingErrors - READ-ONLY; Array of per-item errors coming from the last sync session.
1755	FilesNotSyncingErrors *[]ServerEndpointFilesNotSyncingError `json:"filesNotSyncingErrors,omitempty"`
1756}
1757
1758// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
1759// which has 'tags' and a 'location'
1760type TrackedResource struct {
1761	// Tags - Resource tags.
1762	Tags map[string]*string `json:"tags"`
1763	// Location - The geo-location where the resource lives
1764	Location *string `json:"location,omitempty"`
1765	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1766	ID *string `json:"id,omitempty"`
1767	// Name - READ-ONLY; The name of the resource
1768	Name *string `json:"name,omitempty"`
1769	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1770	Type *string `json:"type,omitempty"`
1771}
1772
1773// MarshalJSON is the custom marshaler for TrackedResource.
1774func (tr TrackedResource) MarshalJSON() ([]byte, error) {
1775	objectMap := make(map[string]interface{})
1776	if tr.Tags != nil {
1777		objectMap["tags"] = tr.Tags
1778	}
1779	if tr.Location != nil {
1780		objectMap["location"] = tr.Location
1781	}
1782	return json.Marshal(objectMap)
1783}
1784
1785// TriggerChangeDetectionParameters the parameters used when calling trigger change detection action on
1786// cloud endpoint.
1787type TriggerChangeDetectionParameters struct {
1788	// DirectoryPath - Relative path to a directory Azure File share for which change detection is to be performed.
1789	DirectoryPath *string `json:"directoryPath,omitempty"`
1790	// ChangeDetectionMode - Change Detection Mode. Applies to a directory specified in directoryPath parameter. Possible values include: 'Default', 'Recursive'
1791	ChangeDetectionMode ChangeDetectionMode `json:"changeDetectionMode,omitempty"`
1792	// Paths - Array of relative paths on the Azure File share to be included in the change detection. Can be files and directories.
1793	Paths *[]string `json:"paths,omitempty"`
1794}
1795
1796// TriggerRolloverRequest trigger Rollover Request.
1797type TriggerRolloverRequest struct {
1798	// ServerCertificate - Certificate Data
1799	ServerCertificate *string `json:"serverCertificate,omitempty"`
1800}
1801
1802// Workflow workflow resource.
1803type Workflow struct {
1804	autorest.Response `json:"-"`
1805	// WorkflowProperties - Workflow properties.
1806	*WorkflowProperties `json:"properties,omitempty"`
1807	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1808	ID *string `json:"id,omitempty"`
1809	// Name - READ-ONLY; The name of the resource
1810	Name *string `json:"name,omitempty"`
1811	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1812	Type *string `json:"type,omitempty"`
1813}
1814
1815// MarshalJSON is the custom marshaler for Workflow.
1816func (w Workflow) MarshalJSON() ([]byte, error) {
1817	objectMap := make(map[string]interface{})
1818	if w.WorkflowProperties != nil {
1819		objectMap["properties"] = w.WorkflowProperties
1820	}
1821	return json.Marshal(objectMap)
1822}
1823
1824// UnmarshalJSON is the custom unmarshaler for Workflow struct.
1825func (w *Workflow) UnmarshalJSON(body []byte) error {
1826	var m map[string]*json.RawMessage
1827	err := json.Unmarshal(body, &m)
1828	if err != nil {
1829		return err
1830	}
1831	for k, v := range m {
1832		switch k {
1833		case "properties":
1834			if v != nil {
1835				var workflowProperties WorkflowProperties
1836				err = json.Unmarshal(*v, &workflowProperties)
1837				if err != nil {
1838					return err
1839				}
1840				w.WorkflowProperties = &workflowProperties
1841			}
1842		case "id":
1843			if v != nil {
1844				var ID string
1845				err = json.Unmarshal(*v, &ID)
1846				if err != nil {
1847					return err
1848				}
1849				w.ID = &ID
1850			}
1851		case "name":
1852			if v != nil {
1853				var name string
1854				err = json.Unmarshal(*v, &name)
1855				if err != nil {
1856					return err
1857				}
1858				w.Name = &name
1859			}
1860		case "type":
1861			if v != nil {
1862				var typeVar string
1863				err = json.Unmarshal(*v, &typeVar)
1864				if err != nil {
1865					return err
1866				}
1867				w.Type = &typeVar
1868			}
1869		}
1870	}
1871
1872	return nil
1873}
1874
1875// WorkflowArray array of Workflow
1876type WorkflowArray struct {
1877	autorest.Response `json:"-"`
1878	// Value - Collection of workflow items.
1879	Value *[]Workflow `json:"value,omitempty"`
1880}
1881
1882// WorkflowProperties workflow Properties object.
1883type WorkflowProperties struct {
1884	// LastStepName - last step name
1885	LastStepName *string `json:"lastStepName,omitempty"`
1886	// Status - workflow status. Possible values include: 'Active', 'Expired', 'Succeeded', 'Aborted', 'Failed'
1887	Status Status `json:"status,omitempty"`
1888	// Operation - operation direction. Possible values include: 'Do', 'Undo', 'Cancel'
1889	Operation Operation `json:"operation,omitempty"`
1890	// Steps - workflow steps
1891	Steps *string `json:"steps,omitempty"`
1892	// LastOperationID - workflow last operation identifier.
1893	LastOperationID *string `json:"lastOperationId,omitempty"`
1894}
1895