From 4247b4ebfd23d51f251b8e0660b3a4b4c53ddb3d Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 27 Oct 2020 03:52:15 +0000 Subject: [PATCH] Generated from 02d3677a017daf5b96b78cee612015f249f55fc6 fix java readme --- .../netapp/mgmt/2020-06-01/netapp/backups.go | 8 +++- .../netapp/mgmt/2020-06-01/netapp/enums.go | 6 +-- .../netapp/mgmt/2020-06-01/netapp/models.go | 37 ++++++++++++++++--- .../netapp/mgmt/2020-06-01/netapp/pools.go | 4 -- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/services/netapp/mgmt/2020-06-01/netapp/backups.go b/services/netapp/mgmt/2020-06-01/netapp/backups.go index 98434c791cd4..3a7459564b2e 100644 --- a/services/netapp/mgmt/2020-06-01/netapp/backups.go +++ b/services/netapp/mgmt/2020-06-01/netapp/backups.go @@ -76,7 +76,13 @@ func (client BackupsClient) Create(ctx context.Context, resourceGroupName string {Target: "volumeName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$`, Chain: nil}}}, {TargetValue: body, Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.BackupProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "body.BackupProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.BackupProperties.BackupID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.BackupProperties.BackupID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.BackupProperties.BackupID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.BackupProperties.BackupID", Name: validation.Pattern, Rule: `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`, Chain: nil}, + }}, + }}}}}); err != nil { return result, validation.NewError("netapp.BackupsClient", "Create", err.Error()) } diff --git a/services/netapp/mgmt/2020-06-01/netapp/enums.go b/services/netapp/mgmt/2020-06-01/netapp/enums.go index 3993b50154d3..e9c6a3a994d0 100644 --- a/services/netapp/mgmt/2020-06-01/netapp/enums.go +++ b/services/netapp/mgmt/2020-06-01/netapp/enums.go @@ -163,15 +163,11 @@ const ( Daily ReplicationSchedule = "daily" // Hourly ... Hourly ReplicationSchedule = "hourly" - // Monthly ... - Monthly ReplicationSchedule = "monthly" - // Weekly ... - Weekly ReplicationSchedule = "weekly" ) // PossibleReplicationScheduleValues returns an array of possible values for the ReplicationSchedule const type. func PossibleReplicationScheduleValues() []ReplicationSchedule { - return []ReplicationSchedule{OneZerominutely, Daily, Hourly, Monthly, Weekly} + return []ReplicationSchedule{OneZerominutely, Daily, Hourly} } // SecurityStyle enumerates the values for security style. diff --git a/services/netapp/mgmt/2020-06-01/netapp/models.go b/services/netapp/mgmt/2020-06-01/netapp/models.go index e4fec81e7cce..8a77ec57f524 100644 --- a/services/netapp/mgmt/2020-06-01/netapp/models.go +++ b/services/netapp/mgmt/2020-06-01/netapp/models.go @@ -940,6 +940,8 @@ func (bpp BackupPolicyProperties) MarshalJSON() ([]byte, error) { // BackupProperties backup properties type BackupProperties struct { + // BackupID - READ-ONLY; UUID v4 used to identify the Backup + BackupID *string `json:"backupId,omitempty"` // CreationDate - READ-ONLY; The creation date of the backup CreationDate *date.Time `json:"creationDate,omitempty"` // ProvisioningState - READ-ONLY; Azure lifecycle management @@ -1714,7 +1716,7 @@ type ReplicationObject struct { ReplicationID *string `json:"replicationId,omitempty"` // EndpointType - Indicates whether the local volume is the source or destination for the Volume Replication. Possible values include: 'Src', 'Dst' EndpointType EndpointType `json:"endpointType,omitempty"` - // ReplicationSchedule - Schedule. Possible values include: '10minutely', 'Hourly', 'Daily', 'Weekly', 'Monthly' + // ReplicationSchedule - Schedule. Possible values include: '10minutely', 'Hourly', 'Daily' ReplicationSchedule ReplicationSchedule `json:"replicationSchedule,omitempty"` // RemoteVolumeResourceID - The resource ID of the remote volume. RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,omitempty"` @@ -2173,16 +2175,41 @@ func (spp *SnapshotPolicyPatch) UnmarshalJSON(body []byte) error { // SnapshotPolicyProperties snapshot policy properties type SnapshotPolicyProperties struct { + // Name - READ-ONLY; Snapshot policy name + Name *string `json:"name,omitempty"` // HourlySchedule - Schedule for hourly snapshots - HourlySchedule interface{} `json:"hourlySchedule,omitempty"` + HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` // DailySchedule - Schedule for daily snapshots - DailySchedule interface{} `json:"dailySchedule,omitempty"` + DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` // WeeklySchedule - Schedule for weekly snapshots - WeeklySchedule interface{} `json:"weeklySchedule,omitempty"` + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // MonthlySchedule - Schedule for monthly snapshots - MonthlySchedule interface{} `json:"monthlySchedule,omitempty"` + MonthlySchedule *MonthlySchedule `json:"monthlySchedule,omitempty"` // Enabled - The property to decide policy is enabled or not Enabled *bool `json:"enabled,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for SnapshotPolicyProperties. +func (spp SnapshotPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spp.HourlySchedule != nil { + objectMap["hourlySchedule"] = spp.HourlySchedule + } + if spp.DailySchedule != nil { + objectMap["dailySchedule"] = spp.DailySchedule + } + if spp.WeeklySchedule != nil { + objectMap["weeklySchedule"] = spp.WeeklySchedule + } + if spp.MonthlySchedule != nil { + objectMap["monthlySchedule"] = spp.MonthlySchedule + } + if spp.Enabled != nil { + objectMap["enabled"] = spp.Enabled + } + return json.Marshal(objectMap) } // SnapshotPolicyVolumeList volumes associated with snapshot policy diff --git a/services/netapp/mgmt/2020-06-01/netapp/pools.go b/services/netapp/mgmt/2020-06-01/netapp/pools.go index 7e251c6c7d5c..b98f8b77a8b7 100644 --- a/services/netapp/mgmt/2020-06-01/netapp/pools.go +++ b/services/netapp/mgmt/2020-06-01/netapp/pools.go @@ -72,10 +72,6 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, - {Target: "body.PoolProperties.TotalThroughputMibps", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "body.PoolProperties.TotalThroughputMibps", Name: validation.MultipleOf, Rule: 0.001, Chain: nil}}}, - {Target: "body.PoolProperties.UtilizedThroughputMibps", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "body.PoolProperties.UtilizedThroughputMibps", Name: validation.MultipleOf, Rule: 0.001, Chain: nil}}}, }}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},