diff --git a/profiles/preview/preview/blueprint/mgmt/blueprint/blueprintapi/models.go b/profiles/preview/preview/blueprint/mgmt/blueprint/blueprintapi/models.go index c5ef1bc62a12..4ad5ca93ca80 100644 --- a/profiles/preview/preview/blueprint/mgmt/blueprint/blueprintapi/models.go +++ b/profiles/preview/preview/blueprint/mgmt/blueprint/blueprintapi/models.go @@ -27,3 +27,4 @@ type PublishedBlueprintsClientAPI = original.PublishedBlueprintsClientAPI type PublishedArtifactsClientAPI = original.PublishedArtifactsClientAPI type OperationsClientAPI = original.OperationsClientAPI type AssignmentsClientAPI = original.AssignmentsClientAPI +type AssignmentOperationsClientAPI = original.AssignmentOperationsClientAPI diff --git a/profiles/preview/preview/blueprint/mgmt/blueprint/models.go b/profiles/preview/preview/blueprint/mgmt/blueprint/models.go index 9be47e4aa2a4..c48ca851f842 100644 --- a/profiles/preview/preview/blueprint/mgmt/blueprint/models.go +++ b/profiles/preview/preview/blueprint/mgmt/blueprint/models.go @@ -26,6 +26,7 @@ import ( ) type ArtifactsClient = original.ArtifactsClient +type AssignmentOperationsClient = original.AssignmentOperationsClient type AssignmentsClient = original.AssignmentsClient type BlueprintsClient = original.BlueprintsClient @@ -100,13 +101,22 @@ type ArtifactListPage = original.ArtifactListPage type ArtifactModel = original.ArtifactModel type ArtifactPropertiesBase = original.ArtifactPropertiesBase type Assignment = original.Assignment +type AssignmentDeploymentJob = original.AssignmentDeploymentJob +type AssignmentDeploymentJobResult = original.AssignmentDeploymentJobResult +type AssignmentJobCreatedResource = original.AssignmentJobCreatedResource type AssignmentList = original.AssignmentList type AssignmentListIterator = original.AssignmentListIterator type AssignmentListPage = original.AssignmentListPage type AssignmentLockSettings = original.AssignmentLockSettings +type AssignmentOperation = original.AssignmentOperation +type AssignmentOperationList = original.AssignmentOperationList +type AssignmentOperationListIterator = original.AssignmentOperationListIterator +type AssignmentOperationListPage = original.AssignmentOperationListPage +type AssignmentOperationProperties = original.AssignmentOperationProperties type AssignmentProperties = original.AssignmentProperties type AssignmentStatus = original.AssignmentStatus type AzureResourceBase = original.AzureResourceBase +type AzureResourceManagerError = original.AzureResourceManagerError type KeyVaultReference = original.KeyVaultReference type List = original.List type ListIterator = original.ListIterator @@ -151,6 +161,12 @@ func NewArtifactsClient() ArtifactsClient { func NewArtifactsClientWithBaseURI(baseURI string) ArtifactsClient { return original.NewArtifactsClientWithBaseURI(baseURI) } +func NewAssignmentOperationsClient() AssignmentOperationsClient { + return original.NewAssignmentOperationsClient() +} +func NewAssignmentOperationsClientWithBaseURI(baseURI string) AssignmentOperationsClient { + return original.NewAssignmentOperationsClientWithBaseURI(baseURI) +} func NewAssignmentsClient() AssignmentsClient { return original.NewAssignmentsClient() } @@ -199,6 +215,12 @@ func NewAssignmentListIterator(page AssignmentListPage) AssignmentListIterator { func NewAssignmentListPage(getNextPage func(context.Context, AssignmentList) (AssignmentList, error)) AssignmentListPage { return original.NewAssignmentListPage(getNextPage) } +func NewAssignmentOperationListIterator(page AssignmentOperationListPage) AssignmentOperationListIterator { + return original.NewAssignmentOperationListIterator(page) +} +func NewAssignmentOperationListPage(getNextPage func(context.Context, AssignmentOperationList) (AssignmentOperationList, error)) AssignmentOperationListPage { + return original.NewAssignmentOperationListPage(getNextPage) +} func NewListIterator(page ListPage) ListIterator { return original.NewListIterator(page) } diff --git a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/assignmentoperations.go b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/assignmentoperations.go new file mode 100644 index 000000000000..c805414a843f --- /dev/null +++ b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/assignmentoperations.go @@ -0,0 +1,233 @@ +package blueprint + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AssignmentOperationsClient is the blueprint Client +type AssignmentOperationsClient struct { + BaseClient +} + +// NewAssignmentOperationsClient creates an instance of the AssignmentOperationsClient client. +func NewAssignmentOperationsClient() AssignmentOperationsClient { + return NewAssignmentOperationsClientWithBaseURI(DefaultBaseURI) +} + +// NewAssignmentOperationsClientWithBaseURI creates an instance of the AssignmentOperationsClient client. +func NewAssignmentOperationsClientWithBaseURI(baseURI string) AssignmentOperationsClient { + return AssignmentOperationsClient{NewWithBaseURI(baseURI)} +} + +// Get get a Blueprint assignment operation. +// Parameters: +// subscriptionID - azure subscriptionId, which we assign the blueprint to. +// assignmentName - name of the assignment. +// assignmentOperationName - name of the assignment operation. +func (client AssignmentOperationsClient) Get(ctx context.Context, subscriptionID string, assignmentName string, assignmentOperationName string) (result AssignmentOperation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, subscriptionID, assignmentName, assignmentOperationName) + if err != nil { + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssignmentOperationsClient) GetPreparer(ctx context.Context, subscriptionID string, assignmentName string, assignmentOperationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "assignmentName": autorest.Encode("path", assignmentName), + "assignmentOperationName": autorest.Encode("path", assignmentOperationName), + "subscriptionId": autorest.Encode("path", subscriptionID), + } + + const APIVersion = "2018-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations/{assignmentOperationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AssignmentOperationsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssignmentOperationsClient) GetResponder(resp *http.Response) (result AssignmentOperation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list Operations for given blueprint assignment within a subscription. +// Parameters: +// subscriptionID - azure subscriptionId, which we assign the blueprint to. +// assignmentName - name of the assignment. +func (client AssignmentOperationsClient) List(ctx context.Context, subscriptionID string, assignmentName string) (result AssignmentOperationListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.List") + defer func() { + sc := -1 + if result.aol.Response.Response != nil { + sc = result.aol.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, subscriptionID, assignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aol.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "List", resp, "Failure sending request") + return + } + + result.aol, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AssignmentOperationsClient) ListPreparer(ctx context.Context, subscriptionID string, assignmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "assignmentName": autorest.Encode("path", assignmentName), + "subscriptionId": autorest.Encode("path", subscriptionID), + } + + const APIVersion = "2018-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client AssignmentOperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssignmentOperationsClient) ListResponder(resp *http.Response) (result AssignmentOperationList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AssignmentOperationsClient) listNextResults(ctx context.Context, lastResults AssignmentOperationList) (result AssignmentOperationList, err error) { + req, err := lastResults.assignmentOperationListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "blueprint.AssignmentOperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AssignmentOperationsClient) ListComplete(ctx context.Context, subscriptionID string, assignmentName string) (result AssignmentOperationListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, subscriptionID, assignmentName) + return +} diff --git a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/blueprintapi/interfaces.go b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/blueprintapi/interfaces.go index ab16959ee52d..65c3a380d83e 100644 --- a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/blueprintapi/interfaces.go +++ b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/blueprintapi/interfaces.go @@ -76,3 +76,11 @@ type AssignmentsClientAPI interface { } var _ AssignmentsClientAPI = (*blueprint.AssignmentsClient)(nil) + +// AssignmentOperationsClientAPI contains the set of methods on the AssignmentOperationsClient type. +type AssignmentOperationsClientAPI interface { + Get(ctx context.Context, subscriptionID string, assignmentName string, assignmentOperationName string) (result blueprint.AssignmentOperation, err error) + List(ctx context.Context, subscriptionID string, assignmentName string) (result blueprint.AssignmentOperationListPage, err error) +} + +var _ AssignmentOperationsClientAPI = (*blueprint.AssignmentOperationsClient)(nil) diff --git a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/client.go b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/client.go index 5d5c87198798..94d17c5822d5 100644 --- a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/client.go +++ b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/client.go @@ -1,4 +1,4 @@ -// Package blueprint implements the Azure ARM Blueprint service API version 2017-11-11-preview. +// Package blueprint implements the Azure ARM Blueprint service API version . // // Blueprint Client package blueprint diff --git a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/models.go b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/models.go index 535f6811a0ed..3d905ce24972 100644 --- a/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/models.go +++ b/services/preview/blueprint/mgmt/2017-11-11-preview/blueprint/models.go @@ -572,6 +572,61 @@ func (a *Assignment) UnmarshalJSON(body []byte) error { return nil } +// AssignmentDeploymentJob represents individual job in given assignment operation. +type AssignmentDeploymentJob struct { + // Kind - Kind of the job. + Kind *string `json:"kind,omitempty"` + // Action - Name of the action performed in this job. + Action *string `json:"action,omitempty"` + // JobID - Id of this job. + JobID *string `json:"jobId,omitempty"` + // JobState - State of this job. + JobState *string `json:"jobState,omitempty"` + // Result - deployment job result. + Result *AssignmentDeploymentJobResult `json:"result,omitempty"` + // History - result of this deployment job for each retry. + History *[]AssignmentDeploymentJobResult `json:"history,omitempty"` + // RequestURI - Reference to deployment job resource id. + RequestURI *string `json:"requestUri,omitempty"` +} + +// AssignmentDeploymentJobResult result of each individual deployment in a blueprint assignment. +type AssignmentDeploymentJobResult struct { + // Error - contains error details if deployment job failed. + Error *AzureResourceManagerError `json:"error,omitempty"` + // Resources - resources created as result of the deployment job. + Resources *[]AssignmentJobCreatedResource `json:"resources,omitempty"` +} + +// AssignmentJobCreatedResource azure resource created from deployment job. +type AssignmentJobCreatedResource struct { + Properties map[string]*string `json:"properties"` + // ID - String Id used to locate any resource on Azure. + ID *string `json:"id,omitempty"` + // Type - Type of this resource. + Type *string `json:"type,omitempty"` + // Name - Name of this resource. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentJobCreatedResource. +func (ajcr AssignmentJobCreatedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ajcr.Properties != nil { + objectMap["properties"] = ajcr.Properties + } + if ajcr.ID != nil { + objectMap["id"] = ajcr.ID + } + if ajcr.Type != nil { + objectMap["type"] = ajcr.Type + } + if ajcr.Name != nil { + objectMap["name"] = ajcr.Name + } + return json.Marshal(objectMap) +} + // AssignmentList list of Blueprint assignments type AssignmentList struct { autorest.Response `json:"-"` @@ -724,6 +779,250 @@ type AssignmentLockSettings struct { Mode AssignmentLockMode `json:"mode,omitempty"` } +// AssignmentOperation represents underlying deployment detail for each update to the assignment. +type AssignmentOperation struct { + autorest.Response `json:"-"` + // AssignmentOperationProperties - Properties for AssignmentOperation + *AssignmentOperationProperties `json:"properties,omitempty"` + // ID - String Id used to locate any resource on Azure. + ID *string `json:"id,omitempty"` + // Type - Type of this resource. + Type *string `json:"type,omitempty"` + // Name - Name of this resource. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssignmentOperation. +func (ao AssignmentOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ao.AssignmentOperationProperties != nil { + objectMap["properties"] = ao.AssignmentOperationProperties + } + if ao.ID != nil { + objectMap["id"] = ao.ID + } + if ao.Type != nil { + objectMap["type"] = ao.Type + } + if ao.Name != nil { + objectMap["name"] = ao.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssignmentOperation struct. +func (ao *AssignmentOperation) 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 assignmentOperationProperties AssignmentOperationProperties + err = json.Unmarshal(*v, &assignmentOperationProperties) + if err != nil { + return err + } + ao.AssignmentOperationProperties = &assignmentOperationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ao.ID = &ID + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ao.Type = &typeVar + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ao.Name = &name + } + } + } + + return nil +} + +// AssignmentOperationList list of AssignmentOperation. +type AssignmentOperationList struct { + autorest.Response `json:"-"` + // Value - List of AssignmentOperation. + Value *[]AssignmentOperation `json:"value,omitempty"` + // NextLink - Link to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AssignmentOperationListIterator provides access to a complete listing of AssignmentOperation values. +type AssignmentOperationListIterator struct { + i int + page AssignmentOperationListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AssignmentOperationListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AssignmentOperationListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AssignmentOperationListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AssignmentOperationListIterator) Response() AssignmentOperationList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AssignmentOperationListIterator) Value() AssignmentOperation { + if !iter.page.NotDone() { + return AssignmentOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AssignmentOperationListIterator type. +func NewAssignmentOperationListIterator(page AssignmentOperationListPage) AssignmentOperationListIterator { + return AssignmentOperationListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aol AssignmentOperationList) IsEmpty() bool { + return aol.Value == nil || len(*aol.Value) == 0 +} + +// assignmentOperationListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aol AssignmentOperationList) assignmentOperationListPreparer(ctx context.Context) (*http.Request, error) { + if aol.NextLink == nil || len(to.String(aol.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aol.NextLink))) +} + +// AssignmentOperationListPage contains a page of AssignmentOperation values. +type AssignmentOperationListPage struct { + fn func(context.Context, AssignmentOperationList) (AssignmentOperationList, error) + aol AssignmentOperationList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AssignmentOperationListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentOperationListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.aol) + if err != nil { + return err + } + page.aol = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AssignmentOperationListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AssignmentOperationListPage) NotDone() bool { + return !page.aol.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AssignmentOperationListPage) Response() AssignmentOperationList { + return page.aol +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AssignmentOperationListPage) Values() []AssignmentOperation { + if page.aol.IsEmpty() { + return nil + } + return *page.aol.Value +} + +// Creates a new instance of the AssignmentOperationListPage type. +func NewAssignmentOperationListPage(getNextPage func(context.Context, AssignmentOperationList) (AssignmentOperationList, error)) AssignmentOperationListPage { + return AssignmentOperationListPage{fn: getNextPage} +} + +// AssignmentOperationProperties properties of AssignmentOperation. +type AssignmentOperationProperties struct { + // BlueprintVersion - The blueprint version used for the assignment operation. + BlueprintVersion *string `json:"blueprintVersion,omitempty"` + // AssignmentState - State of this assignment operation. + AssignmentState *string `json:"assignmentState,omitempty"` + // TimeCreated - Create time of this Assignment Operation. + TimeCreated *string `json:"timeCreated,omitempty"` + // TimeStarted - Start time of the underlying deployment. + TimeStarted *string `json:"timeStarted,omitempty"` + // TimeFinished - Finish time of the overall underlying deployments. + TimeFinished *string `json:"timeFinished,omitempty"` + // Deployments - list of jobs in this assignment operation. + Deployments *[]AssignmentDeploymentJob `json:"deployments,omitempty"` +} + // AssignmentProperties detailed properties for Assignment. type AssignmentProperties struct { // BlueprintID - ID of the Blueprint definition resource. @@ -792,6 +1091,14 @@ type AzureResourceBase struct { Name *string `json:"name,omitempty"` } +// AzureResourceManagerError error code and message +type AzureResourceManagerError struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` +} + // KeyVaultReference specifies the link to a KeyVault. type KeyVaultReference struct { // ID - Azure resource ID of the KeyVault.