From 4122446e8d1a9010bbecffc67ffa882cb4f173c7 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 Nov 2020 05:18:14 +0000 Subject: [PATCH] CodeGen from PR 11641 in Azure/azure-rest-api-specs update (#11641) --- .../applicationdefinitions.go | 86 +++++++++++++------ .../managedapplications/applications.go | 4 +- .../managedapplicationsapi/interfaces.go | 8 +- .../2019-07-01/managedapplications/models.go | 55 +++++++----- 4 files changed, 97 insertions(+), 56 deletions(-) diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go index c89459f78c0c..3e4d9cc96ff6 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go @@ -139,11 +139,10 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateResponder(resp *http.Re // CreateOrUpdateByID creates a new managed application definition. // Parameters: -// applicationDefinitionID - the fully qualified ID of the managed application definition, including the -// managed application name and the managed application definition resource type. Use the format, -// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition. // parameters - parameters supplied to the create or update a managed application definition. -func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) { +func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.CreateOrUpdateByID") defer func() { @@ -155,6 +154,13 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Contex }() } if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.NotificationPolicy", Name: validation.Null, Rule: false, @@ -163,7 +169,7 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Contex return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", err.Error()) } - req, err := client.CreateOrUpdateByIDPreparer(ctx, applicationDefinitionID, parameters) + req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceGroupName, applicationDefinitionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", nil, "Failure preparing request") return @@ -179,9 +185,11 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Contex } // CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. -func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (*http.Request, error) { +func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applicationDefinitionId": applicationDefinitionID, + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-07-01" @@ -193,7 +201,7 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -203,7 +211,7 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx contex // http.Response Body if it receives an error. func (client ApplicationDefinitionsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) { var resp *http.Response - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -310,10 +318,9 @@ func (client ApplicationDefinitionsClient) DeleteResponder(resp *http.Response) // DeleteByID deletes the managed application definition. // Parameters: -// applicationDefinitionID - the fully qualified ID of the managed application definition, including the -// managed application name and the managed application definition resource type. Use the format, -// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} -func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinitionsDeleteByIDFuture, err error) { +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition. +func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinitionsDeleteByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.DeleteByID") defer func() { @@ -324,7 +331,18 @@ func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, appli tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteByIDPreparer(ctx, applicationDefinitionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "DeleteByID", err.Error()) + } + + req, err := client.DeleteByIDPreparer(ctx, resourceGroupName, applicationDefinitionName) if err != nil { err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "DeleteByID", nil, "Failure preparing request") return @@ -340,9 +358,11 @@ func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, appli } // DeleteByIDPreparer prepares the DeleteByID request. -func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) { +func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applicationDefinitionId": applicationDefinitionID, + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-07-01" @@ -353,7 +373,7 @@ func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -362,7 +382,7 @@ func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Contex // http.Response Body if it receives an error. func (client ApplicationDefinitionsClient) DeleteByIDSender(req *http.Request) (future ApplicationDefinitionsDeleteByIDFuture, err error) { var resp *http.Response - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -469,10 +489,9 @@ func (client ApplicationDefinitionsClient) GetResponder(resp *http.Response) (re // GetByID gets the managed application definition. // Parameters: -// applicationDefinitionID - the fully qualified ID of the managed application definition, including the -// managed application name and the managed application definition resource type. Use the format, -// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} -func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinition, err error) { +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition. +func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinition, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.GetByID") defer func() { @@ -483,7 +502,18 @@ func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, applicat tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetByIDPreparer(ctx, applicationDefinitionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "GetByID", err.Error()) + } + + req, err := client.GetByIDPreparer(ctx, resourceGroupName, applicationDefinitionName) if err != nil { err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", nil, "Failure preparing request") return @@ -505,9 +535,11 @@ func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, applicat } // GetByIDPreparer prepares the GetByID request. -func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) { +func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applicationDefinitionId": applicationDefinitionID, + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-07-01" @@ -518,7 +550,7 @@ func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -526,7 +558,7 @@ func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, // GetByIDSender sends the GetByID request. The method will close the // http.Response Body if it receives an error. func (client ApplicationDefinitionsClient) GetByIDSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetByIDResponder handles the response to the GetByID request. The method always diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applications.go b/services/resources/mgmt/2019-07-01/managedapplications/applications.go index eba6535995dd..deae89907809 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/applications.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/applications.go @@ -887,7 +887,7 @@ func (client ApplicationsClient) RefreshPermissionsResponder(resp *http.Response // resourceGroupName - the name of the resource group. The name is case insensitive. // applicationName - the name of the managed application. // parameters - parameters supplied to update an existing managed application. -func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (result Application, err error) { +func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *ApplicationPatchable) (result Application, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Update") defer func() { @@ -931,7 +931,7 @@ func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName s } // UpdatePreparer prepares the Update request. -func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (*http.Request, error) { +func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters *ApplicationPatchable) (*http.Request, error) { pathParameters := map[string]interface{}{ "applicationName": autorest.Encode("path", applicationName), "resourceGroupName": autorest.Encode("path", resourceGroupName), diff --git a/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go index 85e11ec08ee4..fd103bffc44b 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go @@ -44,7 +44,7 @@ type ApplicationsClientAPI interface { ListBySubscription(ctx context.Context) (result managedapplications.ApplicationListResultPage, err error) ListBySubscriptionComplete(ctx context.Context) (result managedapplications.ApplicationListResultIterator, err error) RefreshPermissions(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.ApplicationsRefreshPermissionsFuture, err error) - Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.Application) (result managedapplications.Application, err error) + Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.ApplicationPatchable) (result managedapplications.Application, err error) UpdateByID(ctx context.Context, applicationID string, parameters *managedapplications.Application) (result managedapplications.Application, err error) } @@ -53,11 +53,11 @@ var _ ApplicationsClientAPI = (*managedapplications.ApplicationsClient)(nil) // ApplicationDefinitionsClientAPI contains the set of methods on the ApplicationDefinitionsClient type. type ApplicationDefinitionsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters managedapplications.ApplicationDefinition) (result managedapplications.ApplicationDefinitionsCreateOrUpdateFuture, err error) - CreateOrUpdateByID(ctx context.Context, applicationDefinitionID string, parameters managedapplications.ApplicationDefinition) (result managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) + CreateOrUpdateByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters managedapplications.ApplicationDefinition) (result managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) Delete(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinitionsDeleteFuture, err error) - DeleteByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinitionsDeleteByIDFuture, err error) + DeleteByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinitionsDeleteByIDFuture, err error) Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) - GetByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinition, err error) + GetByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultPage, err error) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultIterator, err error) } diff --git a/services/resources/mgmt/2019-07-01/managedapplications/models.go b/services/resources/mgmt/2019-07-01/managedapplications/models.go index c14df15a392a..f08c5b2413c9 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/models.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/models.go @@ -226,8 +226,8 @@ type ApplicationBillingDetailsDefinition struct { ResourceUsageID *string `json:"resourceUsageId,omitempty"` } -// ApplicationClientDetails the application client details to track the entity creating/updating the managed -// app resource. +// ApplicationClientDetails the application client details to track the entity creating/updating the +// managed app resource. type ApplicationClientDetails struct { // Oid - The client Oid. Oid *string `json:"oid,omitempty"` @@ -529,8 +529,11 @@ func (page ApplicationDefinitionListResultPage) Values() []ApplicationDefinition } // Creates a new instance of the ApplicationDefinitionListResultPage type. -func NewApplicationDefinitionListResultPage(getNextPage func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)) ApplicationDefinitionListResultPage { - return ApplicationDefinitionListResultPage{fn: getNextPage} +func NewApplicationDefinitionListResultPage(cur ApplicationDefinitionListResult, getNextPage func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)) ApplicationDefinitionListResultPage { + return ApplicationDefinitionListResultPage{ + fn: getNextPage, + adlr: cur, + } } // ApplicationDefinitionProperties the managed application definition properties. @@ -565,8 +568,8 @@ type ApplicationDefinitionProperties struct { Policies *[]ApplicationPolicy `json:"policies,omitempty"` } -// ApplicationDefinitionsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ApplicationDefinitionsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type ApplicationDefinitionsCreateOrUpdateByIDFuture struct { azure.Future } @@ -839,8 +842,11 @@ func (page ApplicationListResultPage) Values() []Application { } // Creates a new instance of the ApplicationListResultPage type. -func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { - return ApplicationListResultPage{fn: getNextPage} +func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return ApplicationListResultPage{ + fn: getNextPage, + alr: cur, + } } // ApplicationManagementPolicy managed application management policy. @@ -887,8 +893,8 @@ type ApplicationPackageSupportUrls struct { // ApplicationPatchable information about managed application. type ApplicationPatchable struct { - // ApplicationPropertiesPatchable - The managed application properties. - *ApplicationPropertiesPatchable `json:"properties,omitempty"` + // ApplicationProperties - The managed application properties. + *ApplicationProperties `json:"properties,omitempty"` // Plan - The plan information. Plan *PlanPatchable `json:"plan,omitempty"` // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. @@ -914,8 +920,8 @@ type ApplicationPatchable struct { // MarshalJSON is the custom marshaler for ApplicationPatchable. func (ap ApplicationPatchable) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ap.ApplicationPropertiesPatchable != nil { - objectMap["properties"] = ap.ApplicationPropertiesPatchable + if ap.ApplicationProperties != nil { + objectMap["properties"] = ap.ApplicationProperties } if ap.Plan != nil { objectMap["plan"] = ap.Plan @@ -952,12 +958,12 @@ func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var applicationPropertiesPatchable ApplicationPropertiesPatchable - err = json.Unmarshal(*v, &applicationPropertiesPatchable) + var applicationProperties ApplicationProperties + err = json.Unmarshal(*v, &applicationProperties) if err != nil { return err } - ap.ApplicationPropertiesPatchable = &applicationPropertiesPatchable + ap.ApplicationProperties = &applicationProperties } case "plan": if v != nil { @@ -1175,8 +1181,8 @@ func (future *ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsCl return } -// ApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ApplicationsCreateOrUpdateFuture struct { azure.Future } @@ -1273,8 +1279,8 @@ func (future *ApplicationsRefreshPermissionsFuture) Result(client ApplicationsCl return } -// ErrorResponse error response indicates managed application is not able to process the incoming request. The -// reason is provided in the error message. +// ErrorResponse error response indicates managed application is not able to process the incoming request. +// The reason is provided in the error message. type ErrorResponse struct { // HTTPStatus - Http status code. HTTPStatus *string `json:"httpStatus,omitempty"` @@ -1522,8 +1528,8 @@ func (jrp JitRequestProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// JitRequestsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// JitRequestsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type JitRequestsCreateOrUpdateFuture struct { azure.Future } @@ -1731,8 +1737,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // Plan plan for the managed application.