From 8c965f7cbb93f9fdf1fec8df5416f193e0bd465e Mon Sep 17 00:00:00 2001 From: Jiahui Peng <46921893+Alancere@users.noreply.github.com> Date: Tue, 25 Jan 2022 13:43:40 +0800 Subject: [PATCH] [Release] sdk/resourcemanager/storage/armstorage/0.4.0 generation from spec commit: d830271b241897bad300f9275ff7b27d502aa6c5 (#16913) --- .../storage/armstorage/CHANGELOG.md | 13 ++++ .../storage/armstorage/autorest.md | 6 +- sdk/resourcemanager/storage/armstorage/go.mod | 2 +- sdk/resourcemanager/storage/armstorage/go.sum | 4 +- .../zz_generated_accounts_client.go | 14 ++-- .../zz_generated_blobcontainers_client.go | 14 ++-- ..._generated_blobinventorypolicies_client.go | 14 ++-- .../zz_generated_blobservices_client.go | 14 ++-- .../armstorage/zz_generated_constants.go | 2 +- .../zz_generated_deletedaccounts_client.go | 14 ++-- .../zz_generated_encryptionscopes_client.go | 14 ++-- .../zz_generated_fileservices_client.go | 14 ++-- .../zz_generated_fileshares_client.go | 14 ++-- .../zz_generated_localusers_client.go | 14 ++-- .../zz_generated_managementpolicies_client.go | 14 ++-- .../storage/armstorage/zz_generated_models.go | 77 ------------------- ...erated_objectreplicationpolicies_client.go | 14 ++-- .../zz_generated_operations_client.go | 14 ++-- ...rated_privateendpointconnections_client.go | 14 ++-- ...z_generated_privatelinkresources_client.go | 14 ++-- .../armstorage/zz_generated_queue_client.go | 14 ++-- .../zz_generated_queueservices_client.go | 14 ++-- .../armstorage/zz_generated_skus_client.go | 14 ++-- .../armstorage/zz_generated_table_client.go | 14 ++-- .../zz_generated_tableservices_client.go | 14 ++-- .../armstorage/zz_generated_usages_client.go | 14 ++-- 26 files changed, 160 insertions(+), 224 deletions(-) diff --git a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index 1ca729912cb4..54b750778b8c 100644 --- a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 0.4.0 (2022-01-25) +### Breaking Changes + +- Function `CloudErrorBodyAutoGenerated.MarshalJSON` has been removed +- Function `CloudErrorBody.MarshalJSON` has been removed +- Struct `CloudError` has been removed +- Struct `CloudErrorAutoGenerated` has been removed +- Struct `CloudErrorBody` has been removed +- Struct `CloudErrorBodyAutoGenerated` has been removed +- Struct `ErrorResponse` has been removed +- Struct `ErrorResponseBody` has been removed + + ## 0.3.0 (2022-01-13) ### Breaking Changes diff --git a/sdk/resourcemanager/storage/armstorage/autorest.md b/sdk/resourcemanager/storage/armstorage/autorest.md index 409d70c09649..921a59145b3d 100644 --- a/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,10 +5,10 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/8e4746332979ed6ff3577bdc97dd2065a7577598/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/8e4746332979ed6ff3577bdc97dd2065a7577598/specification/storage/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/d830271b241897bad300f9275ff7b27d502aa6c5/specification/storage/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d830271b241897bad300f9275ff7b27d502aa6c5/specification/storage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.3.0 +module-version: 0.4.0 modelerfour: seal-single-value-enum-by-default: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/storage/armstorage/go.mod b/sdk/resourcemanager/storage/armstorage/go.mod index 354c6ffc38ab..8d46350fe05a 100644 --- a/sdk/resourcemanager/storage/armstorage/go.mod +++ b/sdk/resourcemanager/storage/armstorage/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage go 1.16 require ( - github.com/Azure/azure-sdk-for-go v61.1.0+incompatible + github.com/Azure/azure-sdk-for-go v61.3.0+incompatible github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0 ) diff --git a/sdk/resourcemanager/storage/armstorage/go.sum b/sdk/resourcemanager/storage/armstorage/go.sum index 993764ff59dc..666ec1c36f73 100644 --- a/sdk/resourcemanager/storage/armstorage/go.sum +++ b/sdk/resourcemanager/storage/armstorage/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go v61.1.0+incompatible h1:Qbz3jdfkXIPjZECEuk2E7i3iLhC9Ul74pG5mQRQC+z4= -github.com/Azure/azure-sdk-for-go v61.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v61.3.0+incompatible h1:k7MKrYcGwX5qh+fC9xVhcEuaZajFfbDYMEgo8oemTLo= +github.com/Azure/azure-sdk-for-go v61.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0 h1:8wVJL0HUP5yDFXvotdewORTw7Yu88JbreWN/mobSvsQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0 h1:bLRntPH25SkY1uZ/YZW+dmxNky9r1fAHvDFrzluo+4Q= diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_accounts_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_accounts_client.go index 0f290f193277..7a80e3af81f9 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_accounts_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_accounts_client.go @@ -34,17 +34,17 @@ type AccountsClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AccountsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &AccountsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_blobcontainers_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_blobcontainers_client.go index d637c60c3423..79dca7920336 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_blobcontainers_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_blobcontainers_client.go @@ -34,17 +34,17 @@ type BlobContainersClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BlobContainersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &BlobContainersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_blobinventorypolicies_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_blobinventorypolicies_client.go index 22fb54a3dc5a..13b5b2fc1238 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_blobinventorypolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_blobinventorypolicies_client.go @@ -34,17 +34,17 @@ type BlobInventoryPoliciesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BlobInventoryPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &BlobInventoryPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_blobservices_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_blobservices_client.go index df644ccc7e7b..8b6d9be3ece9 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_blobservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_blobservices_client.go @@ -34,17 +34,17 @@ type BlobServicesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewBlobServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BlobServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &BlobServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_constants.go b/sdk/resourcemanager/storage/armstorage/zz_generated_constants.go index 3051d4f1bea0..4e47dcea5d75 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_constants.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_constants.go @@ -10,7 +10,7 @@ package armstorage const ( moduleName = "armstorage" - moduleVersion = "v0.3.0" + moduleVersion = "v0.4.0" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_deletedaccounts_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_deletedaccounts_client.go index a289486f5907..47bd2300d3f4 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_deletedaccounts_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_deletedaccounts_client.go @@ -34,17 +34,17 @@ type DeletedAccountsClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DeletedAccountsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &DeletedAccountsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_encryptionscopes_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_encryptionscopes_client.go index 23e4ea1a0c2a..0cc29cfaeccc 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_encryptionscopes_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_encryptionscopes_client.go @@ -34,17 +34,17 @@ type EncryptionScopesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *EncryptionScopesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &EncryptionScopesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_fileservices_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_fileservices_client.go index 86748c203da1..71bce8574ddc 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_fileservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_fileservices_client.go @@ -34,17 +34,17 @@ type FileServicesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FileServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &FileServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_fileshares_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_fileshares_client.go index 2f21a3d65bce..900da4897a5f 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_fileshares_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_fileshares_client.go @@ -34,17 +34,17 @@ type FileSharesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FileSharesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &FileSharesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_localusers_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_localusers_client.go index 00b7c96a73d5..f658a083ba1d 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_localusers_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_localusers_client.go @@ -34,17 +34,17 @@ type LocalUsersClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LocalUsersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &LocalUsersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_managementpolicies_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_managementpolicies_client.go index 7435025b1acc..9ebe87dd73ab 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_managementpolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_managementpolicies_client.go @@ -34,17 +34,17 @@ type ManagementPoliciesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ManagementPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &ManagementPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_models.go b/sdk/resourcemanager/storage/armstorage/zz_generated_models.go index 9bebc9093252..d9937e9a50cb 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_models.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_models.go @@ -1482,68 +1482,6 @@ type CheckNameAvailabilityResult struct { Reason *Reason `json:"reason,omitempty" azure:"ro"` } -// CloudError - An error response from the Storage service. -type CloudError struct { - // An error response from the Storage service. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorAutoGenerated - An error response from the Storage service. -type CloudErrorAutoGenerated struct { - // An error response from the Storage service. - Error *CloudErrorBodyAutoGenerated `json:"error,omitempty"` -} - -// CloudErrorBody - An error response from the Storage service. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - - // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` -} - -// MarshalJSON implements the json.Marshaller interface for type CloudErrorBody. -func (c CloudErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// CloudErrorBodyAutoGenerated - An error response from the Storage service. -type CloudErrorBodyAutoGenerated struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBodyAutoGenerated `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - - // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` -} - -// MarshalJSON implements the json.Marshaller interface for type CloudErrorBodyAutoGenerated. -func (c CloudErrorBodyAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - // ContainerProperties - The properties of a container. type ContainerProperties struct { // Default the container to use specified encryption scope for all writes. @@ -2171,21 +2109,6 @@ type Endpoints struct { Web *string `json:"web,omitempty" azure:"ro"` } -// ErrorResponse - An error response from the storage resource provider. -type ErrorResponse struct { - // Azure Storage Resource Provider error response body. - Error *ErrorResponseBody `json:"error,omitempty"` -} - -// ErrorResponseBody - Error response body contract. -type ErrorResponseBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` -} - // ExtendedLocation - The complex type of the extended location. type ExtendedLocation struct { // The name of the extended location. diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_objectreplicationpolicies_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_objectreplicationpolicies_client.go index fd95ebfdd934..e859deeecb18 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_objectreplicationpolicies_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_objectreplicationpolicies_client.go @@ -34,17 +34,17 @@ type ObjectReplicationPoliciesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ObjectReplicationPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &ObjectReplicationPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_operations_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_operations_client.go index 136aa1e14c85..00c84f809f81 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_operations_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_operations_client.go @@ -29,16 +29,16 @@ type OperationsClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &OperationsClient{ - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_privateendpointconnections_client.go index 248382db2baa..9688ffed7238 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_privateendpointconnections_client.go @@ -34,17 +34,17 @@ type PrivateEndpointConnectionsClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateEndpointConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &PrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_privatelinkresources_client.go index 1966ce682590..17df5f007b59 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_privatelinkresources_client.go @@ -34,17 +34,17 @@ type PrivateLinkResourcesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateLinkResourcesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &PrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_queue_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_queue_client.go index 8ef7fcb85582..4079eb053e91 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_queue_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_queue_client.go @@ -34,17 +34,17 @@ type QueueClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *QueueClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &QueueClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_queueservices_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_queueservices_client.go index dec23a27176a..08b61365a160 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_queueservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_queueservices_client.go @@ -34,17 +34,17 @@ type QueueServicesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewQueueServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *QueueServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &QueueServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_skus_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_skus_client.go index e2ef623659f2..e80f6beedabe 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_skus_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_skus_client.go @@ -34,17 +34,17 @@ type SKUsClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SKUsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &SKUsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_table_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_table_client.go index 48c45d95c13d..d00734d2814b 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_table_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_table_client.go @@ -34,17 +34,17 @@ type TableClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewTableClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TableClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &TableClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_tableservices_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_tableservices_client.go index db886f34272e..261bbb1d61f8 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_tableservices_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_tableservices_client.go @@ -34,17 +34,17 @@ type TableServicesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewTableServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TableServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &TableServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client } diff --git a/sdk/resourcemanager/storage/armstorage/zz_generated_usages_client.go b/sdk/resourcemanager/storage/armstorage/zz_generated_usages_client.go index b3eb0b599c78..7940b3c97830 100644 --- a/sdk/resourcemanager/storage/armstorage/zz_generated_usages_client.go +++ b/sdk/resourcemanager/storage/armstorage/zz_generated_usages_client.go @@ -34,17 +34,17 @@ type UsagesClient struct { // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UsagesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } client := &UsagesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } return client }