1package netapp
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/date"
25)
26
27// The package's fully qualified name.
28const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/netapp/mgmt/2017-08-15/netapp"
29
30// Account netApp account resource
31type Account struct {
32	autorest.Response `json:"-"`
33	// Location - Resource location
34	Location *string `json:"location,omitempty"`
35	// ID - READ-ONLY; Resource Id
36	ID *string `json:"id,omitempty"`
37	// Name - READ-ONLY; Resource name
38	Name *string `json:"name,omitempty"`
39	// Type - READ-ONLY; Resource type
40	Type *string `json:"type,omitempty"`
41	// Tags - Resource tags
42	Tags interface{} `json:"tags,omitempty"`
43	// AccountProperties - NetApp Account properties
44	*AccountProperties `json:"properties,omitempty"`
45}
46
47// MarshalJSON is the custom marshaler for Account.
48func (a Account) MarshalJSON() ([]byte, error) {
49	objectMap := make(map[string]interface{})
50	if a.Location != nil {
51		objectMap["location"] = a.Location
52	}
53	if a.Tags != nil {
54		objectMap["tags"] = a.Tags
55	}
56	if a.AccountProperties != nil {
57		objectMap["properties"] = a.AccountProperties
58	}
59	return json.Marshal(objectMap)
60}
61
62// UnmarshalJSON is the custom unmarshaler for Account struct.
63func (a *Account) UnmarshalJSON(body []byte) error {
64	var m map[string]*json.RawMessage
65	err := json.Unmarshal(body, &m)
66	if err != nil {
67		return err
68	}
69	for k, v := range m {
70		switch k {
71		case "location":
72			if v != nil {
73				var location string
74				err = json.Unmarshal(*v, &location)
75				if err != nil {
76					return err
77				}
78				a.Location = &location
79			}
80		case "id":
81			if v != nil {
82				var ID string
83				err = json.Unmarshal(*v, &ID)
84				if err != nil {
85					return err
86				}
87				a.ID = &ID
88			}
89		case "name":
90			if v != nil {
91				var name string
92				err = json.Unmarshal(*v, &name)
93				if err != nil {
94					return err
95				}
96				a.Name = &name
97			}
98		case "type":
99			if v != nil {
100				var typeVar string
101				err = json.Unmarshal(*v, &typeVar)
102				if err != nil {
103					return err
104				}
105				a.Type = &typeVar
106			}
107		case "tags":
108			if v != nil {
109				var tags interface{}
110				err = json.Unmarshal(*v, &tags)
111				if err != nil {
112					return err
113				}
114				a.Tags = tags
115			}
116		case "properties":
117			if v != nil {
118				var accountProperties AccountProperties
119				err = json.Unmarshal(*v, &accountProperties)
120				if err != nil {
121					return err
122				}
123				a.AccountProperties = &accountProperties
124			}
125		}
126	}
127
128	return nil
129}
130
131// AccountList list of NetApp account resources
132type AccountList struct {
133	autorest.Response `json:"-"`
134	// Value - Multiple NetApp accounts
135	Value *[]Account `json:"value,omitempty"`
136}
137
138// AccountPatch netApp account patch resource
139type AccountPatch struct {
140	// Location - Resource location
141	Location *string `json:"location,omitempty"`
142	// ID - READ-ONLY; Resource Id
143	ID *string `json:"id,omitempty"`
144	// Name - READ-ONLY; Resource name
145	Name *string `json:"name,omitempty"`
146	// Type - READ-ONLY; Resource type
147	Type *string `json:"type,omitempty"`
148	// Tags - Resource tags
149	Tags interface{} `json:"tags,omitempty"`
150	// AccountProperties - NetApp Account properties
151	*AccountProperties `json:"properties,omitempty"`
152}
153
154// MarshalJSON is the custom marshaler for AccountPatch.
155func (ap AccountPatch) MarshalJSON() ([]byte, error) {
156	objectMap := make(map[string]interface{})
157	if ap.Location != nil {
158		objectMap["location"] = ap.Location
159	}
160	if ap.Tags != nil {
161		objectMap["tags"] = ap.Tags
162	}
163	if ap.AccountProperties != nil {
164		objectMap["properties"] = ap.AccountProperties
165	}
166	return json.Marshal(objectMap)
167}
168
169// UnmarshalJSON is the custom unmarshaler for AccountPatch struct.
170func (ap *AccountPatch) UnmarshalJSON(body []byte) error {
171	var m map[string]*json.RawMessage
172	err := json.Unmarshal(body, &m)
173	if err != nil {
174		return err
175	}
176	for k, v := range m {
177		switch k {
178		case "location":
179			if v != nil {
180				var location string
181				err = json.Unmarshal(*v, &location)
182				if err != nil {
183					return err
184				}
185				ap.Location = &location
186			}
187		case "id":
188			if v != nil {
189				var ID string
190				err = json.Unmarshal(*v, &ID)
191				if err != nil {
192					return err
193				}
194				ap.ID = &ID
195			}
196		case "name":
197			if v != nil {
198				var name string
199				err = json.Unmarshal(*v, &name)
200				if err != nil {
201					return err
202				}
203				ap.Name = &name
204			}
205		case "type":
206			if v != nil {
207				var typeVar string
208				err = json.Unmarshal(*v, &typeVar)
209				if err != nil {
210					return err
211				}
212				ap.Type = &typeVar
213			}
214		case "tags":
215			if v != nil {
216				var tags interface{}
217				err = json.Unmarshal(*v, &tags)
218				if err != nil {
219					return err
220				}
221				ap.Tags = tags
222			}
223		case "properties":
224			if v != nil {
225				var accountProperties AccountProperties
226				err = json.Unmarshal(*v, &accountProperties)
227				if err != nil {
228					return err
229				}
230				ap.AccountProperties = &accountProperties
231			}
232		}
233	}
234
235	return nil
236}
237
238// AccountProperties netApp account properties
239type AccountProperties struct {
240	// ProvisioningState - READ-ONLY; Azure lifecycle management
241	ProvisioningState *string `json:"provisioningState,omitempty"`
242	// ActiveDirectories - Active Directories
243	ActiveDirectories *[]ActiveDirectory `json:"activeDirectories,omitempty"`
244}
245
246// MarshalJSON is the custom marshaler for AccountProperties.
247func (ap AccountProperties) MarshalJSON() ([]byte, error) {
248	objectMap := make(map[string]interface{})
249	if ap.ActiveDirectories != nil {
250		objectMap["activeDirectories"] = ap.ActiveDirectories
251	}
252	return json.Marshal(objectMap)
253}
254
255// AccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
256// operation.
257type AccountsCreateOrUpdateFuture struct {
258	azure.FutureAPI
259	// Result returns the result of the asynchronous operation.
260	// If the operation has not completed it will return an error.
261	Result func(AccountsClient) (Account, error)
262}
263
264// AccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
265// operation.
266type AccountsDeleteFuture struct {
267	azure.FutureAPI
268	// Result returns the result of the asynchronous operation.
269	// If the operation has not completed it will return an error.
270	Result func(AccountsClient) (autorest.Response, error)
271}
272
273// ActiveDirectory active Directory
274type ActiveDirectory struct {
275	// ActiveDirectoryID - Id of the Active Directory
276	ActiveDirectoryID *string `json:"activeDirectoryId,omitempty"`
277	// Username - Username of Active Directory domain administrator
278	Username *string `json:"username,omitempty"`
279	// Password - Plain text password of Active Directory domain administrator
280	Password *string `json:"password,omitempty"`
281	// Domain - Name of the Active Directory domain
282	Domain *string `json:"domain,omitempty"`
283	// DNS - Comma separated list of DNS server IP addresses for the Active Directory domain
284	DNS *string `json:"dNS,omitempty"`
285	// Status - Status of the Active Directory
286	Status *string `json:"status,omitempty"`
287	// SMBServerName - NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes
288	SMBServerName *string `json:"sMBServerName,omitempty"`
289	// OrganizationalUnit - The Organizational Unit (OU) within the Windows Active Directory
290	OrganizationalUnit *string `json:"organizationalUnit,omitempty"`
291}
292
293// CapacityPool capacity pool resource
294type CapacityPool struct {
295	autorest.Response `json:"-"`
296	// Location - Resource location
297	Location *string `json:"location,omitempty"`
298	// ID - READ-ONLY; Resource Id
299	ID *string `json:"id,omitempty"`
300	// Name - READ-ONLY; Resource name
301	Name *string `json:"name,omitempty"`
302	// Type - READ-ONLY; Resource type
303	Type *string `json:"type,omitempty"`
304	// Tags - Resource tags
305	Tags interface{} `json:"tags,omitempty"`
306	// PoolProperties - Capacity pool properties
307	*PoolProperties `json:"properties,omitempty"`
308}
309
310// MarshalJSON is the custom marshaler for CapacityPool.
311func (cp CapacityPool) MarshalJSON() ([]byte, error) {
312	objectMap := make(map[string]interface{})
313	if cp.Location != nil {
314		objectMap["location"] = cp.Location
315	}
316	if cp.Tags != nil {
317		objectMap["tags"] = cp.Tags
318	}
319	if cp.PoolProperties != nil {
320		objectMap["properties"] = cp.PoolProperties
321	}
322	return json.Marshal(objectMap)
323}
324
325// UnmarshalJSON is the custom unmarshaler for CapacityPool struct.
326func (cp *CapacityPool) UnmarshalJSON(body []byte) error {
327	var m map[string]*json.RawMessage
328	err := json.Unmarshal(body, &m)
329	if err != nil {
330		return err
331	}
332	for k, v := range m {
333		switch k {
334		case "location":
335			if v != nil {
336				var location string
337				err = json.Unmarshal(*v, &location)
338				if err != nil {
339					return err
340				}
341				cp.Location = &location
342			}
343		case "id":
344			if v != nil {
345				var ID string
346				err = json.Unmarshal(*v, &ID)
347				if err != nil {
348					return err
349				}
350				cp.ID = &ID
351			}
352		case "name":
353			if v != nil {
354				var name string
355				err = json.Unmarshal(*v, &name)
356				if err != nil {
357					return err
358				}
359				cp.Name = &name
360			}
361		case "type":
362			if v != nil {
363				var typeVar string
364				err = json.Unmarshal(*v, &typeVar)
365				if err != nil {
366					return err
367				}
368				cp.Type = &typeVar
369			}
370		case "tags":
371			if v != nil {
372				var tags interface{}
373				err = json.Unmarshal(*v, &tags)
374				if err != nil {
375					return err
376				}
377				cp.Tags = tags
378			}
379		case "properties":
380			if v != nil {
381				var poolProperties PoolProperties
382				err = json.Unmarshal(*v, &poolProperties)
383				if err != nil {
384					return err
385				}
386				cp.PoolProperties = &poolProperties
387			}
388		}
389	}
390
391	return nil
392}
393
394// CapacityPoolList list of capacity pool resources
395type CapacityPoolList struct {
396	autorest.Response `json:"-"`
397	// Value - List of Capacity pools
398	Value *[]CapacityPool `json:"value,omitempty"`
399}
400
401// CapacityPoolPatch capacity pool patch resource
402type CapacityPoolPatch struct {
403	// Location - Resource location
404	Location *string `json:"location,omitempty"`
405	// ID - READ-ONLY; Resource Id
406	ID *string `json:"id,omitempty"`
407	// Name - READ-ONLY; Resource name
408	Name *string `json:"name,omitempty"`
409	// Type - READ-ONLY; Resource type
410	Type *string `json:"type,omitempty"`
411	// Tags - Resource tags
412	Tags interface{} `json:"tags,omitempty"`
413	// PoolPatchProperties - Capacity pool properties
414	*PoolPatchProperties `json:"properties,omitempty"`
415}
416
417// MarshalJSON is the custom marshaler for CapacityPoolPatch.
418func (cpp CapacityPoolPatch) MarshalJSON() ([]byte, error) {
419	objectMap := make(map[string]interface{})
420	if cpp.Location != nil {
421		objectMap["location"] = cpp.Location
422	}
423	if cpp.Tags != nil {
424		objectMap["tags"] = cpp.Tags
425	}
426	if cpp.PoolPatchProperties != nil {
427		objectMap["properties"] = cpp.PoolPatchProperties
428	}
429	return json.Marshal(objectMap)
430}
431
432// UnmarshalJSON is the custom unmarshaler for CapacityPoolPatch struct.
433func (cpp *CapacityPoolPatch) UnmarshalJSON(body []byte) error {
434	var m map[string]*json.RawMessage
435	err := json.Unmarshal(body, &m)
436	if err != nil {
437		return err
438	}
439	for k, v := range m {
440		switch k {
441		case "location":
442			if v != nil {
443				var location string
444				err = json.Unmarshal(*v, &location)
445				if err != nil {
446					return err
447				}
448				cpp.Location = &location
449			}
450		case "id":
451			if v != nil {
452				var ID string
453				err = json.Unmarshal(*v, &ID)
454				if err != nil {
455					return err
456				}
457				cpp.ID = &ID
458			}
459		case "name":
460			if v != nil {
461				var name string
462				err = json.Unmarshal(*v, &name)
463				if err != nil {
464					return err
465				}
466				cpp.Name = &name
467			}
468		case "type":
469			if v != nil {
470				var typeVar string
471				err = json.Unmarshal(*v, &typeVar)
472				if err != nil {
473					return err
474				}
475				cpp.Type = &typeVar
476			}
477		case "tags":
478			if v != nil {
479				var tags interface{}
480				err = json.Unmarshal(*v, &tags)
481				if err != nil {
482					return err
483				}
484				cpp.Tags = tags
485			}
486		case "properties":
487			if v != nil {
488				var poolPatchProperties PoolPatchProperties
489				err = json.Unmarshal(*v, &poolPatchProperties)
490				if err != nil {
491					return err
492				}
493				cpp.PoolPatchProperties = &poolPatchProperties
494			}
495		}
496	}
497
498	return nil
499}
500
501// Dimension dimension of blobs, possibly be blob type or access tier.
502type Dimension struct {
503	// Name - Display name of dimension.
504	Name *string `json:"name,omitempty"`
505	// DisplayName - Display name of dimension.
506	DisplayName *string `json:"displayName,omitempty"`
507}
508
509// Error error response describing why the operation failed.
510type Error struct {
511	// Code - Error code
512	Code *string `json:"code,omitempty"`
513	// Message - Detailed error message
514	Message *string `json:"message,omitempty"`
515}
516
517// ExportPolicyRule volume Export Policy Rule
518type ExportPolicyRule struct {
519	// RuleIndex - Order index
520	RuleIndex *int32 `json:"ruleIndex,omitempty"`
521	// UnixReadOnly - Read only access
522	UnixReadOnly *bool `json:"unixReadOnly,omitempty"`
523	// UnixReadWrite - Read and write access
524	UnixReadWrite *bool `json:"unixReadWrite,omitempty"`
525	// Cifs - Allows CIFS protocol
526	Cifs *bool `json:"cifs,omitempty"`
527	// Nfsv3 - Allows NFSv3 protocol
528	Nfsv3 *bool `json:"nfsv3,omitempty"`
529	// Nfsv4 - Allows NFSv4 protocol
530	Nfsv4 *bool `json:"nfsv4,omitempty"`
531	// AllowedClients - Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names
532	AllowedClients *string `json:"allowedClients,omitempty"`
533}
534
535// MetricSpecification metric specification of operation.
536type MetricSpecification struct {
537	// Name - Name of metric specification.
538	Name *string `json:"name,omitempty"`
539	// DisplayName - Display name of metric specification.
540	DisplayName *string `json:"displayName,omitempty"`
541	// DisplayDescription - Display description of metric specification.
542	DisplayDescription *string `json:"displayDescription,omitempty"`
543	// Unit - Unit could be Bytes or Count.
544	Unit *string `json:"unit,omitempty"`
545	// Dimensions - Dimensions of blobs, including blob type and access tier.
546	Dimensions *[]Dimension `json:"dimensions,omitempty"`
547	// AggregationType - Aggregation type could be Average.
548	AggregationType *string `json:"aggregationType,omitempty"`
549	// FillGapWithZero - The property to decide fill gap with zero or not.
550	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
551	// Category - The category this metric specification belong to, could be Capacity.
552	Category *string `json:"category,omitempty"`
553	// ResourceIDDimensionNameOverride - Account Resource Id.
554	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
555}
556
557// MountTarget mount Target
558type MountTarget struct {
559	// Location - Resource location
560	Location *string `json:"location,omitempty"`
561	// ID - READ-ONLY; Resource Id
562	ID *string `json:"id,omitempty"`
563	// Name - READ-ONLY; Resource name
564	Name *string `json:"name,omitempty"`
565	// Tags - Resource tags
566	Tags interface{} `json:"tags,omitempty"`
567	// MountTargetProperties - Mount Target Properties
568	*MountTargetProperties `json:"properties,omitempty"`
569}
570
571// MarshalJSON is the custom marshaler for MountTarget.
572func (mt MountTarget) MarshalJSON() ([]byte, error) {
573	objectMap := make(map[string]interface{})
574	if mt.Location != nil {
575		objectMap["location"] = mt.Location
576	}
577	if mt.Tags != nil {
578		objectMap["tags"] = mt.Tags
579	}
580	if mt.MountTargetProperties != nil {
581		objectMap["properties"] = mt.MountTargetProperties
582	}
583	return json.Marshal(objectMap)
584}
585
586// UnmarshalJSON is the custom unmarshaler for MountTarget struct.
587func (mt *MountTarget) UnmarshalJSON(body []byte) error {
588	var m map[string]*json.RawMessage
589	err := json.Unmarshal(body, &m)
590	if err != nil {
591		return err
592	}
593	for k, v := range m {
594		switch k {
595		case "location":
596			if v != nil {
597				var location string
598				err = json.Unmarshal(*v, &location)
599				if err != nil {
600					return err
601				}
602				mt.Location = &location
603			}
604		case "id":
605			if v != nil {
606				var ID string
607				err = json.Unmarshal(*v, &ID)
608				if err != nil {
609					return err
610				}
611				mt.ID = &ID
612			}
613		case "name":
614			if v != nil {
615				var name string
616				err = json.Unmarshal(*v, &name)
617				if err != nil {
618					return err
619				}
620				mt.Name = &name
621			}
622		case "tags":
623			if v != nil {
624				var tags interface{}
625				err = json.Unmarshal(*v, &tags)
626				if err != nil {
627					return err
628				}
629				mt.Tags = tags
630			}
631		case "properties":
632			if v != nil {
633				var mountTargetProperties MountTargetProperties
634				err = json.Unmarshal(*v, &mountTargetProperties)
635				if err != nil {
636					return err
637				}
638				mt.MountTargetProperties = &mountTargetProperties
639			}
640		}
641	}
642
643	return nil
644}
645
646// MountTargetList list of Mount Targets
647type MountTargetList struct {
648	autorest.Response `json:"-"`
649	// Value - A list of Mount targets
650	Value *[]MountTarget `json:"value,omitempty"`
651}
652
653// MountTargetProperties mount target properties
654type MountTargetProperties struct {
655	// MountTargetID - READ-ONLY; UUID v4 used to identify the MountTarget
656	MountTargetID *string `json:"mountTargetId,omitempty"`
657	// FileSystemID - UUID v4 used to identify the MountTarget
658	FileSystemID *string `json:"fileSystemId,omitempty"`
659	// IPAddress - READ-ONLY; The mount target's IPv4 address
660	IPAddress *string `json:"ipAddress,omitempty"`
661	// Subnet - The subnet
662	Subnet *string `json:"subnet,omitempty"`
663	// StartIP - The start of IPv4 address range to use when creating a new mount target
664	StartIP *string `json:"startIp,omitempty"`
665	// EndIP - The end of IPv4 address range to use when creating a new mount target
666	EndIP *string `json:"endIp,omitempty"`
667	// Gateway - The gateway of the IPv4 address range to use when creating a new mount target
668	Gateway *string `json:"gateway,omitempty"`
669	// Netmask - The netmask of the IPv4 address range to use when creating a new mount target
670	Netmask *string `json:"netmask,omitempty"`
671	// SmbServerFqdn - The SMB server's Fully Qualified Domain Name, FQDN
672	SmbServerFqdn *string `json:"smbServerFqdn,omitempty"`
673	// ProvisioningState - READ-ONLY; Azure lifecycle management
674	ProvisioningState *string `json:"provisioningState,omitempty"`
675}
676
677// MarshalJSON is the custom marshaler for MountTargetProperties.
678func (mtp MountTargetProperties) MarshalJSON() ([]byte, error) {
679	objectMap := make(map[string]interface{})
680	if mtp.FileSystemID != nil {
681		objectMap["fileSystemId"] = mtp.FileSystemID
682	}
683	if mtp.Subnet != nil {
684		objectMap["subnet"] = mtp.Subnet
685	}
686	if mtp.StartIP != nil {
687		objectMap["startIp"] = mtp.StartIP
688	}
689	if mtp.EndIP != nil {
690		objectMap["endIp"] = mtp.EndIP
691	}
692	if mtp.Gateway != nil {
693		objectMap["gateway"] = mtp.Gateway
694	}
695	if mtp.Netmask != nil {
696		objectMap["netmask"] = mtp.Netmask
697	}
698	if mtp.SmbServerFqdn != nil {
699		objectMap["smbServerFqdn"] = mtp.SmbServerFqdn
700	}
701	return json.Marshal(objectMap)
702}
703
704// Operation microsoft.NetApp REST API operation definition.
705type Operation struct {
706	// Name - Operation name: {provider}/{resource}/{operation}
707	Name *string `json:"name,omitempty"`
708	// Display - Display metadata associated with the operation.
709	Display *OperationDisplay `json:"display,omitempty"`
710	// Origin - The origin of operations.
711	Origin *string `json:"origin,omitempty"`
712	// OperationProperties - Properties of operation, include metric specifications.
713	*OperationProperties `json:"properties,omitempty"`
714}
715
716// MarshalJSON is the custom marshaler for Operation.
717func (o Operation) MarshalJSON() ([]byte, error) {
718	objectMap := make(map[string]interface{})
719	if o.Name != nil {
720		objectMap["name"] = o.Name
721	}
722	if o.Display != nil {
723		objectMap["display"] = o.Display
724	}
725	if o.Origin != nil {
726		objectMap["origin"] = o.Origin
727	}
728	if o.OperationProperties != nil {
729		objectMap["properties"] = o.OperationProperties
730	}
731	return json.Marshal(objectMap)
732}
733
734// UnmarshalJSON is the custom unmarshaler for Operation struct.
735func (o *Operation) UnmarshalJSON(body []byte) error {
736	var m map[string]*json.RawMessage
737	err := json.Unmarshal(body, &m)
738	if err != nil {
739		return err
740	}
741	for k, v := range m {
742		switch k {
743		case "name":
744			if v != nil {
745				var name string
746				err = json.Unmarshal(*v, &name)
747				if err != nil {
748					return err
749				}
750				o.Name = &name
751			}
752		case "display":
753			if v != nil {
754				var display OperationDisplay
755				err = json.Unmarshal(*v, &display)
756				if err != nil {
757					return err
758				}
759				o.Display = &display
760			}
761		case "origin":
762			if v != nil {
763				var origin string
764				err = json.Unmarshal(*v, &origin)
765				if err != nil {
766					return err
767				}
768				o.Origin = &origin
769			}
770		case "properties":
771			if v != nil {
772				var operationProperties OperationProperties
773				err = json.Unmarshal(*v, &operationProperties)
774				if err != nil {
775					return err
776				}
777				o.OperationProperties = &operationProperties
778			}
779		}
780	}
781
782	return nil
783}
784
785// OperationDisplay display metadata associated with the operation.
786type OperationDisplay struct {
787	// Provider - Service provider: Microsoft NetApp.
788	Provider *string `json:"provider,omitempty"`
789	// Resource - Resource on which the operation is performed etc.
790	Resource *string `json:"resource,omitempty"`
791	// Operation - Type of operation: get, read, delete, etc.
792	Operation *string `json:"operation,omitempty"`
793	// Description - Operation description.
794	Description *string `json:"description,omitempty"`
795}
796
797// OperationListResult result of the request to list Cloud Volume operations. It contains a list of
798// operations and a URL link to get the next set of results.
799type OperationListResult struct {
800	autorest.Response `json:"-"`
801	// Value - List of Storage operations supported by the Storage resource provider.
802	Value *[]Operation `json:"value,omitempty"`
803}
804
805// OperationProperties properties of operation, include metric specifications.
806type OperationProperties struct {
807	// ServiceSpecification - One property of operation, include metric specifications.
808	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
809}
810
811// PoolPatchProperties patchable pool properties
812type PoolPatchProperties struct {
813	// Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104).
814	Size *int64 `json:"size,omitempty"`
815	// ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'
816	ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"`
817}
818
819// PoolProperties pool properties
820type PoolProperties struct {
821	// PoolID - READ-ONLY; UUID v4 used to identify the Pool
822	PoolID *string `json:"poolId,omitempty"`
823	// Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104).
824	Size *int64 `json:"size,omitempty"`
825	// ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'
826	ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"`
827	// ProvisioningState - READ-ONLY; Azure lifecycle management
828	ProvisioningState *string `json:"provisioningState,omitempty"`
829}
830
831// MarshalJSON is the custom marshaler for PoolProperties.
832func (pp PoolProperties) MarshalJSON() ([]byte, error) {
833	objectMap := make(map[string]interface{})
834	if pp.Size != nil {
835		objectMap["size"] = pp.Size
836	}
837	if pp.ServiceLevel != "" {
838		objectMap["serviceLevel"] = pp.ServiceLevel
839	}
840	return json.Marshal(objectMap)
841}
842
843// PoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
844// operation.
845type PoolsCreateOrUpdateFuture struct {
846	azure.FutureAPI
847	// Result returns the result of the asynchronous operation.
848	// If the operation has not completed it will return an error.
849	Result func(PoolsClient) (CapacityPool, error)
850}
851
852// PoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
853type PoolsDeleteFuture struct {
854	azure.FutureAPI
855	// Result returns the result of the asynchronous operation.
856	// If the operation has not completed it will return an error.
857	Result func(PoolsClient) (autorest.Response, error)
858}
859
860// ServiceSpecification one property of operation, include metric specifications.
861type ServiceSpecification struct {
862	// MetricSpecifications - Metric specifications of operation.
863	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
864}
865
866// Snapshot snapshot of a Volume
867type Snapshot struct {
868	autorest.Response `json:"-"`
869	// Location - Resource location
870	Location *string `json:"location,omitempty"`
871	// ID - READ-ONLY; Resource Id
872	ID *string `json:"id,omitempty"`
873	// Name - READ-ONLY; Resource name
874	Name *string `json:"name,omitempty"`
875	// Type - READ-ONLY; Resource type
876	Type *string `json:"type,omitempty"`
877	// Tags - Resource tags
878	Tags interface{} `json:"tags,omitempty"`
879	// SnapshotProperties - Snapshot Properties
880	*SnapshotProperties `json:"properties,omitempty"`
881}
882
883// MarshalJSON is the custom marshaler for Snapshot.
884func (s Snapshot) MarshalJSON() ([]byte, error) {
885	objectMap := make(map[string]interface{})
886	if s.Location != nil {
887		objectMap["location"] = s.Location
888	}
889	if s.Tags != nil {
890		objectMap["tags"] = s.Tags
891	}
892	if s.SnapshotProperties != nil {
893		objectMap["properties"] = s.SnapshotProperties
894	}
895	return json.Marshal(objectMap)
896}
897
898// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
899func (s *Snapshot) UnmarshalJSON(body []byte) error {
900	var m map[string]*json.RawMessage
901	err := json.Unmarshal(body, &m)
902	if err != nil {
903		return err
904	}
905	for k, v := range m {
906		switch k {
907		case "location":
908			if v != nil {
909				var location string
910				err = json.Unmarshal(*v, &location)
911				if err != nil {
912					return err
913				}
914				s.Location = &location
915			}
916		case "id":
917			if v != nil {
918				var ID string
919				err = json.Unmarshal(*v, &ID)
920				if err != nil {
921					return err
922				}
923				s.ID = &ID
924			}
925		case "name":
926			if v != nil {
927				var name string
928				err = json.Unmarshal(*v, &name)
929				if err != nil {
930					return err
931				}
932				s.Name = &name
933			}
934		case "type":
935			if v != nil {
936				var typeVar string
937				err = json.Unmarshal(*v, &typeVar)
938				if err != nil {
939					return err
940				}
941				s.Type = &typeVar
942			}
943		case "tags":
944			if v != nil {
945				var tags interface{}
946				err = json.Unmarshal(*v, &tags)
947				if err != nil {
948					return err
949				}
950				s.Tags = tags
951			}
952		case "properties":
953			if v != nil {
954				var snapshotProperties SnapshotProperties
955				err = json.Unmarshal(*v, &snapshotProperties)
956				if err != nil {
957					return err
958				}
959				s.SnapshotProperties = &snapshotProperties
960			}
961		}
962	}
963
964	return nil
965}
966
967// SnapshotPatch snapshot patch
968type SnapshotPatch struct {
969	// Tags - Resource tags
970	Tags interface{} `json:"tags,omitempty"`
971}
972
973// SnapshotProperties snapshot properties
974type SnapshotProperties struct {
975	// SnapshotID - READ-ONLY; UUID v4 used to identify the Snapshot
976	SnapshotID *string `json:"snapshotId,omitempty"`
977	// FileSystemID - UUID v4 used to identify the FileSystem
978	FileSystemID *string `json:"fileSystemId,omitempty"`
979	// CreationDate - READ-ONLY; The creation date of the snapshot
980	CreationDate *date.Time `json:"creationDate,omitempty"`
981	// ProvisioningState - READ-ONLY; Azure lifecycle management
982	ProvisioningState *string `json:"provisioningState,omitempty"`
983}
984
985// MarshalJSON is the custom marshaler for SnapshotProperties.
986func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
987	objectMap := make(map[string]interface{})
988	if sp.FileSystemID != nil {
989		objectMap["fileSystemId"] = sp.FileSystemID
990	}
991	return json.Marshal(objectMap)
992}
993
994// SnapshotsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
995// operation.
996type SnapshotsCreateFuture struct {
997	azure.FutureAPI
998	// Result returns the result of the asynchronous operation.
999	// If the operation has not completed it will return an error.
1000	Result func(SnapshotsClient) (Snapshot, error)
1001}
1002
1003// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1004// operation.
1005type SnapshotsDeleteFuture struct {
1006	azure.FutureAPI
1007	// Result returns the result of the asynchronous operation.
1008	// If the operation has not completed it will return an error.
1009	Result func(SnapshotsClient) (autorest.Response, error)
1010}
1011
1012// SnapshotsList list of Snapshots
1013type SnapshotsList struct {
1014	autorest.Response `json:"-"`
1015	// Value - A list of Snapshots
1016	Value *[]Snapshot `json:"value,omitempty"`
1017}
1018
1019// Volume volume resource
1020type Volume struct {
1021	autorest.Response `json:"-"`
1022	// Location - Resource location
1023	Location *string `json:"location,omitempty"`
1024	// ID - READ-ONLY; Resource Id
1025	ID *string `json:"id,omitempty"`
1026	// Name - READ-ONLY; Resource name
1027	Name *string `json:"name,omitempty"`
1028	// Type - READ-ONLY; Resource type
1029	Type *string `json:"type,omitempty"`
1030	// Tags - Resource tags
1031	Tags interface{} `json:"tags,omitempty"`
1032	// VolumeProperties - Volume properties
1033	*VolumeProperties `json:"properties,omitempty"`
1034}
1035
1036// MarshalJSON is the custom marshaler for Volume.
1037func (vVar Volume) MarshalJSON() ([]byte, error) {
1038	objectMap := make(map[string]interface{})
1039	if vVar.Location != nil {
1040		objectMap["location"] = vVar.Location
1041	}
1042	if vVar.Tags != nil {
1043		objectMap["tags"] = vVar.Tags
1044	}
1045	if vVar.VolumeProperties != nil {
1046		objectMap["properties"] = vVar.VolumeProperties
1047	}
1048	return json.Marshal(objectMap)
1049}
1050
1051// UnmarshalJSON is the custom unmarshaler for Volume struct.
1052func (vVar *Volume) UnmarshalJSON(body []byte) error {
1053	var m map[string]*json.RawMessage
1054	err := json.Unmarshal(body, &m)
1055	if err != nil {
1056		return err
1057	}
1058	for k, v := range m {
1059		switch k {
1060		case "location":
1061			if v != nil {
1062				var location string
1063				err = json.Unmarshal(*v, &location)
1064				if err != nil {
1065					return err
1066				}
1067				vVar.Location = &location
1068			}
1069		case "id":
1070			if v != nil {
1071				var ID string
1072				err = json.Unmarshal(*v, &ID)
1073				if err != nil {
1074					return err
1075				}
1076				vVar.ID = &ID
1077			}
1078		case "name":
1079			if v != nil {
1080				var name string
1081				err = json.Unmarshal(*v, &name)
1082				if err != nil {
1083					return err
1084				}
1085				vVar.Name = &name
1086			}
1087		case "type":
1088			if v != nil {
1089				var typeVar string
1090				err = json.Unmarshal(*v, &typeVar)
1091				if err != nil {
1092					return err
1093				}
1094				vVar.Type = &typeVar
1095			}
1096		case "tags":
1097			if v != nil {
1098				var tags interface{}
1099				err = json.Unmarshal(*v, &tags)
1100				if err != nil {
1101					return err
1102				}
1103				vVar.Tags = tags
1104			}
1105		case "properties":
1106			if v != nil {
1107				var volumeProperties VolumeProperties
1108				err = json.Unmarshal(*v, &volumeProperties)
1109				if err != nil {
1110					return err
1111				}
1112				vVar.VolumeProperties = &volumeProperties
1113			}
1114		}
1115	}
1116
1117	return nil
1118}
1119
1120// VolumeList list of volume resources
1121type VolumeList struct {
1122	autorest.Response `json:"-"`
1123	// Value - List of volumes
1124	Value *[]Volume `json:"value,omitempty"`
1125}
1126
1127// VolumePatch volume patch resource
1128type VolumePatch struct {
1129	// Location - Resource location
1130	Location *string `json:"location,omitempty"`
1131	// ID - READ-ONLY; Resource Id
1132	ID *string `json:"id,omitempty"`
1133	// Name - READ-ONLY; Resource name
1134	Name *string `json:"name,omitempty"`
1135	// Type - READ-ONLY; Resource type
1136	Type *string `json:"type,omitempty"`
1137	// Tags - Resource tags
1138	Tags interface{} `json:"tags,omitempty"`
1139	// VolumePatchProperties - Patchable volume properties
1140	*VolumePatchProperties `json:"properties,omitempty"`
1141}
1142
1143// MarshalJSON is the custom marshaler for VolumePatch.
1144func (vp VolumePatch) MarshalJSON() ([]byte, error) {
1145	objectMap := make(map[string]interface{})
1146	if vp.Location != nil {
1147		objectMap["location"] = vp.Location
1148	}
1149	if vp.Tags != nil {
1150		objectMap["tags"] = vp.Tags
1151	}
1152	if vp.VolumePatchProperties != nil {
1153		objectMap["properties"] = vp.VolumePatchProperties
1154	}
1155	return json.Marshal(objectMap)
1156}
1157
1158// UnmarshalJSON is the custom unmarshaler for VolumePatch struct.
1159func (vp *VolumePatch) UnmarshalJSON(body []byte) error {
1160	var m map[string]*json.RawMessage
1161	err := json.Unmarshal(body, &m)
1162	if err != nil {
1163		return err
1164	}
1165	for k, v := range m {
1166		switch k {
1167		case "location":
1168			if v != nil {
1169				var location string
1170				err = json.Unmarshal(*v, &location)
1171				if err != nil {
1172					return err
1173				}
1174				vp.Location = &location
1175			}
1176		case "id":
1177			if v != nil {
1178				var ID string
1179				err = json.Unmarshal(*v, &ID)
1180				if err != nil {
1181					return err
1182				}
1183				vp.ID = &ID
1184			}
1185		case "name":
1186			if v != nil {
1187				var name string
1188				err = json.Unmarshal(*v, &name)
1189				if err != nil {
1190					return err
1191				}
1192				vp.Name = &name
1193			}
1194		case "type":
1195			if v != nil {
1196				var typeVar string
1197				err = json.Unmarshal(*v, &typeVar)
1198				if err != nil {
1199					return err
1200				}
1201				vp.Type = &typeVar
1202			}
1203		case "tags":
1204			if v != nil {
1205				var tags interface{}
1206				err = json.Unmarshal(*v, &tags)
1207				if err != nil {
1208					return err
1209				}
1210				vp.Tags = tags
1211			}
1212		case "properties":
1213			if v != nil {
1214				var volumePatchProperties VolumePatchProperties
1215				err = json.Unmarshal(*v, &volumePatchProperties)
1216				if err != nil {
1217					return err
1218				}
1219				vp.VolumePatchProperties = &volumePatchProperties
1220			}
1221		}
1222	}
1223
1224	return nil
1225}
1226
1227// VolumePatchProperties patchable volume properties
1228type VolumePatchProperties struct {
1229	// ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'
1230	ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"`
1231	// UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB.
1232	UsageThreshold *int64 `json:"usageThreshold,omitempty"`
1233	// ExportPolicy - Export policy rule
1234	ExportPolicy *VolumePatchPropertiesExportPolicy `json:"exportPolicy,omitempty"`
1235}
1236
1237// VolumePatchPropertiesExportPolicy export policy rule
1238type VolumePatchPropertiesExportPolicy struct {
1239	Rules *[]ExportPolicyRule `json:"rules,omitempty"`
1240}
1241
1242// VolumeProperties volume properties
1243type VolumeProperties struct {
1244	// FileSystemID - READ-ONLY; Unique FileSystem Identifier.
1245	FileSystemID *string `json:"fileSystemId,omitempty"`
1246	// CreationToken - A unique file path for the volume. Used when creating mount targets
1247	CreationToken *string `json:"creationToken,omitempty"`
1248	// ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'
1249	ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"`
1250	// UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB.
1251	UsageThreshold *int64 `json:"usageThreshold,omitempty"`
1252	// ExportPolicy - Export policy rule
1253	ExportPolicy *VolumePropertiesExportPolicy `json:"exportPolicy,omitempty"`
1254	// ProvisioningState - READ-ONLY; Azure lifecycle management
1255	ProvisioningState *string `json:"provisioningState,omitempty"`
1256	// SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes
1257	SubnetID *string `json:"subnetId,omitempty"`
1258}
1259
1260// MarshalJSON is the custom marshaler for VolumeProperties.
1261func (vp VolumeProperties) MarshalJSON() ([]byte, error) {
1262	objectMap := make(map[string]interface{})
1263	if vp.CreationToken != nil {
1264		objectMap["creationToken"] = vp.CreationToken
1265	}
1266	if vp.ServiceLevel != "" {
1267		objectMap["serviceLevel"] = vp.ServiceLevel
1268	}
1269	if vp.UsageThreshold != nil {
1270		objectMap["usageThreshold"] = vp.UsageThreshold
1271	}
1272	if vp.ExportPolicy != nil {
1273		objectMap["exportPolicy"] = vp.ExportPolicy
1274	}
1275	if vp.SubnetID != nil {
1276		objectMap["subnetId"] = vp.SubnetID
1277	}
1278	return json.Marshal(objectMap)
1279}
1280
1281// VolumePropertiesExportPolicy export policy rule
1282type VolumePropertiesExportPolicy struct {
1283	Rules *[]ExportPolicyRule `json:"rules,omitempty"`
1284}
1285
1286// VolumesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1287// operation.
1288type VolumesCreateOrUpdateFuture struct {
1289	azure.FutureAPI
1290	// Result returns the result of the asynchronous operation.
1291	// If the operation has not completed it will return an error.
1292	Result func(VolumesClient) (Volume, error)
1293}
1294
1295// VolumesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1296// operation.
1297type VolumesDeleteFuture struct {
1298	azure.FutureAPI
1299	// Result returns the result of the asynchronous operation.
1300	// If the operation has not completed it will return an error.
1301	Result func(VolumesClient) (autorest.Response, error)
1302}
1303