From a1d8a7cd58018e230435df4d627f3c9daa6afa48 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 28 Jul 2020 02:16:24 +0000 Subject: [PATCH] Generated from 1191d68215da264cc189215b3672492f0a0f25ba Add Location back. Add TaskRunNameParameter to restrict the name. --- .../2018-02-01/containerregistry/builds.go | 8 +- .../containerregistry/buildsteps.go | 12 +- .../containerregistry/buildtasks.go | 9 +- .../2018-02-01/containerregistry/enums.go | 398 ++++++++++ .../2018-02-01/containerregistry/models.go | 701 ++++++------------ .../containerregistry/operations.go | 4 +- .../containerregistry/registries.go | 21 +- .../containerregistry/replications.go | 8 +- .../2018-02-01/containerregistry/version.go | 2 +- .../2018-02-01/containerregistry/webhooks.go | 14 +- 10 files changed, 671 insertions(+), 506 deletions(-) create mode 100644 services/preview/containerregistry/mgmt/2018-02-01/containerregistry/enums.go diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go index d1377c61e38e..b62787132c92 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go @@ -120,7 +120,6 @@ func (client BuildsClient) CancelSender(req *http.Request) (future BuildsCancelF func (client BuildsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -205,7 +204,6 @@ func (client BuildsClient) GetSender(req *http.Request) (*http.Response, error) func (client BuildsClient) GetResponder(resp *http.Response) (result Build, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -291,7 +289,6 @@ func (client BuildsClient) GetLogLinkSender(req *http.Request) (*http.Response, func (client BuildsClient) GetLogLinkResponder(resp *http.Response) (result BuildGetLogResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -344,6 +341,9 @@ func (client BuildsClient) List(ctx context.Context, resourceGroupName string, r if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.BuildsClient", "List", resp, "Failure responding to request") } + if result.blr.hasNextLink() && result.blr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -389,7 +389,6 @@ func (client BuildsClient) ListSender(req *http.Request) (*http.Response, error) func (client BuildsClient) ListResponder(resp *http.Response) (result BuildListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -515,7 +514,6 @@ func (client BuildsClient) UpdateSender(req *http.Request) (future BuildsUpdateF func (client BuildsClient) UpdateResponder(resp *http.Response) (result Build, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go index d94e6999eb46..1fab6b4ef024 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go @@ -133,7 +133,6 @@ func (client BuildStepsClient) CreateSender(req *http.Request) (future BuildStep func (client BuildStepsClient) CreateResponder(resp *http.Response) (result BuildStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -229,7 +228,6 @@ func (client BuildStepsClient) DeleteSender(req *http.Request) (future BuildStep func (client BuildStepsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -324,7 +322,6 @@ func (client BuildStepsClient) GetSender(req *http.Request) (*http.Response, err func (client BuildStepsClient) GetResponder(resp *http.Response) (result BuildStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -378,6 +375,9 @@ func (client BuildStepsClient) List(ctx context.Context, resourceGroupName strin if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsClient", "List", resp, "Failure responding to request") } + if result.bsl.hasNextLink() && result.bsl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -415,7 +415,6 @@ func (client BuildStepsClient) ListSender(req *http.Request) (*http.Response, er func (client BuildStepsClient) ListResponder(resp *http.Response) (result BuildStepList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -511,6 +510,9 @@ func (client BuildStepsClient) ListBuildArguments(ctx context.Context, resourceG if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.BuildStepsClient", "ListBuildArguments", resp, "Failure responding to request") } + if result.bal.hasNextLink() && result.bal.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -549,7 +551,6 @@ func (client BuildStepsClient) ListBuildArgumentsSender(req *http.Request) (*htt func (client BuildStepsClient) ListBuildArgumentsResponder(resp *http.Response) (result BuildArgumentList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -685,7 +686,6 @@ func (client BuildStepsClient) UpdateSender(req *http.Request) (future BuildStep func (client BuildStepsClient) UpdateResponder(resp *http.Response) (result BuildStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go index d6cb91da871e..ee9944d4bc33 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go @@ -141,7 +141,6 @@ func (client BuildTasksClient) CreateSender(req *http.Request) (future BuildTask func (client BuildTasksClient) CreateResponder(resp *http.Response) (result BuildTask, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -231,7 +230,6 @@ func (client BuildTasksClient) DeleteSender(req *http.Request) (future BuildTask func (client BuildTasksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -320,7 +318,6 @@ func (client BuildTasksClient) GetSender(req *http.Request) (*http.Response, err func (client BuildTasksClient) GetResponder(resp *http.Response) (result BuildTask, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -372,6 +369,9 @@ func (client BuildTasksClient) List(ctx context.Context, resourceGroupName strin if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.BuildTasksClient", "List", resp, "Failure responding to request") } + if result.btlr.hasNextLink() && result.btlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -414,7 +414,6 @@ func (client BuildTasksClient) ListSender(req *http.Request) (*http.Response, er func (client BuildTasksClient) ListResponder(resp *http.Response) (result BuildTaskListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -541,7 +540,6 @@ func (client BuildTasksClient) ListSourceRepositoryPropertiesSender(req *http.Re func (client BuildTasksClient) ListSourceRepositoryPropertiesResponder(resp *http.Response) (result SourceRepositoryProperties, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -634,7 +632,6 @@ func (client BuildTasksClient) UpdateSender(req *http.Request) (future BuildTask func (client BuildTasksClient) UpdateResponder(resp *http.Response) (result BuildTask, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/enums.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/enums.go new file mode 100644 index 000000000000..4d5d04221040 --- /dev/null +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/enums.go @@ -0,0 +1,398 @@ +package containerregistry + +// 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. + +// Action enumerates the values for action. +type Action string + +const ( + // Allow ... + Allow Action = "Allow" +) + +// PossibleActionValues returns an array of possible values for the Action const type. +func PossibleActionValues() []Action { + return []Action{Allow} +} + +// BaseImageDependencyType enumerates the values for base image dependency type. +type BaseImageDependencyType string + +const ( + // BuildTime ... + BuildTime BaseImageDependencyType = "BuildTime" + // RunTime ... + RunTime BaseImageDependencyType = "RunTime" +) + +// PossibleBaseImageDependencyTypeValues returns an array of possible values for the BaseImageDependencyType const type. +func PossibleBaseImageDependencyTypeValues() []BaseImageDependencyType { + return []BaseImageDependencyType{BuildTime, RunTime} +} + +// BaseImageTriggerType enumerates the values for base image trigger type. +type BaseImageTriggerType string + +const ( + // All ... + All BaseImageTriggerType = "All" + // None ... + None BaseImageTriggerType = "None" + // Runtime ... + Runtime BaseImageTriggerType = "Runtime" +) + +// PossibleBaseImageTriggerTypeValues returns an array of possible values for the BaseImageTriggerType const type. +func PossibleBaseImageTriggerTypeValues() []BaseImageTriggerType { + return []BaseImageTriggerType{All, None, Runtime} +} + +// BuildStatus enumerates the values for build status. +type BuildStatus string + +const ( + // Canceled ... + Canceled BuildStatus = "Canceled" + // Error ... + Error BuildStatus = "Error" + // Failed ... + Failed BuildStatus = "Failed" + // Queued ... + Queued BuildStatus = "Queued" + // Running ... + Running BuildStatus = "Running" + // Started ... + Started BuildStatus = "Started" + // Succeeded ... + Succeeded BuildStatus = "Succeeded" + // Timeout ... + Timeout BuildStatus = "Timeout" +) + +// PossibleBuildStatusValues returns an array of possible values for the BuildStatus const type. +func PossibleBuildStatusValues() []BuildStatus { + return []BuildStatus{Canceled, Error, Failed, Queued, Running, Started, Succeeded, Timeout} +} + +// BuildTaskStatus enumerates the values for build task status. +type BuildTaskStatus string + +const ( + // Disabled ... + Disabled BuildTaskStatus = "Disabled" + // Enabled ... + Enabled BuildTaskStatus = "Enabled" +) + +// PossibleBuildTaskStatusValues returns an array of possible values for the BuildTaskStatus const type. +func PossibleBuildTaskStatusValues() []BuildTaskStatus { + return []BuildTaskStatus{Disabled, Enabled} +} + +// BuildType enumerates the values for build type. +type BuildType string + +const ( + // AutoBuild ... + AutoBuild BuildType = "AutoBuild" + // QuickBuild ... + QuickBuild BuildType = "QuickBuild" +) + +// PossibleBuildTypeValues returns an array of possible values for the BuildType const type. +func PossibleBuildTypeValues() []BuildType { + return []BuildType{AutoBuild, QuickBuild} +} + +// DefaultAction enumerates the values for default action. +type DefaultAction string + +const ( + // DefaultActionAllow ... + DefaultActionAllow DefaultAction = "Allow" + // DefaultActionDeny ... + DefaultActionDeny DefaultAction = "Deny" +) + +// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{DefaultActionAllow, DefaultActionDeny} +} + +// ImportMode enumerates the values for import mode. +type ImportMode string + +const ( + // Force ... + Force ImportMode = "Force" + // NoForce ... + NoForce ImportMode = "NoForce" +) + +// PossibleImportModeValues returns an array of possible values for the ImportMode const type. +func PossibleImportModeValues() []ImportMode { + return []ImportMode{Force, NoForce} +} + +// OsType enumerates the values for os type. +type OsType string + +const ( + // Linux ... + Linux OsType = "Linux" + // Windows ... + Windows OsType = "Windows" +) + +// PossibleOsTypeValues returns an array of possible values for the OsType const type. +func PossibleOsTypeValues() []OsType { + return []OsType{Linux, Windows} +} + +// PasswordName enumerates the values for password name. +type PasswordName string + +const ( + // Password ... + Password PasswordName = "password" + // Password2 ... + Password2 PasswordName = "password2" +) + +// PossiblePasswordNameValues returns an array of possible values for the PasswordName const type. +func PossiblePasswordNameValues() []PasswordName { + return []PasswordName{Password, Password2} +} + +// PolicyStatus enumerates the values for policy status. +type PolicyStatus string + +const ( + // PolicyStatusDisabled ... + PolicyStatusDisabled PolicyStatus = "disabled" + // PolicyStatusEnabled ... + PolicyStatusEnabled PolicyStatus = "enabled" +) + +// PossiblePolicyStatusValues returns an array of possible values for the PolicyStatus const type. +func PossiblePolicyStatusValues() []PolicyStatus { + return []PolicyStatus{PolicyStatusDisabled, PolicyStatusEnabled} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateCanceled ... + ProvisioningStateCanceled ProvisioningState = "Canceled" + // ProvisioningStateCreating ... + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // ProvisioningStateUpdating ... + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateSucceeded, ProvisioningStateUpdating} +} + +// RegistryUsageUnit enumerates the values for registry usage unit. +type RegistryUsageUnit string + +const ( + // Bytes ... + Bytes RegistryUsageUnit = "Bytes" + // Count ... + Count RegistryUsageUnit = "Count" +) + +// PossibleRegistryUsageUnitValues returns an array of possible values for the RegistryUsageUnit const type. +func PossibleRegistryUsageUnitValues() []RegistryUsageUnit { + return []RegistryUsageUnit{Bytes, Count} +} + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // Basic ... + Basic SkuName = "Basic" + // Classic ... + Classic SkuName = "Classic" + // Premium ... + Premium SkuName = "Premium" + // Standard ... + Standard SkuName = "Standard" +) + +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() []SkuName { + return []SkuName{Basic, Classic, Premium, Standard} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // SkuTierBasic ... + SkuTierBasic SkuTier = "Basic" + // SkuTierClassic ... + SkuTierClassic SkuTier = "Classic" + // SkuTierPremium ... + SkuTierPremium SkuTier = "Premium" + // SkuTierStandard ... + SkuTierStandard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{SkuTierBasic, SkuTierClassic, SkuTierPremium, SkuTierStandard} +} + +// SourceControlType enumerates the values for source control type. +type SourceControlType string + +const ( + // Github ... + Github SourceControlType = "Github" + // VisualStudioTeamService ... + VisualStudioTeamService SourceControlType = "VisualStudioTeamService" +) + +// PossibleSourceControlTypeValues returns an array of possible values for the SourceControlType const type. +func PossibleSourceControlTypeValues() []SourceControlType { + return []SourceControlType{Github, VisualStudioTeamService} +} + +// TokenType enumerates the values for token type. +type TokenType string + +const ( + // OAuth ... + OAuth TokenType = "OAuth" + // PAT ... + PAT TokenType = "PAT" +) + +// PossibleTokenTypeValues returns an array of possible values for the TokenType const type. +func PossibleTokenTypeValues() []TokenType { + return []TokenType{OAuth, PAT} +} + +// TrustPolicyType enumerates the values for trust policy type. +type TrustPolicyType string + +const ( + // Notary ... + Notary TrustPolicyType = "Notary" +) + +// PossibleTrustPolicyTypeValues returns an array of possible values for the TrustPolicyType const type. +func PossibleTrustPolicyTypeValues() []TrustPolicyType { + return []TrustPolicyType{Notary} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeBuildStepProperties ... + TypeBuildStepProperties Type = "BuildStepProperties" + // TypeDocker ... + TypeDocker Type = "Docker" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeBuildStepProperties, TypeDocker} +} + +// TypeBasicBuildStepPropertiesUpdateParameters enumerates the values for type basic build step properties +// update parameters. +type TypeBasicBuildStepPropertiesUpdateParameters string + +const ( + // TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters ... + TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters TypeBasicBuildStepPropertiesUpdateParameters = "BuildStepPropertiesUpdateParameters" + // TypeBasicBuildStepPropertiesUpdateParametersTypeDocker ... + TypeBasicBuildStepPropertiesUpdateParametersTypeDocker TypeBasicBuildStepPropertiesUpdateParameters = "Docker" +) + +// PossibleTypeBasicBuildStepPropertiesUpdateParametersValues returns an array of possible values for the TypeBasicBuildStepPropertiesUpdateParameters const type. +func PossibleTypeBasicBuildStepPropertiesUpdateParametersValues() []TypeBasicBuildStepPropertiesUpdateParameters { + return []TypeBasicBuildStepPropertiesUpdateParameters{TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters, TypeBasicBuildStepPropertiesUpdateParametersTypeDocker} +} + +// TypeBasicQueueBuildRequest enumerates the values for type basic queue build request. +type TypeBasicQueueBuildRequest string + +const ( + // TypeBuildTask ... + TypeBuildTask TypeBasicQueueBuildRequest = "BuildTask" + // TypeQueueBuildRequest ... + TypeQueueBuildRequest TypeBasicQueueBuildRequest = "QueueBuildRequest" + // TypeQuickBuild ... + TypeQuickBuild TypeBasicQueueBuildRequest = "QuickBuild" +) + +// PossibleTypeBasicQueueBuildRequestValues returns an array of possible values for the TypeBasicQueueBuildRequest const type. +func PossibleTypeBasicQueueBuildRequestValues() []TypeBasicQueueBuildRequest { + return []TypeBasicQueueBuildRequest{TypeBuildTask, TypeQueueBuildRequest, TypeQuickBuild} +} + +// WebhookAction enumerates the values for webhook action. +type WebhookAction string + +const ( + // ChartDelete ... + ChartDelete WebhookAction = "chart_delete" + // ChartPush ... + ChartPush WebhookAction = "chart_push" + // Delete ... + Delete WebhookAction = "delete" + // Push ... + Push WebhookAction = "push" + // Quarantine ... + Quarantine WebhookAction = "quarantine" +) + +// PossibleWebhookActionValues returns an array of possible values for the WebhookAction const type. +func PossibleWebhookActionValues() []WebhookAction { + return []WebhookAction{ChartDelete, ChartPush, Delete, Push, Quarantine} +} + +// WebhookStatus enumerates the values for webhook status. +type WebhookStatus string + +const ( + // WebhookStatusDisabled ... + WebhookStatusDisabled WebhookStatus = "disabled" + // WebhookStatusEnabled ... + WebhookStatusEnabled WebhookStatus = "enabled" +) + +// PossibleWebhookStatusValues returns an array of possible values for the WebhookStatus const type. +func PossibleWebhookStatusValues() []WebhookStatus { + return []WebhookStatus{WebhookStatusDisabled, WebhookStatusEnabled} +} diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go index 7935c26a8cbc..fea6398ef429 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go @@ -31,388 +31,8 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/mgmt/2018-02-01/containerregistry" -// Action enumerates the values for action. -type Action string - -const ( - // Allow ... - Allow Action = "Allow" -) - -// PossibleActionValues returns an array of possible values for the Action const type. -func PossibleActionValues() []Action { - return []Action{Allow} -} - -// BaseImageDependencyType enumerates the values for base image dependency type. -type BaseImageDependencyType string - -const ( - // BuildTime ... - BuildTime BaseImageDependencyType = "BuildTime" - // RunTime ... - RunTime BaseImageDependencyType = "RunTime" -) - -// PossibleBaseImageDependencyTypeValues returns an array of possible values for the BaseImageDependencyType const type. -func PossibleBaseImageDependencyTypeValues() []BaseImageDependencyType { - return []BaseImageDependencyType{BuildTime, RunTime} -} - -// BaseImageTriggerType enumerates the values for base image trigger type. -type BaseImageTriggerType string - -const ( - // All ... - All BaseImageTriggerType = "All" - // None ... - None BaseImageTriggerType = "None" - // Runtime ... - Runtime BaseImageTriggerType = "Runtime" -) - -// PossibleBaseImageTriggerTypeValues returns an array of possible values for the BaseImageTriggerType const type. -func PossibleBaseImageTriggerTypeValues() []BaseImageTriggerType { - return []BaseImageTriggerType{All, None, Runtime} -} - -// BuildStatus enumerates the values for build status. -type BuildStatus string - -const ( - // Canceled ... - Canceled BuildStatus = "Canceled" - // Error ... - Error BuildStatus = "Error" - // Failed ... - Failed BuildStatus = "Failed" - // Queued ... - Queued BuildStatus = "Queued" - // Running ... - Running BuildStatus = "Running" - // Started ... - Started BuildStatus = "Started" - // Succeeded ... - Succeeded BuildStatus = "Succeeded" - // Timeout ... - Timeout BuildStatus = "Timeout" -) - -// PossibleBuildStatusValues returns an array of possible values for the BuildStatus const type. -func PossibleBuildStatusValues() []BuildStatus { - return []BuildStatus{Canceled, Error, Failed, Queued, Running, Started, Succeeded, Timeout} -} - -// BuildTaskStatus enumerates the values for build task status. -type BuildTaskStatus string - -const ( - // Disabled ... - Disabled BuildTaskStatus = "Disabled" - // Enabled ... - Enabled BuildTaskStatus = "Enabled" -) - -// PossibleBuildTaskStatusValues returns an array of possible values for the BuildTaskStatus const type. -func PossibleBuildTaskStatusValues() []BuildTaskStatus { - return []BuildTaskStatus{Disabled, Enabled} -} - -// BuildType enumerates the values for build type. -type BuildType string - -const ( - // AutoBuild ... - AutoBuild BuildType = "AutoBuild" - // QuickBuild ... - QuickBuild BuildType = "QuickBuild" -) - -// PossibleBuildTypeValues returns an array of possible values for the BuildType const type. -func PossibleBuildTypeValues() []BuildType { - return []BuildType{AutoBuild, QuickBuild} -} - -// DefaultAction enumerates the values for default action. -type DefaultAction string - -const ( - // DefaultActionAllow ... - DefaultActionAllow DefaultAction = "Allow" - // DefaultActionDeny ... - DefaultActionDeny DefaultAction = "Deny" -) - -// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. -func PossibleDefaultActionValues() []DefaultAction { - return []DefaultAction{DefaultActionAllow, DefaultActionDeny} -} - -// ImportMode enumerates the values for import mode. -type ImportMode string - -const ( - // Force ... - Force ImportMode = "Force" - // NoForce ... - NoForce ImportMode = "NoForce" -) - -// PossibleImportModeValues returns an array of possible values for the ImportMode const type. -func PossibleImportModeValues() []ImportMode { - return []ImportMode{Force, NoForce} -} - -// OsType enumerates the values for os type. -type OsType string - -const ( - // Linux ... - Linux OsType = "Linux" - // Windows ... - Windows OsType = "Windows" -) - -// PossibleOsTypeValues returns an array of possible values for the OsType const type. -func PossibleOsTypeValues() []OsType { - return []OsType{Linux, Windows} -} - -// PasswordName enumerates the values for password name. -type PasswordName string - -const ( - // Password ... - Password PasswordName = "password" - // Password2 ... - Password2 PasswordName = "password2" -) - -// PossiblePasswordNameValues returns an array of possible values for the PasswordName const type. -func PossiblePasswordNameValues() []PasswordName { - return []PasswordName{Password, Password2} -} - -// PolicyStatus enumerates the values for policy status. -type PolicyStatus string - -const ( - // PolicyStatusDisabled ... - PolicyStatusDisabled PolicyStatus = "disabled" - // PolicyStatusEnabled ... - PolicyStatusEnabled PolicyStatus = "enabled" -) - -// PossiblePolicyStatusValues returns an array of possible values for the PolicyStatus const type. -func PossiblePolicyStatusValues() []PolicyStatus { - return []PolicyStatus{PolicyStatusDisabled, PolicyStatusEnabled} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // ProvisioningStateCanceled ... - ProvisioningStateCanceled ProvisioningState = "Canceled" - // ProvisioningStateCreating ... - ProvisioningStateCreating ProvisioningState = "Creating" - // ProvisioningStateDeleting ... - ProvisioningStateDeleting ProvisioningState = "Deleting" - // ProvisioningStateFailed ... - ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateSucceeded ... - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - // ProvisioningStateUpdating ... - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateSucceeded, ProvisioningStateUpdating} -} - -// RegistryUsageUnit enumerates the values for registry usage unit. -type RegistryUsageUnit string - -const ( - // Bytes ... - Bytes RegistryUsageUnit = "Bytes" - // Count ... - Count RegistryUsageUnit = "Count" -) - -// PossibleRegistryUsageUnitValues returns an array of possible values for the RegistryUsageUnit const type. -func PossibleRegistryUsageUnitValues() []RegistryUsageUnit { - return []RegistryUsageUnit{Bytes, Count} -} - -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // Basic ... - Basic SkuName = "Basic" - // Classic ... - Classic SkuName = "Classic" - // Premium ... - Premium SkuName = "Premium" - // Standard ... - Standard SkuName = "Standard" -) - -// PossibleSkuNameValues returns an array of possible values for the SkuName const type. -func PossibleSkuNameValues() []SkuName { - return []SkuName{Basic, Classic, Premium, Standard} -} - -// SkuTier enumerates the values for sku tier. -type SkuTier string - -const ( - // SkuTierBasic ... - SkuTierBasic SkuTier = "Basic" - // SkuTierClassic ... - SkuTierClassic SkuTier = "Classic" - // SkuTierPremium ... - SkuTierPremium SkuTier = "Premium" - // SkuTierStandard ... - SkuTierStandard SkuTier = "Standard" -) - -// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. -func PossibleSkuTierValues() []SkuTier { - return []SkuTier{SkuTierBasic, SkuTierClassic, SkuTierPremium, SkuTierStandard} -} - -// SourceControlType enumerates the values for source control type. -type SourceControlType string - -const ( - // Github ... - Github SourceControlType = "Github" - // VisualStudioTeamService ... - VisualStudioTeamService SourceControlType = "VisualStudioTeamService" -) - -// PossibleSourceControlTypeValues returns an array of possible values for the SourceControlType const type. -func PossibleSourceControlTypeValues() []SourceControlType { - return []SourceControlType{Github, VisualStudioTeamService} -} - -// TokenType enumerates the values for token type. -type TokenType string - -const ( - // OAuth ... - OAuth TokenType = "OAuth" - // PAT ... - PAT TokenType = "PAT" -) - -// PossibleTokenTypeValues returns an array of possible values for the TokenType const type. -func PossibleTokenTypeValues() []TokenType { - return []TokenType{OAuth, PAT} -} - -// TrustPolicyType enumerates the values for trust policy type. -type TrustPolicyType string - -const ( - // Notary ... - Notary TrustPolicyType = "Notary" -) - -// PossibleTrustPolicyTypeValues returns an array of possible values for the TrustPolicyType const type. -func PossibleTrustPolicyTypeValues() []TrustPolicyType { - return []TrustPolicyType{Notary} -} - -// Type enumerates the values for type. -type Type string - -const ( - // TypeBuildStepProperties ... - TypeBuildStepProperties Type = "BuildStepProperties" - // TypeDocker ... - TypeDocker Type = "Docker" -) - -// PossibleTypeValues returns an array of possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{TypeBuildStepProperties, TypeDocker} -} - -// TypeBasicBuildStepPropertiesUpdateParameters enumerates the values for type basic build step properties -// update parameters. -type TypeBasicBuildStepPropertiesUpdateParameters string - -const ( - // TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters ... - TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters TypeBasicBuildStepPropertiesUpdateParameters = "BuildStepPropertiesUpdateParameters" - // TypeBasicBuildStepPropertiesUpdateParametersTypeDocker ... - TypeBasicBuildStepPropertiesUpdateParametersTypeDocker TypeBasicBuildStepPropertiesUpdateParameters = "Docker" -) - -// PossibleTypeBasicBuildStepPropertiesUpdateParametersValues returns an array of possible values for the TypeBasicBuildStepPropertiesUpdateParameters const type. -func PossibleTypeBasicBuildStepPropertiesUpdateParametersValues() []TypeBasicBuildStepPropertiesUpdateParameters { - return []TypeBasicBuildStepPropertiesUpdateParameters{TypeBasicBuildStepPropertiesUpdateParametersTypeBuildStepPropertiesUpdateParameters, TypeBasicBuildStepPropertiesUpdateParametersTypeDocker} -} - -// TypeBasicQueueBuildRequest enumerates the values for type basic queue build request. -type TypeBasicQueueBuildRequest string - -const ( - // TypeBuildTask ... - TypeBuildTask TypeBasicQueueBuildRequest = "BuildTask" - // TypeQueueBuildRequest ... - TypeQueueBuildRequest TypeBasicQueueBuildRequest = "QueueBuildRequest" - // TypeQuickBuild ... - TypeQuickBuild TypeBasicQueueBuildRequest = "QuickBuild" -) - -// PossibleTypeBasicQueueBuildRequestValues returns an array of possible values for the TypeBasicQueueBuildRequest const type. -func PossibleTypeBasicQueueBuildRequestValues() []TypeBasicQueueBuildRequest { - return []TypeBasicQueueBuildRequest{TypeBuildTask, TypeQueueBuildRequest, TypeQuickBuild} -} - -// WebhookAction enumerates the values for webhook action. -type WebhookAction string - -const ( - // ChartDelete ... - ChartDelete WebhookAction = "chart_delete" - // ChartPush ... - ChartPush WebhookAction = "chart_push" - // Delete ... - Delete WebhookAction = "delete" - // Push ... - Push WebhookAction = "push" - // Quarantine ... - Quarantine WebhookAction = "quarantine" -) - -// PossibleWebhookActionValues returns an array of possible values for the WebhookAction const type. -func PossibleWebhookActionValues() []WebhookAction { - return []WebhookAction{ChartDelete, ChartPush, Delete, Push, Quarantine} -} - -// WebhookStatus enumerates the values for webhook status. -type WebhookStatus string - -const ( - // WebhookStatusDisabled ... - WebhookStatusDisabled WebhookStatus = "disabled" - // WebhookStatusEnabled ... - WebhookStatusEnabled WebhookStatus = "enabled" -) - -// PossibleWebhookStatusValues returns an array of possible values for the WebhookStatus const type. -func PossibleWebhookStatusValues() []WebhookStatus { - return []WebhookStatus{WebhookStatusDisabled, WebhookStatusEnabled} -} - -// Actor the agent that initiated the event. For most situations, this could be from the authorization -// context of the request. +// Actor the agent that initiated the event. For most situations, this could be from the authorization context +// of the request. type Actor struct { // Name - The subject or username associated with the request context that generated the event. Name *string `json:"name,omitempty"` @@ -594,10 +214,15 @@ func (bal BuildArgumentList) IsEmpty() bool { return bal.Value == nil || len(*bal.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bal BuildArgumentList) hasNextLink() bool { + return bal.NextLink != nil && len(*bal.NextLink) != 0 +} + // buildArgumentListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bal BuildArgumentList) buildArgumentListPreparer(ctx context.Context) (*http.Request, error) { - if bal.NextLink == nil || len(to.String(bal.NextLink)) < 1 { + if !bal.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -625,11 +250,16 @@ func (page *BuildArgumentListPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bal) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bal) + if err != nil { + return err + } + page.bal = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bal = next return nil } @@ -767,10 +397,15 @@ func (blr BuildListResult) IsEmpty() bool { return blr.Value == nil || len(*blr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (blr BuildListResult) hasNextLink() bool { + return blr.NextLink != nil && len(*blr.NextLink) != 0 +} + // buildListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (blr BuildListResult) buildListResultPreparer(ctx context.Context) (*http.Request, error) { - if blr.NextLink == nil || len(to.String(blr.NextLink)) < 1 { + if !blr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -798,11 +433,16 @@ func (page *BuildListResultPage) NextWithContext(ctx context.Context) (err error tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.blr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.blr) + if err != nil { + return err + } + page.blr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.blr = next return nil } @@ -903,6 +543,13 @@ type BuildStep struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for BuildStep. +func (bs BuildStep) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = bs.Properties + return json.Marshal(objectMap) +} + // UnmarshalJSON is the custom unmarshaler for BuildStep struct. func (bs *BuildStep) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -1030,10 +677,15 @@ func (bsl BuildStepList) IsEmpty() bool { return bsl.Value == nil || len(*bsl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (bsl BuildStepList) hasNextLink() bool { + return bsl.NextLink != nil && len(*bsl.NextLink) != 0 +} + // buildStepListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (bsl BuildStepList) buildStepListPreparer(ctx context.Context) (*http.Request, error) { - if bsl.NextLink == nil || len(to.String(bsl.NextLink)) < 1 { + if !bsl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1061,11 +713,16 @@ func (page *BuildStepListPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bsl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.bsl) + if err != nil { + return err + } + page.bsl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.bsl = next return nil } @@ -1249,8 +906,7 @@ func (bspup BuildStepPropertiesUpdateParameters) AsBasicBuildStepPropertiesUpdat return &bspup, true } -// BuildStepsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildStepsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildStepsCreateFuture struct { azure.Future } @@ -1278,8 +934,7 @@ func (future *BuildStepsCreateFuture) Result(client BuildStepsClient) (bs BuildS return } -// BuildStepsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildStepsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildStepsDeleteFuture struct { azure.Future } @@ -1301,8 +956,7 @@ func (future *BuildStepsDeleteFuture) Result(client BuildStepsClient) (ar autore return } -// BuildStepsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildStepsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildStepsUpdateFuture struct { azure.Future } @@ -1408,8 +1062,8 @@ func (future *BuildsUpdateFuture) Result(client BuildsClient) (b Build, err erro return } -// BuildTask the build task that has the resource properties and all build items. The build task will have -// all information to schedule a build against it. +// BuildTask the build task that has the resource properties and all build items. The build task will have all +// information to schedule a build against it. type BuildTask struct { autorest.Response `json:"-"` // BuildTaskProperties - The properties of a build task. @@ -1634,10 +1288,15 @@ func (btlr BuildTaskListResult) IsEmpty() bool { return btlr.Value == nil || len(*btlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (btlr BuildTaskListResult) hasNextLink() bool { + return btlr.NextLink != nil && len(*btlr.NextLink) != 0 +} + // buildTaskListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (btlr BuildTaskListResult) buildTaskListResultPreparer(ctx context.Context) (*http.Request, error) { - if btlr.NextLink == nil || len(to.String(btlr.NextLink)) < 1 { + if !btlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1665,11 +1324,16 @@ func (page *BuildTaskListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.btlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.btlr) + if err != nil { + return err + } + page.btlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.btlr = next return nil } @@ -1721,6 +1385,27 @@ type BuildTaskProperties struct { Timeout *int32 `json:"timeout,omitempty"` } +// MarshalJSON is the custom marshaler for BuildTaskProperties. +func (btp BuildTaskProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if btp.Alias != nil { + objectMap["alias"] = btp.Alias + } + if btp.Status != "" { + objectMap["status"] = btp.Status + } + if btp.SourceRepository != nil { + objectMap["sourceRepository"] = btp.SourceRepository + } + if btp.Platform != nil { + objectMap["platform"] = btp.Platform + } + if btp.Timeout != nil { + objectMap["timeout"] = btp.Timeout + } + return json.Marshal(objectMap) +} + // BuildTaskPropertiesUpdateParameters the properties for updating a build task. type BuildTaskPropertiesUpdateParameters struct { // Alias - The alternative updatable name for a build task. @@ -1735,8 +1420,7 @@ type BuildTaskPropertiesUpdateParameters struct { SourceRepository *SourceRepositoryUpdateParameters `json:"sourceRepository,omitempty"` } -// BuildTasksCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildTasksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildTasksCreateFuture struct { azure.Future } @@ -1764,8 +1448,7 @@ func (future *BuildTasksCreateFuture) Result(client BuildTasksClient) (bt BuildT return } -// BuildTasksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildTasksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildTasksDeleteFuture struct { azure.Future } @@ -1787,8 +1470,7 @@ func (future *BuildTasksDeleteFuture) Result(client BuildTasksClient) (ar autore return } -// BuildTasksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// BuildTasksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type BuildTasksUpdateFuture struct { azure.Future } @@ -2154,10 +1836,15 @@ func (elr EventListResult) IsEmpty() bool { return elr.Value == nil || len(*elr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (elr EventListResult) hasNextLink() bool { + return elr.NextLink != nil && len(*elr.NextLink) != 0 +} + // eventListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (elr EventListResult) eventListResultPreparer(ctx context.Context) (*http.Request, error) { - if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 { + if !elr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2185,11 +1872,16 @@ func (page *EventListResultPage) NextWithContext(ctx context.Context) (err error tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.elr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.elr) + if err != nil { + return err + } + page.elr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.elr = next return nil } @@ -2552,10 +2244,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2583,11 +2280,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -2668,6 +2370,12 @@ type ProxyResource struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for ProxyResource. +func (pr ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // QuarantinePolicy an object that represents quarantine policy for a container registry. type QuarantinePolicy struct { // Status - The value that indicates whether the policy is enabled or not. Possible values include: 'PolicyStatusEnabled', 'PolicyStatusDisabled' @@ -2841,8 +2549,7 @@ type RegenerateCredentialParameters struct { Name PasswordName `json:"name,omitempty"` } -// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type RegistriesCreateFuture struct { azure.Future } @@ -2870,8 +2577,7 @@ func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registr return } -// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type RegistriesDeleteFuture struct { azure.Future } @@ -2945,8 +2651,7 @@ func (future *RegistriesQueueBuildFuture) Result(client RegistriesClient) (b Bui return } -// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type RegistriesUpdateFuture struct { azure.Future } @@ -2974,8 +2679,8 @@ func (future *RegistriesUpdateFuture) Result(client RegistriesClient) (r Registr return } -// RegistriesUpdatePoliciesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// RegistriesUpdatePoliciesFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type RegistriesUpdatePoliciesFuture struct { azure.Future } @@ -3204,10 +2909,15 @@ func (rlr RegistryListResult) IsEmpty() bool { return rlr.Value == nil || len(*rlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rlr RegistryListResult) hasNextLink() bool { + return rlr.NextLink != nil && len(*rlr.NextLink) != 0 +} + // registryListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rlr RegistryListResult) registryListResultPreparer(ctx context.Context) (*http.Request, error) { - if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + if !rlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3235,11 +2945,16 @@ func (page *RegistryListResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rlr = next return nil } @@ -3327,6 +3042,21 @@ type RegistryProperties struct { NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` } +// MarshalJSON is the custom marshaler for RegistryProperties. +func (rp RegistryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rp.AdminUserEnabled != nil { + objectMap["adminUserEnabled"] = rp.AdminUserEnabled + } + if rp.StorageAccount != nil { + objectMap["storageAccount"] = rp.StorageAccount + } + if rp.NetworkRuleSet != nil { + objectMap["networkRuleSet"] = rp.NetworkRuleSet + } + return json.Marshal(objectMap) +} + // RegistryPropertiesUpdateParameters the parameters for updating the properties of a container registry. type RegistryPropertiesUpdateParameters struct { // AdminUserEnabled - The value that indicates whether the admin user is enabled. @@ -3601,10 +3331,15 @@ func (rlr ReplicationListResult) IsEmpty() bool { return rlr.Value == nil || len(*rlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rlr ReplicationListResult) hasNextLink() bool { + return rlr.NextLink != nil && len(*rlr.NextLink) != 0 +} + // replicationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rlr ReplicationListResult) replicationListResultPreparer(ctx context.Context) (*http.Request, error) { - if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + if !rlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3632,11 +3367,16 @@ func (page *ReplicationListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rlr = next return nil } @@ -3678,6 +3418,12 @@ type ReplicationProperties struct { Status *Status `json:"status,omitempty"` } +// MarshalJSON is the custom marshaler for ReplicationProperties. +func (rp ReplicationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ReplicationsCreateFuture struct { @@ -3822,8 +3568,17 @@ type Sku struct { Tier SkuTier `json:"tier,omitempty"` } -// Source the registry node that generated the event. Put differently, while the actor initiates the event, -// the source generates it. +// MarshalJSON is the custom marshaler for Sku. +func (s Sku) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Name != "" { + objectMap["name"] = s.Name + } + return json.Marshal(objectMap) +} + +// Source the registry node that generated the event. Put differently, while the actor initiates the event, the +// source generates it. type Source struct { // Addr - The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port. Addr *string `json:"addr,omitempty"` @@ -3885,8 +3640,14 @@ type Status struct { Timestamp *date.Time `json:"timestamp,omitempty"` } -// StorageAccountProperties the properties of a storage account for a container registry. Only applicable -// to Classic SKU. +// MarshalJSON is the custom marshaler for Status. +func (s Status) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StorageAccountProperties the properties of a storage account for a container registry. Only applicable to +// Classic SKU. type StorageAccountProperties struct { // ID - The resource ID of the storage account. ID *string `json:"id,omitempty"` @@ -4175,10 +3936,15 @@ func (wlr WebhookListResult) IsEmpty() bool { return wlr.Value == nil || len(*wlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (wlr WebhookListResult) hasNextLink() bool { + return wlr.NextLink != nil && len(*wlr.NextLink) != 0 +} + // webhookListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (wlr WebhookListResult) webhookListResultPreparer(ctx context.Context) (*http.Request, error) { - if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 { + if !wlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4206,11 +3972,16 @@ func (page *WebhookListResultPage) NextWithContext(ctx context.Context) (err err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.wlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.wlr) + if err != nil { + return err + } + page.wlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.wlr = next return nil } @@ -4256,6 +4027,21 @@ type WebhookProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for WebhookProperties. +func (wp WebhookProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wp.Status != "" { + objectMap["status"] = wp.Status + } + if wp.Scope != nil { + objectMap["scope"] = wp.Scope + } + if wp.Actions != nil { + objectMap["actions"] = wp.Actions + } + return json.Marshal(objectMap) +} + // WebhookPropertiesCreateParameters the parameters for creating the properties of a webhook. type WebhookPropertiesCreateParameters struct { // ServiceURI - The service URI for the webhook to post notifications. @@ -4326,8 +4112,7 @@ func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type WebhooksCreateFuture struct { azure.Future } @@ -4355,8 +4140,7 @@ func (future *WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, er return } -// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type WebhooksDeleteFuture struct { azure.Future } @@ -4378,8 +4162,7 @@ func (future *WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.R return } -// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type WebhooksUpdateFuture struct { azure.Future } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go index cd3527e7664c..36d74d8ced3b 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go @@ -71,6 +71,9 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "List", resp, "Failure responding to request") } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -101,7 +104,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go index 590b2c77553a..9df613121222 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go @@ -121,7 +121,6 @@ func (client RegistriesClient) CheckNameAvailabilitySender(req *http.Request) (* func (client RegistriesClient) CheckNameAvailabilityResponder(resp *http.Response) (result RegistryNameStatus, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -216,7 +215,6 @@ func (client RegistriesClient) CreateSender(req *http.Request) (future Registrie func (client RegistriesClient) CreateResponder(resp *http.Response) (result Registry, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -302,7 +300,6 @@ func (client RegistriesClient) DeleteSender(req *http.Request) (future Registrie func (client RegistriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -387,7 +384,6 @@ func (client RegistriesClient) GetSender(req *http.Request) (*http.Response, err func (client RegistriesClient) GetResponder(resp *http.Response) (result Registry, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -471,7 +467,6 @@ func (client RegistriesClient) GetBuildSourceUploadURLSender(req *http.Request) func (client RegistriesClient) GetBuildSourceUploadURLResponder(resp *http.Response) (result SourceUploadDefinition, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -566,7 +561,6 @@ func (client RegistriesClient) ImportImageSender(req *http.Request) (future Regi func (client RegistriesClient) ImportImageResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -603,6 +597,9 @@ func (client RegistriesClient) List(ctx context.Context) (result RegistryListRes if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "List", resp, "Failure responding to request") } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -637,7 +634,6 @@ func (client RegistriesClient) ListSender(req *http.Request) (*http.Response, er func (client RegistriesClient) ListResponder(resp *http.Response) (result RegistryListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -720,6 +716,9 @@ func (client RegistriesClient) ListByResourceGroup(ctx context.Context, resource if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListByResourceGroup", resp, "Failure responding to request") } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -755,7 +754,6 @@ func (client RegistriesClient) ListByResourceGroupSender(req *http.Request) (*ht func (client RegistriesClient) ListByResourceGroupResponder(resp *http.Response) (result RegistryListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -878,7 +876,6 @@ func (client RegistriesClient) ListCredentialsSender(req *http.Request) (*http.R func (client RegistriesClient) ListCredentialsResponder(resp *http.Response) (result RegistryListCredentialsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -964,7 +961,6 @@ func (client RegistriesClient) ListPoliciesSender(req *http.Request) (*http.Resp func (client RegistriesClient) ListPoliciesResponder(resp *http.Response) (result RegistryPolicies, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1050,7 +1046,6 @@ func (client RegistriesClient) ListUsagesSender(req *http.Request) (*http.Respon func (client RegistriesClient) ListUsagesResponder(resp *http.Response) (result RegistryUsageListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1137,7 +1132,6 @@ func (client RegistriesClient) QueueBuildSender(req *http.Request) (future Regis func (client RegistriesClient) QueueBuildResponder(resp *http.Response) (result Build, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1227,7 +1221,6 @@ func (client RegistriesClient) RegenerateCredentialSender(req *http.Request) (*h func (client RegistriesClient) RegenerateCredentialResponder(resp *http.Response) (result RegistryListCredentialsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1316,7 +1309,6 @@ func (client RegistriesClient) UpdateSender(req *http.Request) (future Registrie func (client RegistriesClient) UpdateResponder(resp *http.Response) (result Registry, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1405,7 +1397,6 @@ func (client RegistriesClient) UpdatePoliciesSender(req *http.Request) (future R func (client RegistriesClient) UpdatePoliciesResponder(resp *http.Response) (result RegistryPolicies, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go index 2997cc628370..8826bcc8e0c0 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go @@ -129,7 +129,6 @@ func (client ReplicationsClient) CreateSender(req *http.Request) (future Replica func (client ReplicationsClient) CreateResponder(resp *http.Response) (result Replication, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -221,7 +220,6 @@ func (client ReplicationsClient) DeleteSender(req *http.Request) (future Replica func (client ReplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -312,7 +310,6 @@ func (client ReplicationsClient) GetSender(req *http.Request) (*http.Response, e func (client ReplicationsClient) GetResponder(resp *http.Response) (result Replication, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -363,6 +360,9 @@ func (client ReplicationsClient) List(ctx context.Context, resourceGroupName str if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure responding to request") } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -399,7 +399,6 @@ func (client ReplicationsClient) ListSender(req *http.Request) (*http.Response, func (client ReplicationsClient) ListResponder(resp *http.Response) (result ReplicationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -531,7 +530,6 @@ func (client ReplicationsClient) UpdateSender(req *http.Request) (future Replica func (client ReplicationsClient) UpdateResponder(resp *http.Response) (result Replication, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/version.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/version.go index 9f1d124ba4cd..3740f9ec7f6f 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/version.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " containerregistry/2018-02-01" + return "Azure-SDK-For-Go/" + Version() + " containerregistry/2018-02-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go index 3e0456876789..64c6048cb6af 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go @@ -135,7 +135,6 @@ func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCre func (client WebhooksClient) CreateResponder(resp *http.Response) (result Webhook, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -227,7 +226,6 @@ func (client WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDel func (client WebhooksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -318,7 +316,6 @@ func (client WebhooksClient) GetSender(req *http.Request) (*http.Response, error func (client WebhooksClient) GetResponder(resp *http.Response) (result Webhook, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -410,7 +407,6 @@ func (client WebhooksClient) GetCallbackConfigSender(req *http.Request) (*http.R func (client WebhooksClient) GetCallbackConfigResponder(resp *http.Response) (result CallbackConfig, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -461,6 +457,9 @@ func (client WebhooksClient) List(ctx context.Context, resourceGroupName string, if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure responding to request") } + if result.wlr.hasNextLink() && result.wlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -497,7 +496,6 @@ func (client WebhooksClient) ListSender(req *http.Request) (*http.Response, erro func (client WebhooksClient) ListResponder(resp *http.Response) (result WebhookListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -590,6 +588,9 @@ func (client WebhooksClient) ListEvents(ctx context.Context, resourceGroupName s if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure responding to request") } + if result.elr.hasNextLink() && result.elr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -627,7 +628,6 @@ func (client WebhooksClient) ListEventsSender(req *http.Request) (*http.Response func (client WebhooksClient) ListEventsResponder(resp *http.Response) (result EventListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -756,7 +756,6 @@ func (client WebhooksClient) PingSender(req *http.Request) (*http.Response, erro func (client WebhooksClient) PingResponder(resp *http.Response) (result EventInfo, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -851,7 +850,6 @@ func (client WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpd func (client WebhooksClient) UpdateResponder(resp *http.Response) (result Webhook, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing())