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..aff7bc20cbcc 100644 --- a/services/netapp/mgmt/2020-06-01/netapp/models.go +++ b/services/netapp/mgmt/2020-06-01/netapp/models.go @@ -1714,7 +1714,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 +2173,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},