diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/caches.go b/services/storagecache/mgmt/2019-11-01/storagecache/caches.go index c27fa604614b..17516a755f1e 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/caches.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/caches.go @@ -62,7 +62,7 @@ func (client CachesClient) CreateOrUpdate(ctx context.Context, resourceGroupName } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "CreateOrUpdate", err.Error()) } @@ -127,7 +127,6 @@ func (client CachesClient) CreateOrUpdateSender(req *http.Request) (future Cache func (client CachesClient) CreateOrUpdateResponder(resp *http.Response) (result Cache, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -152,7 +151,7 @@ func (client CachesClient) Delete(ctx context.Context, resourceGroupName string, } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Delete", err.Error()) } @@ -209,7 +208,6 @@ func (client CachesClient) DeleteSender(req *http.Request) (future CachesDeleteF func (client CachesClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -235,7 +233,7 @@ func (client CachesClient) Flush(ctx context.Context, resourceGroupName string, } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Flush", err.Error()) } @@ -292,7 +290,6 @@ func (client CachesClient) FlushSender(req *http.Request) (future CachesFlushFut func (client CachesClient) FlushResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -317,7 +314,7 @@ func (client CachesClient) Get(ctx context.Context, resourceGroupName string, ca } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Get", err.Error()) } @@ -374,7 +371,6 @@ func (client CachesClient) GetSender(req *http.Request) (*http.Response, error) func (client CachesClient) GetResponder(resp *http.Response) (result Cache, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -446,7 +442,6 @@ func (client CachesClient) ListSender(req *http.Request) (*http.Response, error) func (client CachesClient) ListResponder(resp *http.Response) (result CachesListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -558,7 +553,6 @@ func (client CachesClient) ListByResourceGroupSender(req *http.Request) (*http.R func (client CachesClient) ListByResourceGroupResponder(resp *http.Response) (result CachesListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -620,7 +614,7 @@ func (client CachesClient) Start(ctx context.Context, resourceGroupName string, } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Start", err.Error()) } @@ -677,7 +671,6 @@ func (client CachesClient) StartSender(req *http.Request) (future CachesStartFut func (client CachesClient) StartResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -702,7 +695,7 @@ func (client CachesClient) Stop(ctx context.Context, resourceGroupName string, c } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Stop", err.Error()) } @@ -759,7 +752,6 @@ func (client CachesClient) StopSender(req *http.Request) (future CachesStopFutur func (client CachesClient) StopResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -786,7 +778,7 @@ func (client CachesClient) Update(ctx context.Context, resourceGroupName string, } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "Update", err.Error()) } @@ -851,7 +843,6 @@ func (client CachesClient) UpdateSender(req *http.Request) (*http.Response, erro func (client CachesClient) UpdateResponder(resp *http.Response) (result Cache, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -876,7 +867,7 @@ func (client CachesClient) UpgradeFirmware(ctx context.Context, resourceGroupNam } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.CachesClient", "UpgradeFirmware", err.Error()) } @@ -933,7 +924,6 @@ func (client CachesClient) UpgradeFirmwareSender(req *http.Request) (future Cach func (client CachesClient) UpgradeFirmwareResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/models.go b/services/storagecache/mgmt/2019-11-01/storagecache/models.go index b02cecd0b3ec..2b4a8a531fa1 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/models.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/models.go @@ -113,21 +113,17 @@ func PossibleReasonCodeValues() []ReasonCode { return []ReasonCode{NotAvailableForSubscription, QuotaID} } -// StorageTargetType enumerates the values for storage target type. -type StorageTargetType string +// TargetType enumerates the values for target type. +type TargetType string const ( - // StorageTargetTypeClfs ... - StorageTargetTypeClfs StorageTargetType = "clfs" - // StorageTargetTypeNfs3 ... - StorageTargetTypeNfs3 StorageTargetType = "nfs3" - // StorageTargetTypeUnknown ... - StorageTargetTypeUnknown StorageTargetType = "unknown" + // TargetTypeStorageTargetProperties ... + TargetTypeStorageTargetProperties TargetType = "StorageTarget_properties" ) -// PossibleStorageTargetTypeValues returns an array of possible values for the StorageTargetType const type. -func PossibleStorageTargetTypeValues() []StorageTargetType { - return []StorageTargetType{StorageTargetTypeClfs, StorageTargetTypeNfs3, StorageTargetTypeUnknown} +// PossibleTargetTypeValues returns an array of possible values for the TargetType const type. +func PossibleTargetTypeValues() []TargetType { + return []TargetType{TargetTypeStorageTargetProperties} } // APIOperation REST API operation description: see @@ -1019,16 +1015,14 @@ type StorageTarget struct { ID *string `json:"id,omitempty"` // Type - READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget Type *string `json:"type,omitempty"` - // StorageTargetProperties - Properties of the Storage Target. - *StorageTargetProperties `json:"properties,omitempty"` + // BasicStorageTargetProperties - Properties of the Storage Target. + BasicStorageTargetProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for StorageTarget. func (st StorageTarget) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if st.StorageTargetProperties != nil { - objectMap["properties"] = st.StorageTargetProperties - } + objectMap["properties"] = st.BasicStorageTargetProperties return json.Marshal(objectMap) } @@ -1070,12 +1064,11 @@ func (st *StorageTarget) UnmarshalJSON(body []byte) error { } case "properties": if v != nil { - var storageTargetProperties StorageTargetProperties - err = json.Unmarshal(*v, &storageTargetProperties) + basicStorageTargetProperties, err := unmarshalBasicStorageTargetProperties(*v) if err != nil { return err } - st.StorageTargetProperties = &storageTargetProperties + st.BasicStorageTargetProperties = basicStorageTargetProperties } } } @@ -1083,12 +1076,15 @@ func (st *StorageTarget) UnmarshalJSON(body []byte) error { return nil } +// BasicStorageTargetProperties properties of the Storage Target. +type BasicStorageTargetProperties interface { + AsStorageTargetProperties() (*StorageTargetProperties, bool) +} + // StorageTargetProperties properties of the Storage Target. type StorageTargetProperties struct { // Junctions - List of Cache namespace junctions to target for namespace associations. Junctions *[]NamespaceJunction `json:"junctions,omitempty"` - // TargetType - Type of the Storage Target. Possible values include: 'StorageTargetTypeNfs3', 'StorageTargetTypeClfs', 'StorageTargetTypeUnknown' - TargetType StorageTargetType `json:"targetType,omitempty"` // ProvisioningState - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', 'Updating' ProvisioningState ProvisioningStateType `json:"provisioningState,omitempty"` // Nfs3 - Properties when targetType is nfs3. @@ -1097,6 +1093,76 @@ type StorageTargetProperties struct { Clfs *ClfsTarget `json:"clfs,omitempty"` // Unknown - Properties when targetType is unknown. Unknown *UnknownTarget `json:"unknown,omitempty"` + // TargetType - Possible values include: 'TargetTypeStorageTargetProperties' + TargetType TargetType `json:"targetType,omitempty"` +} + +func unmarshalBasicStorageTargetProperties(body []byte) (BasicStorageTargetProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["targetType"] { + default: + var st StorageTargetProperties + err := json.Unmarshal(body, &st) + return st, err + } +} +func unmarshalBasicStorageTargetPropertiesArray(body []byte) ([]BasicStorageTargetProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + stArray := make([]BasicStorageTargetProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + st, err := unmarshalBasicStorageTargetProperties(*rawMessage) + if err != nil { + return nil, err + } + stArray[index] = st + } + return stArray, nil +} + +// MarshalJSON is the custom marshaler for StorageTargetProperties. +func (st StorageTargetProperties) MarshalJSON() ([]byte, error) { + st.TargetType = TargetTypeStorageTargetProperties + objectMap := make(map[string]interface{}) + if st.Junctions != nil { + objectMap["junctions"] = st.Junctions + } + if st.ProvisioningState != "" { + objectMap["provisioningState"] = st.ProvisioningState + } + if st.Nfs3 != nil { + objectMap["nfs3"] = st.Nfs3 + } + if st.Clfs != nil { + objectMap["clfs"] = st.Clfs + } + if st.Unknown != nil { + objectMap["unknown"] = st.Unknown + } + if st.TargetType != "" { + objectMap["targetType"] = st.TargetType + } + return json.Marshal(objectMap) +} + +// AsStorageTargetProperties is the BasicStorageTargetProperties implementation for StorageTargetProperties. +func (st StorageTargetProperties) AsStorageTargetProperties() (*StorageTargetProperties, bool) { + return &st, true +} + +// AsBasicStorageTargetProperties is the BasicStorageTargetProperties implementation for StorageTargetProperties. +func (st StorageTargetProperties) AsBasicStorageTargetProperties() (BasicStorageTargetProperties, bool) { + return &st, true } // StorageTargetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/operations.go b/services/storagecache/mgmt/2019-11-01/storagecache/operations.go index 24ba6892c313..eae3fff511d4 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/operations.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/operations.go @@ -102,7 +102,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result APIOperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/skus.go b/services/storagecache/mgmt/2019-11-01/storagecache/skus.go index 5bd259022d20..6f2514c0611a 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/skus.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/skus.go @@ -106,7 +106,6 @@ func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) { func (client SkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go b/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go index 5cf2520848b4..d9bbaf93a534 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go @@ -64,15 +64,15 @@ func (client StorageTargetsClient) CreateOrUpdate(ctx context.Context, resourceG } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}, {TargetValue: storageTargetName, Constraints: []validation.Constraint{{Target: "storageTargetName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}, {TargetValue: storagetarget, Constraints: []validation.Constraint{{Target: "storagetarget", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "storagetarget.StorageTargetProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "storagetarget.StorageTargetProperties.Nfs3", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "storagetarget.StorageTargetProperties.Nfs3.Target", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "storagetarget.StorageTargetProperties.Nfs3.Target", Name: validation.Pattern, Rule: `^[-.0-9a-zA-Z]+$`, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "storagetarget.BasicStorageTargetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "storagetarget.BasicStorageTargetProperties.Nfs3", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "storagetarget.BasicStorageTargetProperties.Nfs3.Target", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "storagetarget.BasicStorageTargetProperties.Nfs3.Target", Name: validation.Pattern, Rule: `^[-.0-9a-zA-Z]+$`, Chain: nil}}}, }}, }}, }}}}}); err != nil { @@ -141,7 +141,6 @@ func (client StorageTargetsClient) CreateOrUpdateSender(req *http.Request) (futu func (client StorageTargetsClient) CreateOrUpdateResponder(resp *http.Response) (result StorageTarget, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -170,7 +169,7 @@ func (client StorageTargetsClient) Delete(ctx context.Context, resourceGroupName } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}, {TargetValue: storageTargetName, Constraints: []validation.Constraint{{Target: "storageTargetName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.StorageTargetsClient", "Delete", err.Error()) @@ -230,7 +229,6 @@ func (client StorageTargetsClient) DeleteSender(req *http.Request) (future Stora func (client StorageTargetsClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -256,7 +254,7 @@ func (client StorageTargetsClient) Get(ctx context.Context, resourceGroupName st } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}, {TargetValue: storageTargetName, Constraints: []validation.Constraint{{Target: "storageTargetName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.StorageTargetsClient", "Get", err.Error()) @@ -316,7 +314,6 @@ func (client StorageTargetsClient) GetSender(req *http.Request) (*http.Response, func (client StorageTargetsClient) GetResponder(resp *http.Response) (result StorageTarget, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -341,7 +338,7 @@ func (client StorageTargetsClient) ListByCache(ctx context.Context, resourceGrou } if err := validation.Validate([]validation.Validation{ {TargetValue: cacheName, - Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,31}$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "cacheName", Name: validation.Pattern, Rule: `^[-0-9a-zA-Z_]{1,80}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("storagecache.StorageTargetsClient", "ListByCache", err.Error()) } @@ -399,7 +396,6 @@ func (client StorageTargetsClient) ListByCacheSender(req *http.Request) (*http.R func (client StorageTargetsClient) ListByCacheResponder(resp *http.Response) (result StorageTargetsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go b/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go index 9da32c9f2d52..7e78b4b52e28 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go @@ -106,7 +106,6 @@ func (client UsageModelsClient) ListSender(req *http.Request) (*http.Response, e func (client UsageModelsClient) ListResponder(resp *http.Response) (result UsageModelsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/version.go b/services/storagecache/mgmt/2019-11-01/storagecache/version.go index 6fce0a61b77b..75ce2d61fa6c 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/version.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " storagecache/2019-11-01" + return "Azure-SDK-For-Go/" + Version() + " storagecache/2019-11-01" } // Version returns the semantic version (see http://semver.org) of the client.