diff --git a/services/automation/mgmt/2015-10-31/automation/account.go b/services/automation/mgmt/2015-10-31/automation/account.go index 037f73a92408..5a749315bae8 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) AccountClient { - return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewAccountClient(subscriptionID string, resourceGroupName string) AccountClient { + return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewAccountClientWithBaseURI creates an instance of the AccountClient client. -func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { - return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewAccountClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) AccountClient { + return AccountClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // 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 ac9db9eb863f..1c99f4838c8b 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) ActivityClient { - return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewActivityClient(subscriptionID string, resourceGroupName string) ActivityClient { + return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewActivityClientWithBaseURI creates an instance of the ActivityClient client. -func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { - return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewActivityClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ActivityClient { + return ActivityClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the activity in the module identified by module name and activity name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName, activityName) + req, err := client.GetPreparer(ctx, 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, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client ActivityClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { +func (client ActivityClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,17 +117,16 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, // ListByModule retrieve a list of activities in the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, moduleName) + req, err := client.ListByModulePreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "ListByModule", nil, "Failure preparing request") return @@ -149,11 +148,11 @@ func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName } // ListByModulePreparer prepares the ListByModule request. -func (client ActivityClient) ListByModulePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ActivityClient) ListByModulePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -212,7 +211,7 @@ func (client ActivityClient) listByModuleNextResults(lastResults ActivityListRes } // ListByModuleComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client ActivityClient) ListByModuleComplete(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { + result.page, err = client.ListByModule(ctx, 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 365936df4f91..39cfa0fe8604 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) AgentRegistrationInformationClient { - return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewAgentRegistrationInformationClient(subscriptionID string, resourceGroupName string) AgentRegistrationInformationClient { + return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient // client. -func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { - return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) AgentRegistrationInformationClient { + return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the automation agent registration information. // -// 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) { +// automationAccountName is the automation account name. +func (client AgentRegistrationInformationClient) Get(ctx context.Context, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GetPreparer(ctx, 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, resour } // GetPreparer prepares the Get request. -func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "RegenerateKey", err.Error()) } - req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, automationAccountName, parameters) + req, err := client.RegenerateKeyPreparer(ctx, 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, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { +func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 11a65b7c908b..0082c8f71a70 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) CertificateClient { - return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewCertificateClient(subscriptionID string, resourceGroupName string) CertificateClient { + return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. -func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { - return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) CertificateClient { + return CertificateClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create a certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGrou return result, validation.NewError("automation.CertificateClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGrou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { +func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +123,15 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete the certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, certificateName) + req, err := client.DeletePreparer(ctx, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client CertificateClient) Delete(ctx context.Context, resourceGroupName st } // DeletePreparer prepares the Delete request. -func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,16 +195,15 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the certificate identified by certificate name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, certificateName) + req, err := client.GetPreparer(ctx, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Get", nil, "Failure preparing request") return @@ -227,11 +225,11 @@ func (client CertificateClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client CertificateClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +268,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif // ListByAutomationAccount retrieve a list of certificates. // -// 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) { +// automationAccountName is the automation account name. +func (client CertificateClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CertificateListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +299,10 @@ func (client CertificateClient) ListByAutomationAccount(ctx context.Context, res } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -363,24 +361,23 @@ func (client CertificateClient) listByAutomationAccountNextResults(lastResults C } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CertificateListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Update", nil, "Failure preparing request") return @@ -402,11 +399,11 @@ func (client CertificateClient) Update(ctx context.Context, resourceGroupName st } // UpdatePreparer prepares the Update request. -func (client CertificateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { +func (client CertificateClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 707fd618586a..b66b006734a9 100644 --- a/services/automation/mgmt/2015-10-31/automation/client.go +++ b/services/automation/mgmt/2015-10-31/automation/client.go @@ -32,20 +32,22 @@ const ( // BaseClient is the base client for Automation. type BaseClient struct { autorest.Client - BaseURI string - SubscriptionID string + BaseURI string + SubscriptionID string + ResourceGroupName string } // New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) +func New(subscriptionID string, resourceGroupName string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { +func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + ResourceGroupName: resourceGroupName, } } diff --git a/services/automation/mgmt/2015-10-31/automation/connection.go b/services/automation/mgmt/2015-10-31/automation/connection.go index 39287927d6eb..261940c093b8 100644 --- a/services/automation/mgmt/2015-10-31/automation/connection.go +++ b/services/automation/mgmt/2015-10-31/automation/connection.go @@ -31,24 +31,23 @@ type ConnectionClient struct { } // NewConnectionClient creates an instance of the ConnectionClient client. -func NewConnectionClient(subscriptionID string) ConnectionClient { - return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewConnectionClient(subscriptionID string, resourceGroupName string) ConnectionClient { + return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. -func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { - return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ConnectionClient { + return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create or update a connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -56,7 +55,7 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroup return result, validation.NewError("automation.ConnectionClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +77,11 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroup } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +122,15 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionName) + req, err := client.DeletePreparer(ctx, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +152,11 @@ func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName str } // DeletePreparer prepares the Delete request. -func (client ConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -197,16 +195,15 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn // Get retrieve the connection identified by connection name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionName) + req, err := client.GetPreparer(ctx, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Get", nil, "Failure preparing request") return @@ -228,11 +225,11 @@ func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client ConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -271,16 +268,16 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect // ListByAutomationAccount retrieve a list of connections. // -// 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) { +// automationAccountName is the automation account name. +func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -302,10 +299,10 @@ func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, reso } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -364,24 +361,23 @@ func (client ConnectionClient) listByAutomationAccountNextResults(lastResults Co } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Update", nil, "Failure preparing request") return @@ -403,11 +399,11 @@ func (client ConnectionClient) Update(ctx context.Context, resourceGroupName str } // UpdatePreparer prepares the Update request. -func (client ConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 a5ce642d08d0..e0d78201d71d 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) ConnectionTypeClient { - return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewConnectionTypeClient(subscriptionID string, resourceGroupName string) ConnectionTypeClient { + return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { - return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ConnectionTypeClient { + return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create a connectiontype. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceG return result, validation.NewError("automation.ConnectionTypeClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceG } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +123,15 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete the connectiontype. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) + req, err := client.DeletePreparer(ctx, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName } // DeletePreparer prepares the Delete request. -func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,16 +195,15 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result // Get retrieve the connectiontype identified by connectiontype name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) + req, err := client.GetPreparer(ctx, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Get", nil, "Failure preparing request") return @@ -227,11 +225,11 @@ func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName st } // GetPreparer prepares the Get request. -func (client ConnectionTypeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +268,16 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con // ListByAutomationAccount retrieve a list of connectiontypes. // -// 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) { +// automationAccountName is the automation account name. +func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +299,10 @@ func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -363,7 +361,7 @@ func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResult } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 11f696368414..93e562ee2899 100644 --- a/services/automation/mgmt/2015-10-31/automation/credential.go +++ b/services/automation/mgmt/2015-10-31/automation/credential.go @@ -31,24 +31,23 @@ type CredentialClient struct { } // NewCredentialClient creates an instance of the CredentialClient client. -func NewCredentialClient(subscriptionID string) CredentialClient { - return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewCredentialClient(subscriptionID string, resourceGroupName string) CredentialClient { + return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. -func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { - return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) CredentialClient { + return CredentialClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create a credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -58,7 +57,7 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroup return result, validation.NewError("automation.CredentialClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -80,11 +79,11 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroup } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { +func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -125,16 +124,15 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, credentialName) + req, err := client.DeletePreparer(ctx, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Delete", nil, "Failure preparing request") return @@ -156,11 +154,11 @@ func (client CredentialClient) Delete(ctx context.Context, resourceGroupName str } // DeletePreparer prepares the Delete request. -func (client CredentialClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -198,16 +196,15 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto // Get retrieve the credential identified by credential name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, credentialName) + req, err := client.GetPreparer(ctx, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Get", nil, "Failure preparing request") return @@ -229,11 +226,11 @@ func (client CredentialClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client CredentialClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +269,16 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent // ListByAutomationAccount retrieve a list of credentials. // -// 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) { +// automationAccountName is the automation account name. +func (client CredentialClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CredentialListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +300,10 @@ func (client CredentialClient) ListByAutomationAccount(ctx context.Context, reso } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,24 +362,23 @@ func (client CredentialClient) listByAutomationAccountNextResults(lastResults Cr } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CredentialListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Update", nil, "Failure preparing request") return @@ -404,11 +400,11 @@ func (client CredentialClient) Update(ctx context.Context, resourceGroupName str } // UpdatePreparer prepares the Update request. -func (client CredentialClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { +func (client CredentialClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 148d7c66aebb..5214a65330f5 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go @@ -32,31 +32,30 @@ type DscCompilationJobClient struct { } // NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { - return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscCompilationJobClient(subscriptionID string, resourceGroupName string) DscCompilationJobClient { + return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { - return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscCompilationJobClient { + return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Create creates the Dsc compilation job of the configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, compilationJobID, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, compilationJobID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Create", nil, "Failure preparing request") return @@ -78,11 +77,11 @@ func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupN } // CreatePreparer prepares the Create request. -func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { +func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +122,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu // Get retrieve the Dsc configuration compilation job identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, compilationJobID) + req, err := client.GetPreparer(ctx, automationAccountName, compilationJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Get", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName } // GetPreparer prepares the Get request. -func (client DscCompilationJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -197,16 +196,15 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result // GetStream retrieve the job stream identified by job stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "GetStream", err.Error()) } - req, err := client.GetStreamPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) + req, err := client.GetStreamPreparer(ctx, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "GetStream", nil, "Failure preparing request") return @@ -228,12 +226,12 @@ func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGro } // GetStreamPreparer prepares the GetStream request. -func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { +func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,17 +270,16 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of dsc compilation jobs. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -304,10 +301,10 @@ func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Contex } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -369,7 +366,7 @@ func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastRes } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 6e103018fe4c..39f5236fe8fa 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go @@ -32,27 +32,26 @@ type DscCompilationJobStreamClient struct { } // NewDscCompilationJobStreamClient creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobStreamClient { - return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscCompilationJobStreamClient(subscriptionID string, resourceGroupName string) DscCompilationJobStreamClient { + return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { - return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscCompilationJobStreamClient { + return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // ListByJob retrieve all the job streams for the compilation Job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobStreamClient", "ListByJob", err.Error()) } - req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -74,11 +73,11 @@ func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resou } // ListByJobPreparer prepares the ListByJob request. -func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 87d1abc507ae..3c9716597392 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go @@ -31,24 +31,23 @@ type DscConfigurationClient struct { } // NewDscConfigurationClient creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { - return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscConfigurationClient(subscriptionID string, resourceGroupName string) DscConfigurationClient { + return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { - return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscConfigurationClient { + return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create the configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -61,7 +60,7 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourc return result, validation.NewError("automation.DscConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, configurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, configurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -128,16 +127,15 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response // Delete delete the dsc configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.DeletePreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -159,11 +157,11 @@ func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupNa } // DeletePreparer prepares the Delete request. -func (client DscConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -201,16 +199,15 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul // Get retrieve the configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.GetPreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Get", nil, "Failure preparing request") return @@ -232,11 +229,11 @@ func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName } // GetPreparer prepares the Get request. -func (client DscConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -275,16 +272,15 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D // GetContent retrieve the configuration script identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.GetContentPreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "GetContent", nil, "Failure preparing request") return @@ -306,11 +302,11 @@ func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGro } // GetContentPreparer prepares the GetContent request. -func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -349,16 +345,16 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of configurations. // -// 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) { +// automationAccountName is the automation account name. +func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result DscConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -380,10 +376,10 @@ func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -442,86 +438,7 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) - return -} - -// Update 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) Update(ctx context.Context, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (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 { - return result, validation.NewError("automation.DscConfigurationClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, automationAccountName, configurationName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DscConfigurationClient) UpdatePreparer(ctx context.Context, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-10-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client DscConfigurationClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DscConfigurationClient) UpdateResponder(resp *http.Response) (result DscConfiguration, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} +func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result DscConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 a51206bccabe..d14439275762 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnode.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnode.go @@ -31,27 +31,26 @@ type DscNodeClient struct { } // NewDscNodeClient creates an instance of the DscNodeClient client. -func NewDscNodeClient(subscriptionID string) DscNodeClient { - return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscNodeClient(subscriptionID string, resourceGroupName string) DscNodeClient { + return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. -func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { - return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscNodeClient { + return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Delete delete the dsc node identified by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeID) + req, err := client.DeletePreparer(ctx, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Delete", nil, "Failure preparing request") return @@ -73,11 +72,11 @@ func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client DscNodeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,16 +115,15 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode // Get retrieve the dsc node identified by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID) + req, err := client.GetPreparer(ctx, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Get", nil, "Failure preparing request") return @@ -147,11 +145,11 @@ func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client DscNodeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,17 +188,16 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e // ListByAutomationAccount retrieve a list of dsc nodes. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -222,10 +219,10 @@ func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -287,23 +284,23 @@ func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Update update the dsc node. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeID, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, nodeID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Update", nil, "Failure preparing request") return @@ -325,11 +322,11 @@ func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client DscNodeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { +func (client DscNodeClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 e2684c9b1552..cbefc2741380 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go @@ -31,24 +31,23 @@ type DscNodeConfigurationClient struct { } // NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient { - return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscNodeConfigurationClient(subscriptionID string, resourceGroupName string) DscNodeConfigurationClient { + return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { - return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) DscNodeConfigurationClient { + return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create the node configuration identified by node configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -61,7 +60,7 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, res return result, validation.NewError("automation.DscNodeConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, nodeConfigurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, res } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -128,16 +127,15 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete the Dsc node configurations by node configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) + req, err := client.DeletePreparer(ctx, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -159,11 +157,11 @@ func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGro } // DeletePreparer prepares the Delete request. -func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -201,16 +199,15 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r // Get retrieve the Dsc node configurations by node configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) + req, err := client.GetPreparer(ctx, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Get", nil, "Failure preparing request") return @@ -232,11 +229,11 @@ func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupN } // GetPreparer prepares the Get request. -func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -275,17 +272,16 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of dsc node configurations. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -307,10 +303,10 @@ func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Con } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -372,7 +368,7 @@ func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(last } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 756ad090d914..92b868b9cefd 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) FieldsClient { - return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewFieldsClient(subscriptionID string, resourceGroupName string) FieldsClient { + return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. -func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { - return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) FieldsClient { + return FieldsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // ListByType retrieve a list of fields of a given type identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.FieldsClient", "ListByType", err.Error()) } - req, err := client.ListByTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) + req, err := client.ListByTypePreparer(ctx, 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, resourceGroupName str } // ListByTypePreparer prepares the ListByType request. -func (client FieldsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client FieldsClient) ListByTypePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 d480a44178ce..bcc753901a24 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) HybridRunbookWorkerGroupClient { - return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewHybridRunbookWorkerGroupClient(subscriptionID string, resourceGroupName string) HybridRunbookWorkerGroupClient { + return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { - return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) HybridRunbookWorkerGroupClient { + return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Delete delete a hybrid runbook worker group. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.DeletePreparer(ctx, 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, resourc } // DeletePreparer prepares the Delete request. -func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.GetPreparer(ctx, 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, resourceGr } // GetPreparer prepares the Get request. -func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// automationAccountName is the automation account name. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, 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, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -282,24 +282,23 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults( } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a hybrid runbook worker group. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Update", nil, "Failure preparing request") return @@ -321,11 +320,11 @@ func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourc } // UpdatePreparer prepares the Update request. -func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 72cd180f957b..62b294797d1d 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) JobClient { - return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobClient(subscriptionID string, resourceGroupName string) JobClient { + return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewJobClientWithBaseURI creates an instance of the JobClient client. -func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { - return JobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobClient { + return JobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Create create a job of the runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, jobID, parameters) + req, err := client.CreatePreparer(ctx, 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, resourceGroupName string, au } // CreatePreparer prepares the Create request. -func (client JobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (*http.Request, error) { +func (client JobClient) CreatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,16 +122,15 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er // Get retrieve the job identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.GetPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Get", nil, "Failure preparing request") return @@ -153,11 +152,11 @@ func (client JobClient) Get(ctx context.Context, resourceGroupName string, autom } // GetPreparer prepares the Get request. -func (client JobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,16 +195,15 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error // GetOutput retrieve the job output identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetOutput", err.Error()) } - req, err := client.GetOutputPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.GetOutputPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetOutput", nil, "Failure preparing request") return @@ -227,11 +225,11 @@ func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, } // GetOutputPreparer prepares the GetOutput request. -func (client JobClient) GetOutputPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (*http.Request, error) { +func (client JobClient) GetOutputPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +267,15 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos // GetRunbookContent retrieve the runbook content of the job identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetRunbookContent", err.Error()) } - req, err := client.GetRunbookContentPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.GetRunbookContentPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetRunbookContent", nil, "Failure preparing request") return @@ -300,11 +297,11 @@ func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName } // GetRunbookContentPreparer prepares the GetRunbookContent request. -func (client JobClient) GetRunbookContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (*http.Request, error) { +func (client JobClient) GetRunbookContentPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -342,17 +339,16 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result // ListByAutomationAccount retrieve a list of jobs. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -374,10 +370,10 @@ func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGro } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -439,23 +435,22 @@ func (client JobClient) listByAutomationAccountNextResults(lastResults JobListRe } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result JobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Resume resume the job identified by jobId. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.ResumePreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Resume", nil, "Failure preparing request") return @@ -477,11 +472,11 @@ func (client JobClient) Resume(ctx context.Context, resourceGroupName string, au } // ResumePreparer prepares the Resume request. -func (client JobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) ResumePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -519,16 +514,15 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re // Stop stop the job identified by jobId. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.StopPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Stop", nil, "Failure preparing request") return @@ -550,11 +544,11 @@ func (client JobClient) Stop(ctx context.Context, resourceGroupName string, auto } // StopPreparer prepares the Stop request. -func (client JobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) StopPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -592,16 +586,15 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp // Suspend suspend the job identified by jobId. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.SuspendPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Suspend", nil, "Failure preparing request") return @@ -623,11 +616,11 @@ func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, a } // SuspendPreparer prepares the Suspend request. -func (client JobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client JobClient) SuspendPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 fdcd16cb4515..0c68c574bd96 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobschedule.go +++ b/services/automation/mgmt/2015-10-31/automation/jobschedule.go @@ -32,24 +32,23 @@ type JobScheduleClient struct { } // NewJobScheduleClient creates an instance of the JobScheduleClient client. -func NewJobScheduleClient(subscriptionID string) JobScheduleClient { - return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobScheduleClient(subscriptionID string, resourceGroupName string) JobScheduleClient { + return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. -func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { - return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobScheduleClient { + return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Create create a job schedule. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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}, @@ -58,7 +57,7 @@ func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName st return result, validation.NewError("automation.JobScheduleClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, jobScheduleID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Create", nil, "Failure preparing request") return @@ -80,11 +79,11 @@ func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName st } // CreatePreparer prepares the Create request. -func (client JobScheduleClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { +func (client JobScheduleClient) CreatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -125,16 +124,15 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job // Delete delete the job schedule identified by job schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) + req, err := client.DeletePreparer(ctx, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Delete", nil, "Failure preparing request") return @@ -156,11 +154,11 @@ func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName st } // DeletePreparer prepares the Delete request. -func (client JobScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -198,16 +196,15 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the job schedule identified by job schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) + req, err := client.GetPreparer(ctx, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Get", nil, "Failure preparing request") return @@ -229,11 +226,11 @@ func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client JobScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +269,16 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch // ListByAutomationAccount retrieve a list of job schedules. // -// 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) { +// automationAccountName is the automation account name. +func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result JobScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +300,10 @@ func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, res } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,7 +362,7 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result JobScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 71d0b27fbbe3..bf6ec2513774 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/jobstream.go @@ -31,27 +31,26 @@ type JobStreamClient struct { } // NewJobStreamClient creates an instance of the JobStreamClient client. -func NewJobStreamClient(subscriptionID string) JobStreamClient { - return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobStreamClient(subscriptionID string, resourceGroupName string) JobStreamClient { + return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. -func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { - return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) JobStreamClient { + return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the job stream identified by job stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) + req, err := client.GetPreparer(ctx, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "Get", nil, "Failure preparing request") return @@ -73,12 +72,12 @@ func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client JobStreamClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (*http.Request, error) { +func (client JobStreamClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,17 +116,17 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea // ListByJob retrieve a list of jobs streams identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, jobID, filter) + req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -149,11 +148,11 @@ func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName s } // ListByJobPreparer prepares the ListByJob request. -func (client JobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (*http.Request, error) { +func (client JobStreamClient) ListByJobPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -215,7 +214,7 @@ func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResu } // ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -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) +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) return } diff --git a/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go b/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go index 07bd7f664551..dcab2051b0bd 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) LinkedWorkspaceClient { - return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewLinkedWorkspaceClient(subscriptionID string, resourceGroupName string) LinkedWorkspaceClient { + return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { - return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) LinkedWorkspaceClient { + return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the linked workspace for the account id. // -// 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) { +// automationAccountName is the automation account name. +func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountName string) (result LinkedWorkspace, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.LinkedWorkspaceClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GetPreparer(ctx, 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, resourceGroupName s } // GetPreparer prepares the Get request. -func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2015-10-31/automation/models.go b/services/automation/mgmt/2015-10-31/automation/models.go index f28783338934..2b1c94dcf7db 100644 --- a/services/automation/mgmt/2015-10-31/automation/models.go +++ b/services/automation/mgmt/2015-10-31/automation/models.go @@ -3287,73 +3287,6 @@ func (dcp DscConfigurationProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DscConfigurationUpdateParameters the parameters supplied to the create or update configuration operation. -type DscConfigurationUpdateParameters struct { - // DscConfigurationCreateOrUpdateProperties - Gets or sets configuration create or update properties. - *DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"` - // Name - Gets or sets name of the resource. - Name *string `json:"name,omitempty"` - // Tags - Gets or sets the tags attached to the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DscConfigurationUpdateParameters. -func (dcup DscConfigurationUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dcup.DscConfigurationCreateOrUpdateProperties != nil { - objectMap["properties"] = dcup.DscConfigurationCreateOrUpdateProperties - } - if dcup.Name != nil { - objectMap["name"] = dcup.Name - } - if dcup.Tags != nil { - objectMap["tags"] = dcup.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DscConfigurationUpdateParameters struct. -func (dcup *DscConfigurationUpdateParameters) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dscConfigurationCreateOrUpdateProperties DscConfigurationCreateOrUpdateProperties - err = json.Unmarshal(*v, &dscConfigurationCreateOrUpdateProperties) - if err != nil { - return err - } - dcup.DscConfigurationCreateOrUpdateProperties = &dscConfigurationCreateOrUpdateProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dcup.Name = &name - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dcup.Tags = tags - } - } - } - - return nil -} - // DscMetaConfiguration definition of the DSC Meta Configuration. type DscMetaConfiguration struct { // ConfigurationModeFrequencyMins - Gets or sets the ConfigurationModeFrequencyMins value of the meta configuration. diff --git a/services/automation/mgmt/2015-10-31/automation/module.go b/services/automation/mgmt/2015-10-31/automation/module.go index 929cc72ca68b..fb42da58014a 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) ModuleClient { - return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewModuleClient(subscriptionID string, resourceGroupName string) ModuleClient { + return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewModuleClientWithBaseURI creates an instance of the ModuleClient client. -func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { - return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewModuleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ModuleClient { + return ModuleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create or Update the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName return result, validation.NewError("automation.ModuleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupName } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { +func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,16 +127,15 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the module by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, moduleName) + req, err := client.DeletePreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Delete", nil, "Failure preparing request") return @@ -158,11 +157,11 @@ func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, } // DeletePreparer prepares the Delete request. -func (client ModuleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -200,16 +199,15 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest // Get retrieve the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName) + req, err := client.GetPreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Get", nil, "Failure preparing request") return @@ -231,11 +229,11 @@ func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, au } // GetPreparer prepares the Get request. -func (client ModuleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -274,16 +272,16 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err // ListByAutomationAccount retrieve a list of modules. // -// 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) { +// automationAccountName is the automation account name. +func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ModuleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -305,10 +303,10 @@ func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resource } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -367,23 +365,23 @@ func (client ModuleClient) listByAutomationAccountNextResults(lastResults Module } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ModuleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Update", nil, "Failure preparing request") return @@ -405,11 +403,11 @@ func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client ModuleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { +func (client ModuleClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 2cdc9b7ee487..124a66128fca 100644 --- a/services/automation/mgmt/2015-10-31/automation/nodereports.go +++ b/services/automation/mgmt/2015-10-31/automation/nodereports.go @@ -31,27 +31,26 @@ type NodeReportsClient struct { } // NewNodeReportsClient creates an instance of the NodeReportsClient client. -func NewNodeReportsClient(subscriptionID string) NodeReportsClient { - return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewNodeReportsClient(subscriptionID string, resourceGroupName string) NodeReportsClient { + return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. -func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { - return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) NodeReportsClient { + return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the Dsc node report data by node id and report id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) + req, err := client.GetPreparer(ctx, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "Get", nil, "Failure preparing request") return @@ -73,12 +72,12 @@ func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client NodeReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,16 +116,15 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod // GetContent retrieve the Dsc node reports by node id and report id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) + req, err := client.GetContentPreparer(ctx, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "GetContent", nil, "Failure preparing request") return @@ -148,12 +146,12 @@ func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupNam } // GetContentPreparer prepares the GetContent request. -func (client NodeReportsClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetContentPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -192,17 +190,17 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result // ListByNode retrieve the Dsc node report list by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, nodeID, filter) + req, err := client.ListByNodePreparer(ctx, automationAccountName, nodeID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "ListByNode", nil, "Failure preparing request") return @@ -224,11 +222,11 @@ func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupNam } // ListByNodePreparer prepares the ListByNode request. -func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (*http.Request, error) { +func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -290,7 +288,7 @@ func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportL } // ListByNodeComplete enumerates all values, automatically crossing page boundaries as required. -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) +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) return } diff --git a/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go b/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go index 80f1cb735be0..79064f031ac2 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) ObjectDataTypesClient { - return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewObjectDataTypesClient(subscriptionID string, resourceGroupName string) ObjectDataTypesClient { + return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { - return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ObjectDataTypesClient { + return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", err.Error()) } - req, err := client.ListFieldsByModuleAndTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) + req, err := client.ListFieldsByModuleAndTypePreparer(ctx, 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, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } @@ -117,16 +117,15 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt // ListFieldsByType retrieve a list of fields of a given type across all accessible modules. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByType", err.Error()) } - req, err := client.ListFieldsByTypePreparer(ctx, resourceGroupName, automationAccountName, typeName) + req, err := client.ListFieldsByTypePreparer(ctx, automationAccountName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByType", nil, "Failure preparing request") return @@ -148,10 +147,10 @@ func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resour } // ListFieldsByTypePreparer prepares the ListFieldsByType request. -func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, automationAccountName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 b731c2d30ea0..facdcde19b97 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) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewOperationsClient(subscriptionID string, resourceGroupName string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // 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 fc316a1d7c9a..f639860e7857 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbook.go +++ b/services/automation/mgmt/2015-10-31/automation/runbook.go @@ -31,24 +31,23 @@ type RunbookClient struct { } // NewRunbookClient creates an instance of the RunbookClient client. -func NewRunbookClient(subscriptionID string) RunbookClient { - return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewRunbookClient(subscriptionID string, resourceGroupName string) RunbookClient { + return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. -func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { - return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) RunbookClient { + return RunbookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -69,7 +68,7 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupNam return result, validation.NewError("automation.RunbookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -91,10 +90,10 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { +func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -136,16 +135,15 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the runbook by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.DeletePreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Delete", nil, "Failure preparing request") return @@ -167,10 +165,10 @@ func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client RunbookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) DeletePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -209,16 +207,15 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores // Get retrieve the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Get", nil, "Failure preparing request") return @@ -240,10 +237,10 @@ func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client RunbookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -283,16 +280,15 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e // GetContent retrieve the content of runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "GetContent", nil, "Failure preparing request") return @@ -314,10 +310,10 @@ func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName st } // GetContentPreparer prepares the GetContent request. -func (client RunbookClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -357,16 +353,16 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Str // ListByAutomationAccount retrieve a list of runbooks. // -// 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) { +// automationAccountName is the automation account name. +func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result RunbookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -388,10 +384,10 @@ func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -450,23 +446,23 @@ func (client RunbookClient) listByAutomationAccountNextResults(lastResults Runbo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result RunbookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Update", nil, "Failure preparing request") return @@ -488,10 +484,10 @@ func (client RunbookClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client RunbookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { +func (client RunbookClient) UpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 b1bcf9e2ef5c..2df6d5e62cef 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbookdraft.go +++ b/services/automation/mgmt/2015-10-31/automation/runbookdraft.go @@ -31,27 +31,26 @@ type RunbookDraftClient struct { } // NewRunbookDraftClient creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { - return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewRunbookDraftClient(subscriptionID string, resourceGroupName string) RunbookDraftClient { + return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { - return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) RunbookDraftClient { + return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve the runbook draft identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Get", nil, "Failure preparing request") return @@ -73,10 +72,10 @@ func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName stri } // GetPreparer prepares the Get request. -func (client RunbookDraftClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,16 +115,15 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo // GetContent retrieve the content of runbook draft identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "GetContent", nil, "Failure preparing request") return @@ -147,10 +145,10 @@ func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupNa } // GetContentPreparer prepares the GetContent request. -func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,16 +188,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul // Publish publish runbook draft. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Publish", err.Error()) } - req, err := client.PublishPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.PublishPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Publish", nil, "Failure preparing request") return @@ -215,10 +213,10 @@ func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName } // PublishPreparer prepares the Publish request. -func (client RunbookDraftClient) PublishPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) PublishPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -265,16 +263,16 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result a // ReplaceContent replaces the runbook draft content. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "ReplaceContent", err.Error()) } - req, err := client.ReplaceContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent) + req, err := client.ReplaceContentPreparer(ctx, automationAccountName, runbookName, runbookContent) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "ReplaceContent", nil, "Failure preparing request") return @@ -290,10 +288,10 @@ func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGro } // ReplaceContentPreparer prepares the ReplaceContent request. -func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { +func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -342,16 +340,15 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r // UndoEdit undo draft edit to last known published state identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "UndoEdit", err.Error()) } - req, err := client.UndoEditPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.UndoEditPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "UndoEdit", nil, "Failure preparing request") return @@ -373,10 +370,10 @@ func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName } // UndoEditPreparer prepares the UndoEdit request. -func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 ee673e96001e..c64a63493f7e 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) ScheduleClient { - return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewScheduleClient(subscriptionID string, resourceGroupName string) ScheduleClient { + return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. -func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { - return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) ScheduleClient { + return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create a schedule. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupNa return result, validation.NewError("automation.ScheduleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,16 +122,15 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, scheduleName) + req, err := client.DeletePreparer(ctx, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Delete", nil, "Failure preparing request") return @@ -153,10 +152,10 @@ func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName strin } // DeletePreparer prepares the Delete request. -func (client ScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,16 +194,15 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, scheduleName) + req, err := client.GetPreparer(ctx, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Get", nil, "Failure preparing request") return @@ -226,10 +224,10 @@ func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client ScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +267,16 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, // ListByAutomationAccount retrieve a list of schedules. // -// 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) { +// automationAccountName is the automation account name. +func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +298,10 @@ func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resour } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,23 +360,23 @@ func (client ScheduleClient) listByAutomationAccountNextResults(lastResults Sche } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Update", nil, "Failure preparing request") return @@ -400,10 +398,10 @@ func (client ScheduleClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client ScheduleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) UpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 4ebfa7f129f5..f60511847be2 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) StatisticsClient { - return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewStatisticsClient(subscriptionID string, resourceGroupName string) StatisticsClient { + return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. -func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { - return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) StatisticsClient { + return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // 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 63af34493587..6b821345ddbd 100644 --- a/services/automation/mgmt/2015-10-31/automation/testjob.go +++ b/services/automation/mgmt/2015-10-31/automation/testjob.go @@ -31,28 +31,27 @@ type TestJobClient struct { } // NewTestJobClient creates an instance of the TestJobClient client. -func NewTestJobClient(subscriptionID string) TestJobClient { - return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewTestJobClient(subscriptionID string, resourceGroupName string) TestJobClient { + return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. -func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { - return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) TestJobClient { + return TestJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Create create a test job of the runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Create", nil, "Failure preparing request") return @@ -74,10 +73,10 @@ func (client TestJobClient) Create(ctx context.Context, resourceGroupName string } // CreatePreparer prepares the Create request. -func (client TestJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { +func (client TestJobClient) CreatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -119,16 +118,15 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob // Get retrieve the test job for the specified runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Get", nil, "Failure preparing request") return @@ -150,10 +148,10 @@ func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client TestJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -193,16 +191,15 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e // Resume resume the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.ResumePreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Resume", nil, "Failure preparing request") return @@ -224,10 +221,10 @@ func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string } // ResumePreparer prepares the Resume request. -func (client TestJobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) ResumePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -266,16 +263,15 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores // Stop stop the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.StopPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Stop", nil, "Failure preparing request") return @@ -297,10 +293,10 @@ func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, } // StopPreparer prepares the Stop request. -func (client TestJobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) StopPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -339,16 +335,15 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest. // Suspend suspend the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.SuspendPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Suspend", nil, "Failure preparing request") return @@ -370,10 +365,10 @@ func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName strin } // SuspendPreparer prepares the Suspend request. -func (client TestJobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) SuspendPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 5c7f9707cb26..934834348282 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) TestJobStreamsClient { - return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewTestJobStreamsClient(subscriptionID string, resourceGroupName string) TestJobStreamsClient { + return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { - return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) TestJobStreamsClient { + return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // Get retrieve a test job stream of the test job identified by runbook name and stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName, jobStreamID) + req, err := client.GetPreparer(ctx, 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, resourceGroupName st } // GetPreparer prepares the Get request. -func (client TestJobStreamsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { +func (client TestJobStreamsClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, runbookName, filter) + req, err := client.ListByTestJobPreparer(ctx, 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, resourceGr } // ListByTestJobPreparer prepares the ListByTestJob request. -func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (*http.Request, error) { +func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, automationAccountName string, runbookName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByTestJob(ctx, resourceGroupName, automationAccountName, runbookName, filter) +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) return } diff --git a/services/automation/mgmt/2015-10-31/automation/usages.go b/services/automation/mgmt/2015-10-31/automation/usages.go index 9c8726a20aef..51382ba0f0d3 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) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewUsagesClient(subscriptionID string, resourceGroupName string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. -func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // 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 e957827d4a3f..19382b701ccb 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) VariableClient { - return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewVariableClient(subscriptionID string, resourceGroupName string) VariableClient { + return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewVariableClientWithBaseURI creates an instance of the VariableClient client. -func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { - return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewVariableClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) VariableClient { + return VariableClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create a variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, variableName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { +func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -121,16 +121,15 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, variableName) + req, err := client.DeletePreparer(ctx, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +151,10 @@ func (client VariableClient) Delete(ctx context.Context, resourceGroupName strin } // DeletePreparer prepares the Delete request. -func (client VariableClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) DeletePreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -194,16 +193,15 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the variable identified by variable name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, variableName) + req, err := client.GetPreparer(ctx, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Get", nil, "Failure preparing request") return @@ -225,10 +223,10 @@ func (client VariableClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client VariableClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) GetPreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -268,16 +266,16 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, // ListByAutomationAccount retrieve a list of variables. // -// 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) { +// automationAccountName is the automation account name. +func (client VariableClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result VariableListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +297,10 @@ func (client VariableClient) ListByAutomationAccount(ctx context.Context, resour } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +359,23 @@ func (client VariableClient) listByAutomationAccountNextResults(lastResults Vari } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result VariableListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Update", nil, "Failure preparing request") return @@ -399,10 +397,10 @@ func (client VariableClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client VariableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { +func (client VariableClient) UpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 e55131849aba..8d7502216fc0 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) WebhookClient { - return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewWebhookClient(subscriptionID string, resourceGroupName string) WebhookClient { + return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName) } // NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. -func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { - return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string) WebhookClient { + return WebhookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName)} } // CreateOrUpdate create the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, webhookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { +func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -121,16 +121,15 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the webhook by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, webhookName) + req, err := client.DeletePreparer(ctx, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +151,10 @@ func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client WebhookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) DeletePreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -194,15 +193,15 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores // GenerateURI generates a Uri for use in creating a webhook. // -// 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) { +// automationAccountName is the automation account name. +func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "GenerateURI", err.Error()) } - req, err := client.GenerateURIPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GenerateURIPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "GenerateURI", nil, "Failure preparing request") return @@ -224,10 +223,10 @@ func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName s } // GenerateURIPreparer prepares the GenerateURI request. -func (client WebhookClient) GenerateURIPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client WebhookClient) GenerateURIPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -266,16 +265,15 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St // Get retrieve the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, webhookName) + req, err := client.GetPreparer(ctx, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Get", nil, "Failure preparing request") return @@ -297,10 +295,10 @@ func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client WebhookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) GetPreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -340,17 +338,16 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e // ListByAutomationAccount retrieve a list of webhooks. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -372,10 +369,10 @@ func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -437,23 +434,23 @@ func (client WebhookClient) listByAutomationAccountNextResults(lastResults Webho } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Update update the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Update", nil, "Failure preparing request") return @@ -475,10 +472,10 @@ func (client WebhookClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client WebhookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { +func (client WebhookClient) UpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 037f73a92408..a4e47c2e24b2 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) AccountClient { - return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewAccountClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AccountClient { + return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewAccountClientWithBaseURI creates an instance of the AccountClient client. -func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { - return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewAccountClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AccountClient { + return AccountClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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 ac9db9eb863f..2a2bae70e50a 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) ActivityClient { - return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewActivityClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ActivityClient { + return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewActivityClientWithBaseURI creates an instance of the ActivityClient client. -func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { - return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewActivityClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ActivityClient { + return ActivityClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the activity in the module identified by module name and activity name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ActivityClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName, activityName) + req, err := client.GetPreparer(ctx, 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, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client ActivityClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (*http.Request, error) { +func (client ActivityClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,17 +117,16 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, // ListByModule retrieve a list of activities in the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, moduleName) + req, err := client.ListByModulePreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ActivityClient", "ListByModule", nil, "Failure preparing request") return @@ -149,11 +148,11 @@ func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName } // ListByModulePreparer prepares the ListByModule request. -func (client ActivityClient) ListByModulePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ActivityClient) ListByModulePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -212,7 +211,7 @@ func (client ActivityClient) listByModuleNextResults(lastResults ActivityListRes } // ListByModuleComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client ActivityClient) ListByModuleComplete(ctx context.Context, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) { + result.page, err = client.ListByModule(ctx, 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 365936df4f91..58919a1f72f7 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) AgentRegistrationInformationClient { - return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewAgentRegistrationInformationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AgentRegistrationInformationClient { + return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient // client. -func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { - return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) AgentRegistrationInformationClient { + return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the automation agent registration information. // -// 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) { +// automationAccountName is the automation account name. +func (client AgentRegistrationInformationClient) Get(ctx context.Context, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GetPreparer(ctx, 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, resour } // GetPreparer prepares the Get request. -func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client AgentRegistrationInformationClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.AgentRegistrationInformationClient", "RegenerateKey", err.Error()) } - req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, automationAccountName, parameters) + req, err := client.RegenerateKeyPreparer(ctx, 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, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { +func (client AgentRegistrationInformationClient) RegenerateKeyPreparer(ctx context.Context, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 11a65b7c908b..b8d1f7c7fae0 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) CertificateClient { - return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewCertificateClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CertificateClient { + return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. -func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { - return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CertificateClient { + return CertificateClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGrou return result, validation.NewError("automation.CertificateClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGrou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (*http.Request, error) { +func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +123,15 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete the certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, certificateName) + req, err := client.DeletePreparer(ctx, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client CertificateClient) Delete(ctx context.Context, resourceGroupName st } // DeletePreparer prepares the Delete request. -func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,16 +195,15 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the certificate identified by certificate name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, certificateName) + req, err := client.GetPreparer(ctx, automationAccountName, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Get", nil, "Failure preparing request") return @@ -227,11 +225,11 @@ func (client CertificateClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client CertificateClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (*http.Request, error) { +func (client CertificateClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +268,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif // ListByAutomationAccount retrieve a list of certificates. // -// 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) { +// automationAccountName is the automation account name. +func (client CertificateClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CertificateListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +299,10 @@ func (client CertificateClient) ListByAutomationAccount(ctx context.Context, res } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client CertificateClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -363,24 +361,23 @@ func (client CertificateClient) listByAutomationAccountNextResults(lastResults C } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CertificateListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a certificate. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CertificateClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, certificateName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, certificateName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CertificateClient", "Update", nil, "Failure preparing request") return @@ -402,11 +399,11 @@ func (client CertificateClient) Update(ctx context.Context, resourceGroupName st } // UpdatePreparer prepares the Update request. -func (client CertificateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (*http.Request, error) { +func (client CertificateClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 71700fb23f89..41f9a3766ab1 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/client.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/client.go @@ -32,20 +32,26 @@ const ( // BaseClient is the base client for Automation. type BaseClient struct { autorest.Client - BaseURI string - SubscriptionID string + BaseURI string + SubscriptionID string + ResourceGroupName string + ClientRequestID string + AutomationAccountName string } // New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) +func New(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { +func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + ResourceGroupName: resourceGroupName, + ClientRequestID: clientRequestID, + AutomationAccountName: automationAccountName, } } 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 39287927d6eb..a1942b416ecf 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/connection.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/connection.go @@ -31,24 +31,23 @@ type ConnectionClient struct { } // NewConnectionClient creates an instance of the ConnectionClient client. -func NewConnectionClient(subscriptionID string) ConnectionClient { - return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewConnectionClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionClient { + return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. -func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { - return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionClient { + return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create or update a connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -56,7 +55,7 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroup return result, validation.NewError("automation.ConnectionClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -78,11 +77,11 @@ func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroup } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +122,15 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionName) + req, err := client.DeletePreparer(ctx, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +152,11 @@ func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName str } // DeletePreparer prepares the Delete request. -func (client ConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -197,16 +195,15 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn // Get retrieve the connection identified by connection name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionName) + req, err := client.GetPreparer(ctx, automationAccountName, connectionName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Get", nil, "Failure preparing request") return @@ -228,11 +225,11 @@ func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client ConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (*http.Request, error) { +func (client ConnectionClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -271,16 +268,16 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect // ListByAutomationAccount retrieve a list of connections. // -// 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) { +// automationAccountName is the automation account name. +func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -302,10 +299,10 @@ func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, reso } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ConnectionClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -364,24 +361,23 @@ func (client ConnectionClient) listByAutomationAccountNextResults(lastResults Co } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a connection. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionClient", "Update", nil, "Failure preparing request") return @@ -403,11 +399,11 @@ func (client ConnectionClient) Update(ctx context.Context, resourceGroupName str } // UpdatePreparer prepares the Update request. -func (client ConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (*http.Request, error) { +func (client ConnectionClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 a5ce642d08d0..1927502ef2e8 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) ConnectionTypeClient { - return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewConnectionTypeClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionTypeClient { + return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. -func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { - return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ConnectionTypeClient { + return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a connectiontype. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceG return result, validation.NewError("automation.ConnectionTypeClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceG } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (*http.Request, error) { +func (client ConnectionTypeClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +123,15 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete the connectiontype. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) + req, err := client.DeletePreparer(ctx, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Delete", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName } // DeletePreparer prepares the Delete request. -func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -196,16 +195,15 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result // Get retrieve the connectiontype identified by connectiontype name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ConnectionTypeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, connectionTypeName) + req, err := client.GetPreparer(ctx, automationAccountName, connectionTypeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "Get", nil, "Failure preparing request") return @@ -227,11 +225,11 @@ func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName st } // GetPreparer prepares the Get request. -func (client ConnectionTypeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (*http.Request, error) { +func (client ConnectionTypeClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -270,16 +268,16 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con // ListByAutomationAccount retrieve a list of connectiontypes. // -// 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) { +// automationAccountName is the automation account name. +func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -301,10 +299,10 @@ func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ConnectionTypeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -363,7 +361,7 @@ func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResult } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ConnectionTypeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 11f696368414..4d0f3999ad06 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/credential.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/credential.go @@ -31,24 +31,23 @@ type CredentialClient struct { } // NewCredentialClient creates an instance of the CredentialClient client. -func NewCredentialClient(subscriptionID string) CredentialClient { - return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewCredentialClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CredentialClient { + return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. -func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { - return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) CredentialClient { + return CredentialClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -58,7 +57,7 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroup return result, validation.NewError("automation.CredentialClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -80,11 +79,11 @@ func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroup } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (*http.Request, error) { +func (client CredentialClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -125,16 +124,15 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, credentialName) + req, err := client.DeletePreparer(ctx, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Delete", nil, "Failure preparing request") return @@ -156,11 +154,11 @@ func (client CredentialClient) Delete(ctx context.Context, resourceGroupName str } // DeletePreparer prepares the Delete request. -func (client CredentialClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -198,16 +196,15 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto // Get retrieve the credential identified by credential name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, credentialName) + req, err := client.GetPreparer(ctx, automationAccountName, credentialName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Get", nil, "Failure preparing request") return @@ -229,11 +226,11 @@ func (client CredentialClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client CredentialClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (*http.Request, error) { +func (client CredentialClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +269,16 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent // ListByAutomationAccount retrieve a list of credentials. // -// 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) { +// automationAccountName is the automation account name. +func (client CredentialClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result CredentialListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +300,10 @@ func (client CredentialClient) ListByAutomationAccount(ctx context.Context, reso } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client CredentialClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,24 +362,23 @@ func (client CredentialClient) listByAutomationAccountNextResults(lastResults Cr } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result CredentialListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a credential. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.CredentialClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, credentialName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, credentialName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.CredentialClient", "Update", nil, "Failure preparing request") return @@ -404,11 +400,11 @@ func (client CredentialClient) Update(ctx context.Context, resourceGroupName str } // UpdatePreparer prepares the Update request. -func (client CredentialClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (*http.Request, error) { +func (client CredentialClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 148d7c66aebb..cb289c1e5f5e 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go @@ -32,31 +32,30 @@ type DscCompilationJobClient struct { } // NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { - return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscCompilationJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobClient { + return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. -func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { - return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobClient { + return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Create creates the Dsc compilation job of the configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, compilationJobID, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, compilationJobID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Create", nil, "Failure preparing request") return @@ -78,11 +77,11 @@ func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupN } // CreatePreparer prepares the Create request. -func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (*http.Request, error) { +func (client DscCompilationJobClient) CreatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -123,16 +122,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu // Get retrieve the Dsc configuration compilation job identified by job id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, compilationJobID) + req, err := client.GetPreparer(ctx, automationAccountName, compilationJobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "Get", nil, "Failure preparing request") return @@ -154,11 +153,11 @@ func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName } // GetPreparer prepares the Get request. -func (client DscCompilationJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -197,16 +196,15 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result // GetStream retrieve the job stream identified by job stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobClient", "GetStream", err.Error()) } - req, err := client.GetStreamPreparer(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID) + req, err := client.GetStreamPreparer(ctx, automationAccountName, jobID, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "GetStream", nil, "Failure preparing request") return @@ -228,12 +226,12 @@ func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGro } // GetStreamPreparer prepares the GetStream request. -func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (*http.Request, error) { +func (client DscCompilationJobClient) GetStreamPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,17 +270,16 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of dsc compilation jobs. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -304,10 +301,10 @@ func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Contex } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscCompilationJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -369,7 +366,7 @@ func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastRes } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 6e103018fe4c..366bcb75a7b6 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go @@ -32,27 +32,26 @@ type DscCompilationJobStreamClient struct { } // NewDscCompilationJobStreamClient creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobStreamClient { - return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscCompilationJobStreamClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobStreamClient { + return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. -func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { - return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscCompilationJobStreamClient { + return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // ListByJob retrieve all the job streams for the compilation Job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscCompilationJobStreamClient", "ListByJob", err.Error()) } - req, err := client.ListByJobPreparer(ctx, resourceGroupName, automationAccountName, jobID) + req, err := client.ListByJobPreparer(ctx, automationAccountName, jobID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscCompilationJobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -74,11 +73,11 @@ func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resou } // ListByJobPreparer prepares the ListByJob request. -func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (*http.Request, error) { +func (client DscCompilationJobStreamClient) ListByJobPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 87d1abc507ae..6963bb010ac6 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go @@ -31,24 +31,23 @@ type DscConfigurationClient struct { } // NewDscConfigurationClient creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { - return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscConfigurationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscConfigurationClient { + return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. -func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { - return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscConfigurationClient { + return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create the configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -61,7 +60,7 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourc return result, validation.NewError("automation.DscConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, configurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, configurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourc } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -128,16 +127,15 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response // Delete delete the dsc configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.DeletePreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -159,11 +157,11 @@ func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupNa } // DeletePreparer prepares the Delete request. -func (client DscConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -201,16 +199,15 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul // Get retrieve the configuration identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.GetPreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Get", nil, "Failure preparing request") return @@ -232,11 +229,11 @@ func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName } // GetPreparer prepares the Get request. -func (client DscConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -275,16 +272,15 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D // GetContent retrieve the configuration script identified by configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscConfigurationClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, configurationName) + req, err := client.GetContentPreparer(ctx, automationAccountName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "GetContent", nil, "Failure preparing request") return @@ -306,11 +302,11 @@ func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGro } // GetContentPreparer prepares the GetContent request. -func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (*http.Request, error) { +func (client DscConfigurationClient) GetContentPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -349,16 +345,16 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of configurations. // -// 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) { +// automationAccountName is the automation account name. +func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result DscConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -380,10 +376,10 @@ func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -442,86 +438,7 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) - return -} - -// Update 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) Update(ctx context.Context, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (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 { - return result, validation.NewError("automation.DscConfigurationClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, automationAccountName, configurationName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DscConfigurationClient) UpdatePreparer(ctx context.Context, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "configurationName": autorest.Encode("path", configurationName), - "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-10-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client DscConfigurationClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DscConfigurationClient) UpdateResponder(resp *http.Response) (result DscConfiguration, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} +func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result DscConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 a51206bccabe..c8c9f8e391df 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscnode.go @@ -31,27 +31,26 @@ type DscNodeClient struct { } // NewDscNodeClient creates an instance of the DscNodeClient client. -func NewDscNodeClient(subscriptionID string) DscNodeClient { - return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscNodeClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeClient { + return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. -func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { - return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeClient { + return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Delete delete the dsc node identified by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeID) + req, err := client.DeletePreparer(ctx, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Delete", nil, "Failure preparing request") return @@ -73,11 +72,11 @@ func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client DscNodeClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,16 +115,15 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode // Get retrieve the dsc node identified by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID) + req, err := client.GetPreparer(ctx, automationAccountName, nodeID) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Get", nil, "Failure preparing request") return @@ -147,11 +145,11 @@ func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client DscNodeClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (*http.Request, error) { +func (client DscNodeClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,17 +188,16 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e // ListByAutomationAccount retrieve a list of dsc nodes. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -222,10 +219,10 @@ func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -287,23 +284,23 @@ func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Update update the dsc node. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeID, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, nodeID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeClient", "Update", nil, "Failure preparing request") return @@ -325,11 +322,11 @@ func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client DscNodeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (*http.Request, error) { +func (client DscNodeClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 e2684c9b1552..dca236c2266a 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go @@ -31,24 +31,23 @@ type DscNodeConfigurationClient struct { } // NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient { - return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewDscNodeConfigurationClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeConfigurationClient { + return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. -func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { - return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) DscNodeConfigurationClient { + return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create the node configuration identified by node configuration name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -61,7 +60,7 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, res return result, validation.NewError("automation.DscNodeConfigurationClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, nodeConfigurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,11 +82,11 @@ func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, res } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (*http.Request, error) { +func (client DscNodeConfigurationClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -128,16 +127,15 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete the Dsc node configurations by node configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) + req, err := client.DeletePreparer(ctx, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Delete", nil, "Failure preparing request") return @@ -159,11 +157,11 @@ func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGro } // DeletePreparer prepares the Delete request. -func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -201,16 +199,15 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r // Get retrieve the Dsc node configurations by node configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.DscNodeConfigurationClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeConfigurationName) + req, err := client.GetPreparer(ctx, automationAccountName, nodeConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "Get", nil, "Failure preparing request") return @@ -232,11 +229,11 @@ func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupN } // GetPreparer prepares the Get request. -func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (*http.Request, error) { +func (client DscNodeConfigurationClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -275,17 +272,16 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of dsc node configurations. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -307,10 +303,10 @@ func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Con } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client DscNodeConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -372,7 +368,7 @@ func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(last } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 756ad090d914..b456eb5a3c76 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) FieldsClient { - return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewFieldsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) FieldsClient { + return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. -func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { - return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) FieldsClient { + return FieldsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // ListByType retrieve a list of fields of a given type identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.FieldsClient", "ListByType", err.Error()) } - req, err := client.ListByTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) + req, err := client.ListByTypePreparer(ctx, 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, resourceGroupName str } // ListByTypePreparer prepares the ListByType request. -func (client FieldsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client FieldsClient) ListByTypePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 d480a44178ce..ea504ef9f0c6 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) HybridRunbookWorkerGroupClient { - return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewHybridRunbookWorkerGroupClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) HybridRunbookWorkerGroupClient { + return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. -func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { - return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) HybridRunbookWorkerGroupClient { + return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Delete delete a hybrid runbook worker group. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.DeletePreparer(ctx, 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, resourc } // DeletePreparer prepares the Delete request. -func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName) + req, err := client.GetPreparer(ctx, 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, resourceGr } // GetPreparer prepares the Get request. -func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// automationAccountName is the automation account name. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, 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, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -282,24 +282,23 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults( } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a hybrid runbook worker group. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.HybridRunbookWorkerGroupClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, hybridRunbookWorkerGroupName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "Update", nil, "Failure preparing request") return @@ -321,11 +320,11 @@ func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourc } // UpdatePreparer prepares the Update request. -func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 f5d2b3756da5..4d6a20aa4a79 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/job.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/job.go @@ -31,31 +31,29 @@ type JobClient struct { } // NewJobClient creates an instance of the JobClient client. -func NewJobClient(subscriptionID string) JobClient { - return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobClient { + return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewJobClientWithBaseURI creates an instance of the JobClient client. -func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { - return JobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobClient { + return JobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Create create a job of the runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, jobName, parameters, clientRequestID) + req, err := client.CreatePreparer(ctx, jobName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Create", nil, "Failure preparing request") return @@ -77,11 +75,11 @@ func (client JobClient) Create(ctx context.Context, resourceGroupName string, au } // CreatePreparer prepares the Create request. -func (client JobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, parameters JobCreateParameters, clientRequestID string) (*http.Request, error) { +func (client JobClient) CreatePreparer(ctx context.Context, jobName string, parameters JobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -97,9 +95,9 @@ func (client JobClient) CreatePreparer(ctx context.Context, resourceGroupName st autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -126,16 +124,15 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er // Get retrieve the job identified by job name. // -// 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) { +// jobName is the job name. +func (client JobClient) Get(ctx context.Context, jobName string) (result Job, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.GetPreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Get", nil, "Failure preparing request") return @@ -157,11 +154,11 @@ func (client JobClient) Get(ctx context.Context, resourceGroupName string, autom } // GetPreparer prepares the Get request. -func (client JobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) GetPreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -175,9 +172,9 @@ func (client JobClient) GetPreparer(ctx context.Context, resourceGroupName strin autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -204,16 +201,15 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error // GetOutput retrieve the job output identified by job name. // -// 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) { +// jobName is the name of the job to be created. +func (client JobClient) GetOutput(ctx context.Context, jobName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetOutput", err.Error()) } - req, err := client.GetOutputPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.GetOutputPreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetOutput", nil, "Failure preparing request") return @@ -235,11 +231,11 @@ func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, } // GetOutputPreparer prepares the GetOutput request. -func (client JobClient) GetOutputPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) GetOutputPreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -253,9 +249,9 @@ func (client JobClient) GetOutputPreparer(ctx context.Context, resourceGroupName autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -282,16 +278,15 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result String, // GetRunbookContent retrieve the runbook content of the job identified by job name. // -// 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) { +// jobName is the job name. +func (client JobClient) GetRunbookContent(ctx context.Context, jobName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "GetRunbookContent", err.Error()) } - req, err := client.GetRunbookContentPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.GetRunbookContentPreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "GetRunbookContent", nil, "Failure preparing request") return @@ -313,11 +308,11 @@ func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName } // GetRunbookContentPreparer prepares the GetRunbookContent request. -func (client JobClient) GetRunbookContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) GetRunbookContentPreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -331,9 +326,9 @@ func (client JobClient) GetRunbookContentPreparer(ctx context.Context, resourceG autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -360,17 +355,16 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result // ListByAutomationAccount retrieve a list of jobs. // -// 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) { +// filter is the filter to apply on the operation. +func (client JobClient) ListByAutomationAccount(ctx context.Context, filter string) (result JobListResultV2Page, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter, clientRequestID) + req, err := client.ListByAutomationAccountPreparer(ctx, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -392,10 +386,10 @@ func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGro } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (*http.Request, error) { +func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -412,9 +406,9 @@ func (client JobClient) ListByAutomationAccountPreparer(ctx context.Context, res autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -461,23 +455,22 @@ func (client JobClient) listByAutomationAccountNextResults(lastResults JobListRe } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, filter string) (result JobListResultV2Iterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, filter) return } // Resume resume the job identified by jobName. // -// 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) { +// jobName is the job name. +func (client JobClient) Resume(ctx context.Context, jobName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.ResumePreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Resume", nil, "Failure preparing request") return @@ -499,11 +492,11 @@ func (client JobClient) Resume(ctx context.Context, resourceGroupName string, au } // ResumePreparer prepares the Resume request. -func (client JobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) ResumePreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -517,9 +510,9 @@ func (client JobClient) ResumePreparer(ctx context.Context, resourceGroupName st autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -545,16 +538,15 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re // Stop stop the job identified by jobName. // -// 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) { +// jobName is the job name. +func (client JobClient) Stop(ctx context.Context, jobName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.StopPreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Stop", nil, "Failure preparing request") return @@ -576,11 +568,11 @@ func (client JobClient) Stop(ctx context.Context, resourceGroupName string, auto } // StopPreparer prepares the Stop request. -func (client JobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) StopPreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -594,9 +586,9 @@ func (client JobClient) StopPreparer(ctx context.Context, resourceGroupName stri autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -622,16 +614,15 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp // Suspend suspend the job identified by job name. // -// 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) { +// jobName is the job name. +func (client JobClient) Suspend(ctx context.Context, jobName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, jobName, clientRequestID) + req, err := client.SuspendPreparer(ctx, jobName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobClient", "Suspend", nil, "Failure preparing request") return @@ -653,11 +644,11 @@ func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, a } // SuspendPreparer prepares the Suspend request. -func (client JobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (*http.Request, error) { +func (client JobClient) SuspendPreparer(ctx context.Context, jobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -671,9 +662,9 @@ func (client JobClient) SuspendPreparer(ctx context.Context, resourceGroupName s autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.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 fdcd16cb4515..a3d2522cf0c7 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/jobschedule.go @@ -32,24 +32,23 @@ type JobScheduleClient struct { } // NewJobScheduleClient creates an instance of the JobScheduleClient client. -func NewJobScheduleClient(subscriptionID string) JobScheduleClient { - return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobScheduleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobScheduleClient { + return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. -func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { - return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobScheduleClient { + return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Create create a job schedule. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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}, @@ -58,7 +57,7 @@ func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName st return result, validation.NewError("automation.JobScheduleClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, jobScheduleID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Create", nil, "Failure preparing request") return @@ -80,11 +79,11 @@ func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName st } // CreatePreparer prepares the Create request. -func (client JobScheduleClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (*http.Request, error) { +func (client JobScheduleClient) CreatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -125,16 +124,15 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job // Delete delete the job schedule identified by job schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) + req, err := client.DeletePreparer(ctx, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Delete", nil, "Failure preparing request") return @@ -156,11 +154,11 @@ func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName st } // DeletePreparer prepares the Delete request. -func (client JobScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -198,16 +196,15 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the job schedule identified by job schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobScheduleID) + req, err := client.GetPreparer(ctx, automationAccountName, jobScheduleID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "Get", nil, "Failure preparing request") return @@ -229,11 +226,11 @@ func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client JobScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (*http.Request, error) { +func (client JobScheduleClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -272,16 +269,16 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch // ListByAutomationAccount retrieve a list of job schedules. // -// 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) { +// automationAccountName is the automation account name. +func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result JobScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -303,10 +300,10 @@ func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, res } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -365,7 +362,7 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result JobScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, 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 237b42c9adf5..cdc8a9d2eaac 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/jobstream.go @@ -31,28 +31,26 @@ type JobStreamClient struct { } // NewJobStreamClient creates an instance of the JobStreamClient client. -func NewJobStreamClient(subscriptionID string) JobStreamClient { - return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewJobStreamClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobStreamClient { + return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. -func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { - return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) JobStreamClient { + return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the job stream identified by job stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.JobStreamClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, jobName, jobStreamID, clientRequestID) + req, err := client.GetPreparer(ctx, jobName, jobStreamID) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "Get", nil, "Failure preparing request") return @@ -74,12 +72,12 @@ func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client JobStreamClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (*http.Request, error) { +func (client JobStreamClient) GetPreparer(ctx context.Context, jobName string, jobStreamID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), "jobStreamId": autorest.Encode("path", jobStreamID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -93,9 +91,9 @@ func (client JobStreamClient) GetPreparer(ctx context.Context, resourceGroupName 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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -122,18 +120,16 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea // ListByJob retrieve a list of jobs streams identified by job name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, jobName, filter, clientRequestID) + req, err := client.ListByJobPreparer(ctx, jobName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobStreamClient", "ListByJob", nil, "Failure preparing request") return @@ -155,11 +151,11 @@ func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName s } // ListByJobPreparer prepares the ListByJob request. -func (client JobStreamClient) ListByJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (*http.Request, error) { +func (client JobStreamClient) ListByJobPreparer(ctx context.Context, jobName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), "jobName": autorest.Encode("path", jobName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -176,9 +172,9 @@ func (client JobStreamClient) ListByJobPreparer(ctx context.Context, resourceGro autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -225,7 +221,7 @@ func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResu } // ListByJobComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client JobStreamClient) ListByJobComplete(ctx context.Context, jobName string, filter string) (result JobStreamListResultIterator, err error) { + result.page, err = client.ListByJob(ctx, jobName, filter) 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 07bd7f664551..ff63f48c93a1 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) LinkedWorkspaceClient { - return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewLinkedWorkspaceClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) LinkedWorkspaceClient { + return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. -func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { - return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) LinkedWorkspaceClient { + return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the linked workspace for the account id. // -// 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) { +// automationAccountName is the automation account name. +func (client LinkedWorkspaceClient) Get(ctx context.Context, automationAccountName string) (result LinkedWorkspace, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.LinkedWorkspaceClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GetPreparer(ctx, 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, resourceGroupName s } // GetPreparer prepares the Get request. -func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client LinkedWorkspaceClient) GetPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } diff --git a/services/automation/mgmt/2017-05-15-preview/automation/models.go b/services/automation/mgmt/2017-05-15-preview/automation/models.go index b31284476bc0..bc3ac79fcb1d 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/models.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/models.go @@ -3391,73 +3391,6 @@ func (dcp DscConfigurationProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DscConfigurationUpdateParameters the parameters supplied to the create or update configuration operation. -type DscConfigurationUpdateParameters struct { - // DscConfigurationCreateOrUpdateProperties - Gets or sets configuration create or update properties. - *DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"` - // Name - Gets or sets name of the resource. - Name *string `json:"name,omitempty"` - // Tags - Gets or sets the tags attached to the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DscConfigurationUpdateParameters. -func (dcup DscConfigurationUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dcup.DscConfigurationCreateOrUpdateProperties != nil { - objectMap["properties"] = dcup.DscConfigurationCreateOrUpdateProperties - } - if dcup.Name != nil { - objectMap["name"] = dcup.Name - } - if dcup.Tags != nil { - objectMap["tags"] = dcup.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DscConfigurationUpdateParameters struct. -func (dcup *DscConfigurationUpdateParameters) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var dscConfigurationCreateOrUpdateProperties DscConfigurationCreateOrUpdateProperties - err = json.Unmarshal(*v, &dscConfigurationCreateOrUpdateProperties) - if err != nil { - return err - } - dcup.DscConfigurationCreateOrUpdateProperties = &dscConfigurationCreateOrUpdateProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dcup.Name = &name - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dcup.Tags = tags - } - } - } - - return nil -} - // DscMetaConfiguration definition of the DSC Meta Configuration. type DscMetaConfiguration struct { // ConfigurationModeFrequencyMins - Gets or sets the ConfigurationModeFrequencyMins value of the meta configuration. 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 929cc72ca68b..bbcc83846e33 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) ModuleClient { - return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewModuleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ModuleClient { + return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewModuleClientWithBaseURI creates an instance of the ModuleClient client. -func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { - return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewModuleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ModuleClient { + return ModuleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create or Update the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName return result, validation.NewError("automation.ModuleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupName } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (*http.Request, error) { +func (client ModuleClient) CreateOrUpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -127,16 +127,15 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the module by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, moduleName) + req, err := client.DeletePreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Delete", nil, "Failure preparing request") return @@ -158,11 +157,11 @@ func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, } // DeletePreparer prepares the Delete request. -func (client ModuleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) DeletePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -200,16 +199,15 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest // Get retrieve the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, moduleName) + req, err := client.GetPreparer(ctx, automationAccountName, moduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Get", nil, "Failure preparing request") return @@ -231,11 +229,11 @@ func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, au } // GetPreparer prepares the Get request. -func (client ModuleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (*http.Request, error) { +func (client ModuleClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -274,16 +272,16 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err // ListByAutomationAccount retrieve a list of modules. // -// 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) { +// automationAccountName is the automation account name. +func (client ModuleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ModuleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -305,10 +303,10 @@ func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resource } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ModuleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -367,23 +365,23 @@ func (client ModuleClient) listByAutomationAccountNextResults(lastResults Module } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ModuleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the module identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ModuleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, moduleName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, moduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ModuleClient", "Update", nil, "Failure preparing request") return @@ -405,11 +403,11 @@ func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client ModuleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (*http.Request, error) { +func (client ModuleClient) UpdatePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 2cdc9b7ee487..bd706d936f50 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/nodereports.go @@ -31,27 +31,26 @@ type NodeReportsClient struct { } // NewNodeReportsClient creates an instance of the NodeReportsClient client. -func NewNodeReportsClient(subscriptionID string) NodeReportsClient { - return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewNodeReportsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) NodeReportsClient { + return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. -func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { - return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) NodeReportsClient { + return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the Dsc node report data by node id and report id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) + req, err := client.GetPreparer(ctx, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "Get", nil, "Failure preparing request") return @@ -73,12 +72,12 @@ func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName strin } // GetPreparer prepares the Get request. -func (client NodeReportsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -117,16 +116,15 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod // GetContent retrieve the Dsc node reports by node id and report id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.NodeReportsClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, nodeID, reportID) + req, err := client.GetContentPreparer(ctx, automationAccountName, nodeID, reportID) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "GetContent", nil, "Failure preparing request") return @@ -148,12 +146,12 @@ func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupNam } // GetContentPreparer prepares the GetContent request. -func (client NodeReportsClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (*http.Request, error) { +func (client NodeReportsClient) GetContentPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -192,17 +190,17 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result // ListByNode retrieve the Dsc node report list by node id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, nodeID, filter) + req, err := client.ListByNodePreparer(ctx, automationAccountName, nodeID, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.NodeReportsClient", "ListByNode", nil, "Failure preparing request") return @@ -224,11 +222,11 @@ func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupNam } // ListByNodePreparer prepares the ListByNode request. -func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (*http.Request, error) { +func (client NodeReportsClient) ListByNodePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -290,7 +288,7 @@ func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportL } // ListByNodeComplete enumerates all values, automatically crossing page boundaries as required. -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) +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) 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 80f1cb735be0..cd8a29a3a6fd 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) ObjectDataTypesClient { - return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewObjectDataTypesClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ObjectDataTypesClient { + return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. -func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { - return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ObjectDataTypesClient { + return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", err.Error()) } - req, err := client.ListFieldsByModuleAndTypePreparer(ctx, resourceGroupName, automationAccountName, moduleName, typeName) + req, err := client.ListFieldsByModuleAndTypePreparer(ctx, 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, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByModuleAndTypePreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "typeName": autorest.Encode("path", typeName), } @@ -117,16 +117,15 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt // ListFieldsByType retrieve a list of fields of a given type across all accessible modules. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ObjectDataTypesClient", "ListFieldsByType", err.Error()) } - req, err := client.ListFieldsByTypePreparer(ctx, resourceGroupName, automationAccountName, typeName) + req, err := client.ListFieldsByTypePreparer(ctx, automationAccountName, typeName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ObjectDataTypesClient", "ListFieldsByType", nil, "Failure preparing request") return @@ -148,10 +147,10 @@ func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resour } // ListFieldsByTypePreparer prepares the ListFieldsByType request. -func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (*http.Request, error) { +func (client ObjectDataTypesClient) ListFieldsByTypePreparer(ctx context.Context, automationAccountName string, typeName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 b731c2d30ea0..b340c51efe73 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) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewOperationsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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 fc316a1d7c9a..ccdcbbe0f750 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/runbook.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/runbook.go @@ -31,24 +31,23 @@ type RunbookClient struct { } // NewRunbookClient creates an instance of the RunbookClient client. -func NewRunbookClient(subscriptionID string) RunbookClient { - return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewRunbookClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookClient { + return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. -func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { - return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookClient { + return RunbookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -69,7 +68,7 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupNam return result, validation.NewError("automation.RunbookClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -91,10 +90,10 @@ func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { +func (client RunbookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -136,16 +135,15 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the runbook by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.DeletePreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Delete", nil, "Failure preparing request") return @@ -167,10 +165,10 @@ func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client RunbookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) DeletePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -209,16 +207,15 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores // Get retrieve the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Get", nil, "Failure preparing request") return @@ -240,10 +237,10 @@ func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client RunbookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -283,16 +280,15 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e // GetContent retrieve the content of runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "GetContent", nil, "Failure preparing request") return @@ -314,10 +310,10 @@ func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName st } // GetContentPreparer prepares the GetContent request. -func (client RunbookClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -357,16 +353,16 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Str // ListByAutomationAccount retrieve a list of runbooks. // -// 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) { +// automationAccountName is the automation account name. +func (client RunbookClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result RunbookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -388,10 +384,10 @@ func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client RunbookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -450,23 +446,23 @@ func (client RunbookClient) listByAutomationAccountNextResults(lastResults Runbo } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result RunbookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the runbook identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookClient", "Update", nil, "Failure preparing request") return @@ -488,10 +484,10 @@ func (client RunbookClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client RunbookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { +func (client RunbookClient) UpdatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 b1bcf9e2ef5c..ec5d45c10e72 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go @@ -31,27 +31,26 @@ type RunbookDraftClient struct { } // NewRunbookDraftClient creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { - return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewRunbookDraftClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookDraftClient { + return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. -func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { - return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) RunbookDraftClient { + return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve the runbook draft identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Get", nil, "Failure preparing request") return @@ -73,10 +72,10 @@ func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName stri } // GetPreparer prepares the Get request. -func (client RunbookDraftClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -116,16 +115,15 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo // GetContent retrieve the content of runbook draft identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "GetContent", err.Error()) } - req, err := client.GetContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetContentPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "GetContent", nil, "Failure preparing request") return @@ -147,10 +145,10 @@ func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupNa } // GetContentPreparer prepares the GetContent request. -func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) GetContentPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -190,16 +188,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul // Publish publish runbook draft. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "Publish", err.Error()) } - req, err := client.PublishPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.PublishPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "Publish", nil, "Failure preparing request") return @@ -215,10 +213,10 @@ func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName } // PublishPreparer prepares the Publish request. -func (client RunbookDraftClient) PublishPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) PublishPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -265,16 +263,16 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result a // ReplaceContent replaces the runbook draft content. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "ReplaceContent", err.Error()) } - req, err := client.ReplaceContentPreparer(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent) + req, err := client.ReplaceContentPreparer(ctx, automationAccountName, runbookName, runbookContent) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "ReplaceContent", nil, "Failure preparing request") return @@ -290,10 +288,10 @@ func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGro } // ReplaceContentPreparer prepares the ReplaceContent request. -func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { +func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, automationAccountName string, runbookName string, runbookContent string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -342,16 +340,15 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r // UndoEdit undo draft edit to last known published state identified by runbook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.RunbookDraftClient", "UndoEdit", err.Error()) } - req, err := client.UndoEditPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.UndoEditPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.RunbookDraftClient", "UndoEdit", nil, "Failure preparing request") return @@ -373,10 +370,10 @@ func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName } // UndoEditPreparer prepares the UndoEdit request. -func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client RunbookDraftClient) UndoEditPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 ee673e96001e..174fec7c4f72 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) ScheduleClient { - return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewScheduleClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ScheduleClient { + return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. -func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { - return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) ScheduleClient { + return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a schedule. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupNa return result, validation.NewError("automation.ScheduleClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -122,16 +122,15 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, scheduleName) + req, err := client.DeletePreparer(ctx, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Delete", nil, "Failure preparing request") return @@ -153,10 +152,10 @@ func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName strin } // DeletePreparer prepares the Delete request. -func (client ScheduleClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) DeletePreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -195,16 +194,15 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, scheduleName) + req, err := client.GetPreparer(ctx, automationAccountName, scheduleName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Get", nil, "Failure preparing request") return @@ -226,10 +224,10 @@ func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client ScheduleClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (*http.Request, error) { +func (client ScheduleClient) GetPreparer(ctx context.Context, automationAccountName string, scheduleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "scheduleName": autorest.Encode("path", scheduleName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -269,16 +267,16 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, // ListByAutomationAccount retrieve a list of schedules. // -// 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) { +// automationAccountName is the automation account name. +func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result ScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -300,10 +298,10 @@ func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resour } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client ScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -362,23 +360,23 @@ func (client ScheduleClient) listByAutomationAccountNextResults(lastResults Sche } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result ScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update the schedule identified by schedule name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.ScheduleClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, scheduleName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, scheduleName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.ScheduleClient", "Update", nil, "Failure preparing request") return @@ -400,10 +398,10 @@ func (client ScheduleClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client ScheduleClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { +func (client ScheduleClient) UpdatePreparer(ctx context.Context, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 a1da73ffcff1..6524ea68bda8 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go @@ -33,29 +33,27 @@ type SoftwareUpdateConfigurationMachineRunsClient struct { // NewSoftwareUpdateConfigurationMachineRunsClient creates an instance of the // SoftwareUpdateConfigurationMachineRunsClient client. -func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { - return NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationMachineRunsClient { + return NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI creates an instance of the // SoftwareUpdateConfigurationMachineRunsClient client. -func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { - return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationMachineRunsClient { + return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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. -// 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) { +func (client SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.Context, softwareUpdateConfigurationMachineRunID uuid.UUID) (result SoftwareUpdateConfigurationMachineRun, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationMachineRunsClient", "GetByID", err.Error()) } - req, err := client.GetByIDPreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunID, clientRequestID) + req, err := client.GetByIDPreparer(ctx, softwareUpdateConfigurationMachineRunID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationMachineRunsClient", "GetByID", nil, "Failure preparing request") return @@ -77,10 +75,10 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.C } // GetByIDPreparer prepares the GetByID request. -func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationMachineRunID uuid.UUID, clientRequestID string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDPreparer(ctx context.Context, softwareUpdateConfigurationMachineRunID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "softwareUpdateConfigurationMachineRunId": autorest.Encode("path", softwareUpdateConfigurationMachineRunID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -95,9 +93,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -124,19 +122,17 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) GetByIDResponder(resp // List return list of software update configuration machine runs // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationMachineRunsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter, skip, top) + req, err := client.ListPreparer(ctx, filter, skip, top) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationMachineRunsClient", "List", nil, "Failure preparing request") return @@ -158,10 +154,10 @@ func (client SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Cont } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationMachineRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationMachineRunsClient) ListPreparer(ctx context.Context, filter string, skip string, top string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -184,9 +180,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.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 c4786eb87353..809a611e288f 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go @@ -32,29 +32,27 @@ type SoftwareUpdateConfigurationRunsClient struct { } // NewSoftwareUpdateConfigurationRunsClient creates an instance of the SoftwareUpdateConfigurationRunsClient client. -func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string) SoftwareUpdateConfigurationRunsClient { - return NewSoftwareUpdateConfigurationRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationRunsClient { + return NewSoftwareUpdateConfigurationRunsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewSoftwareUpdateConfigurationRunsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationRunsClient // client. -func NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationRunsClient { - return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationRunsClient { + return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // GetByID get a single software update configuration Run by Id. // -// 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) { +// softwareUpdateConfigurationRunID is the Id of the software update configuration run. +func (client SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, softwareUpdateConfigurationRunID uuid.UUID) (result SoftwareUpdateConfigurationRun, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationRunsClient", "GetByID", err.Error()) } - req, err := client.GetByIDPreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationRunID, clientRequestID) + req, err := client.GetByIDPreparer(ctx, softwareUpdateConfigurationRunID) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationRunsClient", "GetByID", nil, "Failure preparing request") return @@ -76,10 +74,10 @@ func (client SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, } // GetByIDPreparer prepares the GetByID request. -func (client SoftwareUpdateConfigurationRunsClient) GetByIDPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationRunID uuid.UUID, clientRequestID string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationRunsClient) GetByIDPreparer(ctx context.Context, softwareUpdateConfigurationRunID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "softwareUpdateConfigurationRunId": autorest.Encode("path", softwareUpdateConfigurationRunID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -94,9 +92,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -123,19 +121,17 @@ func (client SoftwareUpdateConfigurationRunsClient) GetByIDResponder(resp *http. // List return list of software update configuration runs // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationRunsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter, skip, top) + req, err := client.ListPreparer(ctx, filter, skip, top) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationRunsClient", "List", nil, "Failure preparing request") return @@ -157,10 +153,10 @@ func (client SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, re } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string, skip string, top string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationRunsClient) ListPreparer(ctx context.Context, filter string, skip string, top string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -183,9 +179,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.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 d08e66e51b8b..1c180a52a3f2 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go @@ -31,25 +31,24 @@ type SoftwareUpdateConfigurationsClient struct { } // NewSoftwareUpdateConfigurationsClient creates an instance of the SoftwareUpdateConfigurationsClient client. -func NewSoftwareUpdateConfigurationsClient(subscriptionID string) SoftwareUpdateConfigurationsClient { - return NewSoftwareUpdateConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewSoftwareUpdateConfigurationsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationsClient { + return NewSoftwareUpdateConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewSoftwareUpdateConfigurationsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationsClient // client. -func NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationsClient { - return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SoftwareUpdateConfigurationsClient { + return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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. 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) { +// request body. +func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration) (result SoftwareUpdateConfiguration, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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}, @@ -58,7 +57,7 @@ func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, res return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, clientRequestID) + req, err := client.CreatePreparer(ctx, softwareUpdateConfigurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "Create", nil, "Failure preparing request") return @@ -80,10 +79,10 @@ func (client SoftwareUpdateConfigurationsClient) Create(ctx context.Context, res } // CreatePreparer prepares the Create request. -func (client SoftwareUpdateConfigurationsClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration, clientRequestID string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) CreatePreparer(ctx context.Context, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -100,9 +99,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -129,17 +128,15 @@ func (client SoftwareUpdateConfigurationsClient) CreateResponder(resp *http.Resp // Delete delete a specific software update configuration. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestID) + req, err := client.DeletePreparer(ctx, softwareUpdateConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "Delete", nil, "Failure preparing request") return @@ -161,10 +158,10 @@ func (client SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, res } // DeletePreparer prepares the Delete request. -func (client SoftwareUpdateConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) DeletePreparer(ctx context.Context, softwareUpdateConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -179,9 +176,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -207,17 +204,15 @@ func (client SoftwareUpdateConfigurationsClient) DeleteResponder(resp *http.Resp // GetByName get a single software update configuration by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "GetByName", err.Error()) } - req, err := client.GetByNamePreparer(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestID) + req, err := client.GetByNamePreparer(ctx, softwareUpdateConfigurationName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "GetByName", nil, "Failure preparing request") return @@ -239,10 +234,10 @@ func (client SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, } // GetByNamePreparer prepares the GetByName request. -func (client SoftwareUpdateConfigurationsClient) GetByNamePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, clientRequestID string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) GetByNamePreparer(ctx context.Context, softwareUpdateConfigurationName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "softwareUpdateConfigurationName": autorest.Encode("path", softwareUpdateConfigurationName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -257,9 +252,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.ClientRequestID))) } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -286,16 +281,15 @@ func (client SoftwareUpdateConfigurationsClient) GetByNameResponder(resp *http.R // List get all software update configurations for the account. // -// 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) { +// filter is the filter to apply on the operation. +func (client SoftwareUpdateConfigurationsClient) List(ctx context.Context, filter string) (result SoftwareUpdateConfigurationListResult, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SoftwareUpdateConfigurationsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, resourceGroupName, automationAccountName, clientRequestID, filter) + req, err := client.ListPreparer(ctx, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.SoftwareUpdateConfigurationsClient", "List", nil, "Failure preparing request") return @@ -317,10 +311,10 @@ func (client SoftwareUpdateConfigurationsClient) List(ctx context.Context, resou } // ListPreparer prepares the List request. -func (client SoftwareUpdateConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, clientRequestID string, filter string) (*http.Request, error) { +func (client SoftwareUpdateConfigurationsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "automationAccountName": autorest.Encode("path", client.AutomationAccountName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -337,9 +331,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(clientRequestID) > 0 { + if len(client.ClientRequestID) > 0 { preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("clientRequestId", autorest.String(clientRequestID))) + autorest.WithHeader("clientRequestId", autorest.String(client.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 9657d0e44ab4..1121283f810b 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go @@ -31,24 +31,23 @@ type SourceControlClient struct { } // NewSourceControlClient creates an instance of the SourceControlClient client. -func NewSourceControlClient(subscriptionID string) SourceControlClient { - return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewSourceControlClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlClient { + return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client. -func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string) SourceControlClient { - return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlClient { + return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a source control. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, @@ -65,7 +64,7 @@ func (client SourceControlClient) CreateOrUpdate(ctx context.Context, resourceGr return result, validation.NewError("automation.SourceControlClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, automationAccountName, sourceControlName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -87,10 +86,10 @@ func (client SourceControlClient) CreateOrUpdate(ctx context.Context, resourceGr } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SourceControlClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (*http.Request, error) { +func (client SourceControlClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -132,16 +131,15 @@ func (client SourceControlClient) CreateOrUpdateResponder(resp *http.Response) ( // Delete delete the source control. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName) + req, err := client.DeletePreparer(ctx, automationAccountName, sourceControlName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Delete", nil, "Failure preparing request") return @@ -163,10 +161,10 @@ func (client SourceControlClient) Delete(ctx context.Context, resourceGroupName } // DeletePreparer prepares the Delete request. -func (client SourceControlClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (*http.Request, error) { +func (client SourceControlClient) DeletePreparer(ctx context.Context, automationAccountName string, sourceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -205,16 +203,15 @@ func (client SourceControlClient) DeleteResponder(resp *http.Response) (result a // Get retrieve the source control identified by source control name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, sourceControlName) + req, err := client.GetPreparer(ctx, automationAccountName, sourceControlName) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Get", nil, "Failure preparing request") return @@ -236,10 +233,10 @@ func (client SourceControlClient) Get(ctx context.Context, resourceGroupName str } // GetPreparer prepares the Get request. -func (client SourceControlClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (*http.Request, error) { +func (client SourceControlClient) GetPreparer(ctx context.Context, automationAccountName string, sourceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "sourceControlName": autorest.Encode("path", sourceControlName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -279,17 +276,16 @@ func (client SourceControlClient) GetResponder(resp *http.Response) (result Sour // ListByAutomationAccount retrieve a list of source controls. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -311,10 +307,10 @@ func (client SourceControlClient) ListByAutomationAccount(ctx context.Context, r } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client SourceControlClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client SourceControlClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -376,24 +372,23 @@ func (client SourceControlClient) listByAutomationAccountNextResults(lastResults } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client SourceControlClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result SourceControlListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Update update a source control. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, sourceControlName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.SourceControlClient", "Update", nil, "Failure preparing request") return @@ -415,10 +410,10 @@ func (client SourceControlClient) Update(ctx context.Context, resourceGroupName } // UpdatePreparer prepares the Update request. -func (client SourceControlClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (*http.Request, error) { +func (client SourceControlClient) UpdatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 7701c80633ae..7beb96e02189 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) SourceControlSyncJobClient { - return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewSourceControlSyncJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlSyncJobClient { + return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client. -func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobClient { - return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) SourceControlSyncJobClient { + return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Create creates the sync job for a source control. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlSyncJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID) + req, err := client.CreatePreparer(ctx, 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, resourceGro } // CreatePreparer prepares the Create request. -func (client SourceControlSyncJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { +func (client SourceControlSyncJobClient) CreatePreparer(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.SourceControlSyncJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID) + req, err := client.GetPreparer(ctx, 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, resourceGroupN } // GetPreparer prepares the Get request. -func (client SourceControlSyncJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { +func (client SourceControlSyncJobClient) GetPreparer(ctx context.Context, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, sourceControlName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, 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, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (*http.Request, error) { +func (client SourceControlSyncJobClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, sourceControlName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result SourceControlSyncJobListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, sourceControlName, filter) +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) 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 4ebfa7f129f5..38a32d4f6278 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) StatisticsClient { - return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewStatisticsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) StatisticsClient { + return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. -func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { - return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) StatisticsClient { + return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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 63af34493587..ca73a2e6f423 100644 --- a/services/automation/mgmt/2017-05-15-preview/automation/testjob.go +++ b/services/automation/mgmt/2017-05-15-preview/automation/testjob.go @@ -31,28 +31,27 @@ type TestJobClient struct { } // NewTestJobClient creates an instance of the TestJobClient client. -func NewTestJobClient(subscriptionID string) TestJobClient { - return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewTestJobClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobClient { + return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. -func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { - return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobClient { + return TestJobClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Create create a test job of the runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, automationAccountName, runbookName, parameters) + req, err := client.CreatePreparer(ctx, automationAccountName, runbookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Create", nil, "Failure preparing request") return @@ -74,10 +73,10 @@ func (client TestJobClient) Create(ctx context.Context, resourceGroupName string } // CreatePreparer prepares the Create request. -func (client TestJobClient) CreatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { +func (client TestJobClient) CreatePreparer(ctx context.Context, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -119,16 +118,15 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob // Get retrieve the test job for the specified runbook. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.GetPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Get", nil, "Failure preparing request") return @@ -150,10 +148,10 @@ func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client TestJobClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) GetPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -193,16 +191,15 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e // Resume resume the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Resume", err.Error()) } - req, err := client.ResumePreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.ResumePreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Resume", nil, "Failure preparing request") return @@ -224,10 +221,10 @@ func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string } // ResumePreparer prepares the Resume request. -func (client TestJobClient) ResumePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) ResumePreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -266,16 +263,15 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores // Stop stop the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Stop", err.Error()) } - req, err := client.StopPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.StopPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Stop", nil, "Failure preparing request") return @@ -297,10 +293,10 @@ func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, } // StopPreparer prepares the Stop request. -func (client TestJobClient) StopPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) StopPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "runbookName": autorest.Encode("path", runbookName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -339,16 +335,15 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest. // Suspend suspend the test job. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobClient", "Suspend", err.Error()) } - req, err := client.SuspendPreparer(ctx, resourceGroupName, automationAccountName, runbookName) + req, err := client.SuspendPreparer(ctx, automationAccountName, runbookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.TestJobClient", "Suspend", nil, "Failure preparing request") return @@ -370,10 +365,10 @@ func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName strin } // SuspendPreparer prepares the Suspend request. -func (client TestJobClient) SuspendPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (*http.Request, error) { +func (client TestJobClient) SuspendPreparer(ctx context.Context, automationAccountName string, runbookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 5c7f9707cb26..abfd1a53646a 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) TestJobStreamsClient { - return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewTestJobStreamsClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobStreamsClient { + return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. -func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { - return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) TestJobStreamsClient { + return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // Get retrieve a test job stream of the test job identified by runbook name and stream id. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.TestJobStreamsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, runbookName, jobStreamID) + req, err := client.GetPreparer(ctx, 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, resourceGroupName st } // GetPreparer prepares the Get request. -func (client TestJobStreamsClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (*http.Request, error) { +func (client TestJobStreamsClient) GetPreparer(ctx context.Context, 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", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, runbookName, filter) + req, err := client.ListByTestJobPreparer(ctx, 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, resourceGr } // ListByTestJobPreparer prepares the ListByTestJob request. -func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (*http.Request, error) { +func (client TestJobStreamsClient) ListByTestJobPreparer(ctx context.Context, automationAccountName string, runbookName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) { - result.page, err = client.ListByTestJob(ctx, resourceGroupName, automationAccountName, runbookName, filter) +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) 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 9c8726a20aef..d983d6cbae26 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) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewUsagesClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. -func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // 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 e957827d4a3f..a668ef8304f8 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) VariableClient { - return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewVariableClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) VariableClient { + return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewVariableClientWithBaseURI creates an instance of the VariableClient client. -func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { - return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewVariableClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) VariableClient { + return VariableClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create a variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, variableName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { +func (client VariableClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -121,16 +121,15 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, variableName) + req, err := client.DeletePreparer(ctx, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +151,10 @@ func (client VariableClient) Delete(ctx context.Context, resourceGroupName strin } // DeletePreparer prepares the Delete request. -func (client VariableClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) DeletePreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -194,16 +193,15 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the variable identified by variable name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, variableName) + req, err := client.GetPreparer(ctx, automationAccountName, variableName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Get", nil, "Failure preparing request") return @@ -225,10 +223,10 @@ func (client VariableClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client VariableClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (*http.Request, error) { +func (client VariableClient) GetPreparer(ctx context.Context, automationAccountName string, variableName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "variableName": autorest.Encode("path", variableName), } @@ -268,16 +266,16 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, // ListByAutomationAccount retrieve a list of variables. // -// 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) { +// automationAccountName is the automation account name. +func (client VariableClient) ListByAutomationAccount(ctx context.Context, automationAccountName string) (result VariableListResultPage, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -299,10 +297,10 @@ func (client VariableClient) ListByAutomationAccount(ctx context.Context, resour } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client VariableClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -361,23 +359,23 @@ func (client VariableClient) listByAutomationAccountNextResults(lastResults Vari } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string) (result VariableListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName) return } // Update update a variable. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.VariableClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, variableName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, variableName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.VariableClient", "Update", nil, "Failure preparing request") return @@ -399,10 +397,10 @@ func (client VariableClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client VariableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { +func (client VariableClient) UpdatePreparer(ctx context.Context, automationAccountName string, variableName string, parameters VariableUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.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 e55131849aba..6950464196b9 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) WebhookClient { - return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) +func NewWebhookClient(subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) WebhookClient { + return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName) } // NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. -func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { - return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} +func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, clientRequestID string, automationAccountName string) WebhookClient { + return WebhookClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, clientRequestID, automationAccountName)} } // CreateOrUpdate create the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, webhookName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, 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, resourceGroupNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { +func (client WebhookClient) CreateOrUpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -121,16 +121,15 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the webhook by name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, automationAccountName, webhookName) + req, err := client.DeletePreparer(ctx, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Delete", nil, "Failure preparing request") return @@ -152,10 +151,10 @@ func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client WebhookClient) DeletePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) DeletePreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -194,15 +193,15 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores // GenerateURI generates a Uri for use in creating a webhook. // -// 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) { +// automationAccountName is the automation account name. +func (client WebhookClient) GenerateURI(ctx context.Context, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "GenerateURI", err.Error()) } - req, err := client.GenerateURIPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.GenerateURIPreparer(ctx, automationAccountName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "GenerateURI", nil, "Failure preparing request") return @@ -224,10 +223,10 @@ func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName s } // GenerateURIPreparer prepares the GenerateURI request. -func (client WebhookClient) GenerateURIPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client WebhookClient) GenerateURIPreparer(ctx context.Context, automationAccountName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -266,16 +265,15 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St // Get retrieve the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, automationAccountName, webhookName) + req, err := client.GetPreparer(ctx, automationAccountName, webhookName) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Get", nil, "Failure preparing request") return @@ -297,10 +295,10 @@ func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, a } // GetPreparer prepares the Get request. -func (client WebhookClient) GetPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (*http.Request, error) { +func (client WebhookClient) GetPreparer(ctx context.Context, automationAccountName string, webhookName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), } @@ -340,17 +338,16 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e // ListByAutomationAccount retrieve a list of webhooks. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.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, resourceGroupName, automationAccountName, filter) + req, err := client.ListByAutomationAccountPreparer(ctx, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -372,10 +369,10 @@ func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourc } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { +func (client WebhookClient) ListByAutomationAccountPreparer(ctx context.Context, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -437,23 +434,23 @@ func (client WebhookClient) listByAutomationAccountNextResults(lastResults Webho } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -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) +func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, automationAccountName string, filter string) (result WebhookListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, automationAccountName, filter) return } // Update update the webhook identified by webhook name. // -// 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) { +// 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) { if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + {TargetValue: client.ResourceGroupName, + Constraints: []validation.Constraint{{Target: "client.ResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("automation.WebhookClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, automationAccountName, webhookName, parameters) + req, err := client.UpdatePreparer(ctx, automationAccountName, webhookName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "automation.WebhookClient", "Update", nil, "Failure preparing request") return @@ -475,10 +472,10 @@ func (client WebhookClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client WebhookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { +func (client WebhookClient) UpdatePreparer(ctx context.Context, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webhookName": autorest.Encode("path", webhookName), }