From 0637d7dc67484e5f67f74b6b062b8c901018199b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 13 Mar 2019 09:19:58 +0000 Subject: [PATCH] Generated from 46f3cb6030777135484c1bdc4b1d2146053172f9 NFSAAS-1875 Update to R3.5 Standard (#11) --- .../preview/netapp/mgmt/netapp/models.go | 5 +- .../netapp/mgmt/2017-08-15/netapp/models.go | 270 +++++++++++++++++- 2 files changed, 268 insertions(+), 7 deletions(-) diff --git a/profiles/preview/preview/netapp/mgmt/netapp/models.go b/profiles/preview/preview/netapp/mgmt/netapp/models.go index b673531a8fdc..c834f58052fe 100644 --- a/profiles/preview/preview/netapp/mgmt/netapp/models.go +++ b/profiles/preview/preview/netapp/mgmt/netapp/models.go @@ -28,9 +28,9 @@ const ( type ServiceLevel = original.ServiceLevel const ( - Extreme ServiceLevel = original.Extreme Premium ServiceLevel = original.Premium Standard ServiceLevel = original.Standard + Ultra ServiceLevel = original.Ultra ) type Account = original.Account @@ -40,12 +40,14 @@ type AccountProperties = original.AccountProperties type AccountsClient = original.AccountsClient type AccountsCreateOrUpdateFuture = original.AccountsCreateOrUpdateFuture type AccountsDeleteFuture = original.AccountsDeleteFuture +type ActiveDirectories = original.ActiveDirectories type BaseClient = original.BaseClient type CapacityPool = original.CapacityPool type CapacityPoolList = original.CapacityPoolList type CapacityPoolPatch = original.CapacityPoolPatch type Dimension = original.Dimension type Error = original.Error +type ExportPolicyRule = original.ExportPolicyRule type MetricSpecification = original.MetricSpecification type MountTarget = original.MountTarget type MountTargetList = original.MountTargetList @@ -56,6 +58,7 @@ type OperationDisplay = original.OperationDisplay type OperationListResult = original.OperationListResult type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient +type PoolPatchProperties = original.PoolPatchProperties type PoolProperties = original.PoolProperties type PoolsClient = original.PoolsClient type PoolsCreateOrUpdateFuture = original.PoolsCreateOrUpdateFuture diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/models.go b/services/preview/netapp/mgmt/2017-08-15/netapp/models.go index e2a7eeaffbd9..999fae1fe304 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/models.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/models.go @@ -32,17 +32,17 @@ const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/netapp/mgmt/201 type ServiceLevel string const ( - // Extreme Extreme service level - Extreme ServiceLevel = "Extreme" // Premium Premium service level Premium ServiceLevel = "Premium" // Standard Standard service level Standard ServiceLevel = "Standard" + // Ultra Ultra service level + Ultra ServiceLevel = "Ultra" ) // PossibleServiceLevelValues returns an array of possible values for the ServiceLevel const type. func PossibleServiceLevelValues() []ServiceLevel { - return []ServiceLevel{Extreme, Premium, Standard} + return []ServiceLevel{Premium, Standard, Ultra} } // Account netApp account resource @@ -164,14 +164,119 @@ type AccountList struct { // AccountPatch netApp account patch resource type AccountPatch struct { + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` + // Name - Resource name + Name *string `json:"name,omitempty"` + // Type - Resource type + Type *string `json:"type,omitempty"` // Tags - Resource tags Tags interface{} `json:"tags,omitempty"` + // AccountProperties - NetApp Account properties + *AccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountPatch. +func (ap AccountPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.Location != nil { + objectMap["location"] = ap.Location + } + if ap.ID != nil { + objectMap["id"] = ap.ID + } + if ap.Name != nil { + objectMap["name"] = ap.Name + } + if ap.Type != nil { + objectMap["type"] = ap.Type + } + if ap.Tags != nil { + objectMap["tags"] = ap.Tags + } + if ap.AccountProperties != nil { + objectMap["properties"] = ap.AccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AccountPatch struct. +func (ap *AccountPatch) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ap.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ap.Type = &typeVar + } + case "tags": + if v != nil { + var tags interface{} + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ap.Tags = tags + } + case "properties": + if v != nil { + var accountProperties AccountProperties + err = json.Unmarshal(*v, &accountProperties) + if err != nil { + return err + } + ap.AccountProperties = &accountProperties + } + } + } + + return nil } // AccountProperties netApp account properties type AccountProperties struct { // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` + // ActiveDirectories - Active Directories + ActiveDirectories *ActiveDirectories `json:"activeDirectories,omitempty"` } // AccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -226,6 +331,26 @@ func (future *AccountsDeleteFuture) Result(client AccountsClient) (ar autorest.R return } +// ActiveDirectories active Directories +type ActiveDirectories struct { + // ActiveDirectoryID - Id of the active drectory + ActiveDirectoryID *string `json:"activeDirectoryId,omitempty"` + // Username - Username of Active Directory domain administrator + Username *string `json:"username,omitempty"` + // Password - Plain text password of Active Directory domain administrator + Password *string `json:"password,omitempty"` + // Domain - Name of the Active Directory domain + Domain *string `json:"domain,omitempty"` + // DNS - Comma separated list of DNS server IP addresses for the Active Directory domain + DNS *string `json:"dNS,omitempty"` + // Status - Status of the active drectory + Status *string `json:"status,omitempty"` + // SMBServerName - NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + SMBServerName *string `json:"sMBServerName,omitempty"` + // OrganizationalUnit - The Organizational Unit (OU) within the Windows Active Directory + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` +} + // CapacityPool capacity pool resource type CapacityPool struct { autorest.Response `json:"-"` @@ -345,8 +470,111 @@ type CapacityPoolList struct { // CapacityPoolPatch capacity pool patch resource type CapacityPoolPatch struct { + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` + // Name - Resource name + Name *string `json:"name,omitempty"` + // Type - Resource type + Type *string `json:"type,omitempty"` // Tags - Resource tags Tags interface{} `json:"tags,omitempty"` + // PoolPatchProperties - Capacity pool properties + *PoolPatchProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityPoolPatch. +func (cpp CapacityPoolPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cpp.Location != nil { + objectMap["location"] = cpp.Location + } + if cpp.ID != nil { + objectMap["id"] = cpp.ID + } + if cpp.Name != nil { + objectMap["name"] = cpp.Name + } + if cpp.Type != nil { + objectMap["type"] = cpp.Type + } + if cpp.Tags != nil { + objectMap["tags"] = cpp.Tags + } + if cpp.PoolPatchProperties != nil { + objectMap["properties"] = cpp.PoolPatchProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityPoolPatch struct. +func (cpp *CapacityPoolPatch) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cpp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cpp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cpp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cpp.Type = &typeVar + } + case "tags": + if v != nil { + var tags interface{} + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cpp.Tags = tags + } + case "properties": + if v != nil { + var poolPatchProperties PoolPatchProperties + err = json.Unmarshal(*v, &poolPatchProperties) + if err != nil { + return err + } + cpp.PoolPatchProperties = &poolPatchProperties + } + } + } + + return nil } // Dimension dimension of blobs, possibly be blob type or access tier. @@ -365,6 +593,24 @@ type Error struct { Message *string `json:"message,omitempty"` } +// ExportPolicyRule volume Export Policy Rule +type ExportPolicyRule struct { + // RuleIndex - Order index + RuleIndex *int32 `json:"ruleIndex,omitempty"` + // UnixReadOnly - Read only access + UnixReadOnly *bool `json:"unixReadOnly,omitempty"` + // UnixReadWrite - Read and write access + UnixReadWrite *bool `json:"unixReadWrite,omitempty"` + // Cifs - Allows CIFS protocol + Cifs *bool `json:"cifs,omitempty"` + // Nfsv3 - Allows NFSv3 protocol + Nfsv3 *bool `json:"nfsv3,omitempty"` + // Nfsv4 - Allows NFSv4 protocol + Nfsv4 *bool `json:"nfsv4,omitempty"` + // AllowedClients - Client ingress specification as comma seperated string with IPv4 CIDRs, IPv4 host addresses and host names + AllowedClients *string `json:"allowedClients,omitempty"` +} + // MetricSpecification metric specification of operation. type MetricSpecification struct { // Name - Name of metric specification. @@ -618,13 +864,21 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// PoolPatchProperties patchable pool properties +type PoolPatchProperties struct { + // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). + Size *int64 `json:"size,omitempty"` + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` +} + // PoolProperties pool properties type PoolProperties struct { // PoolID - UUID v4 used to identify the Pool PoolID *string `json:"poolId,omitempty"` // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). Size *int64 `json:"size,omitempty"` - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` @@ -1102,10 +1356,12 @@ func (vp *VolumePatch) UnmarshalJSON(body []byte) error { // VolumePatchProperties patchable volume properties type VolumePatchProperties struct { - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // 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. UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Export policy rule + ExportPolicy *ExportPolicyRule `json:"exportPolicy,omitempty"` } // VolumeProperties volume properties @@ -1114,10 +1370,12 @@ type VolumeProperties struct { FileSystemID *string `json:"fileSystemId,omitempty"` // CreationToken - A unique file path for the volume. Used when creating mount targets CreationToken *string `json:"creationToken,omitempty"` - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // 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. UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Export policy rule + ExportPolicy *ExportPolicyRule `json:"exportPolicy,omitempty"` // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes