diff --git a/services/authorization/mgmt/2015-07-01/authorization/version.go b/services/authorization/mgmt/2015-07-01/authorization/version.go index 77a9c4f0562f..c02f6cc487cb 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/version.go +++ b/services/authorization/mgmt/2015-07-01/authorization/version.go @@ -1,7 +1,5 @@ package authorization -import "github.com/Azure/azure-sdk-for-go/version" - // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,10 +19,10 @@ 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 + " authorization/2015-07-01" + return "Azure-SDK-For-Go/latest services" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return version.Number + return "latest" } diff --git a/services/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go b/services/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go index 8527db7aafeb..5e46de7a5bf1 100644 --- a/services/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go +++ b/services/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go @@ -72,7 +72,7 @@ func (client ClassicAdministratorsClient) ListPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "" + const APIVersion = "2015-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/authorization/mgmt/2017-10-01-preview/authorization/version.go b/services/authorization/mgmt/2017-10-01-preview/authorization/version.go index cfe0e7e18cba..c02f6cc487cb 100644 --- a/services/authorization/mgmt/2017-10-01-preview/authorization/version.go +++ b/services/authorization/mgmt/2017-10-01-preview/authorization/version.go @@ -1,7 +1,5 @@ package authorization -import "github.com/Azure/azure-sdk-for-go/version" - // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,10 +19,10 @@ 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 + " authorization/2017-10-01-preview" + return "Azure-SDK-For-Go/latest services" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return version.Number + return "latest" } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go b/services/authorization/mgmt/2018-01-01-preview/authorization/classicadministratorsgroup.go similarity index 63% rename from services/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go rename to services/authorization/mgmt/2018-01-01-preview/authorization/classicadministratorsgroup.go index ef906747c7c6..bc606ec3f976 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/classicadministratorsgroup.go @@ -24,55 +24,55 @@ import ( "net/http" ) -// ClassicAdministratorsClient is the role based access control provides you a way to apply granular level policy +// ClassicAdministratorsGroupClient is the role based access control provides you a way to apply granular level policy // administration down to individual resources or resource groups. These operations enable you to manage role // definitions and role assignments. A role definition describes the set of actions that can be performed on resources. // A role assignment grants access to Azure Active Directory users. -type ClassicAdministratorsClient struct { +type ClassicAdministratorsGroupClient struct { BaseClient } -// NewClassicAdministratorsClient creates an instance of the ClassicAdministratorsClient client. -func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministratorsClient { - return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewClassicAdministratorsGroupClient creates an instance of the ClassicAdministratorsGroupClient client. +func NewClassicAdministratorsGroupClient(subscriptionID string) ClassicAdministratorsGroupClient { + return NewClassicAdministratorsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. -func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { - return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewClassicAdministratorsGroupClientWithBaseURI creates an instance of the ClassicAdministratorsGroupClient client. +func NewClassicAdministratorsGroupClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsGroupClient { + return ClassicAdministratorsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // List gets service administrator, account administrator, and co-administrators for the subscription. -func (client ClassicAdministratorsClient) List(ctx context.Context) (result ClassicAdministratorListResultPage, err error) { +func (client ClassicAdministratorsGroupClient) List(ctx context.Context) (result ClassicAdministratorListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.calr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "List", resp, "Failure sending request") return } result.calr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client ClassicAdministratorsClient) ListPreparer(ctx context.Context) (*http.Request, error) { +func (client ClassicAdministratorsGroupClient) ListPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-07-01" + const APIVersion = "2015-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -87,14 +87,14 @@ func (client ClassicAdministratorsClient) ListPreparer(ctx context.Context) (*ht // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ClassicAdministratorsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client ClassicAdministratorsGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client ClassicAdministratorsClient) ListResponder(resp *http.Response) (result ClassicAdministratorListResult, err error) { +func (client ClassicAdministratorsGroupClient) ListResponder(resp *http.Response) (result ClassicAdministratorListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -106,10 +106,10 @@ func (client ClassicAdministratorsClient) ListResponder(resp *http.Response) (re } // listNextResults retrieves the next set of results, if any. -func (client ClassicAdministratorsClient) listNextResults(lastResults ClassicAdministratorListResult) (result ClassicAdministratorListResult, err error) { +func (client ClassicAdministratorsGroupClient) listNextResults(lastResults ClassicAdministratorListResult) (result ClassicAdministratorListResult, err error) { req, err := lastResults.classicAdministratorListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -117,17 +117,17 @@ func (client ClassicAdministratorsClient) listNextResults(lastResults ClassicAdm resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ClassicAdministratorsClient) ListComplete(ctx context.Context) (result ClassicAdministratorListResultIterator, err error) { +func (client ClassicAdministratorsGroupClient) ListComplete(ctx context.Context) (result ClassicAdministratorListResultIterator, err error) { result.page, err = client.List(ctx) return } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/models.go b/services/authorization/mgmt/2018-01-01-preview/authorization/models.go index 8e79d8bab251..339a353de192 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/models.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/models.go @@ -751,6 +751,8 @@ func (rd *RoleDefinition) UnmarshalJSON(body []byte) error { type RoleDefinitionFilter struct { // RoleName - Returns role definition with the specific name. RoleName *string `json:"roleName,omitempty"` + // Type - Returns role definition with the specific type. + Type *string `json:"type,omitempty"` } // RoleDefinitionListResult role definition list operation result. diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/permissions.go b/services/authorization/mgmt/2018-01-01-preview/authorization/permissionsgroup.go similarity index 67% rename from services/authorization/mgmt/2018-01-01-preview/authorization/permissions.go rename to services/authorization/mgmt/2018-01-01-preview/authorization/permissionsgroup.go index 5db14fc3dac3..e148690a52f3 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/permissions.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/permissionsgroup.go @@ -24,22 +24,22 @@ import ( "net/http" ) -// PermissionsClient is the role based access control provides you a way to apply granular level policy administration -// down to individual resources or resource groups. These operations enable you to manage role definitions and role -// assignments. A role definition describes the set of actions that can be performed on resources. A role assignment -// grants access to Azure Active Directory users. -type PermissionsClient struct { +// PermissionsGroupClient is the role based access control provides you a way to apply granular level policy +// administration down to individual resources or resource groups. These operations enable you to manage role +// definitions and role assignments. A role definition describes the set of actions that can be performed on resources. +// A role assignment grants access to Azure Active Directory users. +type PermissionsGroupClient struct { BaseClient } -// NewPermissionsClient creates an instance of the PermissionsClient client. -func NewPermissionsClient(subscriptionID string) PermissionsClient { - return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewPermissionsGroupClient creates an instance of the PermissionsGroupClient client. +func NewPermissionsGroupClient(subscriptionID string) PermissionsGroupClient { + return NewPermissionsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. -func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { - return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewPermissionsGroupClientWithBaseURI creates an instance of the PermissionsGroupClient client. +func NewPermissionsGroupClientWithBaseURI(baseURI string, subscriptionID string) PermissionsGroupClient { + return PermissionsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListForResource gets all permissions the caller has for a resource. @@ -47,31 +47,31 @@ func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) Perm // resourceGroupName is the name of the resource group. resourceProviderNamespace is the namespace of the resource // provider. parentResourcePath is the parent resource identity. resourceType is the resource type of the resource. // resourceName is the name of the resource to get the permissions for. -func (client PermissionsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultPage, err error) { +func (client PermissionsGroupClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultPage, err error) { result.fn = client.listForResourceNextResults req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResource", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResource", nil, "Failure preparing request") return } resp, err := client.ListForResourceSender(req) if err != nil { result.pgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResource", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResource", resp, "Failure sending request") return } result.pgr, err = client.ListForResourceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResource", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResource", resp, "Failure responding to request") } return } // ListForResourcePreparer prepares the ListForResource request. -func (client PermissionsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { +func (client PermissionsGroupClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -96,14 +96,14 @@ func (client PermissionsClient) ListForResourcePreparer(ctx context.Context, res // ListForResourceSender sends the ListForResource request. The method will close the // http.Response Body if it receives an error. -func (client PermissionsClient) ListForResourceSender(req *http.Request) (*http.Response, error) { +func (client PermissionsGroupClient) ListForResourceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListForResourceResponder handles the response to the ListForResource request. The method always // closes the http.Response Body. -func (client PermissionsClient) ListForResourceResponder(resp *http.Response) (result PermissionGetResult, err error) { +func (client PermissionsGroupClient) ListForResourceResponder(resp *http.Response) (result PermissionGetResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -115,10 +115,10 @@ func (client PermissionsClient) ListForResourceResponder(resp *http.Response) (r } // listForResourceNextResults retrieves the next set of results, if any. -func (client PermissionsClient) listForResourceNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) { +func (client PermissionsGroupClient) listForResourceNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) { req, err := lastResults.permissionGetResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -126,17 +126,17 @@ func (client PermissionsClient) listForResourceNextResults(lastResults Permissio resp, err := client.ListForResourceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceNextResults", resp, "Failure sending next results request") } result, err = client.ListForResourceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceNextResults", resp, "Failure responding to next results request") } return } // ListForResourceComplete enumerates all values, automatically crossing page boundaries as required. -func (client PermissionsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultIterator, err error) { +func (client PermissionsGroupClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultIterator, err error) { result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) return } @@ -144,31 +144,31 @@ func (client PermissionsClient) ListForResourceComplete(ctx context.Context, res // ListForResourceGroup gets all permissions the caller has for a resource group. // // resourceGroupName is the name of the resource group. -func (client PermissionsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result PermissionGetResultPage, err error) { +func (client PermissionsGroupClient) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result PermissionGetResultPage, err error) { result.fn = client.listForResourceGroupNextResults req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListForResourceGroupSender(req) if err != nil { result.pgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResourceGroup", resp, "Failure sending request") return } result.pgr, err = client.ListForResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "ListForResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "ListForResourceGroup", resp, "Failure responding to request") } return } // ListForResourceGroupPreparer prepares the ListForResourceGroup request. -func (client PermissionsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +func (client PermissionsGroupClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -189,14 +189,14 @@ func (client PermissionsClient) ListForResourceGroupPreparer(ctx context.Context // ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client PermissionsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client PermissionsGroupClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always // closes the http.Response Body. -func (client PermissionsClient) ListForResourceGroupResponder(resp *http.Response) (result PermissionGetResult, err error) { +func (client PermissionsGroupClient) ListForResourceGroupResponder(resp *http.Response) (result PermissionGetResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -208,10 +208,10 @@ func (client PermissionsClient) ListForResourceGroupResponder(resp *http.Respons } // listForResourceGroupNextResults retrieves the next set of results, if any. -func (client PermissionsClient) listForResourceGroupNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) { +func (client PermissionsGroupClient) listForResourceGroupNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) { req, err := lastResults.permissionGetResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -219,17 +219,17 @@ func (client PermissionsClient) listForResourceGroupNextResults(lastResults Perm resp, err := client.ListForResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListForResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.PermissionsGroupClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request") } return } // ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client PermissionsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result PermissionGetResultIterator, err error) { +func (client PermissionsGroupClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result PermissionGetResultIterator, err error) { result.page, err = client.ListForResourceGroup(ctx, resourceGroupName) return } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go b/services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadatagroup.go similarity index 65% rename from services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go rename to services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadatagroup.go index c54b41539e36..a81a561ed00d 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadatagroup.go @@ -24,52 +24,53 @@ import ( "net/http" ) -// ProviderOperationsMetadataClient is the role based access control provides you a way to apply granular level policy -// administration down to individual resources or resource groups. These operations enable you to manage role +// ProviderOperationsMetadataGroupClient is the role based access control provides you a way to apply granular level +// policy administration down to individual resources or resource groups. These operations enable you to manage role // definitions and role assignments. A role definition describes the set of actions that can be performed on resources. // A role assignment grants access to Azure Active Directory users. -type ProviderOperationsMetadataClient struct { +type ProviderOperationsMetadataGroupClient struct { BaseClient } -// NewProviderOperationsMetadataClient creates an instance of the ProviderOperationsMetadataClient client. -func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperationsMetadataClient { - return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewProviderOperationsMetadataGroupClient creates an instance of the ProviderOperationsMetadataGroupClient client. +func NewProviderOperationsMetadataGroupClient(subscriptionID string) ProviderOperationsMetadataGroupClient { + return NewProviderOperationsMetadataGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. -func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { - return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewProviderOperationsMetadataGroupClientWithBaseURI creates an instance of the ProviderOperationsMetadataGroupClient +// client. +func NewProviderOperationsMetadataGroupClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataGroupClient { + return ProviderOperationsMetadataGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets provider operations metadata for the specified resource provider. // // resourceProviderNamespace is the namespace of the resource provider. expand is specifies whether to expand the // values. -func (client ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) { +func (client ProviderOperationsMetadataGroupClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) { req, err := client.GetPreparer(ctx, resourceProviderNamespace, expand) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client ProviderOperationsMetadataClient) GetPreparer(ctx context.Context, resourceProviderNamespace string, expand string) (*http.Request, error) { +func (client ProviderOperationsMetadataGroupClient) GetPreparer(ctx context.Context, resourceProviderNamespace string, expand string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), } @@ -94,14 +95,14 @@ func (client ProviderOperationsMetadataClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client ProviderOperationsMetadataClient) GetSender(req *http.Request) (*http.Response, error) { +func (client ProviderOperationsMetadataGroupClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client ProviderOperationsMetadataClient) GetResponder(resp *http.Response) (result ProviderOperationsMetadata, err error) { +func (client ProviderOperationsMetadataGroupClient) GetResponder(resp *http.Response) (result ProviderOperationsMetadata, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -115,31 +116,31 @@ func (client ProviderOperationsMetadataClient) GetResponder(resp *http.Response) // List gets provider operations metadata for all resource providers. // // expand is specifies whether to expand the values. -func (client ProviderOperationsMetadataClient) List(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultPage, err error) { +func (client ProviderOperationsMetadataGroupClient) List(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx, expand) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.pomlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "List", resp, "Failure sending request") return } result.pomlr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client ProviderOperationsMetadataClient) ListPreparer(ctx context.Context, expand string) (*http.Request, error) { +func (client ProviderOperationsMetadataGroupClient) ListPreparer(ctx context.Context, expand string) (*http.Request, error) { const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, @@ -160,14 +161,14 @@ func (client ProviderOperationsMetadataClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ProviderOperationsMetadataClient) ListSender(req *http.Request) (*http.Response, error) { +func (client ProviderOperationsMetadataGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client ProviderOperationsMetadataClient) ListResponder(resp *http.Response) (result ProviderOperationsMetadataListResult, err error) { +func (client ProviderOperationsMetadataGroupClient) ListResponder(resp *http.Response) (result ProviderOperationsMetadataListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -179,10 +180,10 @@ func (client ProviderOperationsMetadataClient) ListResponder(resp *http.Response } // listNextResults retrieves the next set of results, if any. -func (client ProviderOperationsMetadataClient) listNextResults(lastResults ProviderOperationsMetadataListResult) (result ProviderOperationsMetadataListResult, err error) { +func (client ProviderOperationsMetadataGroupClient) listNextResults(lastResults ProviderOperationsMetadataListResult) (result ProviderOperationsMetadataListResult, err error) { req, err := lastResults.providerOperationsMetadataListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -190,17 +191,17 @@ func (client ProviderOperationsMetadataClient) listNextResults(lastResults Provi resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProviderOperationsMetadataClient) ListComplete(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultIterator, err error) { +func (client ProviderOperationsMetadataGroupClient) ListComplete(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultIterator, err error) { result.page, err = client.List(ctx, expand) return } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go b/services/authorization/mgmt/2018-01-01-preview/authorization/roleassignmentsgroup.go similarity index 71% rename from services/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go rename to services/authorization/mgmt/2018-01-01-preview/authorization/roleassignmentsgroup.go index 7af2ddf83f8e..00712d7e133c 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/roleassignmentsgroup.go @@ -24,22 +24,22 @@ import ( "net/http" ) -// RoleAssignmentsClient is the role based access control provides you a way to apply granular level policy +// RoleAssignmentsGroupClient is the role based access control provides you a way to apply granular level policy // administration down to individual resources or resource groups. These operations enable you to manage role // definitions and role assignments. A role definition describes the set of actions that can be performed on resources. // A role assignment grants access to Azure Active Directory users. -type RoleAssignmentsClient struct { +type RoleAssignmentsGroupClient struct { BaseClient } -// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client. -func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { - return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewRoleAssignmentsGroupClient creates an instance of the RoleAssignmentsGroupClient client. +func NewRoleAssignmentsGroupClient(subscriptionID string) RoleAssignmentsGroupClient { + return NewRoleAssignmentsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. -func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { - return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewRoleAssignmentsGroupClientWithBaseURI creates an instance of the RoleAssignmentsGroupClient client. +func NewRoleAssignmentsGroupClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsGroupClient { + return RoleAssignmentsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates a role assignment. @@ -50,30 +50,30 @@ func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) // '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' // for a resource. roleAssignmentName is the name of the role assignment to create. It can be any valid GUID. // parameters is parameters for the role assignment. -func (client RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) Create(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { req, err := client.CreatePreparer(ctx, scope, roleAssignmentName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Create", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Create", nil, "Failure preparing request") return } resp, err := client.CreateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Create", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Create", resp, "Failure sending request") return } result, err = client.CreateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Create", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Create", resp, "Failure responding to request") } return } // CreatePreparer prepares the Create request. -func (client RoleAssignmentsClient) CreatePreparer(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) CreatePreparer(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleAssignmentName": autorest.Encode("path", roleAssignmentName), "scope": scope, @@ -96,14 +96,14 @@ func (client RoleAssignmentsClient) CreatePreparer(ctx context.Context, scope st // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) CreateSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) CreateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CreateResponder handles the response to the Create request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) CreateResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -117,30 +117,30 @@ func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result // CreateByID creates a role assignment by ID. // // roleID is the ID of the role assignment to create. parameters is parameters for the role assignment. -func (client RoleAssignmentsClient) CreateByID(ctx context.Context, roleID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) CreateByID(ctx context.Context, roleID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { req, err := client.CreateByIDPreparer(ctx, roleID, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "CreateByID", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "CreateByID", nil, "Failure preparing request") return } resp, err := client.CreateByIDSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "CreateByID", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "CreateByID", resp, "Failure sending request") return } result, err = client.CreateByIDResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "CreateByID", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "CreateByID", resp, "Failure responding to request") } return } // CreateByIDPreparer prepares the CreateByID request. -func (client RoleAssignmentsClient) CreateByIDPreparer(ctx context.Context, roleID string, parameters RoleAssignmentCreateParameters) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) CreateByIDPreparer(ctx context.Context, roleID string, parameters RoleAssignmentCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -162,14 +162,14 @@ func (client RoleAssignmentsClient) CreateByIDPreparer(ctx context.Context, role // CreateByIDSender sends the CreateByID request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) CreateByIDSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CreateByIDResponder handles the response to the CreateByID request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) CreateByIDResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -184,30 +184,30 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re // // scope is the scope of the role assignment to delete. roleAssignmentName is the name of the role assignment to // delete. -func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) Delete(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { req, err := client.DeletePreparer(ctx, scope, roleAssignmentName) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Delete", nil, "Failure preparing request") return } resp, err := client.DeleteSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Delete", resp, "Failure sending request") return } result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Delete", resp, "Failure responding to request") } return } // DeletePreparer prepares the Delete request. -func (client RoleAssignmentsClient) DeletePreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) DeletePreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleAssignmentName": autorest.Encode("path", roleAssignmentName), "scope": scope, @@ -228,14 +228,14 @@ func (client RoleAssignmentsClient) DeletePreparer(ctx context.Context, scope st // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) DeleteResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) DeleteResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -249,30 +249,30 @@ func (client RoleAssignmentsClient) DeleteResponder(resp *http.Response) (result // DeleteByID deletes a role assignment. // // roleID is the ID of the role assignment to delete. -func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) DeleteByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { req, err := client.DeleteByIDPreparer(ctx, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "DeleteByID", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "DeleteByID", nil, "Failure preparing request") return } resp, err := client.DeleteByIDSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "DeleteByID", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "DeleteByID", resp, "Failure sending request") return } result, err = client.DeleteByIDResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "DeleteByID", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "DeleteByID", resp, "Failure responding to request") } return } // DeleteByIDPreparer prepares the DeleteByID request. -func (client RoleAssignmentsClient) DeleteByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) DeleteByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -292,14 +292,14 @@ func (client RoleAssignmentsClient) DeleteByIDPreparer(ctx context.Context, role // DeleteByIDSender sends the DeleteByID request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) DeleteByIDSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // DeleteByIDResponder handles the response to the DeleteByID request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) DeleteByIDResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -313,30 +313,30 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re // Get get the specified role assignment. // // scope is the scope of the role assignment. roleAssignmentName is the name of the role assignment to get. -func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) Get(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) { req, err := client.GetPreparer(ctx, scope, roleAssignmentName) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client RoleAssignmentsClient) GetPreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) GetPreparer(ctx context.Context, scope string, roleAssignmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleAssignmentName": autorest.Encode("path", roleAssignmentName), "scope": scope, @@ -357,14 +357,14 @@ func (client RoleAssignmentsClient) GetPreparer(ctx context.Context, scope strin // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) GetSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) GetResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) GetResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -378,30 +378,30 @@ func (client RoleAssignmentsClient) GetResponder(resp *http.Response) (result Ro // GetByID gets a role assignment by ID. // // roleID is the ID of the role assignment to get. -func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) GetByID(ctx context.Context, roleID string) (result RoleAssignment, err error) { req, err := client.GetByIDPreparer(ctx, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "GetByID", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "GetByID", nil, "Failure preparing request") return } resp, err := client.GetByIDSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "GetByID", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "GetByID", resp, "Failure sending request") return } result, err = client.GetByIDResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "GetByID", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "GetByID", resp, "Failure responding to request") } return } // GetByIDPreparer prepares the GetByID request. -func (client RoleAssignmentsClient) GetByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) GetByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -421,14 +421,14 @@ func (client RoleAssignmentsClient) GetByIDPreparer(ctx context.Context, roleID // GetByIDSender sends the GetByID request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) GetByIDSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetByIDResponder handles the response to the GetByID request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (result RoleAssignment, err error) { +func (client RoleAssignmentsGroupClient) GetByIDResponder(resp *http.Response) (result RoleAssignment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -444,31 +444,31 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul // filter is the filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above // the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the // specified principal. -func (client RoleAssignmentsClient) List(ctx context.Context, filter string) (result RoleAssignmentListResultPage, err error) { +func (client RoleAssignmentsGroupClient) List(ctx context.Context, filter string) (result RoleAssignmentListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx, filter) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.ralr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "List", resp, "Failure sending request") return } result.ralr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client RoleAssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -491,14 +491,14 @@ func (client RoleAssignmentsClient) ListPreparer(ctx context.Context, filter str // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) ListResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) ListResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -510,10 +510,10 @@ func (client RoleAssignmentsClient) ListResponder(resp *http.Response) (result R } // listNextResults retrieves the next set of results, if any. -func (client RoleAssignmentsClient) listNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) listNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { req, err := lastResults.roleAssignmentListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -521,17 +521,17 @@ func (client RoleAssignmentsClient) listNextResults(lastResults RoleAssignmentLi resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsGroupClient) ListComplete(ctx context.Context, filter string) (result RoleAssignmentListResultIterator, err error) { result.page, err = client.List(ctx, filter) return } @@ -543,31 +543,31 @@ func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter str // resourceName is the name of the resource to get role assignments for. filter is the filter to apply on the // operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId // eq {id} to return all role assignments at, above or below the scope for the specified principal. -func (client RoleAssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultPage, err error) { +func (client RoleAssignmentsGroupClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultPage, err error) { result.fn = client.listForResourceNextResults req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResource", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResource", nil, "Failure preparing request") return } resp, err := client.ListForResourceSender(req) if err != nil { result.ralr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResource", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResource", resp, "Failure sending request") return } result.ralr, err = client.ListForResourceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResource", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResource", resp, "Failure responding to request") } return } // ListForResourcePreparer prepares the ListForResource request. -func (client RoleAssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -595,14 +595,14 @@ func (client RoleAssignmentsClient) ListForResourcePreparer(ctx context.Context, // ListForResourceSender sends the ListForResource request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) ListForResourceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListForResourceResponder handles the response to the ListForResource request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) ListForResourceResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) ListForResourceResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -614,10 +614,10 @@ func (client RoleAssignmentsClient) ListForResourceResponder(resp *http.Response } // listForResourceNextResults retrieves the next set of results, if any. -func (client RoleAssignmentsClient) listForResourceNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) listForResourceNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { req, err := lastResults.roleAssignmentListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -625,17 +625,17 @@ func (client RoleAssignmentsClient) listForResourceNextResults(lastResults RoleA resp, err := client.ListForResourceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceNextResults", resp, "Failure sending next results request") } result, err = client.ListForResourceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceNextResults", resp, "Failure responding to next results request") } return } // ListForResourceComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsGroupClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultIterator, err error) { result.page, err = client.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) return } @@ -645,31 +645,31 @@ func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, // resourceGroupName is the name of the resource group. filter is the filter to apply on the operation. Use // $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to // return all role assignments at, above or below the scope for the specified principal. -func (client RoleAssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultPage, err error) { +func (client RoleAssignmentsGroupClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultPage, err error) { result.fn = client.listForResourceGroupNextResults req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListForResourceGroupSender(req) if err != nil { result.ralr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResourceGroup", resp, "Failure sending request") return } result.ralr, err = client.ListForResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForResourceGroup", resp, "Failure responding to request") } return } // ListForResourceGroupPreparer prepares the ListForResourceGroup request. -func (client RoleAssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -693,14 +693,14 @@ func (client RoleAssignmentsClient) ListForResourceGroupPreparer(ctx context.Con // ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) ListForResourceGroupResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -712,10 +712,10 @@ func (client RoleAssignmentsClient) ListForResourceGroupResponder(resp *http.Res } // listForResourceGroupNextResults retrieves the next set of results, if any. -func (client RoleAssignmentsClient) listForResourceGroupNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) listForResourceGroupNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { req, err := lastResults.roleAssignmentListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -723,17 +723,17 @@ func (client RoleAssignmentsClient) listForResourceGroupNextResults(lastResults resp, err := client.ListForResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListForResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForResourceGroupNextResults", resp, "Failure responding to next results request") } return } // ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsGroupClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultIterator, err error) { result.page, err = client.ListForResourceGroup(ctx, resourceGroupName, filter) return } @@ -743,31 +743,31 @@ func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Con // scope is the scope of the role assignments. filter is the filter to apply on the operation. Use // $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to // return all role assignments at, above or below the scope for the specified principal. -func (client RoleAssignmentsClient) ListForScope(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultPage, err error) { +func (client RoleAssignmentsGroupClient) ListForScope(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultPage, err error) { result.fn = client.listForScopeNextResults req, err := client.ListForScopePreparer(ctx, scope, filter) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForScope", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForScope", nil, "Failure preparing request") return } resp, err := client.ListForScopeSender(req) if err != nil { result.ralr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForScope", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForScope", resp, "Failure sending request") return } result.ralr, err = client.ListForScopeResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "ListForScope", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "ListForScope", resp, "Failure responding to request") } return } // ListForScopePreparer prepares the ListForScope request. -func (client RoleAssignmentsClient) ListForScopePreparer(ctx context.Context, scope string, filter string) (*http.Request, error) { +func (client RoleAssignmentsGroupClient) ListForScopePreparer(ctx context.Context, scope string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "scope": scope, } @@ -790,14 +790,14 @@ func (client RoleAssignmentsClient) ListForScopePreparer(ctx context.Context, sc // ListForScopeSender sends the ListForScope request. The method will close the // http.Response Body if it receives an error. -func (client RoleAssignmentsClient) ListForScopeSender(req *http.Request) (*http.Response, error) { +func (client RoleAssignmentsGroupClient) ListForScopeSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListForScopeResponder handles the response to the ListForScope request. The method always // closes the http.Response Body. -func (client RoleAssignmentsClient) ListForScopeResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) ListForScopeResponder(resp *http.Response) (result RoleAssignmentListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -809,10 +809,10 @@ func (client RoleAssignmentsClient) ListForScopeResponder(resp *http.Response) ( } // listForScopeNextResults retrieves the next set of results, if any. -func (client RoleAssignmentsClient) listForScopeNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { +func (client RoleAssignmentsGroupClient) listForScopeNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) { req, err := lastResults.roleAssignmentListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForScopeNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForScopeNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -820,17 +820,17 @@ func (client RoleAssignmentsClient) listForScopeNextResults(lastResults RoleAssi resp, err := client.ListForScopeSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForScopeNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForScopeNextResults", resp, "Failure sending next results request") } result, err = client.ListForScopeResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForScopeNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsGroupClient", "listForScopeNextResults", resp, "Failure responding to next results request") } return } // ListForScopeComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleAssignmentsClient) ListForScopeComplete(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultIterator, err error) { +func (client RoleAssignmentsGroupClient) ListForScopeComplete(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultIterator, err error) { result.page, err = client.ListForScope(ctx, scope, filter) return } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go b/services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitionsgroup.go similarity index 71% rename from services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go rename to services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitionsgroup.go index b29cf724fe9a..7f0811fa4203 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/roledefinitionsgroup.go @@ -24,52 +24,52 @@ import ( "net/http" ) -// RoleDefinitionsClient is the role based access control provides you a way to apply granular level policy +// RoleDefinitionsGroupClient is the role based access control provides you a way to apply granular level policy // administration down to individual resources or resource groups. These operations enable you to manage role // definitions and role assignments. A role definition describes the set of actions that can be performed on resources. // A role assignment grants access to Azure Active Directory users. -type RoleDefinitionsClient struct { +type RoleDefinitionsGroupClient struct { BaseClient } -// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient client. -func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { - return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewRoleDefinitionsGroupClient creates an instance of the RoleDefinitionsGroupClient client. +func NewRoleDefinitionsGroupClient(subscriptionID string) RoleDefinitionsGroupClient { + return NewRoleDefinitionsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. -func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { - return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewRoleDefinitionsGroupClientWithBaseURI creates an instance of the RoleDefinitionsGroupClient client. +func NewRoleDefinitionsGroupClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsGroupClient { + return RoleDefinitionsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a role definition. // // scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. roleDefinition is // the values for the role definition. -func (client RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) { req, err := client.CreateOrUpdatePreparer(ctx, scope, roleDefinitionID, roleDefinition) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "CreateOrUpdate", nil, "Failure preparing request") return } resp, err := client.CreateOrUpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "CreateOrUpdate", resp, "Failure sending request") return } result, err = client.CreateOrUpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "CreateOrUpdate", resp, "Failure responding to request") } return } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RoleDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition) (*http.Request, error) { +func (client RoleDefinitionsGroupClient) CreateOrUpdatePreparer(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleDefinitionId": autorest.Encode("path", roleDefinitionID), "scope": scope, @@ -92,14 +92,14 @@ func (client RoleDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client RoleDefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { +func (client RoleDefinitionsGroupClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) CreateOrUpdateResponder(resp *http.Response) (result RoleDefinition, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -113,30 +113,30 @@ func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) // Delete deletes a role definition. // // scope is the scope of the role definition. roleDefinitionID is the ID of the role definition to delete. -func (client RoleDefinitionsClient) Delete(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) Delete(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) { req, err := client.DeletePreparer(ctx, scope, roleDefinitionID) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Delete", nil, "Failure preparing request") return } resp, err := client.DeleteSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Delete", resp, "Failure sending request") return } result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Delete", resp, "Failure responding to request") } return } // DeletePreparer prepares the Delete request. -func (client RoleDefinitionsClient) DeletePreparer(ctx context.Context, scope string, roleDefinitionID string) (*http.Request, error) { +func (client RoleDefinitionsGroupClient) DeletePreparer(ctx context.Context, scope string, roleDefinitionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleDefinitionId": autorest.Encode("path", roleDefinitionID), "scope": scope, @@ -157,14 +157,14 @@ func (client RoleDefinitionsClient) DeletePreparer(ctx context.Context, scope st // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client RoleDefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client RoleDefinitionsGroupClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) DeleteResponder(resp *http.Response) (result RoleDefinition, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -178,30 +178,30 @@ func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result // Get get role definition by name (GUID). // // scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. -func (client RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) Get(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) { req, err := client.GetPreparer(ctx, scope, roleDefinitionID) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client RoleDefinitionsClient) GetPreparer(ctx context.Context, scope string, roleDefinitionID string) (*http.Request, error) { +func (client RoleDefinitionsGroupClient) GetPreparer(ctx context.Context, scope string, roleDefinitionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleDefinitionId": autorest.Encode("path", roleDefinitionID), "scope": scope, @@ -222,14 +222,14 @@ func (client RoleDefinitionsClient) GetPreparer(ctx context.Context, scope strin // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client RoleDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) { +func (client RoleDefinitionsGroupClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client RoleDefinitionsClient) GetResponder(resp *http.Response) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) GetResponder(resp *http.Response) (result RoleDefinition, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -246,30 +246,30 @@ func (client RoleDefinitionsClient) GetResponder(resp *http.Response) (result Ro // /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription // level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant // level role definitions. -func (client RoleDefinitionsClient) GetByID(ctx context.Context, roleID string) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) GetByID(ctx context.Context, roleID string) (result RoleDefinition, err error) { req, err := client.GetByIDPreparer(ctx, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "GetByID", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "GetByID", nil, "Failure preparing request") return } resp, err := client.GetByIDSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "GetByID", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "GetByID", resp, "Failure sending request") return } result, err = client.GetByIDResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "GetByID", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "GetByID", resp, "Failure responding to request") } return } // GetByIDPreparer prepares the GetByID request. -func (client RoleDefinitionsClient) GetByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { +func (client RoleDefinitionsGroupClient) GetByIDPreparer(ctx context.Context, roleID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "roleId": roleID, } @@ -289,14 +289,14 @@ func (client RoleDefinitionsClient) GetByIDPreparer(ctx context.Context, roleID // GetByIDSender sends the GetByID request. The method will close the // http.Response Body if it receives an error. -func (client RoleDefinitionsClient) GetByIDSender(req *http.Request) (*http.Response, error) { +func (client RoleDefinitionsGroupClient) GetByIDSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetByIDResponder handles the response to the GetByID request. The method always // closes the http.Response Body. -func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (result RoleDefinition, err error) { +func (client RoleDefinitionsGroupClient) GetByIDResponder(resp *http.Response) (result RoleDefinition, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -311,31 +311,31 @@ func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (resul // // scope is the scope of the role definition. filter is the filter to apply on the operation. Use atScopeAndBelow // filter to search below the given scope as well. -func (client RoleDefinitionsClient) List(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultPage, err error) { +func (client RoleDefinitionsGroupClient) List(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx, scope, filter) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.rdlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "List", resp, "Failure sending request") return } result.rdlr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client RoleDefinitionsClient) ListPreparer(ctx context.Context, scope string, filter string) (*http.Request, error) { +func (client RoleDefinitionsGroupClient) ListPreparer(ctx context.Context, scope string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "scope": scope, } @@ -358,14 +358,14 @@ func (client RoleDefinitionsClient) ListPreparer(ctx context.Context, scope stri // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client RoleDefinitionsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client RoleDefinitionsGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client RoleDefinitionsClient) ListResponder(resp *http.Response) (result RoleDefinitionListResult, err error) { +func (client RoleDefinitionsGroupClient) ListResponder(resp *http.Response) (result RoleDefinitionListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -377,10 +377,10 @@ func (client RoleDefinitionsClient) ListResponder(resp *http.Response) (result R } // listNextResults retrieves the next set of results, if any. -func (client RoleDefinitionsClient) listNextResults(lastResults RoleDefinitionListResult) (result RoleDefinitionListResult, err error) { +func (client RoleDefinitionsGroupClient) listNextResults(lastResults RoleDefinitionListResult) (result RoleDefinitionListResult, err error) { req, err := lastResults.roleDefinitionListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -388,17 +388,17 @@ func (client RoleDefinitionsClient) listNextResults(lastResults RoleDefinitionLi resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoleDefinitionsClient) ListComplete(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultIterator, err error) { +func (client RoleDefinitionsGroupClient) ListComplete(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultIterator, err error) { result.page, err = client.List(ctx, scope, filter) return } diff --git a/services/authorization/mgmt/2018-01-01-preview/authorization/version.go b/services/authorization/mgmt/2018-01-01-preview/authorization/version.go index 2833e0b21000..c02f6cc487cb 100644 --- a/services/authorization/mgmt/2018-01-01-preview/authorization/version.go +++ b/services/authorization/mgmt/2018-01-01-preview/authorization/version.go @@ -1,7 +1,5 @@ package authorization -import "github.com/Azure/azure-sdk-for-go/version" - // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,10 +19,10 @@ 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 + " authorization/2018-01-01-preview" + return "Azure-SDK-For-Go/latest services" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return version.Number + return "latest" }