diff --git a/services/automation/mgmt/2015-10-31/automation/account.go b/services/automation/mgmt/2015-10-31/automation/account.go index 5a749315bae8..037f73a92408 100644 --- a/services/automation/mgmt/2015-10-31/automation/account.go +++ b/services/automation/mgmt/2015-10-31/automation/account.go @@ -31,13 +31,13 @@ type AccountClient struct { } // NewAccountClient creates an instance of the AccountClient client. -func NewAccountClient(subscriptionID string, resourceGroupName string) AccountClient { - return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewAccountClient(subscriptionID string) AccountClient { + return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewAccountClientWithBaseURI creates an instance of the AccountClient client. -func NewAccountClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) AccountClient { - return AccountClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { + return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update automation account. diff --git a/services/automation/mgmt/2015-10-31/automation/activity.go b/services/automation/mgmt/2015-10-31/automation/activity.go index 1c99f4838c8b..ac9db9eb863f 100644 --- a/services/automation/mgmt/2015-10-31/automation/activity.go +++ b/services/automation/mgmt/2015-10-31/automation/activity.go @@ -31,27 +31,27 @@ type ActivityClient struct { } // NewActivityClient creates an instance of the ActivityClient client. -func NewActivityClient(subscriptionID string, resourceGroupName string) ActivityClient { - return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewActivityClient(subscriptionID string) ActivityClient { + return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewActivityClientWithBaseURI creates an instance of the ActivityClient client. -func NewActivityClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ActivityClient { - return ActivityClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { + return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the activity in the module identified by module name and activity name. // -// automationAccountName is the automation account name. moduleName is the name of module. activityName is the name -// of activity. -func (client ActivityClient) Get(ctx context.Context, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. activityName is the name of activity. +func (client ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, moduleName, activityName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName, activityName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "Get", nil, "Failure preparing request") return @@ -73,12 +73,12 @@ func (client ActivityClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client ActivityClient) GetPreparer(ctx context.Context, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { +func (client ActivityClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "activityName": autorest.Encode("path", activityName), "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,16 +117,17 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, // ListByModule retrieve a list of activities in the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. -func (client ActivityClient) ListByModule(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. +func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "ListByModule", err.Error()) } result.fn = client.listByModuleNextResults - req, err := client.ListByModulePreparer(ctx, automationAccountName, moduleName) + req, err := client.ListByModulePreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "ListByModule", nil, "Failure preparing request") return @@ -148,11 +149,11 @@ func (client ActivityClient) ListByModule(ctx context.Context, automationAccount } // ListByModulePreparer prepares the ListByModule request. -func (client ActivityClient) ListByModulePreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ActivityClient) ListByModulePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -211,7 +212,7 @@ func (client ActivityClient) listByModuleNextResults(lastResults ActivityListRes } // ListByModuleComplete enumerates all values, automatically crossing page boundaries as required. -func (client ActivityClient) ListByModuleComplete(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { - result.page, err = client.ListByModule(ctx, automationAccountName, moduleName) +func (client ActivityClient) ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { + result.page, err = client.ListByModule(ctx, resourceGroupName, automationAccountName, moduleName) return } diff --git a/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go b/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go index 39cfa0fe8604..365936df4f91 100644 --- a/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go +++ b/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go @@ -31,27 +31,27 @@ type AgentRegistrationInformationClient struct { } // NewAgentRegistrationInformationClient creates an instance of the AgentRegistrationInformationClient client. -func NewAgentRegistrationInformationClient(subscriptionID string, resourceGroupName string) AgentRegistrationInformationClient { - return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrationInformationClient { + return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient // client. -func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) AgentRegistrationInformationClient { - return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { + return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the automation agent registration information. // -// automationAccountName is the automation account name. -func (client AgentRegistrationInformationClient) Get(ctx context.Context, automationAccountName string) (result AgentRegistration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.AgentRegistrationInformationClient", "Get", nil, "Failure preparing request") return @@ -73,10 +73,10 @@ func (client AgentRegistrationInformationClient) Get(ctx context.Context, automa } // GetPreparer prepares the Get request. -func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,16 +115,16 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons // RegenerateKey regenerate a primary or secondary agent registration key // -// automationAccountName is the automation account name. parameters is the name of the agent registration key to be -// regenerated -func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters +// is the name of the agent registration key to be regenerated +func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "RegenerateKey", err.Error()) } - req, err := client.RegenerateKeyPreparer(ctx, automationAccountName, parameters) + req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, automationAccountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.AgentRegistrationInformationClient", "RegenerateKey", nil, "Failure preparing request") return @@ -146,10 +146,10 @@ func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Conte } // RegenerateKeyPreparer prepares the RegenerateKey request. -func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { +func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/certificate.go b/services/automation/mgmt/2015-10-31/automation/certificate.go index 0082c8f71a70..11a65b7c908b 100644 --- a/services/automation/mgmt/2015-10-31/automation/certificate.go +++ b/services/automation/mgmt/2015-10-31/automation/certificate.go @@ -31,24 +31,24 @@ type CertificateClient struct { } // NewCertificateClient creates an instance of the CertificateClient client. -func NewCertificateClient(subscriptionID string, resourceGroupName string) CertificateClient { - return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewCertificateClient(subscriptionID string) CertificateClient { + return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. -func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) CertificateClient { - return CertificateClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { + return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a certificate. // -// automationAccountName is the automation account name. certificateName is the parameters supplied to the create -// or update certificate operation. parameters is the parameters supplied to the create or update certificate -// operation. -func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the parameters supplied to the create or update certificate operation. parameters is the +// parameters supplied to the create or update certificate operation. +func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CertificateCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -56,7 +56,7 @@ func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAc return result, validation.NewError("automation.CertificateClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, certificateName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +78,11 @@ func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { +func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,15 +123,16 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete the certificate. // -// automationAccountName is the automation account name. certificateName is the name of certificate. -func (client CertificateClient) Delete(ctx context.Context, automationAccountName string, certificateName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the name of certificate. +func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, certificateName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Delete", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client CertificateClient) Delete(ctx context.Context, automationAccountNam } // DeletePreparer prepares the Delete request. -func (client CertificateClient) DeletePreparer(ctx context.Context, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +196,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the certificate identified by certificate name. // -// automationAccountName is the automation account name. certificateName is the name of certificate. -func (client CertificateClient) Get(ctx context.Context, automationAccountName string, certificateName string) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the name of certificate. +func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, certificateName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Get", nil, "Failure preparing request") return @@ -225,11 +227,11 @@ func (client CertificateClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client CertificateClient) GetPreparer(ctx context.Context, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +270,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif // ListByAutomationAccount retrieve a list of certificates. // -// automationAccountName is the automation account name. -func (client CertificateClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CertificateListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client CertificateClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +301,10 @@ func (client CertificateClient) ListByAutomationAccount(ctx context.Context, aut } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +363,24 @@ func (client CertificateClient) listByAutomationAccountNextResults(lastResults C } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CertificateListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a certificate. // -// automationAccountName is the automation account name. certificateName is the parameters supplied to the update -// certificate operation. parameters is the parameters supplied to the update certificate operation. -func (client CertificateClient) Update(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the parameters supplied to the update certificate operation. parameters is the parameters +// supplied to the update certificate operation. +func (client CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, certificateName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Update", nil, "Failure preparing request") return @@ -399,11 +402,11 @@ func (client CertificateClient) Update(ctx context.Context, automationAccountNam } // UpdatePreparer prepares the Update request. -func (client CertificateClient) UpdatePreparer(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { +func (client CertificateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/client.go b/services/automation/mgmt/2015-10-31/automation/client.go index b66b006734a9..707fd618586a 100644 --- a/services/automation/mgmt/2015-10-31/automation/client.go +++ b/services/automation/mgmt/2015-10-31/automation/client.go @@ -32,22 +32,20 @@ const ( // BaseClient is the base client for Automation. type BaseClient struct { autorest.Client - BaseURI string - SubscriptionID string - ResourceGroupName string + BaseURI string + SubscriptionID string } // New creates an instance of the BaseClient client. -func New(subscriptionID string, resourceGroupName string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) } // NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) BaseClient { +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - ResourceGroupName: resourceGroupName, + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, } } diff --git a/services/automation/mgmt/2015-10-31/automation/connection.go b/services/automation/mgmt/2015-10-31/automation/connection.go index 261940c093b8..39287927d6eb 100644 --- a/services/automation/mgmt/2015-10-31/automation/connection.go +++ b/services/automation/mgmt/2015-10-31/automation/connection.go @@ -31,23 +31,24 @@ type ConnectionClient struct { } // NewConnectionClient creates an instance of the ConnectionClient client. -func NewConnectionClient(subscriptionID string, resourceGroupName string) ConnectionClient { - return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewConnectionClient(subscriptionID string) ConnectionClient { + return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. -func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ConnectionClient { - return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { + return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a connection. // -// automationAccountName is the automation account name. connectionName is the parameters supplied to the create or -// update connection operation. parameters is the parameters supplied to the create or update connection operation. -func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the parameters supplied to the create or update connection operation. parameters is the +// parameters supplied to the create or update connection operation. +func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -55,7 +56,7 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAcc return result, validation.NewError("automation.ConnectionClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -77,11 +78,11 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAcc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,15 +123,16 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the connection. // -// automationAccountName is the automation account name. connectionName is the name of connection. -func (client ConnectionClient) Delete(ctx context.Context, automationAccountName string, connectionName string) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the name of connection. +func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, connectionName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Delete", nil, "Failure preparing request") return @@ -152,11 +154,11 @@ func (client ConnectionClient) Delete(ctx context.Context, automationAccountName } // DeletePreparer prepares the Delete request. -func (client ConnectionClient) DeletePreparer(ctx context.Context, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +197,16 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn // Get retrieve the connection identified by connection name. // -// automationAccountName is the automation account name. connectionName is the name of connection. -func (client ConnectionClient) Get(ctx context.Context, automationAccountName string, connectionName string) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the name of connection. +func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, connectionName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Get", nil, "Failure preparing request") return @@ -225,11 +228,11 @@ func (client ConnectionClient) Get(ctx context.Context, automationAccountName st } // GetPreparer prepares the Get request. -func (client ConnectionClient) GetPreparer(ctx context.Context, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +271,16 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect // ListByAutomationAccount retrieve a list of connections. // -// automationAccountName is the automation account name. -func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +302,10 @@ func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, auto } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +364,24 @@ func (client ConnectionClient) listByAutomationAccountNextResults(lastResults Co } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a connection. // -// automationAccountName is the automation account name. connectionName is the parameters supplied to the update a -// connection operation. parameters is the parameters supplied to the update a connection operation. -func (client ConnectionClient) Update(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the parameters supplied to the update a connection operation. parameters is the parameters +// supplied to the update a connection operation. +func (client ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, connectionName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Update", nil, "Failure preparing request") return @@ -399,11 +403,11 @@ func (client ConnectionClient) Update(ctx context.Context, automationAccountName } // UpdatePreparer prepares the Update request. -func (client ConnectionClient) UpdatePreparer(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/connectiontype.go b/services/automation/mgmt/2015-10-31/automation/connectiontype.go index e0d78201d71d..a5ce642d08d0 100644 --- a/services/automation/mgmt/2015-10-31/automation/connectiontype.go +++ b/services/automation/mgmt/2015-10-31/automation/connectiontype.go @@ -31,24 +31,24 @@ type ConnectionTypeClient struct { } // NewConnectionTypeClient creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClient(subscriptionID string, resourceGroupName string) ConnectionTypeClient { - return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { + return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ConnectionTypeClient { - return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { + return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a connectiontype. // -// automationAccountName is the automation account name. connectionTypeName is the parameters supplied to the -// create or update connectiontype operation. parameters is the parameters supplied to the create or update -// connectiontype operation. -func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is +// the parameters supplied to the create or update connectiontype operation. +func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionTypeCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -56,7 +56,7 @@ func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automatio return result, validation.NewError("automation.ConnectionTypeClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionTypeName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +78,11 @@ func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automatio } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,15 +123,16 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete the connectiontype. // -// automationAccountName is the automation account name. connectionTypeName is the name of connectiontype. -func (client ConnectionTypeClient) Delete(ctx context.Context, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. +func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, connectionTypeName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Delete", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client ConnectionTypeClient) Delete(ctx context.Context, automationAccount } // DeletePreparer prepares the Delete request. -func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +196,16 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result // Get retrieve the connectiontype identified by connectiontype name. // -// automationAccountName is the automation account name. connectionTypeName is the name of connectiontype. -func (client ConnectionTypeClient) Get(ctx context.Context, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. +func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, connectionTypeName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Get", nil, "Failure preparing request") return @@ -225,11 +227,11 @@ func (client ConnectionTypeClient) Get(ctx context.Context, automationAccountNam } // GetPreparer prepares the Get request. -func (client ConnectionTypeClient) GetPreparer(ctx context.Context, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +270,16 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con // ListByAutomationAccount retrieve a list of connectiontypes. // -// automationAccountName is the automation account name. -func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +301,10 @@ func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,7 +363,7 @@ func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResult } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2015-10-31/automation/credential.go b/services/automation/mgmt/2015-10-31/automation/credential.go index 93e562ee2899..11f696368414 100644 --- a/services/automation/mgmt/2015-10-31/automation/credential.go +++ b/services/automation/mgmt/2015-10-31/automation/credential.go @@ -31,23 +31,24 @@ type CredentialClient struct { } // NewCredentialClient creates an instance of the CredentialClient client. -func NewCredentialClient(subscriptionID string, resourceGroupName string) CredentialClient { - return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewCredentialClient(subscriptionID string) CredentialClient { + return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. -func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) CredentialClient { - return CredentialClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { + return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a credential. // -// automationAccountName is the automation account name. credentialName is the parameters supplied to the create or -// update credential operation. parameters is the parameters supplied to the create or update credential operation. -func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the parameters supplied to the create or update credential operation. parameters is the +// parameters supplied to the create or update credential operation. +func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CredentialCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -57,7 +58,7 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAcc return result, validation.NewError("automation.CredentialClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, credentialName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -79,11 +80,11 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAcc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { +func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -124,15 +125,16 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the credential. // -// automationAccountName is the automation account name. credentialName is the name of credential. -func (client CredentialClient) Delete(ctx context.Context, automationAccountName string, credentialName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the name of credential. +func (client CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, credentialName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +156,11 @@ func (client CredentialClient) Delete(ctx context.Context, automationAccountName } // DeletePreparer prepares the Delete request. -func (client CredentialClient) DeletePreparer(ctx context.Context, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +198,16 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto // Get retrieve the credential identified by credential name. // -// automationAccountName is the automation account name. credentialName is the name of credential. -func (client CredentialClient) Get(ctx context.Context, automationAccountName string, credentialName string) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the name of credential. +func (client CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, credentialName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Get", nil, "Failure preparing request") return @@ -226,11 +229,11 @@ func (client CredentialClient) Get(ctx context.Context, automationAccountName st } // GetPreparer prepares the Get request. -func (client CredentialClient) GetPreparer(ctx context.Context, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +272,16 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent // ListByAutomationAccount retrieve a list of credentials. // -// automationAccountName is the automation account name. -func (client CredentialClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CredentialListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client CredentialClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +303,10 @@ func (client CredentialClient) ListByAutomationAccount(ctx context.Context, auto } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,23 +365,24 @@ func (client CredentialClient) listByAutomationAccountNextResults(lastResults Cr } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CredentialListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a credential. // -// automationAccountName is the automation account name. credentialName is the parameters supplied to the Update -// credential operation. parameters is the parameters supplied to the Update credential operation. -func (client CredentialClient) Update(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the parameters supplied to the Update credential operation. parameters is the parameters +// supplied to the Update credential operation. +func (client CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, credentialName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Update", nil, "Failure preparing request") return @@ -400,11 +404,11 @@ func (client CredentialClient) Update(ctx context.Context, automationAccountName } // UpdatePreparer prepares the Update request. -func (client CredentialClient) UpdatePreparer(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { +func (client CredentialClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go b/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go index 5214a65330f5..148d7c66aebb 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go @@ -32,30 +32,31 @@ type DscCompilationJobClient struct { } // NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClient(subscriptionID string, resourceGroupName string) DscCompilationJobClient { - return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { + return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscCompilationJobClient { - return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { + return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates the Dsc compilation job of the configuration. // -// automationAccountName is the automation account name. compilationJobID is the the DSC configuration Id. -// parameters is the parameters supplied to the create compilation job operation. -func (client DscCompilationJobClient) Create(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// compilationJobID is the the DSC configuration Id. parameters is the parameters supplied to the create +// compilation job operation. +func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties.Configuration", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, compilationJobID, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, compilationJobID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Create", nil, "Failure preparing request") return @@ -77,11 +78,11 @@ func (client DscCompilationJobClient) Create(ctx context.Context, automationAcco } // CreatePreparer prepares the Create request. -func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { +func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "compilationJobId": autorest.Encode("path", compilationJobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,16 +123,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu // Get retrieve the Dsc configuration compilation job identified by job id. // -// automationAccountName is the automation account name. compilationJobID is the Dsc configuration compilation job -// id. -func (client DscCompilationJobClient) Get(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// compilationJobID is the Dsc configuration compilation job id. +func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, compilationJobID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, compilationJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Get", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client DscCompilationJobClient) Get(ctx context.Context, automationAccount } // GetPreparer prepares the Get request. -func (client DscCompilationJobClient) GetPreparer(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "compilationJobId": autorest.Encode("path", compilationJobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +197,16 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result // GetStream retrieve the job stream identified by job stream id. // -// automationAccountName is the automation account name. jobID is the job id. jobStreamID is the job stream id. -func (client DscCompilationJobClient) GetStream(ctx context.Context, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. jobStreamID is the job stream id. +func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "GetStream", err.Error()) } - req, err := client.GetStreamPreparer(ctx, automationAccountName, jobID, jobStreamID) + req, err := client.GetStreamPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "GetStream", nil, "Failure preparing request") return @@ -226,12 +228,12 @@ func (client DscCompilationJobClient) GetStream(ctx context.Context, automationA } // GetStreamPreparer prepares the GetStream request. -func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { +func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +272,17 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of dsc compilation jobs. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +304,10 @@ func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Contex } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -366,7 +369,7 @@ func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastRes } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } diff --git a/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go b/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go index 39f5236fe8fa..6e103018fe4c 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go @@ -32,26 +32,27 @@ type DscCompilationJobStreamClient struct { } // NewDscCompilationJobStreamClient creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClient(subscriptionID string, resourceGroupName string) DscCompilationJobStreamClient { - return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobStreamClient { + return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscCompilationJobStreamClient { - return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { + return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByJob retrieve all the job streams for the compilation Job. // -// automationAccountName is the automation account name. jobID is the job id. -func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobStreamClient", "ListByJob", err.Error()) } - req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID) + req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -73,11 +74,11 @@ func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, autom } // ListByJobPreparer prepares the ListByJob request. -func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go b/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go index 3c9716597392..26591ee4fad2 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go @@ -31,23 +31,24 @@ type DscConfigurationClient struct { } // NewDscConfigurationClient creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClient(subscriptionID string, resourceGroupName string) DscConfigurationClient { - return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { + return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscConfigurationClient { - return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { + return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the create or update parameters for -// configuration. parameters is the create or update parameters for configuration. -func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. +func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties.Source", Name: validation.Null, Rule: true, @@ -60,7 +61,7 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automat return result, validation.NewError("automation.DscConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, configurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, configurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +83,11 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automat } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +128,16 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response // Delete delete the dsc configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) Delete(ctx context.Context, automationAccountName string, configurationName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, configurationName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +159,11 @@ func (client DscConfigurationClient) Delete(ctx context.Context, automationAccou } // DeletePreparer prepares the Delete request. -func (client DscConfigurationClient) DeletePreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +201,16 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul // Get retrieve the configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) Get(ctx context.Context, automationAccountName string, configurationName string) (result DscConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, configurationName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Get", nil, "Failure preparing request") return @@ -229,11 +232,11 @@ func (client DscConfigurationClient) Get(ctx context.Context, automationAccountN } // GetPreparer prepares the Get request. -func (client DscConfigurationClient) GetPreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,15 +275,16 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D // GetContent retrieve the configuration script identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) GetContent(ctx context.Context, automationAccountName string, configurationName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, configurationName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "GetContent", nil, "Failure preparing request") return @@ -302,11 +306,11 @@ func (client DscConfigurationClient) GetContent(ctx context.Context, automationA } // GetContentPreparer prepares the GetContent request. -func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -345,16 +349,16 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of configurations. // -// automationAccountName is the automation account name. -func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result DscConfigurationListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -376,10 +380,10 @@ func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -438,7 +442,7 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result DscConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2015-10-31/automation/dscnode.go b/services/automation/mgmt/2015-10-31/automation/dscnode.go index d14439275762..a51206bccabe 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnode.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnode.go @@ -31,26 +31,27 @@ type DscNodeClient struct { } // NewDscNodeClient creates an instance of the DscNodeClient client. -func NewDscNodeClient(subscriptionID string, resourceGroupName string) DscNodeClient { - return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewDscNodeClient(subscriptionID string) DscNodeClient { + return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. -func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscNodeClient { - return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { + return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete delete the dsc node identified by node id. // -// automationAccountName is automation account name. nodeID is the node id. -func (client DscNodeClient) Delete(ctx context.Context, automationAccountName string, nodeID string) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the +// node id. +func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, nodeID) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Delete", nil, "Failure preparing request") return @@ -72,11 +73,11 @@ func (client DscNodeClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client DscNodeClient) DeletePreparer(ctx context.Context, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,15 +116,16 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode // Get retrieve the dsc node identified by node id. // -// automationAccountName is the automation account name. nodeID is the node id. -func (client DscNodeClient) Get(ctx context.Context, automationAccountName string, nodeID string) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the node id. +func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Get", nil, "Failure preparing request") return @@ -145,11 +147,11 @@ func (client DscNodeClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client DscNodeClient) GetPreparer(ctx context.Context, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -188,16 +190,17 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e // ListByAutomationAccount retrieve a list of dsc nodes. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -219,10 +222,10 @@ func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -284,23 +287,23 @@ func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update the dsc node. // -// automationAccountName is the automation account name. nodeID is parameters supplied to the update dsc node. -// parameters is parameters supplied to the update dsc node. -func (client DscNodeClient) Update(ctx context.Context, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node. +func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, nodeID, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Update", nil, "Failure preparing request") return @@ -322,11 +325,11 @@ func (client DscNodeClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client DscNodeClient) UpdatePreparer(ctx context.Context, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { +func (client DscNodeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go b/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go index cbefc2741380..e2684c9b1552 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go @@ -31,23 +31,24 @@ type DscNodeConfigurationClient struct { } // NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClient(subscriptionID string, resourceGroupName string) DscNodeConfigurationClient { - return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient { + return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscNodeConfigurationClient { - return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { + return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the node configuration identified by node configuration name. // -// automationAccountName is the automation account name. nodeConfigurationName is the create or update parameters -// for configuration. parameters is the create or update parameters for configuration. -func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. +func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Source.Hash", Name: validation.Null, Rule: false, @@ -60,7 +61,7 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, aut return result, validation.NewError("automation.DscNodeConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, nodeConfigurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +83,11 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, aut } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +128,16 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete the Dsc node configurations by node configuration. // -// automationAccountName is the automation account name. nodeConfigurationName is the Dsc node configuration name. -func (client DscNodeConfigurationClient) Delete(ctx context.Context, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. +func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, nodeConfigurationName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +159,11 @@ func (client DscNodeConfigurationClient) Delete(ctx context.Context, automationA } // DeletePreparer prepares the Delete request. -func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +201,16 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r // Get retrieve the Dsc node configurations by node configuration. // -// automationAccountName is the automation account name. nodeConfigurationName is the Dsc node configuration name. -func (client DscNodeConfigurationClient) Get(ctx context.Context, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. +func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeConfigurationName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Get", nil, "Failure preparing request") return @@ -229,11 +232,11 @@ func (client DscNodeConfigurationClient) Get(ctx context.Context, automationAcco } // GetPreparer prepares the Get request. -func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +275,17 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of dsc node configurations. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +307,10 @@ func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Con } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -368,7 +372,7 @@ func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(last } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } diff --git a/services/automation/mgmt/2015-10-31/automation/fields.go b/services/automation/mgmt/2015-10-31/automation/fields.go index 92b868b9cefd..756ad090d914 100644 --- a/services/automation/mgmt/2015-10-31/automation/fields.go +++ b/services/automation/mgmt/2015-10-31/automation/fields.go @@ -31,27 +31,27 @@ type FieldsClient struct { } // NewFieldsClient creates an instance of the FieldsClient client. -func NewFieldsClient(subscriptionID string, resourceGroupName string) FieldsClient { - return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewFieldsClient(subscriptionID string) FieldsClient { + return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. -func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) FieldsClient { - return FieldsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { + return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByType retrieve a list of fields of a given type identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. typeName is the name of -// type. -func (client FieldsClient) ListByType(ctx context.Context, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. typeName is the name of type. +func (client FieldsClient) ListByType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.FieldsClient", "ListByType", err.Error()) } - req, err := client.ListByTypePreparer(ctx, automationAccountName, moduleName, typeName) + req, err := client.ListByTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.FieldsClient", "ListByType", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client FieldsClient) ListByType(ctx context.Context, automationAccountName } // ListByTypePreparer prepares the ListByType request. -func (client FieldsClient) ListByTypePreparer(ctx context.Context, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client FieldsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } diff --git a/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go b/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go index bcc753901a24..d480a44178ce 100644 --- a/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go +++ b/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go @@ -31,27 +31,27 @@ type HybridRunbookWorkerGroupClient struct { } // NewHybridRunbookWorkerGroupClient creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClient(subscriptionID string, resourceGroupName string) HybridRunbookWorkerGroupClient { - return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorkerGroupClient { + return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) HybridRunbookWorkerGroupClient { - return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { + return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete delete a hybrid runbook worker group. // -// automationAccountName is automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name -func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Delete", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, automat } // DeletePreparer prepares the Delete request. -func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,16 +115,16 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response // Get retrieve a hybrid runbook worker group. // -// automationAccountName is the automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name -func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Get", nil, "Failure preparing request") return @@ -146,11 +146,11 @@ func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, automation } // GetPreparer prepares the Get request. -func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -189,16 +189,16 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) ( // ListByAutomationAccount retrieve a list of hybrid runbook worker groups. // -// automationAccountName is the automation account name. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -220,10 +220,10 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -282,23 +282,24 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults( } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a hybrid runbook worker group. // -// automationAccountName is the automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name parameters is the hybrid runbook worker group -func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker +// group +func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Update", nil, "Failure preparing request") return @@ -320,11 +321,11 @@ func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, automat } // UpdatePreparer prepares the Update request. -func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/job.go b/services/automation/mgmt/2015-10-31/automation/job.go index 62b294797d1d..72cd180f957b 100644 --- a/services/automation/mgmt/2015-10-31/automation/job.go +++ b/services/automation/mgmt/2015-10-31/automation/job.go @@ -32,30 +32,30 @@ type JobClient struct { } // NewJobClient creates an instance of the JobClient client. -func NewJobClient(subscriptionID string, resourceGroupName string) JobClient { - return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewJobClient(subscriptionID string) JobClient { + return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobClientWithBaseURI creates an instance of the JobClient client. -func NewJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobClient { - return JobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { + return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a job of the runbook. // -// automationAccountName is the automation account name. jobID is the job id. parameters is the parameters supplied -// to the create job operation. -func (client JobClient) Create(ctx context.Context, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. parameters is the parameters supplied to the create job operation. +func (client JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobCreateProperties.Runbook", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, jobID, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Create", nil, "Failure preparing request") return @@ -77,11 +77,11 @@ func (client JobClient) Create(ctx context.Context, automationAccountName string } // CreatePreparer prepares the Create request. -func (client JobClient) CreatePreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (*http.Request, error) { +func (client JobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,15 +122,16 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er // Get retrieve the job identified by job id. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) Get(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result Job, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, jobID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Get", nil, "Failure preparing request") return @@ -152,11 +153,11 @@ func (client JobClient) Get(ctx context.Context, automationAccountName string, j } // GetPreparer prepares the Get request. -func (client JobClient) GetPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +196,16 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error // GetOutput retrieve the job output identified by job id. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) GetOutput(ctx context.Context, automationAccountName string, jobID string) (result ReadCloser, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetOutput", err.Error()) } - req, err := client.GetOutputPreparer(ctx, automationAccountName, jobID) + req, err := client.GetOutputPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetOutput", nil, "Failure preparing request") return @@ -225,11 +227,11 @@ func (client JobClient) GetOutput(ctx context.Context, automationAccountName str } // GetOutputPreparer prepares the GetOutput request. -func (client JobClient) GetOutputPreparer(ctx context.Context, automationAccountName string, jobID string) (*http.Request, error) { +func (client JobClient) GetOutputPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -267,15 +269,16 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos // GetRunbookContent retrieve the runbook content of the job identified by job id. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) GetRunbookContent(ctx context.Context, automationAccountName string, jobID string) (result ReadCloser, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetRunbookContent", err.Error()) } - req, err := client.GetRunbookContentPreparer(ctx, automationAccountName, jobID) + req, err := client.GetRunbookContentPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetRunbookContent", nil, "Failure preparing request") return @@ -297,11 +300,11 @@ func (client JobClient) GetRunbookContent(ctx context.Context, automationAccount } // GetRunbookContentPreparer prepares the GetRunbookContent request. -func (client JobClient) GetRunbookContentPreparer(ctx context.Context, automationAccountName string, jobID string) (*http.Request, error) { +func (client JobClient) GetRunbookContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -339,16 +342,17 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result // ListByAutomationAccount retrieve a list of jobs. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client JobClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result JobListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -370,10 +374,10 @@ func (client JobClient) ListByAutomationAccount(ctx context.Context, automationA } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -435,22 +439,23 @@ func (client JobClient) listByAutomationAccountNextResults(lastResults JobListRe } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result JobListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Resume resume the job identified by jobId. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) Resume(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, automationAccountName, jobID) + req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Resume", nil, "Failure preparing request") return @@ -472,11 +477,11 @@ func (client JobClient) Resume(ctx context.Context, automationAccountName string } // ResumePreparer prepares the Resume request. -func (client JobClient) ResumePreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -514,15 +519,16 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re // Stop stop the job identified by jobId. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) Stop(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, automationAccountName, jobID) + req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Stop", nil, "Failure preparing request") return @@ -544,11 +550,11 @@ func (client JobClient) Stop(ctx context.Context, automationAccountName string, } // StopPreparer prepares the Stop request. -func (client JobClient) StopPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -586,15 +592,16 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp // Suspend suspend the job identified by jobId. // -// automationAccountName is the automation account name. jobID is the job id. -func (client JobClient) Suspend(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, automationAccountName, jobID) + req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Suspend", nil, "Failure preparing request") return @@ -616,11 +623,11 @@ func (client JobClient) Suspend(ctx context.Context, automationAccountName strin } // SuspendPreparer prepares the Suspend request. -func (client JobClient) SuspendPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/jobschedule.go b/services/automation/mgmt/2015-10-31/automation/jobschedule.go index 0c68c574bd96..fdcd16cb4515 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobschedule.go +++ b/services/automation/mgmt/2015-10-31/automation/jobschedule.go @@ -32,23 +32,24 @@ type JobScheduleClient struct { } // NewJobScheduleClient creates an instance of the JobScheduleClient client. -func NewJobScheduleClient(subscriptionID string, resourceGroupName string) JobScheduleClient { - return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewJobScheduleClient(subscriptionID string) JobScheduleClient { + return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. -func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobScheduleClient { - return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { + return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a job schedule. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. parameters is the -// parameters supplied to the create job schedule operation. -func (client JobScheduleClient) Create(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. parameters is the parameters supplied to the create job schedule +// operation. +func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties.Schedule", Name: validation.Null, Rule: true, Chain: nil}, @@ -57,7 +58,7 @@ func (client JobScheduleClient) Create(ctx context.Context, automationAccountNam return result, validation.NewError("automation.JobScheduleClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, jobScheduleID, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Create", nil, "Failure preparing request") return @@ -79,11 +80,11 @@ func (client JobScheduleClient) Create(ctx context.Context, automationAccountNam } // CreatePreparer prepares the Create request. -func (client JobScheduleClient) CreatePreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { +func (client JobScheduleClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -124,15 +125,16 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job // Delete delete the job schedule identified by job schedule name. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. -func (client JobScheduleClient) Delete(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. +func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, jobScheduleID) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +156,11 @@ func (client JobScheduleClient) Delete(ctx context.Context, automationAccountNam } // DeletePreparer prepares the Delete request. -func (client JobScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +198,16 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the job schedule identified by job schedule name. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. -func (client JobScheduleClient) Get(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. +func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, jobScheduleID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Get", nil, "Failure preparing request") return @@ -226,11 +229,11 @@ func (client JobScheduleClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client JobScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +272,16 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch // ListByAutomationAccount retrieve a list of job schedules. // -// automationAccountName is the automation account name. -func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result JobScheduleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +303,10 @@ func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, aut } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,7 +365,7 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result JobScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2015-10-31/automation/jobstream.go b/services/automation/mgmt/2015-10-31/automation/jobstream.go index bf6ec2513774..71d0b27fbbe3 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/jobstream.go @@ -31,26 +31,27 @@ type JobStreamClient struct { } // NewJobStreamClient creates an instance of the JobStreamClient client. -func NewJobStreamClient(subscriptionID string, resourceGroupName string) JobStreamClient { - return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewJobStreamClient(subscriptionID string) JobStreamClient { + return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. -func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobStreamClient { - return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { + return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the job stream identified by job stream id. // -// automationAccountName is the automation account name. jobID is the job id. jobStreamID is the job stream id. -func (client JobStreamClient) Get(ctx context.Context, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. jobStreamID is the job stream id. +func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, jobID, jobStreamID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "Get", nil, "Failure preparing request") return @@ -72,12 +73,12 @@ func (client JobStreamClient) Get(ctx context.Context, automationAccountName str } // GetPreparer prepares the Get request. -func (client JobStreamClient) GetPreparer(ctx context.Context, automationAccountName string, jobID string, jobStreamID string) (*http.Request, error) { +func (client JobStreamClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,17 +117,17 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea // ListByJob retrieve a list of jobs streams identified by job id. // -// automationAccountName is the automation account name. jobID is the job Id. filter is the filter to apply on the -// operation. -func (client JobStreamClient) ListByJob(ctx context.Context, automationAccountName string, jobID string, filter string) (result JobStreamListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job Id. filter is the filter to apply on the operation. +func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "ListByJob", err.Error()) } result.fn = client.listByJobNextResults - req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID, filter) + req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -148,11 +149,11 @@ func (client JobStreamClient) ListByJob(ctx context.Context, automationAccountNa } // ListByJobPreparer prepares the ListByJob request. -func (client JobStreamClient) ListByJobPreparer(ctx context.Context, automationAccountName string, jobID string, filter string) (*http.Request, error) { +func (client JobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -214,7 +215,7 @@ func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResu } // ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobStreamClient) ListByJobComplete(ctx context.Context, automationAccountName string, jobID string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByJob(ctx, automationAccountName, jobID, filter) +func (client JobStreamClient) ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResultIterator, err error) { + result.page, err = client.ListByJob(ctx, resourceGroupName, automationAccountName, jobID, filter) return } diff --git a/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go b/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go index dcab2051b0bd..07bd7f664551 100644 --- a/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go +++ b/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go @@ -31,26 +31,26 @@ type LinkedWorkspaceClient struct { } // NewLinkedWorkspaceClient creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClient(subscriptionID string, resourceGroupName string) LinkedWorkspaceClient { - return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { + return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) LinkedWorkspaceClient { - return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { + return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the linked workspace for the account id. // -// automationAccountName is the automation account name. -func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountName string) (result LinkedWorkspace, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result LinkedWorkspace, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.LinkedWorkspaceClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.LinkedWorkspaceClient", "Get", nil, "Failure preparing request") return @@ -72,10 +72,10 @@ func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountNa } // GetPreparer prepares the Get request. -func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/module.go b/services/automation/mgmt/2015-10-31/automation/module.go index fb42da58014a..929cc72ca68b 100644 --- a/services/automation/mgmt/2015-10-31/automation/module.go +++ b/services/automation/mgmt/2015-10-31/automation/module.go @@ -31,23 +31,23 @@ type ModuleClient struct { } // NewModuleClient creates an instance of the ModuleClient client. -func NewModuleClient(subscriptionID string, resourceGroupName string) ModuleClient { - return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewModuleClient(subscriptionID string) ModuleClient { + return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewModuleClientWithBaseURI creates an instance of the ModuleClient client. -func NewModuleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ModuleClient { - return ModuleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { + return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or Update the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. parameters is the create -// or update parameters for module. -func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. parameters is the create or update parameters for module. +func (client ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties.ContentLink", Name: validation.Null, Rule: true, @@ -60,7 +60,7 @@ func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccount return result, validation.NewError("automation.ModuleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, moduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +82,11 @@ func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccount } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { +func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +127,16 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the module by name. // -// automationAccountName is the automation account name. moduleName is the module name. -func (client ModuleClient) Delete(ctx context.Context, automationAccountName string, moduleName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the module name. +func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, moduleName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +158,11 @@ func (client ModuleClient) Delete(ctx context.Context, automationAccountName str } // DeletePreparer prepares the Delete request. -func (client ModuleClient) DeletePreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +200,16 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest // Get retrieve the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the module name. -func (client ModuleClient) Get(ctx context.Context, automationAccountName string, moduleName string) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the module name. +func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, moduleName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Get", nil, "Failure preparing request") return @@ -229,11 +231,11 @@ func (client ModuleClient) Get(ctx context.Context, automationAccountName string } // GetPreparer prepares the Get request. -func (client ModuleClient) GetPreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +274,16 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err // ListByAutomationAccount retrieve a list of modules. // -// automationAccountName is the automation account name. -func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ModuleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +305,10 @@ func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automati } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,23 +367,23 @@ func (client ModuleClient) listByAutomationAccountNextResults(lastResults Module } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ModuleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. parameters is the update -// parameters for module. -func (client ModuleClient) Update(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. parameters is the update parameters for module. +func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, moduleName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Update", nil, "Failure preparing request") return @@ -403,11 +405,11 @@ func (client ModuleClient) Update(ctx context.Context, automationAccountName str } // UpdatePreparer prepares the Update request. -func (client ModuleClient) UpdatePreparer(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { +func (client ModuleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/nodereports.go b/services/automation/mgmt/2015-10-31/automation/nodereports.go index 124a66128fca..2cdc9b7ee487 100644 --- a/services/automation/mgmt/2015-10-31/automation/nodereports.go +++ b/services/automation/mgmt/2015-10-31/automation/nodereports.go @@ -31,26 +31,27 @@ type NodeReportsClient struct { } // NewNodeReportsClient creates an instance of the NodeReportsClient client. -func NewNodeReportsClient(subscriptionID string, resourceGroupName string) NodeReportsClient { - return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewNodeReportsClient(subscriptionID string) NodeReportsClient { + return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. -func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) NodeReportsClient { - return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { + return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the Dsc node report data by node id and report id. // -// automationAccountName is the automation account name. nodeID is the Dsc node id. reportID is the report id. -func (client NodeReportsClient) Get(ctx context.Context, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the Dsc node id. reportID is the report id. +func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeID, reportID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "Get", nil, "Failure preparing request") return @@ -72,12 +73,12 @@ func (client NodeReportsClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client NodeReportsClient) GetPreparer(ctx context.Context, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), "reportId": autorest.Encode("path", reportID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,15 +117,16 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod // GetContent retrieve the Dsc node reports by node id and report id. // -// automationAccountName is the automation account name. nodeID is the Dsc node id. reportID is the report id. -func (client NodeReportsClient) GetContent(ctx context.Context, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the Dsc node id. reportID is the report id. +func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, nodeID, reportID) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "GetContent", nil, "Failure preparing request") return @@ -146,12 +148,12 @@ func (client NodeReportsClient) GetContent(ctx context.Context, automationAccoun } // GetContentPreparer prepares the GetContent request. -func (client NodeReportsClient) GetContentPreparer(ctx context.Context, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), "reportId": autorest.Encode("path", reportID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,17 +192,17 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result // ListByNode retrieve the Dsc node report list by node id. // -// automationAccountName is the automation account name. nodeID is the parameters supplied to the list operation. -// filter is the filter to apply on the operation. -func (client NodeReportsClient) ListByNode(ctx context.Context, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the parameters supplied to the list operation. filter is the filter to apply on the operation. +func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "ListByNode", err.Error()) } result.fn = client.listByNodeNextResults - req, err := client.ListByNodePreparer(ctx, automationAccountName, nodeID, filter) + req, err := client.ListByNodePreparer(ctx, resourceGroupName, automationAccountName, nodeID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "ListByNode", nil, "Failure preparing request") return @@ -222,11 +224,11 @@ func (client NodeReportsClient) ListByNode(ctx context.Context, automationAccoun } // ListByNodePreparer prepares the ListByNode request. -func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, automationAccountName string, nodeID string, filter string) (*http.Request, error) { +func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -288,7 +290,7 @@ func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportL } // ListByNodeComplete enumerates all values, automatically crossing page boundaries as required. -func (client NodeReportsClient) ListByNodeComplete(ctx context.Context, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultIterator, err error) { - result.page, err = client.ListByNode(ctx, automationAccountName, nodeID, filter) +func (client NodeReportsClient) ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultIterator, err error) { + result.page, err = client.ListByNode(ctx, resourceGroupName, automationAccountName, nodeID, filter) return } diff --git a/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go b/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go index 79064f031ac2..80f1cb735be0 100644 --- a/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go +++ b/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go @@ -31,27 +31,27 @@ type ObjectDataTypesClient struct { } // NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClient(subscriptionID string, resourceGroupName string) ObjectDataTypesClient { - return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { + return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ObjectDataTypesClient { - return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { + return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. typeName is the name of -// type. -func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. typeName is the name of type. +func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", err.Error()) } - req, err := client.ListFieldsByModuleAndTypePreparer(ctx, automationAccountName, moduleName, typeName) + req, err := client.ListFieldsByModuleAndTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Contex } // ListFieldsByModuleAndTypePreparer prepares the ListFieldsByModuleAndType request. -func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } @@ -117,15 +117,16 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt // ListFieldsByType retrieve a list of fields of a given type across all accessible modules. // -// automationAccountName is the automation account name. typeName is the name of type. -func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is +// the name of type. +func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByType", err.Error()) } - req, err := client.ListFieldsByTypePreparer(ctx, automationAccountName, typeName) + req, err := client.ListFieldsByTypePreparer(ctx, resourceGroupName, automationAccountName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByType", nil, "Failure preparing request") return @@ -147,10 +148,10 @@ func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, automa } // ListFieldsByTypePreparer prepares the ListFieldsByType request. -func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, automationAccountName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } diff --git a/services/automation/mgmt/2015-10-31/automation/operations.go b/services/automation/mgmt/2015-10-31/automation/operations.go index facdcde19b97..b731c2d30ea0 100644 --- a/services/automation/mgmt/2015-10-31/automation/operations.go +++ b/services/automation/mgmt/2015-10-31/automation/operations.go @@ -30,13 +30,13 @@ type OperationsClient struct { } // NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string, resourceGroupName string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List lists all of the available Automation REST API operations. diff --git a/services/automation/mgmt/2015-10-31/automation/runbook.go b/services/automation/mgmt/2015-10-31/automation/runbook.go index f639860e7857..fc316a1d7c9a 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbook.go +++ b/services/automation/mgmt/2015-10-31/automation/runbook.go @@ -31,23 +31,24 @@ type RunbookClient struct { } // NewRunbookClient creates an instance of the RunbookClient client. -func NewRunbookClient(subscriptionID string, resourceGroupName string) RunbookClient { - return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewRunbookClient(subscriptionID string) RunbookClient { + return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. -func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) RunbookClient { - return RunbookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { + return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. parameters is the create -// or update parameters for runbook. Provide either content link for a published runbook or draft, not both. -func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. parameters is the create or update parameters for runbook. Provide either content link for +// a published runbook or draft, not both. +func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties.Draft", Name: validation.Null, Rule: false, @@ -68,7 +69,7 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccoun return result, validation.NewError("automation.RunbookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -90,10 +91,10 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccoun } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { +func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -135,15 +136,16 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the runbook by name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) Delete(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, runbookName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Delete", nil, "Failure preparing request") return @@ -165,10 +167,10 @@ func (client RunbookClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client RunbookClient) DeletePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -207,15 +209,16 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores // Get retrieve the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Get", nil, "Failure preparing request") return @@ -237,10 +240,10 @@ func (client RunbookClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client RunbookClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -280,15 +283,16 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e // GetContent retrieve the content of runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) GetContent(ctx context.Context, automationAccountName string, runbookName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "GetContent", nil, "Failure preparing request") return @@ -310,10 +314,10 @@ func (client RunbookClient) GetContent(ctx context.Context, automationAccountNam } // GetContentPreparer prepares the GetContent request. -func (client RunbookClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -353,16 +357,16 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Str // ListByAutomationAccount retrieve a list of runbooks. // -// automationAccountName is the automation account name. -func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result RunbookListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -384,10 +388,10 @@ func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -446,23 +450,23 @@ func (client RunbookClient) listByAutomationAccountNextResults(lastResults Runbo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result RunbookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. parameters is the update -// parameters for runbook. -func (client RunbookClient) Update(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. parameters is the update parameters for runbook. +func (client RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Update", nil, "Failure preparing request") return @@ -484,10 +488,10 @@ func (client RunbookClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client RunbookClient) UpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { +func (client RunbookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/runbookdraft.go b/services/automation/mgmt/2015-10-31/automation/runbookdraft.go index 2df6d5e62cef..b1bcf9e2ef5c 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbookdraft.go +++ b/services/automation/mgmt/2015-10-31/automation/runbookdraft.go @@ -31,26 +31,27 @@ type RunbookDraftClient struct { } // NewRunbookDraftClient creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClient(subscriptionID string, resourceGroupName string) RunbookDraftClient { - return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { + return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) RunbookDraftClient { - return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { + return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the runbook draft identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraft, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Get", nil, "Failure preparing request") return @@ -72,10 +73,10 @@ func (client RunbookDraftClient) Get(ctx context.Context, automationAccountName } // GetPreparer prepares the Get request. -func (client RunbookDraftClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,15 +116,16 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo // GetContent retrieve the content of runbook draft identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) GetContent(ctx context.Context, automationAccountName string, runbookName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "GetContent", nil, "Failure preparing request") return @@ -145,10 +147,10 @@ func (client RunbookDraftClient) GetContent(ctx context.Context, automationAccou } // GetContentPreparer prepares the GetContent request. -func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -188,16 +190,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul // Publish publish runbook draft. // -// automationAccountName is the automation account name. runbookName is the parameters supplied to the publish -// runbook operation. -func (client RunbookDraftClient) Publish(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the parameters supplied to the publish runbook operation. +func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Publish", err.Error()) } - req, err := client.PublishPreparer(ctx, automationAccountName, runbookName) + req, err := client.PublishPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Publish", nil, "Failure preparing request") return @@ -213,10 +215,10 @@ func (client RunbookDraftClient) Publish(ctx context.Context, automationAccountN } // PublishPreparer prepares the Publish request. -func (client RunbookDraftClient) PublishPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) PublishPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -263,16 +265,16 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result a // ReplaceContent replaces the runbook draft content. // -// automationAccountName is the automation account name. runbookName is the runbook name. runbookContent is the -// runbook draft content. -func (client RunbookDraftClient) ReplaceContent(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (result RunbookDraftReplaceContentFuture, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. runbookContent is the runbook draft content. +func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (result RunbookDraftReplaceContentFuture, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "ReplaceContent", err.Error()) } - req, err := client.ReplaceContentPreparer(ctx, automationAccountName, runbookName, runbookContent) + req, err := client.ReplaceContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "ReplaceContent", nil, "Failure preparing request") return @@ -288,10 +290,10 @@ func (client RunbookDraftClient) ReplaceContent(ctx context.Context, automationA } // ReplaceContentPreparer prepares the ReplaceContent request. -func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { +func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -340,15 +342,16 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r // UndoEdit undo draft edit to last known published state identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) UndoEdit(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "UndoEdit", err.Error()) } - req, err := client.UndoEditPreparer(ctx, automationAccountName, runbookName) + req, err := client.UndoEditPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "UndoEdit", nil, "Failure preparing request") return @@ -370,10 +373,10 @@ func (client RunbookDraftClient) UndoEdit(ctx context.Context, automationAccount } // UndoEditPreparer prepares the UndoEdit request. -func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/schedule.go b/services/automation/mgmt/2015-10-31/automation/schedule.go index c64a63493f7e..ee673e96001e 100644 --- a/services/automation/mgmt/2015-10-31/automation/schedule.go +++ b/services/automation/mgmt/2015-10-31/automation/schedule.go @@ -31,23 +31,23 @@ type ScheduleClient struct { } // NewScheduleClient creates an instance of the ScheduleClient client. -func NewScheduleClient(subscriptionID string, resourceGroupName string) ScheduleClient { - return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewScheduleClient(subscriptionID string) ScheduleClient { + return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. -func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ScheduleClient { - return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { + return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a schedule. // -// automationAccountName is the automation account name. scheduleName is the schedule name. parameters is the -// parameters supplied to the create or update schedule operation. -func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. parameters is the parameters supplied to the create or update schedule operation. +func (client ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ScheduleCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -55,7 +55,7 @@ func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccou return result, validation.NewError("automation.ScheduleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, scheduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -77,10 +77,10 @@ func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,15 +122,16 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. -func (client ScheduleClient) Delete(ctx context.Context, automationAccountName string, scheduleName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. +func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, scheduleName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +153,10 @@ func (client ScheduleClient) Delete(ctx context.Context, automationAccountName s } // DeletePreparer prepares the Delete request. -func (client ScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -194,15 +195,16 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. -func (client ScheduleClient) Get(ctx context.Context, automationAccountName string, scheduleName string) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. +func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, scheduleName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Get", nil, "Failure preparing request") return @@ -224,10 +226,10 @@ func (client ScheduleClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client ScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -267,16 +269,16 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, // ListByAutomationAccount retrieve a list of schedules. // -// automationAccountName is the automation account name. -func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ScheduleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -298,10 +300,10 @@ func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automa } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -360,23 +362,23 @@ func (client ScheduleClient) listByAutomationAccountNextResults(lastResults Sche } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. parameters is the -// parameters supplied to the update schedule operation. -func (client ScheduleClient) Update(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. parameters is the parameters supplied to the update schedule operation. +func (client ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, scheduleName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Update", nil, "Failure preparing request") return @@ -398,10 +400,10 @@ func (client ScheduleClient) Update(ctx context.Context, automationAccountName s } // UpdatePreparer prepares the Update request. -func (client ScheduleClient) UpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/statistics.go b/services/automation/mgmt/2015-10-31/automation/statistics.go index f60511847be2..4ebfa7f129f5 100644 --- a/services/automation/mgmt/2015-10-31/automation/statistics.go +++ b/services/automation/mgmt/2015-10-31/automation/statistics.go @@ -31,13 +31,13 @@ type StatisticsClient struct { } // NewStatisticsClient creates an instance of the StatisticsClient client. -func NewStatisticsClient(subscriptionID string, resourceGroupName string) StatisticsClient { - return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewStatisticsClient(subscriptionID string) StatisticsClient { + return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. -func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) StatisticsClient { - return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { + return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByAutomationAccount retrieve the statistics for the account. diff --git a/services/automation/mgmt/2015-10-31/automation/testjob.go b/services/automation/mgmt/2015-10-31/automation/testjob.go index 6b821345ddbd..63af34493587 100644 --- a/services/automation/mgmt/2015-10-31/automation/testjob.go +++ b/services/automation/mgmt/2015-10-31/automation/testjob.go @@ -31,27 +31,28 @@ type TestJobClient struct { } // NewTestJobClient creates an instance of the TestJobClient client. -func NewTestJobClient(subscriptionID string, resourceGroupName string) TestJobClient { - return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewTestJobClient(subscriptionID string) TestJobClient { + return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. -func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) TestJobClient { - return TestJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { + return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a test job of the runbook. // -// automationAccountName is the automation account name. runbookName is the parameters supplied to the create test -// job operation. parameters is the parameters supplied to the create test job operation. -func (client TestJobClient) Create(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the parameters supplied to the create test job operation. parameters is the parameters supplied to the create +// test job operation. +func (client TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Create", nil, "Failure preparing request") return @@ -73,10 +74,10 @@ func (client TestJobClient) Create(ctx context.Context, automationAccountName st } // CreatePreparer prepares the Create request. -func (client TestJobClient) CreatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { +func (client TestJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -118,15 +119,16 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob // Get retrieve the test job for the specified runbook. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result TestJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Get", nil, "Failure preparing request") return @@ -148,10 +150,10 @@ func (client TestJobClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client TestJobClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -191,15 +193,16 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e // Resume resume the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Resume(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, automationAccountName, runbookName) + req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Resume", nil, "Failure preparing request") return @@ -221,10 +224,10 @@ func (client TestJobClient) Resume(ctx context.Context, automationAccountName st } // ResumePreparer prepares the Resume request. -func (client TestJobClient) ResumePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -263,15 +266,16 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores // Stop stop the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Stop(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, automationAccountName, runbookName) + req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Stop", nil, "Failure preparing request") return @@ -293,10 +297,10 @@ func (client TestJobClient) Stop(ctx context.Context, automationAccountName stri } // StopPreparer prepares the Stop request. -func (client TestJobClient) StopPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -335,15 +339,16 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest. // Suspend suspend the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Suspend(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, automationAccountName, runbookName) + req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Suspend", nil, "Failure preparing request") return @@ -365,10 +370,10 @@ func (client TestJobClient) Suspend(ctx context.Context, automationAccountName s } // SuspendPreparer prepares the Suspend request. -func (client TestJobClient) SuspendPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/testjobstreams.go b/services/automation/mgmt/2015-10-31/automation/testjobstreams.go index 934834348282..5c7f9707cb26 100644 --- a/services/automation/mgmt/2015-10-31/automation/testjobstreams.go +++ b/services/automation/mgmt/2015-10-31/automation/testjobstreams.go @@ -31,27 +31,27 @@ type TestJobStreamsClient struct { } // NewTestJobStreamsClient creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClient(subscriptionID string, resourceGroupName string) TestJobStreamsClient { - return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { + return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) TestJobStreamsClient { - return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { + return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve a test job stream of the test job identified by runbook name and stream id. // -// automationAccountName is the automation account name. runbookName is the runbook name. jobStreamID is the job -// stream id. -func (client TestJobStreamsClient) Get(ctx context.Context, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. jobStreamID is the job stream id. +func (client TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName, jobStreamID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobStreamsClient", "Get", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client TestJobStreamsClient) Get(ctx context.Context, automationAccountNam } // GetPreparer prepares the Get request. -func (client TestJobStreamsClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { +func (client TestJobStreamsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,17 +117,17 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job // ListByTestJob retrieve a list of test job streams identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. filter is the filter to -// apply on the operation. -func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. filter is the filter to apply on the operation. +func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "ListByTestJob", err.Error()) } result.fn = client.listByTestJobNextResults - req, err := client.ListByTestJobPreparer(ctx, automationAccountName, runbookName, filter) + req, err := client.ListByTestJobPreparer(ctx, resourceGroupName, automationAccountName, runbookName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobStreamsClient", "ListByTestJob", nil, "Failure preparing request") return @@ -149,10 +149,10 @@ func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, automation } // ListByTestJobPreparer prepares the ListByTestJob request. -func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, automationAccountName string, runbookName string, filter string) (*http.Request, error) { +func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -215,7 +215,7 @@ func (client TestJobStreamsClient) listByTestJobNextResults(lastResults JobStrea } // ListByTestJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client TestJobStreamsClient) ListByTestJobComplete(ctx context.Context, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByTestJob(ctx, automationAccountName, runbookName, filter) +func (client TestJobStreamsClient) ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { + result.page, err = client.ListByTestJob(ctx, resourceGroupName, automationAccountName, runbookName, filter) return } diff --git a/services/automation/mgmt/2015-10-31/automation/usages.go b/services/automation/mgmt/2015-10-31/automation/usages.go index 51382ba0f0d3..9c8726a20aef 100644 --- a/services/automation/mgmt/2015-10-31/automation/usages.go +++ b/services/automation/mgmt/2015-10-31/automation/usages.go @@ -31,13 +31,13 @@ type UsagesClient struct { } // NewUsagesClient creates an instance of the UsagesClient client. -func NewUsagesClient(subscriptionID string, resourceGroupName string) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewUsagesClient(subscriptionID string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. -func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByAutomationAccount retrieve the usage for the account id. diff --git a/services/automation/mgmt/2015-10-31/automation/variable.go b/services/automation/mgmt/2015-10-31/automation/variable.go index 19382b701ccb..e957827d4a3f 100644 --- a/services/automation/mgmt/2015-10-31/automation/variable.go +++ b/services/automation/mgmt/2015-10-31/automation/variable.go @@ -31,30 +31,30 @@ type VariableClient struct { } // NewVariableClient creates an instance of the VariableClient client. -func NewVariableClient(subscriptionID string, resourceGroupName string) VariableClient { - return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewVariableClient(subscriptionID string) VariableClient { + return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewVariableClientWithBaseURI creates an instance of the VariableClient client. -func NewVariableClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) VariableClient { - return VariableClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { + return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a variable. // -// automationAccountName is the automation account name. variableName is the variable name. parameters is the -// parameters supplied to the create or update variable operation. -func (client VariableClient) CreateOrUpdate(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the variable name. parameters is the parameters supplied to the create or update variable operation. +func (client VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.VariableCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, variableName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -76,10 +76,10 @@ func (client VariableClient) CreateOrUpdate(ctx context.Context, automationAccou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { +func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -121,15 +121,16 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the variable. // -// automationAccountName is the automation account name. variableName is the name of variable. -func (client VariableClient) Delete(ctx context.Context, automationAccountName string, variableName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the name of variable. +func (client VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, variableName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Delete", nil, "Failure preparing request") return @@ -151,10 +152,10 @@ func (client VariableClient) Delete(ctx context.Context, automationAccountName s } // DeletePreparer prepares the Delete request. -func (client VariableClient) DeletePreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -193,15 +194,16 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the variable identified by variable name. // -// automationAccountName is the automation account name. variableName is the name of variable. -func (client VariableClient) Get(ctx context.Context, automationAccountName string, variableName string) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the name of variable. +func (client VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, variableName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Get", nil, "Failure preparing request") return @@ -223,10 +225,10 @@ func (client VariableClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client VariableClient) GetPreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -266,16 +268,16 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, // ListByAutomationAccount retrieve a list of variables. // -// automationAccountName is the automation account name. -func (client VariableClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result VariableListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client VariableClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -297,10 +299,10 @@ func (client VariableClient) ListByAutomationAccount(ctx context.Context, automa } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -359,23 +361,23 @@ func (client VariableClient) listByAutomationAccountNextResults(lastResults Vari } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result VariableListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a variable. // -// automationAccountName is the automation account name. variableName is the variable name. parameters is the -// parameters supplied to the update variable operation. -func (client VariableClient) Update(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the variable name. parameters is the parameters supplied to the update variable operation. +func (client VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, variableName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Update", nil, "Failure preparing request") return @@ -397,10 +399,10 @@ func (client VariableClient) Update(ctx context.Context, automationAccountName s } // UpdatePreparer prepares the Update request. -func (client VariableClient) UpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { +func (client VariableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } diff --git a/services/automation/mgmt/2015-10-31/automation/webhook.go b/services/automation/mgmt/2015-10-31/automation/webhook.go index 8d7502216fc0..e55131849aba 100644 --- a/services/automation/mgmt/2015-10-31/automation/webhook.go +++ b/services/automation/mgmt/2015-10-31/automation/webhook.go @@ -31,30 +31,30 @@ type WebhookClient struct { } // NewWebhookClient creates an instance of the WebhookClient client. -func NewWebhookClient(subscriptionID string, resourceGroupName string) WebhookClient { - return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) +func NewWebhookClient(subscriptionID string) WebhookClient { + return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. -func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) WebhookClient { - return WebhookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} +func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { + return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. parameters is the create -// or update parameters for webhook. -func (client WebhookClient) CreateOrUpdate(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. parameters is the create or update parameters for webhook. +func (client WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.WebhookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, webhookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -76,10 +76,10 @@ func (client WebhookClient) CreateOrUpdate(ctx context.Context, automationAccoun } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { +func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -121,15 +121,16 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the webhook by name. // -// automationAccountName is the automation account name. webhookName is the webhook name. -func (client WebhookClient) Delete(ctx context.Context, automationAccountName string, webhookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. +func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, webhookName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Delete", nil, "Failure preparing request") return @@ -151,10 +152,10 @@ func (client WebhookClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client WebhookClient) DeletePreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -193,15 +194,15 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores // GenerateURI generates a Uri for use in creating a webhook. // -// automationAccountName is the automation account name. -func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "GenerateURI", err.Error()) } - req, err := client.GenerateURIPreparer(ctx, automationAccountName) + req, err := client.GenerateURIPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "GenerateURI", nil, "Failure preparing request") return @@ -223,10 +224,10 @@ func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountNa } // GenerateURIPreparer prepares the GenerateURI request. -func (client WebhookClient) GenerateURIPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client WebhookClient) GenerateURIPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -265,15 +266,16 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St // Get retrieve the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. -func (client WebhookClient) Get(ctx context.Context, automationAccountName string, webhookName string) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. +func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, webhookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Get", nil, "Failure preparing request") return @@ -295,10 +297,10 @@ func (client WebhookClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client WebhookClient) GetPreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -338,16 +340,17 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e // ListByAutomationAccount retrieve a list of webhooks. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client WebhookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -369,10 +372,10 @@ func (client WebhookClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -434,23 +437,23 @@ func (client WebhookClient) listByAutomationAccountNextResults(lastResults Webho } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. parameters is the update -// parameters for webhook. -func (client WebhookClient) Update(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. parameters is the update parameters for webhook. +func (client WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, webhookName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Update", nil, "Failure preparing request") return @@ -472,10 +475,10 @@ func (client WebhookClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client WebhookClient) UpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { +func (client WebhookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/account.go b/services/automation/mgmt/2017-05-15-preview/automation/account.go index a4e47c2e24b2..037f73a92408 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/account.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/account.go @@ -31,13 +31,13 @@ type AccountClient struct { } // NewAccountClient creates an instance of the AccountClient client. -func NewAccountClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AccountClient { - return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewAccountClient(subscriptionID string) AccountClient { + return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewAccountClientWithBaseURI creates an instance of the AccountClient client. -func NewAccountClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AccountClient { - return AccountClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { + return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update automation account. diff --git a/services/automation/mgmt/2017-05-15-preview/automation/activity.go b/services/automation/mgmt/2017-05-15-preview/automation/activity.go index 2a2bae70e50a..ac9db9eb863f 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/activity.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/activity.go @@ -31,27 +31,27 @@ type ActivityClient struct { } // NewActivityClient creates an instance of the ActivityClient client. -func NewActivityClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ActivityClient { - return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewActivityClient(subscriptionID string) ActivityClient { + return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewActivityClientWithBaseURI creates an instance of the ActivityClient client. -func NewActivityClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ActivityClient { - return ActivityClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { + return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the activity in the module identified by module name and activity name. // -// automationAccountName is the automation account name. moduleName is the name of module. activityName is the name -// of activity. -func (client ActivityClient) Get(ctx context.Context, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. activityName is the name of activity. +func (client ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, moduleName, activityName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName, activityName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "Get", nil, "Failure preparing request") return @@ -73,12 +73,12 @@ func (client ActivityClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client ActivityClient) GetPreparer(ctx context.Context, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { +func (client ActivityClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "activityName": autorest.Encode("path", activityName), "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,16 +117,17 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, // ListByModule retrieve a list of activities in the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. -func (client ActivityClient) ListByModule(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. +func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "ListByModule", err.Error()) } result.fn = client.listByModuleNextResults - req, err := client.ListByModulePreparer(ctx, automationAccountName, moduleName) + req, err := client.ListByModulePreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "ListByModule", nil, "Failure preparing request") return @@ -148,11 +149,11 @@ func (client ActivityClient) ListByModule(ctx context.Context, automationAccount } // ListByModulePreparer prepares the ListByModule request. -func (client ActivityClient) ListByModulePreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ActivityClient) ListByModulePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -211,7 +212,7 @@ func (client ActivityClient) listByModuleNextResults(lastResults ActivityListRes } // ListByModuleComplete enumerates all values, automatically crossing page boundaries as required. -func (client ActivityClient) ListByModuleComplete(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { - result.page, err = client.ListByModule(ctx, automationAccountName, moduleName) +func (client ActivityClient) ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { + result.page, err = client.ListByModule(ctx, resourceGroupName, automationAccountName, moduleName) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go b/services/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go index 58919a1f72f7..365936df4f91 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go @@ -31,27 +31,27 @@ type AgentRegistrationInformationClient struct { } // NewAgentRegistrationInformationClient creates an instance of the AgentRegistrationInformationClient client. -func NewAgentRegistrationInformationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AgentRegistrationInformationClient { - return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrationInformationClient { + return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient // client. -func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AgentRegistrationInformationClient { - return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { + return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the automation agent registration information. // -// automationAccountName is the automation account name. -func (client AgentRegistrationInformationClient) Get(ctx context.Context, automationAccountName string) (result AgentRegistration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.AgentRegistrationInformationClient", "Get", nil, "Failure preparing request") return @@ -73,10 +73,10 @@ func (client AgentRegistrationInformationClient) Get(ctx context.Context, automa } // GetPreparer prepares the Get request. -func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,16 +115,16 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons // RegenerateKey regenerate a primary or secondary agent registration key // -// automationAccountName is the automation account name. parameters is the name of the agent registration key to be -// regenerated -func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters +// is the name of the agent registration key to be regenerated +func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "RegenerateKey", err.Error()) } - req, err := client.RegenerateKeyPreparer(ctx, automationAccountName, parameters) + req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, automationAccountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.AgentRegistrationInformationClient", "RegenerateKey", nil, "Failure preparing request") return @@ -146,10 +146,10 @@ func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Conte } // RegenerateKeyPreparer prepares the RegenerateKey request. -func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { +func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/certificate.go b/services/automation/mgmt/2017-05-15-preview/automation/certificate.go index b8d1f7c7fae0..11a65b7c908b 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/certificate.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/certificate.go @@ -31,24 +31,24 @@ type CertificateClient struct { } // NewCertificateClient creates an instance of the CertificateClient client. -func NewCertificateClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CertificateClient { - return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewCertificateClient(subscriptionID string) CertificateClient { + return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. -func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CertificateClient { - return CertificateClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { + return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a certificate. // -// automationAccountName is the automation account name. certificateName is the parameters supplied to the create -// or update certificate operation. parameters is the parameters supplied to the create or update certificate -// operation. -func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the parameters supplied to the create or update certificate operation. parameters is the +// parameters supplied to the create or update certificate operation. +func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CertificateCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -56,7 +56,7 @@ func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAc return result, validation.NewError("automation.CertificateClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, certificateName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +78,11 @@ func (client CertificateClient) CreateOrUpdate(ctx context.Context, automationAc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { +func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,15 +123,16 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete the certificate. // -// automationAccountName is the automation account name. certificateName is the name of certificate. -func (client CertificateClient) Delete(ctx context.Context, automationAccountName string, certificateName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the name of certificate. +func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, certificateName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Delete", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client CertificateClient) Delete(ctx context.Context, automationAccountNam } // DeletePreparer prepares the Delete request. -func (client CertificateClient) DeletePreparer(ctx context.Context, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +196,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the certificate identified by certificate name. // -// automationAccountName is the automation account name. certificateName is the name of certificate. -func (client CertificateClient) Get(ctx context.Context, automationAccountName string, certificateName string) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the name of certificate. +func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, certificateName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Get", nil, "Failure preparing request") return @@ -225,11 +227,11 @@ func (client CertificateClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client CertificateClient) GetPreparer(ctx context.Context, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +270,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif // ListByAutomationAccount retrieve a list of certificates. // -// automationAccountName is the automation account name. -func (client CertificateClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CertificateListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client CertificateClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +301,10 @@ func (client CertificateClient) ListByAutomationAccount(ctx context.Context, aut } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +363,24 @@ func (client CertificateClient) listByAutomationAccountNextResults(lastResults C } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CertificateListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a certificate. // -// automationAccountName is the automation account name. certificateName is the parameters supplied to the update -// certificate operation. parameters is the parameters supplied to the update certificate operation. -func (client CertificateClient) Update(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// certificateName is the parameters supplied to the update certificate operation. parameters is the parameters +// supplied to the update certificate operation. +func (client CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, certificateName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Update", nil, "Failure preparing request") return @@ -399,11 +402,11 @@ func (client CertificateClient) Update(ctx context.Context, automationAccountNam } // UpdatePreparer prepares the Update request. -func (client CertificateClient) UpdatePreparer(ctx context.Context, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { +func (client CertificateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "certificateName": autorest.Encode("path", certificateName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/client.go b/services/automation/mgmt/2017-05-15-preview/automation/client.go index 41f9a3766ab1..71700fb23f89 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/client.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/client.go @@ -32,26 +32,20 @@ const ( // BaseClient is the base client for Automation. type BaseClient struct { autorest.Client - BaseURI string - SubscriptionID string - ResourceGroupName string - ClientRequestID string - AutomationAccountName string + BaseURI string + SubscriptionID string } // New creates an instance of the BaseClient client. -func New(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) } // NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) BaseClient { +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - ResourceGroupName: resourceGroupName, - ClientRequestID: clientRequestID, - AutomationAccountName: automationAccountName, + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, } } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/connection.go b/services/automation/mgmt/2017-05-15-preview/automation/connection.go index a1942b416ecf..39287927d6eb 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/connection.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/connection.go @@ -31,23 +31,24 @@ type ConnectionClient struct { } // NewConnectionClient creates an instance of the ConnectionClient client. -func NewConnectionClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionClient { - return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewConnectionClient(subscriptionID string) ConnectionClient { + return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. -func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionClient { - return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { + return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a connection. // -// automationAccountName is the automation account name. connectionName is the parameters supplied to the create or -// update connection operation. parameters is the parameters supplied to the create or update connection operation. -func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the parameters supplied to the create or update connection operation. parameters is the +// parameters supplied to the create or update connection operation. +func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -55,7 +56,7 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAcc return result, validation.NewError("automation.ConnectionClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -77,11 +78,11 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, automationAcc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,15 +123,16 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the connection. // -// automationAccountName is the automation account name. connectionName is the name of connection. -func (client ConnectionClient) Delete(ctx context.Context, automationAccountName string, connectionName string) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the name of connection. +func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, connectionName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Delete", nil, "Failure preparing request") return @@ -152,11 +154,11 @@ func (client ConnectionClient) Delete(ctx context.Context, automationAccountName } // DeletePreparer prepares the Delete request. -func (client ConnectionClient) DeletePreparer(ctx context.Context, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +197,16 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn // Get retrieve the connection identified by connection name. // -// automationAccountName is the automation account name. connectionName is the name of connection. -func (client ConnectionClient) Get(ctx context.Context, automationAccountName string, connectionName string) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the name of connection. +func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, connectionName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Get", nil, "Failure preparing request") return @@ -225,11 +228,11 @@ func (client ConnectionClient) Get(ctx context.Context, automationAccountName st } // GetPreparer prepares the Get request. -func (client ConnectionClient) GetPreparer(ctx context.Context, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +271,16 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect // ListByAutomationAccount retrieve a list of connections. // -// automationAccountName is the automation account name. -func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +302,10 @@ func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, auto } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +364,24 @@ func (client ConnectionClient) listByAutomationAccountNextResults(lastResults Co } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a connection. // -// automationAccountName is the automation account name. connectionName is the parameters supplied to the update a -// connection operation. parameters is the parameters supplied to the update a connection operation. -func (client ConnectionClient) Update(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionName is the parameters supplied to the update a connection operation. parameters is the parameters +// supplied to the update a connection operation. +func (client ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, connectionName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Update", nil, "Failure preparing request") return @@ -399,11 +403,11 @@ func (client ConnectionClient) Update(ctx context.Context, automationAccountName } // UpdatePreparer prepares the Update request. -func (client ConnectionClient) UpdatePreparer(ctx context.Context, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/connectiontype.go b/services/automation/mgmt/2017-05-15-preview/automation/connectiontype.go index 1927502ef2e8..a5ce642d08d0 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/connectiontype.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/connectiontype.go @@ -31,24 +31,24 @@ type ConnectionTypeClient struct { } // NewConnectionTypeClient creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionTypeClient { - return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { + return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionTypeClient { - return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { + return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a connectiontype. // -// automationAccountName is the automation account name. connectionTypeName is the parameters supplied to the -// create or update connectiontype operation. parameters is the parameters supplied to the create or update -// connectiontype operation. -func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is +// the parameters supplied to the create or update connectiontype operation. +func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionTypeCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -56,7 +56,7 @@ func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automatio return result, validation.NewError("automation.ConnectionTypeClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionTypeName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +78,11 @@ func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, automatio } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,15 +123,16 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete the connectiontype. // -// automationAccountName is the automation account name. connectionTypeName is the name of connectiontype. -func (client ConnectionTypeClient) Delete(ctx context.Context, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. +func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, connectionTypeName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Delete", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client ConnectionTypeClient) Delete(ctx context.Context, automationAccount } // DeletePreparer prepares the Delete request. -func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,15 +196,16 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result // Get retrieve the connectiontype identified by connectiontype name. // -// automationAccountName is the automation account name. connectionTypeName is the name of connectiontype. -func (client ConnectionTypeClient) Get(ctx context.Context, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. +func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, connectionTypeName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Get", nil, "Failure preparing request") return @@ -225,11 +227,11 @@ func (client ConnectionTypeClient) Get(ctx context.Context, automationAccountNam } // GetPreparer prepares the Get request. -func (client ConnectionTypeClient) GetPreparer(ctx context.Context, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "connectionTypeName": autorest.Encode("path", connectionTypeName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -268,16 +270,16 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con // ListByAutomationAccount retrieve a list of connectiontypes. // -// automationAccountName is the automation account name. -func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +301,10 @@ func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,7 +363,7 @@ func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResult } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/credential.go b/services/automation/mgmt/2017-05-15-preview/automation/credential.go index 4d0f3999ad06..11f696368414 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/credential.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/credential.go @@ -31,23 +31,24 @@ type CredentialClient struct { } // NewCredentialClient creates an instance of the CredentialClient client. -func NewCredentialClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CredentialClient { - return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewCredentialClient(subscriptionID string) CredentialClient { + return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. -func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CredentialClient { - return CredentialClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { + return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a credential. // -// automationAccountName is the automation account name. credentialName is the parameters supplied to the create or -// update credential operation. parameters is the parameters supplied to the create or update credential operation. -func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the parameters supplied to the create or update credential operation. parameters is the +// parameters supplied to the create or update credential operation. +func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CredentialCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -57,7 +58,7 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAcc return result, validation.NewError("automation.CredentialClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, credentialName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -79,11 +80,11 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, automationAcc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { +func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -124,15 +125,16 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the credential. // -// automationAccountName is the automation account name. credentialName is the name of credential. -func (client CredentialClient) Delete(ctx context.Context, automationAccountName string, credentialName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the name of credential. +func (client CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, credentialName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +156,11 @@ func (client CredentialClient) Delete(ctx context.Context, automationAccountName } // DeletePreparer prepares the Delete request. -func (client CredentialClient) DeletePreparer(ctx context.Context, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +198,16 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto // Get retrieve the credential identified by credential name. // -// automationAccountName is the automation account name. credentialName is the name of credential. -func (client CredentialClient) Get(ctx context.Context, automationAccountName string, credentialName string) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the name of credential. +func (client CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, credentialName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Get", nil, "Failure preparing request") return @@ -226,11 +229,11 @@ func (client CredentialClient) Get(ctx context.Context, automationAccountName st } // GetPreparer prepares the Get request. -func (client CredentialClient) GetPreparer(ctx context.Context, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +272,16 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent // ListByAutomationAccount retrieve a list of credentials. // -// automationAccountName is the automation account name. -func (client CredentialClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CredentialListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client CredentialClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +303,10 @@ func (client CredentialClient) ListByAutomationAccount(ctx context.Context, auto } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,23 +365,24 @@ func (client CredentialClient) listByAutomationAccountNextResults(lastResults Cr } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CredentialListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a credential. // -// automationAccountName is the automation account name. credentialName is the parameters supplied to the Update -// credential operation. parameters is the parameters supplied to the Update credential operation. -func (client CredentialClient) Update(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// credentialName is the parameters supplied to the Update credential operation. parameters is the parameters +// supplied to the Update credential operation. +func (client CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, credentialName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Update", nil, "Failure preparing request") return @@ -400,11 +404,11 @@ func (client CredentialClient) Update(ctx context.Context, automationAccountName } // UpdatePreparer prepares the Update request. -func (client CredentialClient) UpdatePreparer(ctx context.Context, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { +func (client CredentialClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "credentialName": autorest.Encode("path", credentialName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go index cb289c1e5f5e..148d7c66aebb 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go @@ -32,30 +32,31 @@ type DscCompilationJobClient struct { } // NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobClient { - return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { + return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobClient { - return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { + return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates the Dsc compilation job of the configuration. // -// automationAccountName is the automation account name. compilationJobID is the the DSC configuration Id. -// parameters is the parameters supplied to the create compilation job operation. -func (client DscCompilationJobClient) Create(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// compilationJobID is the the DSC configuration Id. parameters is the parameters supplied to the create +// compilation job operation. +func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties.Configuration", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, compilationJobID, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, compilationJobID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Create", nil, "Failure preparing request") return @@ -77,11 +78,11 @@ func (client DscCompilationJobClient) Create(ctx context.Context, automationAcco } // CreatePreparer prepares the Create request. -func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { +func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "compilationJobId": autorest.Encode("path", compilationJobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,16 +123,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu // Get retrieve the Dsc configuration compilation job identified by job id. // -// automationAccountName is the automation account name. compilationJobID is the Dsc configuration compilation job -// id. -func (client DscCompilationJobClient) Get(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// compilationJobID is the Dsc configuration compilation job id. +func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, compilationJobID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, compilationJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Get", nil, "Failure preparing request") return @@ -153,11 +154,11 @@ func (client DscCompilationJobClient) Get(ctx context.Context, automationAccount } // GetPreparer prepares the Get request. -func (client DscCompilationJobClient) GetPreparer(ctx context.Context, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "compilationJobId": autorest.Encode("path", compilationJobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +197,16 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result // GetStream retrieve the job stream identified by job stream id. // -// automationAccountName is the automation account name. jobID is the job id. jobStreamID is the job stream id. -func (client DscCompilationJobClient) GetStream(ctx context.Context, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. jobStreamID is the job stream id. +func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "GetStream", err.Error()) } - req, err := client.GetStreamPreparer(ctx, automationAccountName, jobID, jobStreamID) + req, err := client.GetStreamPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "GetStream", nil, "Failure preparing request") return @@ -226,12 +228,12 @@ func (client DscCompilationJobClient) GetStream(ctx context.Context, automationA } // GetStreamPreparer prepares the GetStream request. -func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { +func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +272,17 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of dsc compilation jobs. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +304,10 @@ func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Contex } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -366,7 +369,7 @@ func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastRes } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go index 366bcb75a7b6..6e103018fe4c 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go @@ -32,26 +32,27 @@ type DscCompilationJobStreamClient struct { } // NewDscCompilationJobStreamClient creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobStreamClient { - return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobStreamClient { + return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobStreamClient { - return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { + return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByJob retrieve all the job streams for the compilation Job. // -// automationAccountName is the automation account name. jobID is the job id. -func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the +// job id. +func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobStreamClient", "ListByJob", err.Error()) } - req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID) + req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -73,11 +74,11 @@ func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, autom } // ListByJobPreparer prepares the ListByJob request. -func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobId": autorest.Encode("path", jobID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go b/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go index 6963bb010ac6..26591ee4fad2 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go @@ -31,23 +31,24 @@ type DscConfigurationClient struct { } // NewDscConfigurationClient creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscConfigurationClient { - return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { + return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscConfigurationClient { - return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { + return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the create or update parameters for -// configuration. parameters is the create or update parameters for configuration. -func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. +func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties.Source", Name: validation.Null, Rule: true, @@ -60,7 +61,7 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automat return result, validation.NewError("automation.DscConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, configurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, configurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +83,11 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, automat } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +128,16 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response // Delete delete the dsc configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) Delete(ctx context.Context, automationAccountName string, configurationName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, configurationName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +159,11 @@ func (client DscConfigurationClient) Delete(ctx context.Context, automationAccou } // DeletePreparer prepares the Delete request. -func (client DscConfigurationClient) DeletePreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +201,16 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul // Get retrieve the configuration identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) Get(ctx context.Context, automationAccountName string, configurationName string) (result DscConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, configurationName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Get", nil, "Failure preparing request") return @@ -229,11 +232,11 @@ func (client DscConfigurationClient) Get(ctx context.Context, automationAccountN } // GetPreparer prepares the Get request. -func (client DscConfigurationClient) GetPreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,15 +275,16 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D // GetContent retrieve the configuration script identified by configuration name. // -// automationAccountName is the automation account name. configurationName is the configuration name. -func (client DscConfigurationClient) GetContent(ctx context.Context, automationAccountName string, configurationName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. +func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, configurationName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "GetContent", nil, "Failure preparing request") return @@ -302,11 +306,11 @@ func (client DscConfigurationClient) GetContent(ctx context.Context, automationA } // GetContentPreparer prepares the GetContent request. -func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -345,16 +349,16 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of configurations. // -// automationAccountName is the automation account name. -func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result DscConfigurationListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -376,10 +380,10 @@ func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -438,7 +442,7 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result DscConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go b/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go index c8c9f8e391df..a51206bccabe 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go @@ -31,26 +31,27 @@ type DscNodeClient struct { } // NewDscNodeClient creates an instance of the DscNodeClient client. -func NewDscNodeClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeClient { - return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewDscNodeClient(subscriptionID string) DscNodeClient { + return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. -func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeClient { - return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { + return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete delete the dsc node identified by node id. // -// automationAccountName is automation account name. nodeID is the node id. -func (client DscNodeClient) Delete(ctx context.Context, automationAccountName string, nodeID string) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the +// node id. +func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, nodeID) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Delete", nil, "Failure preparing request") return @@ -72,11 +73,11 @@ func (client DscNodeClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client DscNodeClient) DeletePreparer(ctx context.Context, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,15 +116,16 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode // Get retrieve the dsc node identified by node id. // -// automationAccountName is the automation account name. nodeID is the node id. -func (client DscNodeClient) Get(ctx context.Context, automationAccountName string, nodeID string) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the node id. +func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Get", nil, "Failure preparing request") return @@ -145,11 +147,11 @@ func (client DscNodeClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client DscNodeClient) GetPreparer(ctx context.Context, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -188,16 +190,17 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e // ListByAutomationAccount retrieve a list of dsc nodes. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -219,10 +222,10 @@ func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -284,23 +287,23 @@ func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update the dsc node. // -// automationAccountName is the automation account name. nodeID is parameters supplied to the update dsc node. -// parameters is parameters supplied to the update dsc node. -func (client DscNodeClient) Update(ctx context.Context, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node. +func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, nodeID, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Update", nil, "Failure preparing request") return @@ -322,11 +325,11 @@ func (client DscNodeClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client DscNodeClient) UpdatePreparer(ctx context.Context, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { +func (client DscNodeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go b/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go index dca236c2266a..e2684c9b1552 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go @@ -31,23 +31,24 @@ type DscNodeConfigurationClient struct { } // NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeConfigurationClient { - return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient { + return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeConfigurationClient { - return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { + return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the node configuration identified by node configuration name. // -// automationAccountName is the automation account name. nodeConfigurationName is the create or update parameters -// for configuration. parameters is the create or update parameters for configuration. -func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. +func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Source.Hash", Name: validation.Null, Rule: false, @@ -60,7 +61,7 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, aut return result, validation.NewError("automation.DscNodeConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, nodeConfigurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +83,11 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, aut } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +128,16 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete the Dsc node configurations by node configuration. // -// automationAccountName is the automation account name. nodeConfigurationName is the Dsc node configuration name. -func (client DscNodeConfigurationClient) Delete(ctx context.Context, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. +func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, nodeConfigurationName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +159,11 @@ func (client DscNodeConfigurationClient) Delete(ctx context.Context, automationA } // DeletePreparer prepares the Delete request. -func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +201,16 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r // Get retrieve the Dsc node configurations by node configuration. // -// automationAccountName is the automation account name. nodeConfigurationName is the Dsc node configuration name. -func (client DscNodeConfigurationClient) Get(ctx context.Context, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. +func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeConfigurationName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Get", nil, "Failure preparing request") return @@ -229,11 +232,11 @@ func (client DscNodeConfigurationClient) Get(ctx context.Context, automationAcco } // GetPreparer prepares the Get request. -func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeConfigurationName": autorest.Encode("path", nodeConfigurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +275,17 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of dsc node configurations. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +307,10 @@ func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Con } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -368,7 +372,7 @@ func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(last } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/fields.go b/services/automation/mgmt/2017-05-15-preview/automation/fields.go index b456eb5a3c76..756ad090d914 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/fields.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/fields.go @@ -31,27 +31,27 @@ type FieldsClient struct { } // NewFieldsClient creates an instance of the FieldsClient client. -func NewFieldsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) FieldsClient { - return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewFieldsClient(subscriptionID string) FieldsClient { + return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. -func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) FieldsClient { - return FieldsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { + return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByType retrieve a list of fields of a given type identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. typeName is the name of -// type. -func (client FieldsClient) ListByType(ctx context.Context, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. typeName is the name of type. +func (client FieldsClient) ListByType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.FieldsClient", "ListByType", err.Error()) } - req, err := client.ListByTypePreparer(ctx, automationAccountName, moduleName, typeName) + req, err := client.ListByTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.FieldsClient", "ListByType", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client FieldsClient) ListByType(ctx context.Context, automationAccountName } // ListByTypePreparer prepares the ListByType request. -func (client FieldsClient) ListByTypePreparer(ctx context.Context, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client FieldsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go b/services/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go index ea504ef9f0c6..d480a44178ce 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go @@ -31,27 +31,27 @@ type HybridRunbookWorkerGroupClient struct { } // NewHybridRunbookWorkerGroupClient creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) HybridRunbookWorkerGroupClient { - return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorkerGroupClient { + return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) HybridRunbookWorkerGroupClient { - return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { + return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete delete a hybrid runbook worker group. // -// automationAccountName is automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name -func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Delete", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, automat } // DeletePreparer prepares the Delete request. -func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,16 +115,16 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response // Get retrieve a hybrid runbook worker group. // -// automationAccountName is the automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name -func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Get", nil, "Failure preparing request") return @@ -146,11 +146,11 @@ func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, automation } // GetPreparer prepares the Get request. -func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -189,16 +189,16 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) ( // ListByAutomationAccount retrieve a list of hybrid runbook worker groups. // -// automationAccountName is the automation account name. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -220,10 +220,10 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -282,23 +282,24 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults( } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a hybrid runbook worker group. // -// automationAccountName is the automation account name. hybridRunbookWorkerGroupName is the hybrid runbook worker -// group name parameters is the hybrid runbook worker group -func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker +// group +func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Update", nil, "Failure preparing request") return @@ -320,11 +321,11 @@ func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, automat } // UpdatePreparer prepares the Update request. -func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "hybridRunbookWorkerGroupName": autorest.Encode("path", hybridRunbookWorkerGroupName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/job.go b/services/automation/mgmt/2017-05-15-preview/automation/job.go index 4d6a20aa4a79..f5d2b3756da5 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/job.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/job.go @@ -31,29 +31,31 @@ type JobClient struct { } // NewJobClient creates an instance of the JobClient client. -func NewJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobClient { - return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewJobClient(subscriptionID string) JobClient { + return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobClientWithBaseURI creates an instance of the JobClient client. -func NewJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobClient { - return JobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { + return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a job of the runbook. // -// jobName is the job name. parameters is the parameters supplied to the create job operation. -func (client JobClient) Create(ctx context.Context, jobName string, parameters JobCreateParameters) (result Job, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. parameters is the parameters supplied to the create job operation. clientRequestID is +// identifies this specific client request. +func (client JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, parameters JobCreateParameters, clientRequestID string) (result Job, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobCreateProperties.Runbook", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, jobName, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobName, parameters, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Create", nil, "Failure preparing request") return @@ -75,11 +77,11 @@ func (client JobClient) Create(ctx context.Context, jobName string, parameters J } // CreatePreparer prepares the Create request. -func (client JobClient) CreatePreparer(ctx context.Context, jobName string, parameters JobCreateParameters) (*http.Request, error) { +func (client JobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, parameters JobCreateParameters, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -95,9 +97,9 @@ func (client JobClient) CreatePreparer(ctx context.Context, jobName string, para autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -124,15 +126,16 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er // Get retrieve the job identified by job name. // -// jobName is the job name. -func (client JobClient) Get(ctx context.Context, jobName string) (result Job, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. clientRequestID is identifies this specific client request. +func (client JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result Job, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, jobName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Get", nil, "Failure preparing request") return @@ -154,11 +157,11 @@ func (client JobClient) Get(ctx context.Context, jobName string) (result Job, er } // GetPreparer prepares the Get request. -func (client JobClient) GetPreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -172,9 +175,9 @@ func (client JobClient) GetPreparer(ctx context.Context, jobName string) (*http. autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -201,15 +204,16 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error // GetOutput retrieve the job output identified by job name. // -// jobName is the name of the job to be created. -func (client JobClient) GetOutput(ctx context.Context, jobName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the name of the job to be created. clientRequestID is identifies this specific client request. +func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetOutput", err.Error()) } - req, err := client.GetOutputPreparer(ctx, jobName) + req, err := client.GetOutputPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetOutput", nil, "Failure preparing request") return @@ -231,11 +235,11 @@ func (client JobClient) GetOutput(ctx context.Context, jobName string) (result S } // GetOutputPreparer prepares the GetOutput request. -func (client JobClient) GetOutputPreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) GetOutputPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -249,9 +253,9 @@ func (client JobClient) GetOutputPreparer(ctx context.Context, jobName string) ( autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -278,15 +282,16 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result String, // GetRunbookContent retrieve the runbook content of the job identified by job name. // -// jobName is the job name. -func (client JobClient) GetRunbookContent(ctx context.Context, jobName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. clientRequestID is identifies this specific client request. +func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetRunbookContent", err.Error()) } - req, err := client.GetRunbookContentPreparer(ctx, jobName) + req, err := client.GetRunbookContentPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetRunbookContent", nil, "Failure preparing request") return @@ -308,11 +313,11 @@ func (client JobClient) GetRunbookContent(ctx context.Context, jobName string) ( } // GetRunbookContentPreparer prepares the GetRunbookContent request. -func (client JobClient) GetRunbookContentPreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) GetRunbookContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -326,9 +331,9 @@ func (client JobClient) GetRunbookContentPreparer(ctx context.Context, jobName s autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -355,16 +360,17 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result // ListByAutomationAccount retrieve a list of jobs. // -// filter is the filter to apply on the operation. -func (client JobClient) ListByAutomationAccount(ctx context.Context, filter string) (result JobListResultV2Page, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// filter is the filter to apply on the operation. clientRequestID is identifies this specific client request. +func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result JobListResultV2Page, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -386,10 +392,10 @@ func (client JobClient) ListByAutomationAccount(ctx context.Context, filter stri } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, filter string) (*http.Request, error) { +func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -406,9 +412,9 @@ func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, fil autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -455,22 +461,23 @@ func (client JobClient) listByAutomationAccountNextResults(lastResults JobListRe } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, filter string) (result JobListResultV2Iterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, filter) +func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result JobListResultV2Iterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter, clientRequestID) return } // Resume resume the job identified by jobName. // -// jobName is the job name. -func (client JobClient) Resume(ctx context.Context, jobName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. clientRequestID is identifies this specific client request. +func (client JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, jobName) + req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Resume", nil, "Failure preparing request") return @@ -492,11 +499,11 @@ func (client JobClient) Resume(ctx context.Context, jobName string) (result auto } // ResumePreparer prepares the Resume request. -func (client JobClient) ResumePreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -510,9 +517,9 @@ func (client JobClient) ResumePreparer(ctx context.Context, jobName string) (*ht autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -538,15 +545,16 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re // Stop stop the job identified by jobName. // -// jobName is the job name. -func (client JobClient) Stop(ctx context.Context, jobName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. clientRequestID is identifies this specific client request. +func (client JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, jobName) + req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Stop", nil, "Failure preparing request") return @@ -568,11 +576,11 @@ func (client JobClient) Stop(ctx context.Context, jobName string) (result autore } // StopPreparer prepares the Stop request. -func (client JobClient) StopPreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -586,9 +594,9 @@ func (client JobClient) StopPreparer(ctx context.Context, jobName string) (*http autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -614,15 +622,16 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp // Suspend suspend the job identified by job name. // -// jobName is the job name. -func (client JobClient) Suspend(ctx context.Context, jobName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. clientRequestID is identifies this specific client request. +func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, jobName) + req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Suspend", nil, "Failure preparing request") return @@ -644,11 +653,11 @@ func (client JobClient) Suspend(ctx context.Context, jobName string) (result aut } // SuspendPreparer prepares the Suspend request. -func (client JobClient) SuspendPreparer(ctx context.Context, jobName string) (*http.Request, error) { +func (client JobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -662,9 +671,9 @@ func (client JobClient) SuspendPreparer(ctx context.Context, jobName string) (*h autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go b/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go index a3d2522cf0c7..fdcd16cb4515 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go @@ -32,23 +32,24 @@ type JobScheduleClient struct { } // NewJobScheduleClient creates an instance of the JobScheduleClient client. -func NewJobScheduleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobScheduleClient { - return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewJobScheduleClient(subscriptionID string) JobScheduleClient { + return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. -func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobScheduleClient { - return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { + return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a job schedule. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. parameters is the -// parameters supplied to the create job schedule operation. -func (client JobScheduleClient) Create(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. parameters is the parameters supplied to the create job schedule +// operation. +func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties.Schedule", Name: validation.Null, Rule: true, Chain: nil}, @@ -57,7 +58,7 @@ func (client JobScheduleClient) Create(ctx context.Context, automationAccountNam return result, validation.NewError("automation.JobScheduleClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, jobScheduleID, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Create", nil, "Failure preparing request") return @@ -79,11 +80,11 @@ func (client JobScheduleClient) Create(ctx context.Context, automationAccountNam } // CreatePreparer prepares the Create request. -func (client JobScheduleClient) CreatePreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { +func (client JobScheduleClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -124,15 +125,16 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job // Delete delete the job schedule identified by job schedule name. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. -func (client JobScheduleClient) Delete(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. +func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, jobScheduleID) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +156,11 @@ func (client JobScheduleClient) Delete(ctx context.Context, automationAccountNam } // DeletePreparer prepares the Delete request. -func (client JobScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,15 +198,16 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the job schedule identified by job schedule name. // -// automationAccountName is the automation account name. jobScheduleID is the job schedule name. -func (client JobScheduleClient) Get(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// jobScheduleID is the job schedule name. +func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, jobScheduleID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Get", nil, "Failure preparing request") return @@ -226,11 +229,11 @@ func (client JobScheduleClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client JobScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobScheduleId": autorest.Encode("path", jobScheduleID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +272,16 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch // ListByAutomationAccount retrieve a list of job schedules. // -// automationAccountName is the automation account name. -func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result JobScheduleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +303,10 @@ func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, aut } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,7 +365,7 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result JobScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go b/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go index cdc8a9d2eaac..237b42c9adf5 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go @@ -31,26 +31,28 @@ type JobStreamClient struct { } // NewJobStreamClient creates an instance of the JobStreamClient client. -func NewJobStreamClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobStreamClient { - return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewJobStreamClient(subscriptionID string) JobStreamClient { + return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. -func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobStreamClient { - return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { + return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the job stream identified by job stream id. // -// jobName is the job name. jobStreamID is the job stream id. -func (client JobStreamClient) Get(ctx context.Context, jobName string, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. jobStreamID is the job stream id. clientRequestID is identifies this specific client +// request. +func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, jobName, jobStreamID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobName, jobStreamID, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "Get", nil, "Failure preparing request") return @@ -72,12 +74,12 @@ func (client JobStreamClient) Get(ctx context.Context, jobName string, jobStream } // GetPreparer prepares the Get request. -func (client JobStreamClient) GetPreparer(ctx context.Context, jobName string, jobStreamID string) (*http.Request, error) { +func (client JobStreamClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -91,9 +93,9 @@ func (client JobStreamClient) GetPreparer(ctx context.Context, jobName string, j autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -120,16 +122,18 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea // ListByJob retrieve a list of jobs streams identified by job name. // -// jobName is the job name. filter is the filter to apply on the operation. -func (client JobStreamClient) ListByJob(ctx context.Context, jobName string, filter string) (result JobStreamListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// jobName is the job name. filter is the filter to apply on the operation. clientRequestID is identifies this +// specific client request. +func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "ListByJob", err.Error()) } result.fn = client.listByJobNextResults - req, err := client.ListByJobPreparer(ctx, jobName, filter) + req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobName, filter, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -151,11 +155,11 @@ func (client JobStreamClient) ListByJob(ctx context.Context, jobName string, fil } // ListByJobPreparer prepares the ListByJob request. -func (client JobStreamClient) ListByJobPreparer(ctx context.Context, jobName string, filter string) (*http.Request, error) { +func (client JobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "automationAccountName": autorest.Encode("path", automationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -172,9 +176,9 @@ func (client JobStreamClient) ListByJobPreparer(ctx context.Context, jobName str autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -221,7 +225,7 @@ func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResu } // ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobStreamClient) ListByJobComplete(ctx context.Context, jobName string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByJob(ctx, jobName, filter) +func (client JobStreamClient) ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result JobStreamListResultIterator, err error) { + result.page, err = client.ListByJob(ctx, resourceGroupName, automationAccountName, jobName, filter, clientRequestID) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go b/services/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go index ff63f48c93a1..07bd7f664551 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go @@ -31,26 +31,26 @@ type LinkedWorkspaceClient struct { } // NewLinkedWorkspaceClient creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) LinkedWorkspaceClient { - return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { + return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) LinkedWorkspaceClient { - return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { + return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the linked workspace for the account id. // -// automationAccountName is the automation account name. -func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountName string) (result LinkedWorkspace, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result LinkedWorkspace, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.LinkedWorkspaceClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.LinkedWorkspaceClient", "Get", nil, "Failure preparing request") return @@ -72,10 +72,10 @@ func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountNa } // GetPreparer prepares the Get request. -func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/module.go b/services/automation/mgmt/2017-05-15-preview/automation/module.go index bbcc83846e33..929cc72ca68b 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/module.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/module.go @@ -31,23 +31,23 @@ type ModuleClient struct { } // NewModuleClient creates an instance of the ModuleClient client. -func NewModuleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ModuleClient { - return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewModuleClient(subscriptionID string) ModuleClient { + return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewModuleClientWithBaseURI creates an instance of the ModuleClient client. -func NewModuleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ModuleClient { - return ModuleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { + return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or Update the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. parameters is the create -// or update parameters for module. -func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. parameters is the create or update parameters for module. +func (client ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties.ContentLink", Name: validation.Null, Rule: true, @@ -60,7 +60,7 @@ func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccount return result, validation.NewError("automation.ModuleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, moduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -82,11 +82,11 @@ func (client ModuleClient) CreateOrUpdate(ctx context.Context, automationAccount } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { +func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,15 +127,16 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the module by name. // -// automationAccountName is the automation account name. moduleName is the module name. -func (client ModuleClient) Delete(ctx context.Context, automationAccountName string, moduleName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the module name. +func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, moduleName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Delete", nil, "Failure preparing request") return @@ -157,11 +158,11 @@ func (client ModuleClient) Delete(ctx context.Context, automationAccountName str } // DeletePreparer prepares the Delete request. -func (client ModuleClient) DeletePreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -199,15 +200,16 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest // Get retrieve the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the module name. -func (client ModuleClient) Get(ctx context.Context, automationAccountName string, moduleName string) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the module name. +func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, moduleName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Get", nil, "Failure preparing request") return @@ -229,11 +231,11 @@ func (client ModuleClient) Get(ctx context.Context, automationAccountName string } // GetPreparer prepares the Get request. -func (client ModuleClient) GetPreparer(ctx context.Context, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +274,16 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err // ListByAutomationAccount retrieve a list of modules. // -// automationAccountName is the automation account name. -func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ModuleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +305,10 @@ func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automati } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,23 +367,23 @@ func (client ModuleClient) listByAutomationAccountNextResults(lastResults Module } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ModuleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the module identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. parameters is the update -// parameters for module. -func (client ModuleClient) Update(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. parameters is the update parameters for module. +func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, moduleName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Update", nil, "Failure preparing request") return @@ -403,11 +405,11 @@ func (client ModuleClient) Update(ctx context.Context, automationAccountName str } // UpdatePreparer prepares the Update request. -func (client ModuleClient) UpdatePreparer(ctx context.Context, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { +func (client ModuleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go b/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go index bd706d936f50..2cdc9b7ee487 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go @@ -31,26 +31,27 @@ type NodeReportsClient struct { } // NewNodeReportsClient creates an instance of the NodeReportsClient client. -func NewNodeReportsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) NodeReportsClient { - return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewNodeReportsClient(subscriptionID string) NodeReportsClient { + return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. -func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) NodeReportsClient { - return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { + return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the Dsc node report data by node id and report id. // -// automationAccountName is the automation account name. nodeID is the Dsc node id. reportID is the report id. -func (client NodeReportsClient) Get(ctx context.Context, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the Dsc node id. reportID is the report id. +func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, nodeID, reportID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "Get", nil, "Failure preparing request") return @@ -72,12 +73,12 @@ func (client NodeReportsClient) Get(ctx context.Context, automationAccountName s } // GetPreparer prepares the Get request. -func (client NodeReportsClient) GetPreparer(ctx context.Context, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), "reportId": autorest.Encode("path", reportID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,15 +117,16 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod // GetContent retrieve the Dsc node reports by node id and report id. // -// automationAccountName is the automation account name. nodeID is the Dsc node id. reportID is the report id. -func (client NodeReportsClient) GetContent(ctx context.Context, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the Dsc node id. reportID is the report id. +func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, nodeID, reportID) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "GetContent", nil, "Failure preparing request") return @@ -146,12 +148,12 @@ func (client NodeReportsClient) GetContent(ctx context.Context, automationAccoun } // GetContentPreparer prepares the GetContent request. -func (client NodeReportsClient) GetContentPreparer(ctx context.Context, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), "reportId": autorest.Encode("path", reportID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,17 +192,17 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result // ListByNode retrieve the Dsc node report list by node id. // -// automationAccountName is the automation account name. nodeID is the parameters supplied to the list operation. -// filter is the filter to apply on the operation. -func (client NodeReportsClient) ListByNode(ctx context.Context, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// the parameters supplied to the list operation. filter is the filter to apply on the operation. +func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "ListByNode", err.Error()) } result.fn = client.listByNodeNextResults - req, err := client.ListByNodePreparer(ctx, automationAccountName, nodeID, filter) + req, err := client.ListByNodePreparer(ctx, resourceGroupName, automationAccountName, nodeID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "ListByNode", nil, "Failure preparing request") return @@ -222,11 +224,11 @@ func (client NodeReportsClient) ListByNode(ctx context.Context, automationAccoun } // ListByNodePreparer prepares the ListByNode request. -func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, automationAccountName string, nodeID string, filter string) (*http.Request, error) { +func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "nodeId": autorest.Encode("path", nodeID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -288,7 +290,7 @@ func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportL } // ListByNodeComplete enumerates all values, automatically crossing page boundaries as required. -func (client NodeReportsClient) ListByNodeComplete(ctx context.Context, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultIterator, err error) { - result.page, err = client.ListByNode(ctx, automationAccountName, nodeID, filter) +func (client NodeReportsClient) ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultIterator, err error) { + result.page, err = client.ListByNode(ctx, resourceGroupName, automationAccountName, nodeID, filter) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go b/services/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go index cd8a29a3a6fd..80f1cb735be0 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go @@ -31,27 +31,27 @@ type ObjectDataTypesClient struct { } // NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ObjectDataTypesClient { - return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { + return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ObjectDataTypesClient { - return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { + return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. // -// automationAccountName is the automation account name. moduleName is the name of module. typeName is the name of -// type. -func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName +// is the name of module. typeName is the name of type. +func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", err.Error()) } - req, err := client.ListFieldsByModuleAndTypePreparer(ctx, automationAccountName, moduleName, typeName) + req, err := client.ListFieldsByModuleAndTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Contex } // ListFieldsByModuleAndTypePreparer prepares the ListFieldsByModuleAndType request. -func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "moduleName": autorest.Encode("path", moduleName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } @@ -117,15 +117,16 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt // ListFieldsByType retrieve a list of fields of a given type across all accessible modules. // -// automationAccountName is the automation account name. typeName is the name of type. -func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is +// the name of type. +func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByType", err.Error()) } - req, err := client.ListFieldsByTypePreparer(ctx, automationAccountName, typeName) + req, err := client.ListFieldsByTypePreparer(ctx, resourceGroupName, automationAccountName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByType", nil, "Failure preparing request") return @@ -147,10 +148,10 @@ func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, automa } // ListFieldsByTypePreparer prepares the ListFieldsByType request. -func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, automationAccountName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/operations.go b/services/automation/mgmt/2017-05-15-preview/automation/operations.go index b340c51efe73..b731c2d30ea0 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/operations.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/operations.go @@ -30,13 +30,13 @@ type OperationsClient struct { } // NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List lists all of the available Automation REST API operations. diff --git a/services/automation/mgmt/2017-05-15-preview/automation/runbook.go b/services/automation/mgmt/2017-05-15-preview/automation/runbook.go index ccdcbbe0f750..fc316a1d7c9a 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/runbook.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/runbook.go @@ -31,23 +31,24 @@ type RunbookClient struct { } // NewRunbookClient creates an instance of the RunbookClient client. -func NewRunbookClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookClient { - return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewRunbookClient(subscriptionID string) RunbookClient { + return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. -func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookClient { - return RunbookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { + return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. parameters is the create -// or update parameters for runbook. Provide either content link for a published runbook or draft, not both. -func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. parameters is the create or update parameters for runbook. Provide either content link for +// a published runbook or draft, not both. +func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties.Draft", Name: validation.Null, Rule: false, @@ -68,7 +69,7 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccoun return result, validation.NewError("automation.RunbookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -90,10 +91,10 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, automationAccoun } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { +func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -135,15 +136,16 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the runbook by name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) Delete(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, runbookName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Delete", nil, "Failure preparing request") return @@ -165,10 +167,10 @@ func (client RunbookClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client RunbookClient) DeletePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -207,15 +209,16 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores // Get retrieve the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Get", nil, "Failure preparing request") return @@ -237,10 +240,10 @@ func (client RunbookClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client RunbookClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -280,15 +283,16 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e // GetContent retrieve the content of runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookClient) GetContent(ctx context.Context, automationAccountName string, runbookName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "GetContent", nil, "Failure preparing request") return @@ -310,10 +314,10 @@ func (client RunbookClient) GetContent(ctx context.Context, automationAccountNam } // GetContentPreparer prepares the GetContent request. -func (client RunbookClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -353,16 +357,16 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Str // ListByAutomationAccount retrieve a list of runbooks. // -// automationAccountName is the automation account name. -func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result RunbookListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -384,10 +388,10 @@ func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -446,23 +450,23 @@ func (client RunbookClient) listByAutomationAccountNextResults(lastResults Runbo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result RunbookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the runbook identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. parameters is the update -// parameters for runbook. -func (client RunbookClient) Update(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. parameters is the update parameters for runbook. +func (client RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Update", nil, "Failure preparing request") return @@ -484,10 +488,10 @@ func (client RunbookClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client RunbookClient) UpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { +func (client RunbookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go b/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go index ec5d45c10e72..b1bcf9e2ef5c 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go @@ -31,26 +31,27 @@ type RunbookDraftClient struct { } // NewRunbookDraftClient creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookDraftClient { - return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { + return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookDraftClient { - return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { + return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the runbook draft identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraft, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Get", nil, "Failure preparing request") return @@ -72,10 +73,10 @@ func (client RunbookDraftClient) Get(ctx context.Context, automationAccountName } // GetPreparer prepares the Get request. -func (client RunbookDraftClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -115,15 +116,16 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo // GetContent retrieve the content of runbook draft identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) GetContent(ctx context.Context, automationAccountName string, runbookName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "GetContent", nil, "Failure preparing request") return @@ -145,10 +147,10 @@ func (client RunbookDraftClient) GetContent(ctx context.Context, automationAccou } // GetContentPreparer prepares the GetContent request. -func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -188,16 +190,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul // Publish publish runbook draft. // -// automationAccountName is the automation account name. runbookName is the parameters supplied to the publish -// runbook operation. -func (client RunbookDraftClient) Publish(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the parameters supplied to the publish runbook operation. +func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Publish", err.Error()) } - req, err := client.PublishPreparer(ctx, automationAccountName, runbookName) + req, err := client.PublishPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Publish", nil, "Failure preparing request") return @@ -213,10 +215,10 @@ func (client RunbookDraftClient) Publish(ctx context.Context, automationAccountN } // PublishPreparer prepares the Publish request. -func (client RunbookDraftClient) PublishPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) PublishPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -263,16 +265,16 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result a // ReplaceContent replaces the runbook draft content. // -// automationAccountName is the automation account name. runbookName is the runbook name. runbookContent is the -// runbook draft content. -func (client RunbookDraftClient) ReplaceContent(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (result RunbookDraftReplaceContentFuture, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. runbookContent is the runbook draft content. +func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (result RunbookDraftReplaceContentFuture, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "ReplaceContent", err.Error()) } - req, err := client.ReplaceContentPreparer(ctx, automationAccountName, runbookName, runbookContent) + req, err := client.ReplaceContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "ReplaceContent", nil, "Failure preparing request") return @@ -288,10 +290,10 @@ func (client RunbookDraftClient) ReplaceContent(ctx context.Context, automationA } // ReplaceContentPreparer prepares the ReplaceContent request. -func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { +func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -340,15 +342,16 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r // UndoEdit undo draft edit to last known published state identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client RunbookDraftClient) UndoEdit(ctx context.Context, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "UndoEdit", err.Error()) } - req, err := client.UndoEditPreparer(ctx, automationAccountName, runbookName) + req, err := client.UndoEditPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "UndoEdit", nil, "Failure preparing request") return @@ -370,10 +373,10 @@ func (client RunbookDraftClient) UndoEdit(ctx context.Context, automationAccount } // UndoEditPreparer prepares the UndoEdit request. -func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/schedule.go b/services/automation/mgmt/2017-05-15-preview/automation/schedule.go index 174fec7c4f72..ee673e96001e 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/schedule.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/schedule.go @@ -31,23 +31,23 @@ type ScheduleClient struct { } // NewScheduleClient creates an instance of the ScheduleClient client. -func NewScheduleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ScheduleClient { - return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewScheduleClient(subscriptionID string) ScheduleClient { + return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. -func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ScheduleClient { - return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { + return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a schedule. // -// automationAccountName is the automation account name. scheduleName is the schedule name. parameters is the -// parameters supplied to the create or update schedule operation. -func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. parameters is the parameters supplied to the create or update schedule operation. +func (client ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ScheduleCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -55,7 +55,7 @@ func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccou return result, validation.NewError("automation.ScheduleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, scheduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -77,10 +77,10 @@ func (client ScheduleClient) CreateOrUpdate(ctx context.Context, automationAccou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,15 +122,16 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. -func (client ScheduleClient) Delete(ctx context.Context, automationAccountName string, scheduleName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. +func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, scheduleName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +153,10 @@ func (client ScheduleClient) Delete(ctx context.Context, automationAccountName s } // DeletePreparer prepares the Delete request. -func (client ScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -194,15 +195,16 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. -func (client ScheduleClient) Get(ctx context.Context, automationAccountName string, scheduleName string) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. +func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, scheduleName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Get", nil, "Failure preparing request") return @@ -224,10 +226,10 @@ func (client ScheduleClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client ScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -267,16 +269,16 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, // ListByAutomationAccount retrieve a list of schedules. // -// automationAccountName is the automation account name. -func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ScheduleListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -298,10 +300,10 @@ func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automa } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -360,23 +362,23 @@ func (client ScheduleClient) listByAutomationAccountNextResults(lastResults Sche } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update the schedule identified by schedule name. // -// automationAccountName is the automation account name. scheduleName is the schedule name. parameters is the -// parameters supplied to the update schedule operation. -func (client ScheduleClient) Update(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName +// is the schedule name. parameters is the parameters supplied to the update schedule operation. +func (client ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, scheduleName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Update", nil, "Failure preparing request") return @@ -398,10 +400,10 @@ func (client ScheduleClient) Update(ctx context.Context, automationAccountName s } // UpdatePreparer prepares the Update request. -func (client ScheduleClient) UpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go index 6524ea68bda8..a1da73ffcff1 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go @@ -33,27 +33,29 @@ type SoftwareUpdateConfigurationMachineRunsClient struct { // NewSoftwareUpdateConfigurationMachineRunsClient creates an instance of the // SoftwareUpdateConfigurationMachineRunsClient client. -func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationMachineRunsClient { - return NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { + return NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI creates an instance of the // SoftwareUpdateConfigurationMachineRunsClient client. -func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationMachineRunsClient { - return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { + return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } // GetByID get a single software update configuration machine run by Id. // +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. // softwareUpdateConfigurationMachineRunID is the Id of the software update configuration machine run. -func (client SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.Context, softwareUpdateConfigurationMachineRunID uuid.UUID) (result SoftwareUpdateConfigurationMachineRun, err error) { +// clientRequestID is identifies this specific client request. +func (client SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationMachineRunID uuid.UUID, clientRequestID string) (result SoftwareUpdateConfigurationMachineRun, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationMachineRunsClient", "GetByID", err.Error()) } - req, err := client.GetByIDPreparer(ctx, softwareUpdateConfigurationMachineRunID) + req, err := client.GetByIDPreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunID, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationMachineRunsClient", "GetByID", nil, "Failure preparing request") return @@ -75,10 +77,10 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.C } // GetByIDPreparer prepares the GetByID request. -func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDPreparer(ctx context.Context, softwareUpdateConfigurationMachineRunID uuid.UUID) (*http.Request, error) { +func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationMachineRunID uuid.UUID, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "softwareUpdateConfigurationMachineRunId": autorest.Encode("path", softwareUpdateConfigurationMachineRunID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -93,9 +95,9 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDPreparer(ctx c autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -122,17 +124,19 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDResponder(resp // List return list of software update configuration machine runs // -// filter is the filter to apply on the operation. You can use the following filters: 'properties/osType', -// 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' skip is number of -// entries you skip before returning results top is maximum number of entries returned in the results collection -func (client SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Context, filter string, skip string, top string) (result SoftwareUpdateConfigurationMachineRunListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// clientRequestID is identifies this specific client request. filter is the filter to apply on the operation. You +// can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and +// 'properties/softwareUpdateConfiguration/name' skip is number of entries you skip before returning results top is +// maximum number of entries returned in the results collection +func (client SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (result SoftwareUpdateConfigurationMachineRunListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationMachineRunsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, filter, skip, top) + req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter, skip, top) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationMachineRunsClient", "List", nil, "Failure preparing request") return @@ -154,10 +158,10 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Cont } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationMachineRunsClient) ListPreparer(ctx context.Context, filter string, skip string, top string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationMachineRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -180,9 +184,9 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) ListPreparer(ctx cont autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go index 809a611e288f..c4786eb87353 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go @@ -32,27 +32,29 @@ type SoftwareUpdateConfigurationRunsClient struct { } // NewSoftwareUpdateConfigurationRunsClient creates an instance of the SoftwareUpdateConfigurationRunsClient client. -func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationRunsClient { - return NewSoftwareUpdateConfigurationRunsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string) SoftwareUpdateConfigurationRunsClient { + return NewSoftwareUpdateConfigurationRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewSoftwareUpdateConfigurationRunsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationRunsClient // client. -func NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationRunsClient { - return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationRunsClient { + return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } // GetByID get a single software update configuration Run by Id. // -// softwareUpdateConfigurationRunID is the Id of the software update configuration run. -func (client SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, softwareUpdateConfigurationRunID uuid.UUID) (result SoftwareUpdateConfigurationRun, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// softwareUpdateConfigurationRunID is the Id of the software update configuration run. clientRequestID is +// identifies this specific client request. +func (client SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationRunID uuid.UUID, clientRequestID string) (result SoftwareUpdateConfigurationRun, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationRunsClient", "GetByID", err.Error()) } - req, err := client.GetByIDPreparer(ctx, softwareUpdateConfigurationRunID) + req, err := client.GetByIDPreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationRunID, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationRunsClient", "GetByID", nil, "Failure preparing request") return @@ -74,10 +76,10 @@ func (client SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, } // GetByIDPreparer prepares the GetByID request. -func (client SoftwareUpdateConfigurationRunsClient) GetByIDPreparer(ctx context.Context, softwareUpdateConfigurationRunID uuid.UUID) (*http.Request, error) { +func (client SoftwareUpdateConfigurationRunsClient) GetByIDPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationRunID uuid.UUID, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "softwareUpdateConfigurationRunId": autorest.Encode("path", softwareUpdateConfigurationRunID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -92,9 +94,9 @@ func (client SoftwareUpdateConfigurationRunsClient) GetByIDPreparer(ctx context. autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -121,17 +123,19 @@ func (client SoftwareUpdateConfigurationRunsClient) GetByIDResponder(resp *http. // List return list of software update configuration runs // -// filter is the filter to apply on the operation. You can use the following filters: 'properties/osType', -// 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' skip is number of -// entries you skip before returning results top is maximum number of entries returned in the results collection -func (client SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, filter string, skip string, top string) (result SoftwareUpdateConfigurationRunListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// clientRequestID is identifies this specific client request. filter is the filter to apply on the operation. You +// can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and +// 'properties/softwareUpdateConfiguration/name' skip is number of entries you skip before returning results top is +// maximum number of entries returned in the results collection +func (client SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (result SoftwareUpdateConfigurationRunListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationRunsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, filter, skip, top) + req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter, skip, top) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationRunsClient", "List", nil, "Failure preparing request") return @@ -153,10 +157,10 @@ func (client SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, fi } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationRunsClient) ListPreparer(ctx context.Context, filter string, skip string, top string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -179,9 +183,9 @@ func (client SoftwareUpdateConfigurationRunsClient) ListPreparer(ctx context.Con autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go index 1c180a52a3f2..d08e66e51b8b 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go @@ -31,24 +31,25 @@ type SoftwareUpdateConfigurationsClient struct { } // NewSoftwareUpdateConfigurationsClient creates an instance of the SoftwareUpdateConfigurationsClient client. -func NewSoftwareUpdateConfigurationsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationsClient { - return NewSoftwareUpdateConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewSoftwareUpdateConfigurationsClient(subscriptionID string) SoftwareUpdateConfigurationsClient { + return NewSoftwareUpdateConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewSoftwareUpdateConfigurationsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationsClient // client. -func NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationsClient { - return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationsClient { + return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a new software update configuration with the name given in the URI. // +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. // softwareUpdateConfigurationName is the name of the software update configuration to be created. parameters is -// request body. -func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration) (result SoftwareUpdateConfiguration, err error) { +// request body. clientRequestID is identifies this specific client request. +func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration, clientRequestID string) (result SoftwareUpdateConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.SoftwareUpdateConfigurationProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.SoftwareUpdateConfigurationProperties.UpdateConfiguration", Name: validation.Null, Rule: true, Chain: nil}, @@ -57,7 +58,7 @@ func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, sof return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, softwareUpdateConfigurationName, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "Create", nil, "Failure preparing request") return @@ -79,10 +80,10 @@ func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, sof } // CreatePreparer prepares the Create request. -func (client SoftwareUpdateConfigurationsClient) CreatePreparer(ctx context.Context, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -99,9 +100,9 @@ func (client SoftwareUpdateConfigurationsClient) CreatePreparer(ctx context.Cont autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -128,15 +129,17 @@ func (client SoftwareUpdateConfigurationsClient) CreateResponder(resp *http.Resp // Delete delete a specific software update configuration. // -// softwareUpdateConfigurationName is the name of the software update configuration to be created. -func (client SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, softwareUpdateConfigurationName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// softwareUpdateConfigurationName is the name of the software update configuration to be created. clientRequestID +// is identifies this specific client request. +func (client SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, softwareUpdateConfigurationName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "Delete", nil, "Failure preparing request") return @@ -158,10 +161,10 @@ func (client SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, sof } // DeletePreparer prepares the Delete request. -func (client SoftwareUpdateConfigurationsClient) DeletePreparer(ctx context.Context, softwareUpdateConfigurationName string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -176,9 +179,9 @@ func (client SoftwareUpdateConfigurationsClient) DeletePreparer(ctx context.Cont autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -204,15 +207,17 @@ func (client SoftwareUpdateConfigurationsClient) DeleteResponder(resp *http.Resp // GetByName get a single software update configuration by name. // -// softwareUpdateConfigurationName is the name of the software update configuration to be created. -func (client SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, softwareUpdateConfigurationName string) (result SoftwareUpdateConfiguration, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// softwareUpdateConfigurationName is the name of the software update configuration to be created. clientRequestID +// is identifies this specific client request. +func (client SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (result SoftwareUpdateConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "GetByName", err.Error()) } - req, err := client.GetByNamePreparer(ctx, softwareUpdateConfigurationName) + req, err := client.GetByNamePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "GetByName", nil, "Failure preparing request") return @@ -234,10 +239,10 @@ func (client SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, } // GetByNamePreparer prepares the GetByName request. -func (client SoftwareUpdateConfigurationsClient) GetByNamePreparer(ctx context.Context, softwareUpdateConfigurationName string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) GetByNamePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -252,9 +257,9 @@ func (client SoftwareUpdateConfigurationsClient) GetByNamePreparer(ctx context.C autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -281,15 +286,16 @@ func (client SoftwareUpdateConfigurationsClient) GetByNameResponder(resp *http.R // List get all software update configurations for the account. // -// filter is the filter to apply on the operation. -func (client SoftwareUpdateConfigurationsClient) List(ctx context.Context, filter string) (result SoftwareUpdateConfigurationListResult, err error) { +// resourceGroupName is the resource group name. automationAccountName is the name of the automation account. +// clientRequestID is identifies this specific client request. filter is the filter to apply on the operation. +func (client SoftwareUpdateConfigurationsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string) (result SoftwareUpdateConfigurationListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, filter) + req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "List", nil, "Failure preparing request") return @@ -311,10 +317,10 @@ func (client SoftwareUpdateConfigurationsClient) List(ctx context.Context, filte } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", client.AutomationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "automationAccountName": autorest.Encode("path", automationAccountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -331,9 +337,9 @@ func (client SoftwareUpdateConfigurationsClient) ListPreparer(ctx context.Contex autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(client.ClientRequestID) > 0 { + if len(clientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go b/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go index 1121283f810b..9657d0e44ab4 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go @@ -31,23 +31,24 @@ type SourceControlClient struct { } // NewSourceControlClient creates an instance of the SourceControlClient client. -func NewSourceControlClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlClient { - return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewSourceControlClient(subscriptionID string) SourceControlClient { + return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client. -func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlClient { - return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string) SourceControlClient { + return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a source control. // -// automationAccountName is the automation account name. sourceControlName is the source control name. parameters -// is the parameters supplied to the create or update source control operation. -func (client SourceControlClient) CreateOrUpdate(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (result SourceControl, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the source control name. parameters is the parameters supplied to the create or update +// source control operation. +func (client SourceControlClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (result SourceControl, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.SourceControlCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.SourceControlCreateOrUpdateProperties.RepoURL", Name: validation.Null, Rule: false, @@ -64,7 +65,7 @@ func (client SourceControlClient) CreateOrUpdate(ctx context.Context, automation return result, validation.NewError("automation.SourceControlClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, sourceControlName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -86,10 +87,10 @@ func (client SourceControlClient) CreateOrUpdate(ctx context.Context, automation } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SourceControlClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (*http.Request, error) { +func (client SourceControlClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -131,15 +132,16 @@ func (client SourceControlClient) CreateOrUpdateResponder(resp *http.Response) ( // Delete delete the source control. // -// automationAccountName is the automation account name. sourceControlName is the name of source control. -func (client SourceControlClient) Delete(ctx context.Context, automationAccountName string, sourceControlName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the name of source control. +func (client SourceControlClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, sourceControlName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Delete", nil, "Failure preparing request") return @@ -161,10 +163,10 @@ func (client SourceControlClient) Delete(ctx context.Context, automationAccountN } // DeletePreparer prepares the Delete request. -func (client SourceControlClient) DeletePreparer(ctx context.Context, automationAccountName string, sourceControlName string) (*http.Request, error) { +func (client SourceControlClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -203,15 +205,16 @@ func (client SourceControlClient) DeleteResponder(resp *http.Response) (result a // Get retrieve the source control identified by source control name. // -// automationAccountName is the automation account name. sourceControlName is the name of source control. -func (client SourceControlClient) Get(ctx context.Context, automationAccountName string, sourceControlName string) (result SourceControl, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the name of source control. +func (client SourceControlClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result SourceControl, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, sourceControlName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, sourceControlName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Get", nil, "Failure preparing request") return @@ -233,10 +236,10 @@ func (client SourceControlClient) Get(ctx context.Context, automationAccountName } // GetPreparer prepares the Get request. -func (client SourceControlClient) GetPreparer(ctx context.Context, automationAccountName string, sourceControlName string) (*http.Request, error) { +func (client SourceControlClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -276,16 +279,17 @@ func (client SourceControlClient) GetResponder(resp *http.Response) (result Sour // ListByAutomationAccount retrieve a list of source controls. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client SourceControlClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result SourceControlListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client SourceControlClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result SourceControlListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -307,10 +311,10 @@ func (client SourceControlClient) ListByAutomationAccount(ctx context.Context, a } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client SourceControlClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client SourceControlClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -372,23 +376,24 @@ func (client SourceControlClient) listByAutomationAccountNextResults(lastResults } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client SourceControlClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result SourceControlListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client SourceControlClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result SourceControlListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update a source control. // -// automationAccountName is the automation account name. sourceControlName is the source control name. parameters -// is the parameters supplied to the update source control operation. -func (client SourceControlClient) Update(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (result SourceControl, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the source control name. parameters is the parameters supplied to the update source control +// operation. +func (client SourceControlClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (result SourceControl, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, sourceControlName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Update", nil, "Failure preparing request") return @@ -410,10 +415,10 @@ func (client SourceControlClient) Update(ctx context.Context, automationAccountN } // UpdatePreparer prepares the Update request. -func (client SourceControlClient) UpdatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (*http.Request, error) { +func (client SourceControlClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go b/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go index 7beb96e02189..7701c80633ae 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go @@ -32,27 +32,27 @@ type SourceControlSyncJobClient struct { } // NewSourceControlSyncJobClient creates an instance of the SourceControlSyncJobClient client. -func NewSourceControlSyncJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlSyncJobClient { - return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewSourceControlSyncJobClient(subscriptionID string) SourceControlSyncJobClient { + return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client. -func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlSyncJobClient { - return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobClient { + return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates the sync job for a source control. // -// automationAccountName is the automation account name. sourceControlName is the source control name. -// sourceControlSyncJobID is the source control sync job id. -func (client SourceControlSyncJobClient) Create(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result SourceControlSyncJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the source control name. sourceControlSyncJobID is the source control sync job id. +func (client SourceControlSyncJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result SourceControlSyncJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlSyncJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, sourceControlName, sourceControlSyncJobID) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlSyncJobClient", "Create", nil, "Failure preparing request") return @@ -74,10 +74,10 @@ func (client SourceControlSyncJobClient) Create(ctx context.Context, automationA } // CreatePreparer prepares the Create request. -func (client SourceControlSyncJobClient) CreatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { +func (client SourceControlSyncJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "sourceControlSyncJobId": autorest.Encode("path", sourceControlSyncJobID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -118,16 +118,16 @@ func (client SourceControlSyncJobClient) CreateResponder(resp *http.Response) (r // Get retrieve the source control sync job identified by job id. // -// automationAccountName is the automation account name. sourceControlName is the source control name. -// sourceControlSyncJobID is the source control sync job id. -func (client SourceControlSyncJobClient) Get(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result SourceControlSyncJobByID, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the source control name. sourceControlSyncJobID is the source control sync job id. +func (client SourceControlSyncJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result SourceControlSyncJobByID, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlSyncJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, sourceControlName, sourceControlSyncJobID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlSyncJobClient", "Get", nil, "Failure preparing request") return @@ -149,10 +149,10 @@ func (client SourceControlSyncJobClient) Get(ctx context.Context, automationAcco } // GetPreparer prepares the Get request. -func (client SourceControlSyncJobClient) GetPreparer(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { +func (client SourceControlSyncJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "sourceControlSyncJobId": autorest.Encode("path", sourceControlSyncJobID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -193,17 +193,17 @@ func (client SourceControlSyncJobClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of source control sync jobs. // -// automationAccountName is the automation account name. sourceControlName is the source control name. filter is -// the filter to apply on the operation. -func (client SourceControlSyncJobClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, sourceControlName string, filter string) (result SourceControlSyncJobListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// sourceControlName is the source control name. filter is the filter to apply on the operation. +func (client SourceControlSyncJobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result SourceControlSyncJobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlSyncJobClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, sourceControlName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlSyncJobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -225,10 +225,10 @@ func (client SourceControlSyncJobClient) ListByAutomationAccount(ctx context.Con } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client SourceControlSyncJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, sourceControlName string, filter string) (*http.Request, error) { +func (client SourceControlSyncJobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -291,7 +291,7 @@ func (client SourceControlSyncJobClient) listByAutomationAccountNextResults(last } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client SourceControlSyncJobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, sourceControlName string, filter string) (result SourceControlSyncJobListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, sourceControlName, filter) +func (client SourceControlSyncJobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result SourceControlSyncJobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, sourceControlName, filter) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/statistics.go b/services/automation/mgmt/2017-05-15-preview/automation/statistics.go index 38a32d4f6278..4ebfa7f129f5 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/statistics.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/statistics.go @@ -31,13 +31,13 @@ type StatisticsClient struct { } // NewStatisticsClient creates an instance of the StatisticsClient client. -func NewStatisticsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) StatisticsClient { - return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewStatisticsClient(subscriptionID string) StatisticsClient { + return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. -func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) StatisticsClient { - return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { + return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByAutomationAccount retrieve the statistics for the account. diff --git a/services/automation/mgmt/2017-05-15-preview/automation/testjob.go b/services/automation/mgmt/2017-05-15-preview/automation/testjob.go index ca73a2e6f423..63af34493587 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/testjob.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/testjob.go @@ -31,27 +31,28 @@ type TestJobClient struct { } // NewTestJobClient creates an instance of the TestJobClient client. -func NewTestJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobClient { - return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewTestJobClient(subscriptionID string) TestJobClient { + return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. -func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobClient { - return TestJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { + return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a test job of the runbook. // -// automationAccountName is the automation account name. runbookName is the parameters supplied to the create test -// job operation. parameters is the parameters supplied to the create test job operation. -func (client TestJobClient) Create(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the parameters supplied to the create test job operation. parameters is the parameters supplied to the create +// test job operation. +func (client TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, automationAccountName, runbookName, parameters) + req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Create", nil, "Failure preparing request") return @@ -73,10 +74,10 @@ func (client TestJobClient) Create(ctx context.Context, automationAccountName st } // CreatePreparer prepares the Create request. -func (client TestJobClient) CreatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { +func (client TestJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -118,15 +119,16 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob // Get retrieve the test job for the specified runbook. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Get(ctx context.Context, automationAccountName string, runbookName string) (result TestJob, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Get", nil, "Failure preparing request") return @@ -148,10 +150,10 @@ func (client TestJobClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client TestJobClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -191,15 +193,16 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e // Resume resume the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Resume(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, automationAccountName, runbookName) + req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Resume", nil, "Failure preparing request") return @@ -221,10 +224,10 @@ func (client TestJobClient) Resume(ctx context.Context, automationAccountName st } // ResumePreparer prepares the Resume request. -func (client TestJobClient) ResumePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -263,15 +266,16 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores // Stop stop the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Stop(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, automationAccountName, runbookName) + req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Stop", nil, "Failure preparing request") return @@ -293,10 +297,10 @@ func (client TestJobClient) Stop(ctx context.Context, automationAccountName stri } // StopPreparer prepares the Stop request. -func (client TestJobClient) StopPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -335,15 +339,16 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest. // Suspend suspend the test job. // -// automationAccountName is the automation account name. runbookName is the runbook name. -func (client TestJobClient) Suspend(ctx context.Context, automationAccountName string, runbookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. +func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, automationAccountName, runbookName) + req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Suspend", nil, "Failure preparing request") return @@ -365,10 +370,10 @@ func (client TestJobClient) Suspend(ctx context.Context, automationAccountName s } // SuspendPreparer prepares the Suspend request. -func (client TestJobClient) SuspendPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go b/services/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go index abfd1a53646a..5c7f9707cb26 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go @@ -31,27 +31,27 @@ type TestJobStreamsClient struct { } // NewTestJobStreamsClient creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobStreamsClient { - return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { + return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobStreamsClient { - return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { + return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve a test job stream of the test job identified by runbook name and stream id. // -// automationAccountName is the automation account name. runbookName is the runbook name. jobStreamID is the job -// stream id. -func (client TestJobStreamsClient) Get(ctx context.Context, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. jobStreamID is the job stream id. +func (client TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, runbookName, jobStreamID) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobStreamsClient", "Get", nil, "Failure preparing request") return @@ -73,11 +73,11 @@ func (client TestJobStreamsClient) Get(ctx context.Context, automationAccountNam } // GetPreparer prepares the Get request. -func (client TestJobStreamsClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { +func (client TestJobStreamsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,17 +117,17 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job // ListByTestJob retrieve a list of test job streams identified by runbook name. // -// automationAccountName is the automation account name. runbookName is the runbook name. filter is the filter to -// apply on the operation. -func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName +// is the runbook name. filter is the filter to apply on the operation. +func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "ListByTestJob", err.Error()) } result.fn = client.listByTestJobNextResults - req, err := client.ListByTestJobPreparer(ctx, automationAccountName, runbookName, filter) + req, err := client.ListByTestJobPreparer(ctx, resourceGroupName, automationAccountName, runbookName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobStreamsClient", "ListByTestJob", nil, "Failure preparing request") return @@ -149,10 +149,10 @@ func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, automation } // ListByTestJobPreparer prepares the ListByTestJob request. -func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, automationAccountName string, runbookName string, filter string) (*http.Request, error) { +func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -215,7 +215,7 @@ func (client TestJobStreamsClient) listByTestJobNextResults(lastResults JobStrea } // ListByTestJobComplete enumerates all values, automatically crossing page boundaries as required. -func (client TestJobStreamsClient) ListByTestJobComplete(ctx context.Context, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByTestJob(ctx, automationAccountName, runbookName, filter) +func (client TestJobStreamsClient) ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { + result.page, err = client.ListByTestJob(ctx, resourceGroupName, automationAccountName, runbookName, filter) return } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/usages.go b/services/automation/mgmt/2017-05-15-preview/automation/usages.go index d983d6cbae26..9c8726a20aef 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/usages.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/usages.go @@ -31,13 +31,13 @@ type UsagesClient struct { } // NewUsagesClient creates an instance of the UsagesClient client. -func NewUsagesClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewUsagesClient(subscriptionID string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. -func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByAutomationAccount retrieve the usage for the account id. diff --git a/services/automation/mgmt/2017-05-15-preview/automation/variable.go b/services/automation/mgmt/2017-05-15-preview/automation/variable.go index a668ef8304f8..e957827d4a3f 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/variable.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/variable.go @@ -31,30 +31,30 @@ type VariableClient struct { } // NewVariableClient creates an instance of the VariableClient client. -func NewVariableClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) VariableClient { - return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewVariableClient(subscriptionID string) VariableClient { + return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewVariableClientWithBaseURI creates an instance of the VariableClient client. -func NewVariableClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) VariableClient { - return VariableClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { + return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a variable. // -// automationAccountName is the automation account name. variableName is the variable name. parameters is the -// parameters supplied to the create or update variable operation. -func (client VariableClient) CreateOrUpdate(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the variable name. parameters is the parameters supplied to the create or update variable operation. +func (client VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.VariableCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, variableName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -76,10 +76,10 @@ func (client VariableClient) CreateOrUpdate(ctx context.Context, automationAccou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { +func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -121,15 +121,16 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the variable. // -// automationAccountName is the automation account name. variableName is the name of variable. -func (client VariableClient) Delete(ctx context.Context, automationAccountName string, variableName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the name of variable. +func (client VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, variableName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Delete", nil, "Failure preparing request") return @@ -151,10 +152,10 @@ func (client VariableClient) Delete(ctx context.Context, automationAccountName s } // DeletePreparer prepares the Delete request. -func (client VariableClient) DeletePreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -193,15 +194,16 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the variable identified by variable name. // -// automationAccountName is the automation account name. variableName is the name of variable. -func (client VariableClient) Get(ctx context.Context, automationAccountName string, variableName string) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the name of variable. +func (client VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, variableName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Get", nil, "Failure preparing request") return @@ -223,10 +225,10 @@ func (client VariableClient) Get(ctx context.Context, automationAccountName stri } // GetPreparer prepares the Get request. -func (client VariableClient) GetPreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -266,16 +268,16 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, // ListByAutomationAccount retrieve a list of variables. // -// automationAccountName is the automation account name. -func (client VariableClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result VariableListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client VariableClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -297,10 +299,10 @@ func (client VariableClient) ListByAutomationAccount(ctx context.Context, automa } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -359,23 +361,23 @@ func (client VariableClient) listByAutomationAccountNextResults(lastResults Vari } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result VariableListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) +func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) return } // Update update a variable. // -// automationAccountName is the automation account name. variableName is the variable name. parameters is the -// parameters supplied to the update variable operation. -func (client VariableClient) Update(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName +// is the variable name. parameters is the parameters supplied to the update variable operation. +func (client VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, variableName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Update", nil, "Failure preparing request") return @@ -397,10 +399,10 @@ func (client VariableClient) Update(ctx context.Context, automationAccountName s } // UpdatePreparer prepares the Update request. -func (client VariableClient) UpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { +func (client VariableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/webhook.go b/services/automation/mgmt/2017-05-15-preview/automation/webhook.go index 6950464196b9..e55131849aba 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/webhook.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/webhook.go @@ -31,30 +31,30 @@ type WebhookClient struct { } // NewWebhookClient creates an instance of the WebhookClient client. -func NewWebhookClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) WebhookClient { - return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) +func NewWebhookClient(subscriptionID string) WebhookClient { + return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. -func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) WebhookClient { - return WebhookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} +func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { + return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. parameters is the create -// or update parameters for webhook. -func (client WebhookClient) CreateOrUpdate(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. parameters is the create or update parameters for webhook. +func (client WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.WebhookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, webhookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -76,10 +76,10 @@ func (client WebhookClient) CreateOrUpdate(ctx context.Context, automationAccoun } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { +func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -121,15 +121,16 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the webhook by name. // -// automationAccountName is the automation account name. webhookName is the webhook name. -func (client WebhookClient) Delete(ctx context.Context, automationAccountName string, webhookName string) (result autorest.Response, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. +func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, automationAccountName, webhookName) + req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Delete", nil, "Failure preparing request") return @@ -151,10 +152,10 @@ func (client WebhookClient) Delete(ctx context.Context, automationAccountName st } // DeletePreparer prepares the Delete request. -func (client WebhookClient) DeletePreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -193,15 +194,15 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores // GenerateURI generates a Uri for use in creating a webhook. // -// automationAccountName is the automation account name. -func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountName string) (result String, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "GenerateURI", err.Error()) } - req, err := client.GenerateURIPreparer(ctx, automationAccountName) + req, err := client.GenerateURIPreparer(ctx, resourceGroupName, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "GenerateURI", nil, "Failure preparing request") return @@ -223,10 +224,10 @@ func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountNa } // GenerateURIPreparer prepares the GenerateURI request. -func (client WebhookClient) GenerateURIPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { +func (client WebhookClient) GenerateURIPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -265,15 +266,16 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St // Get retrieve the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. -func (client WebhookClient) Get(ctx context.Context, automationAccountName string, webhookName string) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. +func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, automationAccountName, webhookName) + req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Get", nil, "Failure preparing request") return @@ -295,10 +297,10 @@ func (client WebhookClient) Get(ctx context.Context, automationAccountName strin } // GetPreparer prepares the Get request. -func (client WebhookClient) GetPreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -338,16 +340,17 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e // ListByAutomationAccount retrieve a list of webhooks. // -// automationAccountName is the automation account name. filter is the filter to apply on the operation. -func (client WebhookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultPage, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is +// the filter to apply on the operation. +func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -369,10 +372,10 @@ func (client WebhookClient) ListByAutomationAccount(ctx context.Context, automat } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { +func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -434,23 +437,23 @@ func (client WebhookClient) listByAutomationAccountNextResults(lastResults Webho } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) +func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update the webhook identified by webhook name. // -// automationAccountName is the automation account name. webhookName is the webhook name. parameters is the update -// parameters for webhook. -func (client WebhookClient) Update(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName +// is the webhook name. parameters is the update parameters for webhook. +func (client WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: client.ResourceGroupName, - Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, automationAccountName, webhookName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Update", nil, "Failure preparing request") return @@ -472,10 +475,10 @@ func (client WebhookClient) Update(ctx context.Context, automationAccountName st } // UpdatePreparer prepares the Update request. -func (client WebhookClient) UpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { +func (client WebhookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), }