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	"encoding/json"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/azure"
24	"github.com/Azure/go-autorest/autorest/to"
25	"net/http"
26)
27
28// CloudTiering enumerates the values for cloud tiering.
29type CloudTiering string
30
31const (
32	// Off ...
33	Off CloudTiering = "off"
34	// On ...
35	On CloudTiering = "on"
36)
37
38// PossibleCloudTieringValues returns an array of possible values for the CloudTiering const type.
39func PossibleCloudTieringValues() []CloudTiering {
40	return []CloudTiering{Off, On}
41}
42
43// CloudTiering1 enumerates the values for cloud tiering 1.
44type CloudTiering1 string
45
46const (
47	// CloudTiering1Off ...
48	CloudTiering1Off CloudTiering1 = "off"
49	// CloudTiering1On ...
50	CloudTiering1On CloudTiering1 = "on"
51)
52
53// PossibleCloudTiering1Values returns an array of possible values for the CloudTiering1 const type.
54func PossibleCloudTiering1Values() []CloudTiering1 {
55	return []CloudTiering1{CloudTiering1Off, CloudTiering1On}
56}
57
58// CloudTiering2 enumerates the values for cloud tiering 2.
59type CloudTiering2 string
60
61const (
62	// CloudTiering2Off ...
63	CloudTiering2Off CloudTiering2 = "off"
64	// CloudTiering2On ...
65	CloudTiering2On CloudTiering2 = "on"
66)
67
68// PossibleCloudTiering2Values returns an array of possible values for the CloudTiering2 const type.
69func PossibleCloudTiering2Values() []CloudTiering2 {
70	return []CloudTiering2{CloudTiering2Off, CloudTiering2On}
71}
72
73// NameAvailabilityReason enumerates the values for name availability reason.
74type NameAvailabilityReason string
75
76const (
77	// AlreadyExists ...
78	AlreadyExists NameAvailabilityReason = "AlreadyExists"
79	// Invalid ...
80	Invalid NameAvailabilityReason = "Invalid"
81)
82
83// PossibleNameAvailabilityReasonValues returns an array of possible values for the NameAvailabilityReason const type.
84func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason {
85	return []NameAvailabilityReason{AlreadyExists, Invalid}
86}
87
88// Operation enumerates the values for operation.
89type Operation string
90
91const (
92	// Cancel ...
93	Cancel Operation = "cancel"
94	// Do ...
95	Do Operation = "do"
96	// Undo ...
97	Undo Operation = "undo"
98)
99
100// PossibleOperationValues returns an array of possible values for the Operation const type.
101func PossibleOperationValues() []Operation {
102	return []Operation{Cancel, Do, Undo}
103}
104
105// Reason enumerates the values for reason.
106type Reason string
107
108const (
109	// Deleted ...
110	Deleted Reason = "Deleted"
111	// Registered ...
112	Registered Reason = "Registered"
113	// Suspended ...
114	Suspended Reason = "Suspended"
115	// Unregistered ...
116	Unregistered Reason = "Unregistered"
117	// Warned ...
118	Warned Reason = "Warned"
119)
120
121// PossibleReasonValues returns an array of possible values for the Reason const type.
122func PossibleReasonValues() []Reason {
123	return []Reason{Deleted, Registered, Suspended, Unregistered, Warned}
124}
125
126// Status enumerates the values for status.
127type Status string
128
129const (
130	// Aborted ...
131	Aborted Status = "aborted"
132	// Active ...
133	Active Status = "active"
134	// Expired ...
135	Expired Status = "expired"
136	// Failed ...
137	Failed Status = "failed"
138	// Succeeded ...
139	Succeeded Status = "succeeded"
140)
141
142// PossibleStatusValues returns an array of possible values for the Status const type.
143func PossibleStatusValues() []Status {
144	return []Status{Aborted, Active, Expired, Failed, Succeeded}
145}
146
147// APIError error type
148type APIError struct {
149	// Code - Error code of the given entry.
150	Code *string `json:"code,omitempty"`
151	// Message - Error message of the given entry.
152	Message *string `json:"message,omitempty"`
153	// Target - Target of the given error entry.
154	Target *string `json:"target,omitempty"`
155	// Details - Error details of the given entry.
156	Details *ErrorDetails `json:"details,omitempty"`
157}
158
159// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag.
160type AzureEntityResource struct {
161	// Etag - Resource Etag.
162	Etag *string `json:"etag,omitempty"`
163	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
164	ID *string `json:"id,omitempty"`
165	// Name - The name of the resource
166	Name *string `json:"name,omitempty"`
167	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
168	Type *string `json:"type,omitempty"`
169}
170
171// BackupRequest backup request
172type BackupRequest struct {
173	// AzureFileShare - Azure File Share.
174	AzureFileShare *string `json:"azureFileShare,omitempty"`
175}
176
177// CheckNameAvailabilityParameters parameters for a check name availability request.
178type CheckNameAvailabilityParameters struct {
179	// Name - The name to check for availability
180	Name *string `json:"name,omitempty"`
181	// Type - The resource type. Must be set to Microsoft.StorageSync/storageSyncServices
182	Type *string `json:"type,omitempty"`
183}
184
185// CheckNameAvailabilityResult the CheckNameAvailability operation response.
186type CheckNameAvailabilityResult struct {
187	autorest.Response `json:"-"`
188	// NameAvailable - 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.
189	NameAvailable *bool `json:"nameAvailable,omitempty"`
190	// Reason - 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'
191	Reason NameAvailabilityReason `json:"reason,omitempty"`
192	// Message - Gets an error message explaining the Reason value in more detail.
193	Message *string `json:"message,omitempty"`
194}
195
196// CloudEndpoint cloud Endpoint object.
197type CloudEndpoint struct {
198	autorest.Response `json:"-"`
199	// CloudEndpointProperties - Cloud Endpoint properties.
200	*CloudEndpointProperties `json:"properties,omitempty"`
201	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
202	ID *string `json:"id,omitempty"`
203	// Name - The name of the resource
204	Name *string `json:"name,omitempty"`
205	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
206	Type *string `json:"type,omitempty"`
207}
208
209// MarshalJSON is the custom marshaler for CloudEndpoint.
210func (ce CloudEndpoint) MarshalJSON() ([]byte, error) {
211	objectMap := make(map[string]interface{})
212	if ce.CloudEndpointProperties != nil {
213		objectMap["properties"] = ce.CloudEndpointProperties
214	}
215	if ce.ID != nil {
216		objectMap["id"] = ce.ID
217	}
218	if ce.Name != nil {
219		objectMap["name"] = ce.Name
220	}
221	if ce.Type != nil {
222		objectMap["type"] = ce.Type
223	}
224	return json.Marshal(objectMap)
225}
226
227// UnmarshalJSON is the custom unmarshaler for CloudEndpoint struct.
228func (ce *CloudEndpoint) UnmarshalJSON(body []byte) error {
229	var m map[string]*json.RawMessage
230	err := json.Unmarshal(body, &m)
231	if err != nil {
232		return err
233	}
234	for k, v := range m {
235		switch k {
236		case "properties":
237			if v != nil {
238				var cloudEndpointProperties CloudEndpointProperties
239				err = json.Unmarshal(*v, &cloudEndpointProperties)
240				if err != nil {
241					return err
242				}
243				ce.CloudEndpointProperties = &cloudEndpointProperties
244			}
245		case "id":
246			if v != nil {
247				var ID string
248				err = json.Unmarshal(*v, &ID)
249				if err != nil {
250					return err
251				}
252				ce.ID = &ID
253			}
254		case "name":
255			if v != nil {
256				var name string
257				err = json.Unmarshal(*v, &name)
258				if err != nil {
259					return err
260				}
261				ce.Name = &name
262			}
263		case "type":
264			if v != nil {
265				var typeVar string
266				err = json.Unmarshal(*v, &typeVar)
267				if err != nil {
268					return err
269				}
270				ce.Type = &typeVar
271			}
272		}
273	}
274
275	return nil
276}
277
278// CloudEndpointArray array of CloudEndpoint
279type CloudEndpointArray struct {
280	autorest.Response `json:"-"`
281	// Value - Collection of CloudEndpoint.
282	Value *[]CloudEndpoint `json:"value,omitempty"`
283}
284
285// CloudEndpointCreateParameters the parameters used when creating a storage sync service.
286type CloudEndpointCreateParameters struct {
287	// 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.
288	Location *string `json:"location,omitempty"`
289	// 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.
290	Tags map[string]*string `json:"tags"`
291	// CloudEndpointCreateParametersProperties - The parameters used to create the storage sync service.
292	*CloudEndpointCreateParametersProperties `json:"properties,omitempty"`
293}
294
295// MarshalJSON is the custom marshaler for CloudEndpointCreateParameters.
296func (cecp CloudEndpointCreateParameters) MarshalJSON() ([]byte, error) {
297	objectMap := make(map[string]interface{})
298	if cecp.Location != nil {
299		objectMap["location"] = cecp.Location
300	}
301	if cecp.Tags != nil {
302		objectMap["tags"] = cecp.Tags
303	}
304	if cecp.CloudEndpointCreateParametersProperties != nil {
305		objectMap["properties"] = cecp.CloudEndpointCreateParametersProperties
306	}
307	return json.Marshal(objectMap)
308}
309
310// UnmarshalJSON is the custom unmarshaler for CloudEndpointCreateParameters struct.
311func (cecp *CloudEndpointCreateParameters) UnmarshalJSON(body []byte) error {
312	var m map[string]*json.RawMessage
313	err := json.Unmarshal(body, &m)
314	if err != nil {
315		return err
316	}
317	for k, v := range m {
318		switch k {
319		case "location":
320			if v != nil {
321				var location string
322				err = json.Unmarshal(*v, &location)
323				if err != nil {
324					return err
325				}
326				cecp.Location = &location
327			}
328		case "tags":
329			if v != nil {
330				var tags map[string]*string
331				err = json.Unmarshal(*v, &tags)
332				if err != nil {
333					return err
334				}
335				cecp.Tags = tags
336			}
337		case "properties":
338			if v != nil {
339				var cloudEndpointCreateParametersProperties CloudEndpointCreateParametersProperties
340				err = json.Unmarshal(*v, &cloudEndpointCreateParametersProperties)
341				if err != nil {
342					return err
343				}
344				cecp.CloudEndpointCreateParametersProperties = &cloudEndpointCreateParametersProperties
345			}
346		}
347	}
348
349	return nil
350}
351
352// CloudEndpointCreateParametersProperties cloudEndpoint Properties object.
353type CloudEndpointCreateParametersProperties struct {
354	// StorageAccountResourceID - Storage Account Resource Id
355	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
356	// StorageAccountShareName - Storage Account Share name
357	StorageAccountShareName *string `json:"storageAccountShareName,omitempty"`
358	// StorageAccountTenantID - Storage Account Tenant Id
359	StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"`
360}
361
362// CloudEndpointProperties cloudEndpoint Properties object.
363type CloudEndpointProperties struct {
364	// StorageAccountResourceID - Storage Account Resource Id
365	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
366	// StorageAccountShareName - Storage Account Share name
367	StorageAccountShareName *string `json:"storageAccountShareName,omitempty"`
368	// StorageAccountTenantID - Storage Account Tenant Id
369	StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"`
370	// PartnershipID - Partnership Id
371	PartnershipID *string `json:"partnershipId,omitempty"`
372	// FriendlyName - Friendly Name
373	FriendlyName *string `json:"friendlyName,omitempty"`
374	// BackupEnabled - Backup Enabled
375	BackupEnabled *bool `json:"backupEnabled,omitempty"`
376	// ProvisioningState - CloudEndpoint Provisioning State
377	ProvisioningState *string `json:"provisioningState,omitempty"`
378	// LastWorkflowID - CloudEndpoint lastWorkflowId
379	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
380	// LastOperationName - Resource Last Operation Name
381	LastOperationName *string `json:"lastOperationName,omitempty"`
382}
383
384// CloudEndpointsGroupCreateFuture an abstraction for monitoring and retrieving the results of a long-running
385// operation.
386type CloudEndpointsGroupCreateFuture struct {
387	azure.Future
388}
389
390// Result returns the result of the asynchronous operation.
391// If the operation has not completed it will return an error.
392func (future *CloudEndpointsGroupCreateFuture) Result(client CloudEndpointsGroupClient) (ce CloudEndpoint, err error) {
393	var done bool
394	done, err = future.Done(client)
395	if err != nil {
396		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupCreateFuture", "Result", future.Response(), "Polling failure")
397		return
398	}
399	if !done {
400		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupCreateFuture")
401		return
402	}
403	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
404	if ce.Response.Response, err = future.GetResult(sender); err == nil && ce.Response.Response.StatusCode != http.StatusNoContent {
405		ce, err = client.CreateResponder(ce.Response.Response)
406		if err != nil {
407			err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupCreateFuture", "Result", ce.Response.Response, "Failure responding to request")
408		}
409	}
410	return
411}
412
413// CloudEndpointsGroupDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
414// operation.
415type CloudEndpointsGroupDeleteFuture struct {
416	azure.Future
417}
418
419// Result returns the result of the asynchronous operation.
420// If the operation has not completed it will return an error.
421func (future *CloudEndpointsGroupDeleteFuture) Result(client CloudEndpointsGroupClient) (ar autorest.Response, err error) {
422	var done bool
423	done, err = future.Done(client)
424	if err != nil {
425		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupDeleteFuture", "Result", future.Response(), "Polling failure")
426		return
427	}
428	if !done {
429		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupDeleteFuture")
430		return
431	}
432	ar.Response = future.Response()
433	return
434}
435
436// CloudEndpointsGroupPostBackupFuture an abstraction for monitoring and retrieving the results of a long-running
437// operation.
438type CloudEndpointsGroupPostBackupFuture struct {
439	azure.Future
440}
441
442// Result returns the result of the asynchronous operation.
443// If the operation has not completed it will return an error.
444func (future *CloudEndpointsGroupPostBackupFuture) Result(client CloudEndpointsGroupClient) (pbr PostBackupResponse, err error) {
445	var done bool
446	done, err = future.Done(client)
447	if err != nil {
448		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupPostBackupFuture", "Result", future.Response(), "Polling failure")
449		return
450	}
451	if !done {
452		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupPostBackupFuture")
453		return
454	}
455	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
456	if pbr.Response.Response, err = future.GetResult(sender); err == nil && pbr.Response.Response.StatusCode != http.StatusNoContent {
457		pbr, err = client.PostBackupResponder(pbr.Response.Response)
458		if err != nil {
459			err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupPostBackupFuture", "Result", pbr.Response.Response, "Failure responding to request")
460		}
461	}
462	return
463}
464
465// CloudEndpointsGroupPostRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
466// operation.
467type CloudEndpointsGroupPostRestoreFuture struct {
468	azure.Future
469}
470
471// Result returns the result of the asynchronous operation.
472// If the operation has not completed it will return an error.
473func (future *CloudEndpointsGroupPostRestoreFuture) Result(client CloudEndpointsGroupClient) (ar autorest.Response, err error) {
474	var done bool
475	done, err = future.Done(client)
476	if err != nil {
477		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupPostRestoreFuture", "Result", future.Response(), "Polling failure")
478		return
479	}
480	if !done {
481		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupPostRestoreFuture")
482		return
483	}
484	ar.Response = future.Response()
485	return
486}
487
488// CloudEndpointsGroupPreBackupFuture an abstraction for monitoring and retrieving the results of a long-running
489// operation.
490type CloudEndpointsGroupPreBackupFuture struct {
491	azure.Future
492}
493
494// Result returns the result of the asynchronous operation.
495// If the operation has not completed it will return an error.
496func (future *CloudEndpointsGroupPreBackupFuture) Result(client CloudEndpointsGroupClient) (ar autorest.Response, err error) {
497	var done bool
498	done, err = future.Done(client)
499	if err != nil {
500		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupPreBackupFuture", "Result", future.Response(), "Polling failure")
501		return
502	}
503	if !done {
504		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupPreBackupFuture")
505		return
506	}
507	ar.Response = future.Response()
508	return
509}
510
511// CloudEndpointsGroupPreRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
512// operation.
513type CloudEndpointsGroupPreRestoreFuture struct {
514	azure.Future
515}
516
517// Result returns the result of the asynchronous operation.
518// If the operation has not completed it will return an error.
519func (future *CloudEndpointsGroupPreRestoreFuture) Result(client CloudEndpointsGroupClient) (ar autorest.Response, err error) {
520	var done bool
521	done, err = future.Done(client)
522	if err != nil {
523		err = autorest.NewErrorWithError(err, "storagesync.CloudEndpointsGroupPreRestoreFuture", "Result", future.Response(), "Polling failure")
524		return
525	}
526	if !done {
527		err = azure.NewAsyncOpIncompleteError("storagesync.CloudEndpointsGroupPreRestoreFuture")
528		return
529	}
530	ar.Response = future.Response()
531	return
532}
533
534// Error error type
535type Error struct {
536	// Error - Error details of the given entry.
537	Error *APIError `json:"error,omitempty"`
538	// Innererror - Error details of the given entry.
539	Innererror *APIError `json:"innererror,omitempty"`
540}
541
542// ErrorDetails error Details object.
543type ErrorDetails struct {
544	// Code - Error code of the given entry.
545	Code *string `json:"code,omitempty"`
546	// Message - Error message of the given entry.
547	Message *string `json:"message,omitempty"`
548	// Target - Target of the given entry.
549	Target *string `json:"target,omitempty"`
550}
551
552// OperationDisplayInfo the operation supported by storage sync.
553type OperationDisplayInfo struct {
554	// Description - The description of the operation.
555	Description *string `json:"description,omitempty"`
556	// Operation - The action that users can perform, based on their permission level.
557	Operation *string `json:"operation,omitempty"`
558	// Provider - Service provider: Microsoft StorageSync.
559	Provider *string `json:"provider,omitempty"`
560	// Resource - Resource on which the operation is performed.
561	Resource *string `json:"resource,omitempty"`
562}
563
564// OperationDisplayResource operation Display Resource object.
565type OperationDisplayResource struct {
566	// Provider - Operation Display Resource Provider.
567	Provider *string `json:"provider,omitempty"`
568	// Resource - Operation Display Resource.
569	Resource *string `json:"resource,omitempty"`
570	// Operation - Operation Display Resource Operation.
571	Operation *string `json:"operation,omitempty"`
572	// Description - Operation Display Resource Description.
573	Description *string `json:"description,omitempty"`
574}
575
576// OperationEntity the operation supported by storage sync.
577type OperationEntity struct {
578	// Name - Operation name: {provider}/{resource}/{operation}.
579	Name *string `json:"name,omitempty"`
580	// Display - The operation supported by storage sync.
581	Display *OperationDisplayInfo `json:"display,omitempty"`
582	// Origin - The origin.
583	Origin *string `json:"origin,omitempty"`
584}
585
586// OperationEntityListResult the list of storage sync operations.
587type OperationEntityListResult struct {
588	autorest.Response `json:"-"`
589	// NextLink - The link used to get the next page of operations.
590	NextLink *string `json:"nextLink,omitempty"`
591	// Value - The list of operations.
592	Value *[]OperationEntity `json:"value,omitempty"`
593}
594
595// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values.
596type OperationEntityListResultIterator struct {
597	i    int
598	page OperationEntityListResultPage
599}
600
601// Next advances to the next value.  If there was an error making
602// the request the iterator does not advance and the error is returned.
603func (iter *OperationEntityListResultIterator) Next() error {
604	iter.i++
605	if iter.i < len(iter.page.Values()) {
606		return nil
607	}
608	err := iter.page.Next()
609	if err != nil {
610		iter.i--
611		return err
612	}
613	iter.i = 0
614	return nil
615}
616
617// NotDone returns true if the enumeration should be started or is not yet complete.
618func (iter OperationEntityListResultIterator) NotDone() bool {
619	return iter.page.NotDone() && iter.i < len(iter.page.Values())
620}
621
622// Response returns the raw server response from the last page request.
623func (iter OperationEntityListResultIterator) Response() OperationEntityListResult {
624	return iter.page.Response()
625}
626
627// Value returns the current value or a zero-initialized value if the
628// iterator has advanced beyond the end of the collection.
629func (iter OperationEntityListResultIterator) Value() OperationEntity {
630	if !iter.page.NotDone() {
631		return OperationEntity{}
632	}
633	return iter.page.Values()[iter.i]
634}
635
636// IsEmpty returns true if the ListResult contains no values.
637func (oelr OperationEntityListResult) IsEmpty() bool {
638	return oelr.Value == nil || len(*oelr.Value) == 0
639}
640
641// operationEntityListResultPreparer prepares a request to retrieve the next set of results.
642// It returns nil if no more results exist.
643func (oelr OperationEntityListResult) operationEntityListResultPreparer() (*http.Request, error) {
644	if oelr.NextLink == nil || len(to.String(oelr.NextLink)) < 1 {
645		return nil, nil
646	}
647	return autorest.Prepare(&http.Request{},
648		autorest.AsJSON(),
649		autorest.AsGet(),
650		autorest.WithBaseURL(to.String(oelr.NextLink)))
651}
652
653// OperationEntityListResultPage contains a page of OperationEntity values.
654type OperationEntityListResultPage struct {
655	fn   func(OperationEntityListResult) (OperationEntityListResult, error)
656	oelr OperationEntityListResult
657}
658
659// Next advances to the next page of values.  If there was an error making
660// the request the page does not advance and the error is returned.
661func (page *OperationEntityListResultPage) Next() error {
662	next, err := page.fn(page.oelr)
663	if err != nil {
664		return err
665	}
666	page.oelr = next
667	return nil
668}
669
670// NotDone returns true if the page enumeration should be started or is not yet complete.
671func (page OperationEntityListResultPage) NotDone() bool {
672	return !page.oelr.IsEmpty()
673}
674
675// Response returns the raw server response from the last page request.
676func (page OperationEntityListResultPage) Response() OperationEntityListResult {
677	return page.oelr
678}
679
680// Values returns the slice of values for the current page or nil if there are no values.
681func (page OperationEntityListResultPage) Values() []OperationEntity {
682	if page.oelr.IsEmpty() {
683		return nil
684	}
685	return *page.oelr.Value
686}
687
688// PostBackupResponse post Backup Response
689type PostBackupResponse struct {
690	autorest.Response `json:"-"`
691	// PostBackupResponseProperties - Post Backup Response Properties
692	*PostBackupResponseProperties `json:"backupMetadata,omitempty"`
693}
694
695// MarshalJSON is the custom marshaler for PostBackupResponse.
696func (pbr PostBackupResponse) MarshalJSON() ([]byte, error) {
697	objectMap := make(map[string]interface{})
698	if pbr.PostBackupResponseProperties != nil {
699		objectMap["backupMetadata"] = pbr.PostBackupResponseProperties
700	}
701	return json.Marshal(objectMap)
702}
703
704// UnmarshalJSON is the custom unmarshaler for PostBackupResponse struct.
705func (pbr *PostBackupResponse) UnmarshalJSON(body []byte) error {
706	var m map[string]*json.RawMessage
707	err := json.Unmarshal(body, &m)
708	if err != nil {
709		return err
710	}
711	for k, v := range m {
712		switch k {
713		case "backupMetadata":
714			if v != nil {
715				var postBackupResponseProperties PostBackupResponseProperties
716				err = json.Unmarshal(*v, &postBackupResponseProperties)
717				if err != nil {
718					return err
719				}
720				pbr.PostBackupResponseProperties = &postBackupResponseProperties
721			}
722		}
723	}
724
725	return nil
726}
727
728// PostBackupResponseProperties post Backup Response Properties object.
729type PostBackupResponseProperties struct {
730	// CloudEndpointName - cloud endpoint Name.
731	CloudEndpointName *string `json:"cloudEndpointName,omitempty"`
732}
733
734// PostRestoreRequest post Restore Request
735type PostRestoreRequest struct {
736	// Partition - Post Restore partition.
737	Partition *string `json:"partition,omitempty"`
738	// ReplicaGroup - Post Restore replica group.
739	ReplicaGroup *string `json:"replicaGroup,omitempty"`
740	// RequestID - Post Restore request id.
741	RequestID *string `json:"requestId,omitempty"`
742	// AzureFileShareURI - Post Restore Azure file share uri.
743	AzureFileShareURI *string `json:"azureFileShareUri,omitempty"`
744	// Status - Post Restore Azure status.
745	Status *string `json:"status,omitempty"`
746	// SourceAzureFileShareURI - Post Restore Azure source azure file share uri.
747	SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"`
748	// FailedFileList - Post Restore Azure failed file list.
749	FailedFileList *string `json:"failedFileList,omitempty"`
750	// RestoreFileSpec - Post Restore restore file spec array.
751	RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"`
752}
753
754// PreRestoreRequest pre Restore request object.
755type PreRestoreRequest struct {
756	// Partition - Pre Restore partition.
757	Partition *string `json:"partition,omitempty"`
758	// ReplicaGroup - Pre Restore replica group.
759	ReplicaGroup *string `json:"replicaGroup,omitempty"`
760	// RequestID - Pre Restore request id.
761	RequestID *string `json:"requestId,omitempty"`
762	// AzureFileShareURI - Pre Restore Azure file share uri.
763	AzureFileShareURI *string `json:"azureFileShareUri,omitempty"`
764	// Status - Pre Restore Azure status.
765	Status *string `json:"status,omitempty"`
766	// SourceAzureFileShareURI - Pre Restore Azure source azure file share uri.
767	SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"`
768	// BackupMetadataPropertyBag - Pre Restore backup metadata property bag.
769	BackupMetadataPropertyBag *string `json:"backupMetadataPropertyBag,omitempty"`
770	// RestoreFileSpec - Pre Restore restore file spec array.
771	RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"`
772	// PauseWaitForSyncDrainTimePeriodInSeconds - Pre Restore pause wait for sync drain time period in seconds.
773	PauseWaitForSyncDrainTimePeriodInSeconds *int32 `json:"pauseWaitForSyncDrainTimePeriodInSeconds,omitempty"`
774}
775
776// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
777// required location and tags
778type ProxyResource struct {
779	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
780	ID *string `json:"id,omitempty"`
781	// Name - The name of the resource
782	Name *string `json:"name,omitempty"`
783	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
784	Type *string `json:"type,omitempty"`
785}
786
787// RecallActionParameters the parameters used when calling recall action on server endpoint.
788type RecallActionParameters struct {
789	// Pattern - Pattern of the files.
790	Pattern *string `json:"pattern,omitempty"`
791	// RecallPath - Recall path.
792	RecallPath *string `json:"recallPath,omitempty"`
793}
794
795// RegisteredServer registered Server resource.
796type RegisteredServer struct {
797	autorest.Response `json:"-"`
798	// RegisteredServerProperties - RegisteredServer properties.
799	*RegisteredServerProperties `json:"properties,omitempty"`
800	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
801	ID *string `json:"id,omitempty"`
802	// Name - The name of the resource
803	Name *string `json:"name,omitempty"`
804	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
805	Type *string `json:"type,omitempty"`
806}
807
808// MarshalJSON is the custom marshaler for RegisteredServer.
809func (rs RegisteredServer) MarshalJSON() ([]byte, error) {
810	objectMap := make(map[string]interface{})
811	if rs.RegisteredServerProperties != nil {
812		objectMap["properties"] = rs.RegisteredServerProperties
813	}
814	if rs.ID != nil {
815		objectMap["id"] = rs.ID
816	}
817	if rs.Name != nil {
818		objectMap["name"] = rs.Name
819	}
820	if rs.Type != nil {
821		objectMap["type"] = rs.Type
822	}
823	return json.Marshal(objectMap)
824}
825
826// UnmarshalJSON is the custom unmarshaler for RegisteredServer struct.
827func (rs *RegisteredServer) UnmarshalJSON(body []byte) error {
828	var m map[string]*json.RawMessage
829	err := json.Unmarshal(body, &m)
830	if err != nil {
831		return err
832	}
833	for k, v := range m {
834		switch k {
835		case "properties":
836			if v != nil {
837				var registeredServerProperties RegisteredServerProperties
838				err = json.Unmarshal(*v, &registeredServerProperties)
839				if err != nil {
840					return err
841				}
842				rs.RegisteredServerProperties = &registeredServerProperties
843			}
844		case "id":
845			if v != nil {
846				var ID string
847				err = json.Unmarshal(*v, &ID)
848				if err != nil {
849					return err
850				}
851				rs.ID = &ID
852			}
853		case "name":
854			if v != nil {
855				var name string
856				err = json.Unmarshal(*v, &name)
857				if err != nil {
858					return err
859				}
860				rs.Name = &name
861			}
862		case "type":
863			if v != nil {
864				var typeVar string
865				err = json.Unmarshal(*v, &typeVar)
866				if err != nil {
867					return err
868				}
869				rs.Type = &typeVar
870			}
871		}
872	}
873
874	return nil
875}
876
877// RegisteredServerArray array of RegisteredServer
878type RegisteredServerArray struct {
879	autorest.Response `json:"-"`
880	// Value - Collection of Registered Server.
881	Value *[]RegisteredServer `json:"value,omitempty"`
882}
883
884// RegisteredServerCreateParameters the parameters used when creating a storage sync service.
885type RegisteredServerCreateParameters struct {
886	// 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.
887	Location *string `json:"location,omitempty"`
888	// 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.
889	Tags map[string]*string `json:"tags"`
890	// RegisteredServerCreateParametersProperties - The parameters used to create the storage sync service.
891	*RegisteredServerCreateParametersProperties `json:"properties,omitempty"`
892}
893
894// MarshalJSON is the custom marshaler for RegisteredServerCreateParameters.
895func (rscp RegisteredServerCreateParameters) MarshalJSON() ([]byte, error) {
896	objectMap := make(map[string]interface{})
897	if rscp.Location != nil {
898		objectMap["location"] = rscp.Location
899	}
900	if rscp.Tags != nil {
901		objectMap["tags"] = rscp.Tags
902	}
903	if rscp.RegisteredServerCreateParametersProperties != nil {
904		objectMap["properties"] = rscp.RegisteredServerCreateParametersProperties
905	}
906	return json.Marshal(objectMap)
907}
908
909// UnmarshalJSON is the custom unmarshaler for RegisteredServerCreateParameters struct.
910func (rscp *RegisteredServerCreateParameters) UnmarshalJSON(body []byte) error {
911	var m map[string]*json.RawMessage
912	err := json.Unmarshal(body, &m)
913	if err != nil {
914		return err
915	}
916	for k, v := range m {
917		switch k {
918		case "location":
919			if v != nil {
920				var location string
921				err = json.Unmarshal(*v, &location)
922				if err != nil {
923					return err
924				}
925				rscp.Location = &location
926			}
927		case "tags":
928			if v != nil {
929				var tags map[string]*string
930				err = json.Unmarshal(*v, &tags)
931				if err != nil {
932					return err
933				}
934				rscp.Tags = tags
935			}
936		case "properties":
937			if v != nil {
938				var registeredServerCreateParametersProperties RegisteredServerCreateParametersProperties
939				err = json.Unmarshal(*v, &registeredServerCreateParametersProperties)
940				if err != nil {
941					return err
942				}
943				rscp.RegisteredServerCreateParametersProperties = &registeredServerCreateParametersProperties
944			}
945		}
946	}
947
948	return nil
949}
950
951// RegisteredServerCreateParametersProperties registeredServer Properties object.
952type RegisteredServerCreateParametersProperties struct {
953	// ServerCertificate - Registered Server Certificate
954	ServerCertificate *string `json:"serverCertificate,omitempty"`
955	// AgentVersion - Registered Server Agent Version
956	AgentVersion *string `json:"agentVersion,omitempty"`
957	// ServerOSVersion - Registered Server OS Version
958	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
959	// LastHeartBeat - Registered Server last heart beat
960	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
961	// ServerRole - Registered Server serverRole
962	ServerRole *string `json:"serverRole,omitempty"`
963	// ClusterID - Registered Server clusterId
964	ClusterID *string `json:"clusterId,omitempty"`
965	// ClusterName - Registered Server clusterName
966	ClusterName *string `json:"clusterName,omitempty"`
967	// ServerID - Registered Server serverId
968	ServerID *string `json:"serverId,omitempty"`
969	// FriendlyName - Friendly Name
970	FriendlyName *string `json:"friendlyName,omitempty"`
971}
972
973// RegisteredServerProperties registeredServer Properties object.
974type RegisteredServerProperties struct {
975	// ServerCertificate - Registered Server Certificate
976	ServerCertificate *string `json:"serverCertificate,omitempty"`
977	// AgentVersion - Registered Server Agent Version
978	AgentVersion *string `json:"agentVersion,omitempty"`
979	// ServerOSVersion - Registered Server OS Version
980	ServerOSVersion *string `json:"serverOSVersion,omitempty"`
981	// ServerManagementtErrorCode - Registered Server Management Error Code
982	ServerManagementtErrorCode *int32 `json:"serverManagementtErrorCode,omitempty"`
983	// LastHeartBeat - Registered Server last heart beat
984	LastHeartBeat *string `json:"lastHeartBeat,omitempty"`
985	// ProvisioningState - Registered Server Provisioning State
986	ProvisioningState *string `json:"provisioningState,omitempty"`
987	// ServerRole - Registered Server serverRole
988	ServerRole *string `json:"serverRole,omitempty"`
989	// ClusterID - Registered Server clusterId
990	ClusterID *string `json:"clusterId,omitempty"`
991	// ClusterName - Registered Server clusterName
992	ClusterName *string `json:"clusterName,omitempty"`
993	// ServerID - Registered Server serverId
994	ServerID *string `json:"serverId,omitempty"`
995	// StorageSyncServiceUID - Registered Server storageSyncServiceUid
996	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
997	// LastWorkflowID - Registered Server lastWorkflowId
998	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
999	// LastOperationName - Resource Last Operation Name
1000	LastOperationName *string `json:"lastOperationName,omitempty"`
1001	// DiscoveryEndpointURI - Resource discoveryEndpointUri
1002	DiscoveryEndpointURI *string `json:"discoveryEndpointUri,omitempty"`
1003	// ResourceLocation - Resource Location
1004	ResourceLocation *string `json:"resourceLocation,omitempty"`
1005	// ServiceLocation - Service Location
1006	ServiceLocation *string `json:"serviceLocation,omitempty"`
1007	// FriendlyName - Friendly Name
1008	FriendlyName *string `json:"friendlyName,omitempty"`
1009	// ManagementEndpointURI - Management Endpoint Uri
1010	ManagementEndpointURI *string `json:"managementEndpointUri,omitempty"`
1011}
1012
1013// RegisteredServersGroupCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1014// operation.
1015type RegisteredServersGroupCreateFuture struct {
1016	azure.Future
1017}
1018
1019// Result returns the result of the asynchronous operation.
1020// If the operation has not completed it will return an error.
1021func (future *RegisteredServersGroupCreateFuture) Result(client RegisteredServersGroupClient) (rs RegisteredServer, err error) {
1022	var done bool
1023	done, err = future.Done(client)
1024	if err != nil {
1025		err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersGroupCreateFuture", "Result", future.Response(), "Polling failure")
1026		return
1027	}
1028	if !done {
1029		err = azure.NewAsyncOpIncompleteError("storagesync.RegisteredServersGroupCreateFuture")
1030		return
1031	}
1032	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1033	if rs.Response.Response, err = future.GetResult(sender); err == nil && rs.Response.Response.StatusCode != http.StatusNoContent {
1034		rs, err = client.CreateResponder(rs.Response.Response)
1035		if err != nil {
1036			err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersGroupCreateFuture", "Result", rs.Response.Response, "Failure responding to request")
1037		}
1038	}
1039	return
1040}
1041
1042// RegisteredServersGroupDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1043// operation.
1044type RegisteredServersGroupDeleteFuture struct {
1045	azure.Future
1046}
1047
1048// Result returns the result of the asynchronous operation.
1049// If the operation has not completed it will return an error.
1050func (future *RegisteredServersGroupDeleteFuture) Result(client RegisteredServersGroupClient) (ar autorest.Response, err error) {
1051	var done bool
1052	done, err = future.Done(client)
1053	if err != nil {
1054		err = autorest.NewErrorWithError(err, "storagesync.RegisteredServersGroupDeleteFuture", "Result", future.Response(), "Polling failure")
1055		return
1056	}
1057	if !done {
1058		err = azure.NewAsyncOpIncompleteError("storagesync.RegisteredServersGroupDeleteFuture")
1059		return
1060	}
1061	ar.Response = future.Response()
1062	return
1063}
1064
1065// Resource ...
1066type Resource struct {
1067	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1068	ID *string `json:"id,omitempty"`
1069	// Name - The name of the resource
1070	Name *string `json:"name,omitempty"`
1071	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1072	Type *string `json:"type,omitempty"`
1073}
1074
1075// ResourcesMoveInfo resource Move Info.
1076type ResourcesMoveInfo struct {
1077	// TargetResourceGroup - Target resource group.
1078	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
1079	// Resources - Collection of Resources.
1080	Resources *[]string `json:"resources,omitempty"`
1081}
1082
1083// RestoreFileSpec restore file spec.
1084type RestoreFileSpec struct {
1085	// Path - Restore file spec path
1086	Path *string `json:"path,omitempty"`
1087	// Isdir - Restore file spec isdir
1088	Isdir *bool `json:"isdir,omitempty"`
1089}
1090
1091// ServerEndpoint server Endpoint object.
1092type ServerEndpoint struct {
1093	autorest.Response `json:"-"`
1094	// ServerEndpointProperties - Server Endpoint properties.
1095	*ServerEndpointProperties `json:"properties,omitempty"`
1096	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1097	ID *string `json:"id,omitempty"`
1098	// Name - The name of the resource
1099	Name *string `json:"name,omitempty"`
1100	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1101	Type *string `json:"type,omitempty"`
1102}
1103
1104// MarshalJSON is the custom marshaler for ServerEndpoint.
1105func (se ServerEndpoint) MarshalJSON() ([]byte, error) {
1106	objectMap := make(map[string]interface{})
1107	if se.ServerEndpointProperties != nil {
1108		objectMap["properties"] = se.ServerEndpointProperties
1109	}
1110	if se.ID != nil {
1111		objectMap["id"] = se.ID
1112	}
1113	if se.Name != nil {
1114		objectMap["name"] = se.Name
1115	}
1116	if se.Type != nil {
1117		objectMap["type"] = se.Type
1118	}
1119	return json.Marshal(objectMap)
1120}
1121
1122// UnmarshalJSON is the custom unmarshaler for ServerEndpoint struct.
1123func (se *ServerEndpoint) UnmarshalJSON(body []byte) error {
1124	var m map[string]*json.RawMessage
1125	err := json.Unmarshal(body, &m)
1126	if err != nil {
1127		return err
1128	}
1129	for k, v := range m {
1130		switch k {
1131		case "properties":
1132			if v != nil {
1133				var serverEndpointProperties ServerEndpointProperties
1134				err = json.Unmarshal(*v, &serverEndpointProperties)
1135				if err != nil {
1136					return err
1137				}
1138				se.ServerEndpointProperties = &serverEndpointProperties
1139			}
1140		case "id":
1141			if v != nil {
1142				var ID string
1143				err = json.Unmarshal(*v, &ID)
1144				if err != nil {
1145					return err
1146				}
1147				se.ID = &ID
1148			}
1149		case "name":
1150			if v != nil {
1151				var name string
1152				err = json.Unmarshal(*v, &name)
1153				if err != nil {
1154					return err
1155				}
1156				se.Name = &name
1157			}
1158		case "type":
1159			if v != nil {
1160				var typeVar string
1161				err = json.Unmarshal(*v, &typeVar)
1162				if err != nil {
1163					return err
1164				}
1165				se.Type = &typeVar
1166			}
1167		}
1168	}
1169
1170	return nil
1171}
1172
1173// ServerEndpointArray array of ServerEndpoint
1174type ServerEndpointArray struct {
1175	autorest.Response `json:"-"`
1176	// Value - Collection of ServerEndpoint.
1177	Value *[]ServerEndpoint `json:"value,omitempty"`
1178}
1179
1180// ServerEndpointCreateParameters the parameters used when creating a storage sync service.
1181type ServerEndpointCreateParameters struct {
1182	// 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.
1183	Location *string `json:"location,omitempty"`
1184	// 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.
1185	Tags map[string]*string `json:"tags"`
1186	// ServerEndpointCreateParametersProperties - The parameters used to create the storage sync service.
1187	*ServerEndpointCreateParametersProperties `json:"properties,omitempty"`
1188}
1189
1190// MarshalJSON is the custom marshaler for ServerEndpointCreateParameters.
1191func (secp ServerEndpointCreateParameters) MarshalJSON() ([]byte, error) {
1192	objectMap := make(map[string]interface{})
1193	if secp.Location != nil {
1194		objectMap["location"] = secp.Location
1195	}
1196	if secp.Tags != nil {
1197		objectMap["tags"] = secp.Tags
1198	}
1199	if secp.ServerEndpointCreateParametersProperties != nil {
1200		objectMap["properties"] = secp.ServerEndpointCreateParametersProperties
1201	}
1202	return json.Marshal(objectMap)
1203}
1204
1205// UnmarshalJSON is the custom unmarshaler for ServerEndpointCreateParameters struct.
1206func (secp *ServerEndpointCreateParameters) UnmarshalJSON(body []byte) error {
1207	var m map[string]*json.RawMessage
1208	err := json.Unmarshal(body, &m)
1209	if err != nil {
1210		return err
1211	}
1212	for k, v := range m {
1213		switch k {
1214		case "location":
1215			if v != nil {
1216				var location string
1217				err = json.Unmarshal(*v, &location)
1218				if err != nil {
1219					return err
1220				}
1221				secp.Location = &location
1222			}
1223		case "tags":
1224			if v != nil {
1225				var tags map[string]*string
1226				err = json.Unmarshal(*v, &tags)
1227				if err != nil {
1228					return err
1229				}
1230				secp.Tags = tags
1231			}
1232		case "properties":
1233			if v != nil {
1234				var serverEndpointCreateParametersProperties ServerEndpointCreateParametersProperties
1235				err = json.Unmarshal(*v, &serverEndpointCreateParametersProperties)
1236				if err != nil {
1237					return err
1238				}
1239				secp.ServerEndpointCreateParametersProperties = &serverEndpointCreateParametersProperties
1240			}
1241		}
1242	}
1243
1244	return nil
1245}
1246
1247// ServerEndpointCreateParametersProperties serverEndpoint Properties object.
1248type ServerEndpointCreateParametersProperties struct {
1249	// ServerLocalPath - Server Local path.
1250	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1251	// CloudTiering - Cloud Tiering. Possible values include: 'On', 'Off'
1252	CloudTiering CloudTiering `json:"cloudTiering,omitempty"`
1253	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1254	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1255	// FriendlyName - Friendly Name
1256	FriendlyName *string `json:"friendlyName,omitempty"`
1257	// ServerResourceID - Server Resource Id.
1258	ServerResourceID *string `json:"serverResourceId,omitempty"`
1259}
1260
1261// ServerEndpointProperties serverEndpoint Properties object.
1262type ServerEndpointProperties struct {
1263	// ServerLocalPath - Server Local path.
1264	ServerLocalPath *string `json:"serverLocalPath,omitempty"`
1265	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering2On', 'CloudTiering2Off'
1266	CloudTiering CloudTiering2 `json:"cloudTiering,omitempty"`
1267	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1268	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1269	// FriendlyName - Friendly Name
1270	FriendlyName *string `json:"friendlyName,omitempty"`
1271	// ServerResourceID - Server Resource Id.
1272	ServerResourceID *string `json:"serverResourceId,omitempty"`
1273	// ProvisioningState - ServerEndpoint Provisioning State
1274	ProvisioningState *string `json:"provisioningState,omitempty"`
1275	// LastWorkflowID - ServerEndpoint lastWorkflowId
1276	LastWorkflowID *string `json:"lastWorkflowId,omitempty"`
1277	// LastOperationName - Resource Last Operation Name
1278	LastOperationName *string `json:"lastOperationName,omitempty"`
1279	// SyncStatus - Sync Health Status
1280	SyncStatus interface{} `json:"syncStatus,omitempty"`
1281}
1282
1283// ServerEndpointsGroupCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1284// operation.
1285type ServerEndpointsGroupCreateFuture struct {
1286	azure.Future
1287}
1288
1289// Result returns the result of the asynchronous operation.
1290// If the operation has not completed it will return an error.
1291func (future *ServerEndpointsGroupCreateFuture) Result(client ServerEndpointsGroupClient) (se ServerEndpoint, err error) {
1292	var done bool
1293	done, err = future.Done(client)
1294	if err != nil {
1295		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupCreateFuture", "Result", future.Response(), "Polling failure")
1296		return
1297	}
1298	if !done {
1299		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsGroupCreateFuture")
1300		return
1301	}
1302	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1303	if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
1304		se, err = client.CreateResponder(se.Response.Response)
1305		if err != nil {
1306			err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupCreateFuture", "Result", se.Response.Response, "Failure responding to request")
1307		}
1308	}
1309	return
1310}
1311
1312// ServerEndpointsGroupDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1313// operation.
1314type ServerEndpointsGroupDeleteFuture struct {
1315	azure.Future
1316}
1317
1318// Result returns the result of the asynchronous operation.
1319// If the operation has not completed it will return an error.
1320func (future *ServerEndpointsGroupDeleteFuture) Result(client ServerEndpointsGroupClient) (ar autorest.Response, err error) {
1321	var done bool
1322	done, err = future.Done(client)
1323	if err != nil {
1324		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupDeleteFuture", "Result", future.Response(), "Polling failure")
1325		return
1326	}
1327	if !done {
1328		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsGroupDeleteFuture")
1329		return
1330	}
1331	ar.Response = future.Response()
1332	return
1333}
1334
1335// ServerEndpointsGroupRecallActionFuture an abstraction for monitoring and retrieving the results of a
1336// long-running operation.
1337type ServerEndpointsGroupRecallActionFuture struct {
1338	azure.Future
1339}
1340
1341// Result returns the result of the asynchronous operation.
1342// If the operation has not completed it will return an error.
1343func (future *ServerEndpointsGroupRecallActionFuture) Result(client ServerEndpointsGroupClient) (ar autorest.Response, err error) {
1344	var done bool
1345	done, err = future.Done(client)
1346	if err != nil {
1347		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupRecallActionFuture", "Result", future.Response(), "Polling failure")
1348		return
1349	}
1350	if !done {
1351		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsGroupRecallActionFuture")
1352		return
1353	}
1354	ar.Response = future.Response()
1355	return
1356}
1357
1358// ServerEndpointsGroupUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1359// operation.
1360type ServerEndpointsGroupUpdateFuture struct {
1361	azure.Future
1362}
1363
1364// Result returns the result of the asynchronous operation.
1365// If the operation has not completed it will return an error.
1366func (future *ServerEndpointsGroupUpdateFuture) Result(client ServerEndpointsGroupClient) (se ServerEndpoint, err error) {
1367	var done bool
1368	done, err = future.Done(client)
1369	if err != nil {
1370		err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupUpdateFuture", "Result", future.Response(), "Polling failure")
1371		return
1372	}
1373	if !done {
1374		err = azure.NewAsyncOpIncompleteError("storagesync.ServerEndpointsGroupUpdateFuture")
1375		return
1376	}
1377	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1378	if se.Response.Response, err = future.GetResult(sender); err == nil && se.Response.Response.StatusCode != http.StatusNoContent {
1379		se, err = client.UpdateResponder(se.Response.Response)
1380		if err != nil {
1381			err = autorest.NewErrorWithError(err, "storagesync.ServerEndpointsGroupUpdateFuture", "Result", se.Response.Response, "Failure responding to request")
1382		}
1383	}
1384	return
1385}
1386
1387// ServerEndpointUpdateParameters parameters for updating an Server Endpoint.
1388type ServerEndpointUpdateParameters struct {
1389	// Tags - The user-specified tags associated with the server endpoint.
1390	Tags map[string]*string `json:"tags"`
1391	// ServerEndpointUpdateProperties - The properties of the serverendpoint.
1392	*ServerEndpointUpdateProperties `json:"properties,omitempty"`
1393}
1394
1395// MarshalJSON is the custom marshaler for ServerEndpointUpdateParameters.
1396func (seup ServerEndpointUpdateParameters) MarshalJSON() ([]byte, error) {
1397	objectMap := make(map[string]interface{})
1398	if seup.Tags != nil {
1399		objectMap["tags"] = seup.Tags
1400	}
1401	if seup.ServerEndpointUpdateProperties != nil {
1402		objectMap["properties"] = seup.ServerEndpointUpdateProperties
1403	}
1404	return json.Marshal(objectMap)
1405}
1406
1407// UnmarshalJSON is the custom unmarshaler for ServerEndpointUpdateParameters struct.
1408func (seup *ServerEndpointUpdateParameters) UnmarshalJSON(body []byte) error {
1409	var m map[string]*json.RawMessage
1410	err := json.Unmarshal(body, &m)
1411	if err != nil {
1412		return err
1413	}
1414	for k, v := range m {
1415		switch k {
1416		case "tags":
1417			if v != nil {
1418				var tags map[string]*string
1419				err = json.Unmarshal(*v, &tags)
1420				if err != nil {
1421					return err
1422				}
1423				seup.Tags = tags
1424			}
1425		case "properties":
1426			if v != nil {
1427				var serverEndpointUpdateProperties ServerEndpointUpdateProperties
1428				err = json.Unmarshal(*v, &serverEndpointUpdateProperties)
1429				if err != nil {
1430					return err
1431				}
1432				seup.ServerEndpointUpdateProperties = &serverEndpointUpdateProperties
1433			}
1434		}
1435	}
1436
1437	return nil
1438}
1439
1440// ServerEndpointUpdateProperties serverEndpoint Update Properties object.
1441type ServerEndpointUpdateProperties struct {
1442	// CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering1On', 'CloudTiering1Off'
1443	CloudTiering CloudTiering1 `json:"cloudTiering,omitempty"`
1444	// VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled.
1445	VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"`
1446}
1447
1448// Service storage Sync Service object.
1449type Service struct {
1450	autorest.Response `json:"-"`
1451	// ServiceProperties - Storage Sync Service properties.
1452	*ServiceProperties `json:"properties,omitempty"`
1453	// Tags - Resource tags.
1454	Tags map[string]*string `json:"tags"`
1455	// Location - The geo-location where the resource lives
1456	Location *string `json:"location,omitempty"`
1457	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1458	ID *string `json:"id,omitempty"`
1459	// Name - The name of the resource
1460	Name *string `json:"name,omitempty"`
1461	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1462	Type *string `json:"type,omitempty"`
1463}
1464
1465// MarshalJSON is the custom marshaler for Service.
1466func (s Service) MarshalJSON() ([]byte, error) {
1467	objectMap := make(map[string]interface{})
1468	if s.ServiceProperties != nil {
1469		objectMap["properties"] = s.ServiceProperties
1470	}
1471	if s.Tags != nil {
1472		objectMap["tags"] = s.Tags
1473	}
1474	if s.Location != nil {
1475		objectMap["location"] = s.Location
1476	}
1477	if s.ID != nil {
1478		objectMap["id"] = s.ID
1479	}
1480	if s.Name != nil {
1481		objectMap["name"] = s.Name
1482	}
1483	if s.Type != nil {
1484		objectMap["type"] = s.Type
1485	}
1486	return json.Marshal(objectMap)
1487}
1488
1489// UnmarshalJSON is the custom unmarshaler for Service struct.
1490func (s *Service) UnmarshalJSON(body []byte) error {
1491	var m map[string]*json.RawMessage
1492	err := json.Unmarshal(body, &m)
1493	if err != nil {
1494		return err
1495	}
1496	for k, v := range m {
1497		switch k {
1498		case "properties":
1499			if v != nil {
1500				var serviceProperties ServiceProperties
1501				err = json.Unmarshal(*v, &serviceProperties)
1502				if err != nil {
1503					return err
1504				}
1505				s.ServiceProperties = &serviceProperties
1506			}
1507		case "tags":
1508			if v != nil {
1509				var tags map[string]*string
1510				err = json.Unmarshal(*v, &tags)
1511				if err != nil {
1512					return err
1513				}
1514				s.Tags = tags
1515			}
1516		case "location":
1517			if v != nil {
1518				var location string
1519				err = json.Unmarshal(*v, &location)
1520				if err != nil {
1521					return err
1522				}
1523				s.Location = &location
1524			}
1525		case "id":
1526			if v != nil {
1527				var ID string
1528				err = json.Unmarshal(*v, &ID)
1529				if err != nil {
1530					return err
1531				}
1532				s.ID = &ID
1533			}
1534		case "name":
1535			if v != nil {
1536				var name string
1537				err = json.Unmarshal(*v, &name)
1538				if err != nil {
1539					return err
1540				}
1541				s.Name = &name
1542			}
1543		case "type":
1544			if v != nil {
1545				var typeVar string
1546				err = json.Unmarshal(*v, &typeVar)
1547				if err != nil {
1548					return err
1549				}
1550				s.Type = &typeVar
1551			}
1552		}
1553	}
1554
1555	return nil
1556}
1557
1558// ServiceArray array of StorageSyncServices
1559type ServiceArray struct {
1560	autorest.Response `json:"-"`
1561	// Value - Collection of StorageSyncServices.
1562	Value *[]Service `json:"value,omitempty"`
1563}
1564
1565// ServiceCreateParameters the parameters used when creating a storage sync service.
1566type ServiceCreateParameters struct {
1567	// 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.
1568	Location *string `json:"location,omitempty"`
1569	// 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.
1570	Tags map[string]*string `json:"tags"`
1571}
1572
1573// MarshalJSON is the custom marshaler for ServiceCreateParameters.
1574func (scp ServiceCreateParameters) MarshalJSON() ([]byte, error) {
1575	objectMap := make(map[string]interface{})
1576	if scp.Location != nil {
1577		objectMap["location"] = scp.Location
1578	}
1579	if scp.Tags != nil {
1580		objectMap["tags"] = scp.Tags
1581	}
1582	return json.Marshal(objectMap)
1583}
1584
1585// ServiceProperties storage Sync Service Properties object.
1586type ServiceProperties struct {
1587	// StorageSyncServiceStatus - Storage Sync service status.
1588	StorageSyncServiceStatus *int32 `json:"storageSyncServiceStatus,omitempty"`
1589	// StorageSyncServiceUID - Storage Sync service Uid
1590	StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"`
1591}
1592
1593// ServiceUpdateParameters parameters for updating an Storage sync service.
1594type ServiceUpdateParameters struct {
1595	// Tags - The user-specified tags associated with the storage sync service.
1596	Tags map[string]*string `json:"tags"`
1597	// Properties - The properties of the storage sync service.
1598	Properties interface{} `json:"properties,omitempty"`
1599}
1600
1601// MarshalJSON is the custom marshaler for ServiceUpdateParameters.
1602func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) {
1603	objectMap := make(map[string]interface{})
1604	if sup.Tags != nil {
1605		objectMap["tags"] = sup.Tags
1606	}
1607	objectMap["properties"] = sup.Properties
1608	return json.Marshal(objectMap)
1609}
1610
1611// SubscriptionState subscription State object.
1612type SubscriptionState struct {
1613	// State - State of Azure Subscription. Possible values include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted'
1614	State Reason `json:"state,omitempty"`
1615	// Istransitioning - Is Transitioning
1616	Istransitioning *bool `json:"istransitioning,omitempty"`
1617	// Properties - Subscription state properties.
1618	Properties interface{} `json:"properties,omitempty"`
1619}
1620
1621// SyncGroup sync Group object.
1622type SyncGroup struct {
1623	autorest.Response `json:"-"`
1624	// SyncGroupProperties - SyncGroup properties.
1625	*SyncGroupProperties `json:"properties,omitempty"`
1626	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1627	ID *string `json:"id,omitempty"`
1628	// Name - The name of the resource
1629	Name *string `json:"name,omitempty"`
1630	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1631	Type *string `json:"type,omitempty"`
1632}
1633
1634// MarshalJSON is the custom marshaler for SyncGroup.
1635func (sg SyncGroup) MarshalJSON() ([]byte, error) {
1636	objectMap := make(map[string]interface{})
1637	if sg.SyncGroupProperties != nil {
1638		objectMap["properties"] = sg.SyncGroupProperties
1639	}
1640	if sg.ID != nil {
1641		objectMap["id"] = sg.ID
1642	}
1643	if sg.Name != nil {
1644		objectMap["name"] = sg.Name
1645	}
1646	if sg.Type != nil {
1647		objectMap["type"] = sg.Type
1648	}
1649	return json.Marshal(objectMap)
1650}
1651
1652// UnmarshalJSON is the custom unmarshaler for SyncGroup struct.
1653func (sg *SyncGroup) UnmarshalJSON(body []byte) error {
1654	var m map[string]*json.RawMessage
1655	err := json.Unmarshal(body, &m)
1656	if err != nil {
1657		return err
1658	}
1659	for k, v := range m {
1660		switch k {
1661		case "properties":
1662			if v != nil {
1663				var syncGroupProperties SyncGroupProperties
1664				err = json.Unmarshal(*v, &syncGroupProperties)
1665				if err != nil {
1666					return err
1667				}
1668				sg.SyncGroupProperties = &syncGroupProperties
1669			}
1670		case "id":
1671			if v != nil {
1672				var ID string
1673				err = json.Unmarshal(*v, &ID)
1674				if err != nil {
1675					return err
1676				}
1677				sg.ID = &ID
1678			}
1679		case "name":
1680			if v != nil {
1681				var name string
1682				err = json.Unmarshal(*v, &name)
1683				if err != nil {
1684					return err
1685				}
1686				sg.Name = &name
1687			}
1688		case "type":
1689			if v != nil {
1690				var typeVar string
1691				err = json.Unmarshal(*v, &typeVar)
1692				if err != nil {
1693					return err
1694				}
1695				sg.Type = &typeVar
1696			}
1697		}
1698	}
1699
1700	return nil
1701}
1702
1703// SyncGroupArray array of SyncGroup
1704type SyncGroupArray struct {
1705	autorest.Response `json:"-"`
1706	// Value - Collection of SyncGroup.
1707	Value *[]SyncGroup `json:"value,omitempty"`
1708}
1709
1710// SyncGroupCreateParameters the parameters used when creating a sync group.
1711type SyncGroupCreateParameters struct {
1712	// 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.
1713	Location *string `json:"location,omitempty"`
1714	// 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.
1715	Tags map[string]*string `json:"tags"`
1716	// Properties - The parameters used to create the sync group
1717	Properties interface{} `json:"properties,omitempty"`
1718}
1719
1720// MarshalJSON is the custom marshaler for SyncGroupCreateParameters.
1721func (sgcp SyncGroupCreateParameters) MarshalJSON() ([]byte, error) {
1722	objectMap := make(map[string]interface{})
1723	if sgcp.Location != nil {
1724		objectMap["location"] = sgcp.Location
1725	}
1726	if sgcp.Tags != nil {
1727		objectMap["tags"] = sgcp.Tags
1728	}
1729	objectMap["properties"] = sgcp.Properties
1730	return json.Marshal(objectMap)
1731}
1732
1733// SyncGroupProperties syncGroup Properties object.
1734type SyncGroupProperties struct {
1735	// UniqueID - Unique Id
1736	UniqueID *string `json:"uniqueId,omitempty"`
1737	// SyncGroupStatus - Sync group status
1738	SyncGroupStatus *string `json:"syncGroupStatus,omitempty"`
1739}
1740
1741// TrackedResource the resource model definition for a ARM tracked top level resource
1742type TrackedResource struct {
1743	// Tags - Resource tags.
1744	Tags map[string]*string `json:"tags"`
1745	// Location - The geo-location where the resource lives
1746	Location *string `json:"location,omitempty"`
1747	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1748	ID *string `json:"id,omitempty"`
1749	// Name - The name of the resource
1750	Name *string `json:"name,omitempty"`
1751	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1752	Type *string `json:"type,omitempty"`
1753}
1754
1755// MarshalJSON is the custom marshaler for TrackedResource.
1756func (tr TrackedResource) MarshalJSON() ([]byte, error) {
1757	objectMap := make(map[string]interface{})
1758	if tr.Tags != nil {
1759		objectMap["tags"] = tr.Tags
1760	}
1761	if tr.Location != nil {
1762		objectMap["location"] = tr.Location
1763	}
1764	if tr.ID != nil {
1765		objectMap["id"] = tr.ID
1766	}
1767	if tr.Name != nil {
1768		objectMap["name"] = tr.Name
1769	}
1770	if tr.Type != nil {
1771		objectMap["type"] = tr.Type
1772	}
1773	return json.Marshal(objectMap)
1774}
1775
1776// Workflow workflow resource.
1777type Workflow struct {
1778	autorest.Response `json:"-"`
1779	// WorkflowProperties - Workflow properties.
1780	*WorkflowProperties `json:"properties,omitempty"`
1781	// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1782	ID *string `json:"id,omitempty"`
1783	// Name - The name of the resource
1784	Name *string `json:"name,omitempty"`
1785	// Type - The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
1786	Type *string `json:"type,omitempty"`
1787}
1788
1789// MarshalJSON is the custom marshaler for Workflow.
1790func (w Workflow) MarshalJSON() ([]byte, error) {
1791	objectMap := make(map[string]interface{})
1792	if w.WorkflowProperties != nil {
1793		objectMap["properties"] = w.WorkflowProperties
1794	}
1795	if w.ID != nil {
1796		objectMap["id"] = w.ID
1797	}
1798	if w.Name != nil {
1799		objectMap["name"] = w.Name
1800	}
1801	if w.Type != nil {
1802		objectMap["type"] = w.Type
1803	}
1804	return json.Marshal(objectMap)
1805}
1806
1807// UnmarshalJSON is the custom unmarshaler for Workflow struct.
1808func (w *Workflow) UnmarshalJSON(body []byte) error {
1809	var m map[string]*json.RawMessage
1810	err := json.Unmarshal(body, &m)
1811	if err != nil {
1812		return err
1813	}
1814	for k, v := range m {
1815		switch k {
1816		case "properties":
1817			if v != nil {
1818				var workflowProperties WorkflowProperties
1819				err = json.Unmarshal(*v, &workflowProperties)
1820				if err != nil {
1821					return err
1822				}
1823				w.WorkflowProperties = &workflowProperties
1824			}
1825		case "id":
1826			if v != nil {
1827				var ID string
1828				err = json.Unmarshal(*v, &ID)
1829				if err != nil {
1830					return err
1831				}
1832				w.ID = &ID
1833			}
1834		case "name":
1835			if v != nil {
1836				var name string
1837				err = json.Unmarshal(*v, &name)
1838				if err != nil {
1839					return err
1840				}
1841				w.Name = &name
1842			}
1843		case "type":
1844			if v != nil {
1845				var typeVar string
1846				err = json.Unmarshal(*v, &typeVar)
1847				if err != nil {
1848					return err
1849				}
1850				w.Type = &typeVar
1851			}
1852		}
1853	}
1854
1855	return nil
1856}
1857
1858// WorkflowArray array of Workflow
1859type WorkflowArray struct {
1860	// Value - Collection of workflow items.
1861	Value *[]Workflow `json:"value,omitempty"`
1862}
1863
1864// WorkflowProperties workflow Properties object.
1865type WorkflowProperties struct {
1866	// LastStepName - last step name
1867	LastStepName *string `json:"lastStepName,omitempty"`
1868	// Status - workflow status. Possible values include: 'Active', 'Expired', 'Succeeded', 'Aborted', 'Failed'
1869	Status Status `json:"status,omitempty"`
1870	// Operation - operation direction. Possible values include: 'Do', 'Undo', 'Cancel'
1871	Operation Operation `json:"operation,omitempty"`
1872	// Steps - workflow steps
1873	Steps *string `json:"steps,omitempty"`
1874	// LastOperationID - workflow last operation identifier.
1875	LastOperationID *string `json:"lastOperationId,omitempty"`
1876}
1877