Commit e204d863 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Update Kubernetes to v1.22.1

* Update Kubernetes to v1.22.1 * Update dependent modules to track with upstream Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent ed5991f1

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -26,44 +26,45 @@ replace (
github.com/kubernetes-sigs/cri-tools => github.com/k3s-io/cri-tools v1.21.0-k3s1
github.com/matryer/moq => github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009
// LOOK TO scripts/download FOR THE VERSION OF runc THAT WE ARE BUILDING/SHIPPING
github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.0-rc95
github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.1
github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.0.3-0.20210316141917-a8c4a9ee0f6b
github.com/rancher/k3s/pkg/data => ./pkg/data
go.etcd.io/etcd => github.com/k3s-io/etcd v0.5.0-alpha.5.0.20201208200253-50621aee4aea
golang.org/x/crypto => golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net => golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
golang.org/x/sys => golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884
golang.org/x/net => golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
golang.org/x/sys => golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
google.golang.org/grpc => google.golang.org/grpc v1.27.1
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.4-k3s1
k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.4-k3s1
k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.4-k3s1
k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.4-k3s1
k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.4-k3s1
k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.4-k3s1
k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.4-k3s1
k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.4-k3s1
k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.4-k3s1
k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.4-k3s1
k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.4-k3s1
k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.4-k3s1
k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.4-k3s1
k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.4-k3s1
k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.4-k3s1
k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.4-k3s1
k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.4-k3s1
k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.4-k3s1
k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.4-k3s1
k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.4-k3s1
k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.21.4-k3s1
k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.4-k3s1
k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.4-k3s1
k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.4-k3s1
k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.21.4-k3s1
k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.4-k3s1
k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.21.4-k3s1
k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.21.4-k3s1
k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.22.1-k3s1
k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.22.1-k3s1
k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.22.1-k3s1
k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.22.1-k3s1
k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.22.1-k3s1
k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.22.1-k3s1
k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.22.1-k3s1
k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.22.1-k3s1
k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.22.1-k3s1
k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.22.1-k3s1
k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.22.1-k3s1
k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.22.1-k3s1
k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.22.1-k3s1
k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.22.1-k3s1
k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.22.1-k3s1
k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.22.1-k3s1
k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.22.1-k3s1
k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.22.1-k3s1
k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.22.1-k3s1
k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.22.1-k3s1
k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.22.1-k3s1
k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.22.1-k3s1
k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.22.1-k3s1
k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.22.1-k3s1
k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.22.1-k3s1
k8s.io/pod-security-admission => github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.22.1-k3s1
k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.22.1-k3s1
k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.22.1-k3s1
k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.22.1-k3s1
mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
)
......@@ -84,7 +85,7 @@ require (
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-sql-driver/mysql v1.4.1
github.com/golangplus/testing v1.0.0 // indirect
github.com/google/cadvisor v0.39.0
github.com/google/cadvisor v0.39.2
github.com/google/uuid v1.2.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
......@@ -100,8 +101,8 @@ require (
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.11.0
// LOOK TO scripts/download FOR THE VERSION OF runc THAT WE ARE BUILDING/SHIPPING
github.com/opencontainers/runc v1.0.0-rc95
github.com/opencontainers/selinux v1.8.0
github.com/opencontainers/runc v1.0.1
github.com/opencontainers/selinux v1.8.2
github.com/pierrec/lz4 v2.6.0+incompatible
github.com/pkg/errors v0.9.1
github.com/rancher/dynamiclistener v0.2.3
......@@ -118,23 +119,23 @@ require (
github.com/urfave/cli v1.22.2
go.etcd.io/etcd v0.5.0-alpha.5.0.20201208200253-50621aee4aea
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887
google.golang.org/grpc v1.37.0
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
google.golang.org/grpc v1.38.0
gopkg.in/yaml.v2 v2.4.0
inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252
k8s.io/api v0.21.4
k8s.io/apimachinery v0.21.4
k8s.io/apiserver v0.21.4
k8s.io/api v0.22.1
k8s.io/apimachinery v0.22.1
k8s.io/apiserver v0.22.1
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/cloud-provider v0.21.4
k8s.io/component-base v0.21.4
k8s.io/controller-manager v0.21.4
k8s.io/cri-api v0.21.4
k8s.io/cloud-provider v0.22.1
k8s.io/component-base v0.22.1
k8s.io/controller-manager v0.22.1
k8s.io/cri-api v0.22.1
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.8.0
k8s.io/kubectl v0.21.4
k8s.io/kubernetes v1.21.4
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
k8s.io/klog/v2 v2.9.0
k8s.io/kubectl v0.22.1
k8s.io/kubernetes v1.22.1
k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9
sigs.k8s.io/yaml v1.2.0
)
......@@ -8,7 +8,7 @@ import (
"os"
"time"
"github.com/opencontainers/runc/libcontainer/system"
"github.com/opencontainers/runc/libcontainer/userns"
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/agent/templates"
util2 "github.com/rancher/k3s/pkg/agent/util"
......@@ -42,7 +42,7 @@ func setupContainerdConfig(ctx context.Context, cfg *config.Node) error {
return err
}
isRunningInUserNS := system.RunningInUserNS()
isRunningInUserNS := userns.RunningInUserNS()
_, _, hasCFS, hasPIDs := cgroups.CheckCgroups()
// "/sys/fs/cgroup" is namespaced
cgroupfsWritable := unix.Access("/sys/fs/cgroup", unix.W_OK) == nil
......
......@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
"github.com/opencontainers/runc/libcontainer/system"
"github.com/opencontainers/runc/libcontainer/userns"
"github.com/rancher/k3s/pkg/cgroups"
"github.com/rancher/k3s/pkg/daemons/config"
"github.com/rancher/k3s/pkg/util"
......@@ -142,7 +142,7 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
if runtimeRoot != "" {
argsMap["runtime-cgroups"] = runtimeRoot
}
if system.RunningInUserNS() {
if userns.RunningInUserNS() {
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "DevicePlugins=false")
}
......
......@@ -4,7 +4,7 @@ cd $(dirname $0)/..
. ./scripts/version.sh
RUNC_VERSION=v1.0.0
RUNC_VERSION=v1.0.1
ROOT_VERSION=v0.9.1
TRAEFIK_VERSION=9.18.2 # appVersion: 2.4.8
CHARTS_DIR=build/static/charts
......
The MIT License (MIT)
Copyright (c) 2021 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
# Change History
## Additive Changes
### New Funcs
1. AccessURI.MarshalJSON() ([]byte, error)
1. BootDiagnosticsInstanceView.MarshalJSON() ([]byte, error)
1. DataDiskImage.MarshalJSON() ([]byte, error)
1. GalleryIdentifier.MarshalJSON() ([]byte, error)
1. LogAnalyticsOperationResult.MarshalJSON() ([]byte, error)
1. LogAnalyticsOutput.MarshalJSON() ([]byte, error)
1. OperationListResult.MarshalJSON() ([]byte, error)
1. OperationValueDisplay.MarshalJSON() ([]byte, error)
1. OrchestrationServiceSummary.MarshalJSON() ([]byte, error)
1. RecoveryWalkResponse.MarshalJSON() ([]byte, error)
1. RegionalReplicationStatus.MarshalJSON() ([]byte, error)
1. ReplicationStatus.MarshalJSON() ([]byte, error)
1. ResourceSku.MarshalJSON() ([]byte, error)
1. ResourceSkuCapabilities.MarshalJSON() ([]byte, error)
1. ResourceSkuCapacity.MarshalJSON() ([]byte, error)
1. ResourceSkuCosts.MarshalJSON() ([]byte, error)
1. ResourceSkuLocationInfo.MarshalJSON() ([]byte, error)
1. ResourceSkuRestrictionInfo.MarshalJSON() ([]byte, error)
1. ResourceSkuRestrictions.MarshalJSON() ([]byte, error)
1. ResourceSkuZoneDetails.MarshalJSON() ([]byte, error)
1. RollbackStatusInfo.MarshalJSON() ([]byte, error)
1. RollingUpgradeProgressInfo.MarshalJSON() ([]byte, error)
1. RollingUpgradeRunningStatus.MarshalJSON() ([]byte, error)
1. RollingUpgradeStatusInfoProperties.MarshalJSON() ([]byte, error)
1. ShareInfoElement.MarshalJSON() ([]byte, error)
1. SubResourceReadOnly.MarshalJSON() ([]byte, error)
1. UpgradeOperationHistoricalStatusInfo.MarshalJSON() ([]byte, error)
1. UpgradeOperationHistoricalStatusInfoProperties.MarshalJSON() ([]byte, error)
1. UpgradeOperationHistoryStatus.MarshalJSON() ([]byte, error)
1. VirtualMachineHealthStatus.MarshalJSON() ([]byte, error)
1. VirtualMachineIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
1. VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
1. VirtualMachineScaleSetInstanceViewStatusesSummary.MarshalJSON() ([]byte, error)
1. VirtualMachineScaleSetSku.MarshalJSON() ([]byte, error)
1. VirtualMachineScaleSetSkuCapacity.MarshalJSON() ([]byte, error)
1. VirtualMachineScaleSetVMExtensionsSummary.MarshalJSON() ([]byte, error)
1. VirtualMachineStatusCodeCount.MarshalJSON() ([]byte, error)
{
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"tag": "package-2019-12-01",
"use": "@microsoft.azure/autorest.go@2.1.183",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"additional_properties": {
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -74,6 +63,7 @@ func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
......@@ -113,7 +103,6 @@ func (client AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*h
func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response) (result AvailabilitySet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -152,6 +141,7 @@ func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request")
return
}
return
......@@ -189,7 +179,6 @@ func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Resp
func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
......@@ -227,6 +216,7 @@ func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -264,7 +254,6 @@ func (client AvailabilitySetsClient) GetSender(req *http.Request) (*http.Respons
func (client AvailabilitySetsClient) GetResponder(resp *http.Response) (result AvailabilitySet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -303,6 +292,11 @@ func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName
result.aslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure responding to request")
return
}
if result.aslr.hasNextLink() && result.aslr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -339,7 +333,6 @@ func (client AvailabilitySetsClient) ListSender(req *http.Request) (*http.Respon
func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result AvailabilitySetListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -416,6 +409,7 @@ func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, res
result, err = client.ListAvailableSizesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request")
return
}
return
......@@ -453,7 +447,6 @@ func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request)
func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -463,7 +456,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Resp
// ListBySubscription lists all availability sets in a subscription.
// Parameters:
// expand - the expand expression to apply to the operation.
// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'.
func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, expand string) (result AvailabilitySetListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
......@@ -492,6 +485,11 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, exp
result.aslr, err = client.ListBySubscriptionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure responding to request")
return
}
if result.aslr.hasNextLink() && result.aslr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -530,7 +528,6 @@ func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request)
func (client AvailabilitySetsClient) ListBySubscriptionResponder(resp *http.Response) (result AvailabilitySetListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -607,6 +604,7 @@ func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupNa
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request")
return
}
return
......@@ -646,7 +644,6 @@ func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Resp
func (client AvailabilitySetsClient) UpdateResponder(resp *http.Response) (result AvailabilitySet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
......@@ -3,19 +3,8 @@
// Compute Client
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -54,8 +43,8 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -99,7 +88,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -137,7 +126,10 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -146,7 +138,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -166,8 +157,8 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -180,7 +171,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure sending request")
return
}
......@@ -216,7 +207,10 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -225,7 +219,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
func (client ContainerServicesClient) 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
......@@ -265,6 +258,7 @@ func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -302,7 +296,6 @@ func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Respon
func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -340,6 +333,11 @@ func (client ContainerServicesClient) List(ctx context.Context) (result Containe
result.cslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request")
return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -375,7 +373,6 @@ func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Respo
func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ContainerServiceListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -453,6 +450,11 @@ func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, r
result.cslr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -489,7 +491,6 @@ func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Reques
func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerServiceListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -87,6 +76,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
......@@ -126,7 +116,6 @@ func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request)
func (client DedicatedHostGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -165,6 +154,7 @@ func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request")
return
}
return
......@@ -202,7 +192,6 @@ func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.R
func (client DedicatedHostGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
......@@ -240,6 +229,7 @@ func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -277,7 +267,6 @@ func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Resp
func (client DedicatedHostGroupsClient) GetResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -317,6 +306,11 @@ func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context,
result.dhglr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -353,7 +347,6 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Requ
func (client DedicatedHostGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -428,6 +421,11 @@ func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context)
result.dhglr, err = client.ListBySubscriptionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request")
return
}
if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -463,7 +461,6 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Reque
func (client DedicatedHostGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -540,6 +537,7 @@ func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request")
return
}
return
......@@ -579,7 +577,6 @@ func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.R
func (client DedicatedHostGroupsClient) UpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -79,7 +68,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -118,7 +107,10 @@ func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -127,7 +119,6 @@ func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (futu
func (client DedicatedHostsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -145,8 +136,8 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -159,7 +150,7 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -196,7 +187,10 @@ func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future Dedic
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -205,7 +199,6 @@ func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future Dedic
func (client DedicatedHostsClient) 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
......@@ -245,6 +238,7 @@ func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName st
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -286,7 +280,6 @@ func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response,
func (client DedicatedHostsClient) GetResponder(resp *http.Response) (result DedicatedHost, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -327,6 +320,11 @@ func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resource
result.dhlr, err = client.ListByHostGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request")
return
}
if result.dhlr.hasNextLink() && result.dhlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -364,7 +362,6 @@ func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*ht
func (client DedicatedHostsClient) ListByHostGroupResponder(resp *http.Response) (result DedicatedHostListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -420,8 +417,8 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -434,7 +431,7 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request")
return
}
......@@ -473,7 +470,10 @@ func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future Dedic
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -482,7 +482,6 @@ func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future Dedic
func (client DedicatedHostsClient) UpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -56,8 +45,8 @@ func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -81,7 +70,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -119,7 +108,10 @@ func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -128,7 +120,6 @@ func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (
func (client DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -147,8 +138,8 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -161,7 +152,7 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -197,7 +188,10 @@ func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future D
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -206,7 +200,6 @@ func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future D
func (client DiskEncryptionSetsClient) 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
......@@ -246,6 +239,7 @@ func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupNam
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -283,7 +277,6 @@ func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Respo
func (client DiskEncryptionSetsClient) GetResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -320,6 +313,11 @@ func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEnc
result.desl, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request")
return
}
if result.desl.hasNextLink() && result.desl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -355,7 +353,6 @@ func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Resp
func (client DiskEncryptionSetsClient) ListResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -431,6 +428,11 @@ func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context,
result.desl, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.desl.hasNextLink() && result.desl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -467,7 +469,6 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Reque
func (client DiskEncryptionSetsClient) ListByResourceGroupResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -525,8 +526,8 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -539,7 +540,7 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request")
return
}
......@@ -577,7 +578,10 @@ func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future D
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -586,7 +590,6 @@ func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future D
func (client DiskEncryptionSetsClient) UpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -52,8 +41,8 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -66,7 +55,7 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -104,7 +93,10 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -113,7 +105,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
func (client GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (result Gallery, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -130,8 +121,8 @@ func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName stri
ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -144,7 +135,7 @@ func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request")
return
}
......@@ -180,7 +171,10 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -189,7 +183,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
func (client GalleriesClient) 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
......@@ -227,6 +220,7 @@ func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -264,7 +258,6 @@ func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, erro
func (client GalleriesClient) GetResponder(resp *http.Response) (result Gallery, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -301,6 +294,11 @@ func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage,
result.gl, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request")
return
}
if result.gl.hasNextLink() && result.gl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -336,7 +334,6 @@ func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, err
func (client GalleriesClient) ListResponder(resp *http.Response) (result GalleryList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -412,6 +409,11 @@ func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceG
result.gl, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.gl.hasNextLink() && result.gl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -448,7 +450,6 @@ func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*htt
func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response) (result GalleryList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -504,8 +505,8 @@ func (client GalleriesClient) Update(ctx context.Context, resourceGroupName stri
ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -518,7 +519,7 @@ func (client GalleriesClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure sending request")
return
}
......@@ -556,7 +557,10 @@ func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesU
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -565,7 +569,6 @@ func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesU
func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -56,8 +45,8 @@ func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -70,7 +59,7 @@ func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -109,7 +98,10 @@ func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -118,7 +110,6 @@ func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request)
func (client GalleryApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -137,8 +128,8 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -151,7 +142,7 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -188,7 +179,10 @@ func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -197,7 +191,6 @@ func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future
func (client GalleryApplicationsClient) 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
......@@ -237,6 +230,7 @@ func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -275,7 +269,6 @@ func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Resp
func (client GalleryApplicationsClient) GetResponder(resp *http.Response) (result GalleryApplication, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -316,6 +309,11 @@ func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resou
result.gal, err = client.ListByGalleryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request")
return
}
if result.gal.hasNextLink() && result.gal.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -353,7 +351,6 @@ func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (
func (client GalleryApplicationsClient) ListByGalleryResponder(resp *http.Response) (result GalleryApplicationList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -412,8 +409,8 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -426,7 +423,7 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure sending request")
return
}
......@@ -465,7 +462,10 @@ func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -474,7 +474,6 @@ func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future
func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -59,8 +48,8 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -86,7 +75,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -126,7 +115,10 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Re
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -135,7 +127,6 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Re
func (client GalleryApplicationVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -155,8 +146,8 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -169,7 +160,7 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -207,7 +198,10 @@ func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -216,7 +210,6 @@ func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (
func (client GalleryApplicationVersionsClient) 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
......@@ -258,6 +251,7 @@ func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resource
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -300,7 +294,6 @@ func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*ht
func (client GalleryApplicationVersionsClient) GetResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -342,6 +335,11 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx cont
result.gavl, err = client.ListByGalleryApplicationResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request")
return
}
if result.gavl.hasNextLink() && result.gavl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -380,7 +378,6 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(re
func (client GalleryApplicationVersionsClient) ListByGalleryApplicationResponder(resp *http.Response) (result GalleryApplicationVersionList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -440,8 +437,8 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -454,7 +451,7 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure sending request")
return
}
......@@ -494,7 +491,10 @@ func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -503,7 +503,6 @@ func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (
func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -55,8 +44,8 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -81,7 +70,7 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -120,7 +109,10 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -129,7 +121,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
func (client GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -147,8 +138,8 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -161,7 +152,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
return
}
......@@ -198,7 +189,10 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -207,7 +201,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
func (client GalleryImagesClient) 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
......@@ -246,6 +239,7 @@ func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -284,7 +278,6 @@ func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response,
func (client GalleryImagesClient) GetResponder(resp *http.Response) (result GalleryImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -324,6 +317,11 @@ func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGro
result.gil, err = client.ListByGalleryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request")
return
}
if result.gil.hasNextLink() && result.gil.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -361,7 +359,6 @@ func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.
func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (result GalleryImageList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -419,8 +416,8 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -433,7 +430,7 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure sending request")
return
}
......@@ -472,7 +469,10 @@ func (client GalleryImagesClient) UpdateSender(req *http.Request) (future Galler
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -481,7 +481,6 @@ func (client GalleryImagesClient) UpdateSender(req *http.Request) (future Galler
func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -57,8 +46,8 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -78,7 +67,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -118,7 +107,10 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -127,7 +119,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
func (client GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -146,8 +137,8 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -160,7 +151,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -198,7 +189,10 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -207,7 +201,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
func (client GalleryImageVersionsClient) 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
......@@ -248,6 +241,7 @@ func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -290,7 +284,6 @@ func (client GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Res
func (client GalleryImageVersionsClient) GetResponder(resp *http.Response) (result GalleryImageVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -332,6 +325,11 @@ func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context,
result.givl, err = client.ListByGalleryImageResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request")
return
}
if result.givl.hasNextLink() && result.givl.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -370,7 +368,6 @@ func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Requ
func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.Response) (result GalleryImageVersionList, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -429,8 +426,8 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -443,7 +440,7 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure sending request")
return
}
......@@ -483,7 +480,10 @@ func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -492,7 +492,6 @@ func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future
func (client GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -51,8 +40,8 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -65,7 +54,7 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -103,7 +92,10 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -112,7 +104,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result Image, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -129,8 +120,8 @@ func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -143,7 +134,7 @@ func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request")
return
}
......@@ -179,7 +170,10 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -188,7 +182,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
func (client ImagesClient) 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
......@@ -227,6 +220,7 @@ func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, im
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -267,7 +261,6 @@ func (client ImagesClient) GetSender(req *http.Request) (*http.Response, error)
func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -305,6 +298,11 @@ func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage
result.ilr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure responding to request")
return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -340,7 +338,6 @@ func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error)
func (client ImagesClient) ListResponder(resp *http.Response) (result ImageListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -416,6 +413,11 @@ func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGrou
result.ilr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -452,7 +454,6 @@ func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.R
func (client ImagesClient) ListByResourceGroupResponder(resp *http.Response) (result ImageListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -507,8 +508,8 @@ func (client ImagesClient) Update(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -521,7 +522,7 @@ func (client ImagesClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request")
return
}
......@@ -559,7 +560,10 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -568,7 +572,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
func (client ImagesClient) UpdateResponder(resp *http.Response) (result Image, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -52,8 +41,8 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -72,7 +61,7 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
result, err = client.ExportRequestRateByIntervalSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request")
return
}
......@@ -109,7 +98,10 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -118,7 +110,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -136,8 +127,8 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -156,7 +147,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
return
}
......@@ -193,7 +184,10 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -202,7 +196,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
func (client LogAnalyticsClient) ExportThrottledRequestsResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -69,6 +58,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request")
return
}
return
......@@ -100,7 +90,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())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -74,6 +63,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
......@@ -113,7 +103,6 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Requ
func (client ProximityPlacementGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -152,6 +141,7 @@ func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request")
return
}
return
......@@ -189,7 +179,6 @@ func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*h
func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
......@@ -229,6 +218,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -269,7 +259,6 @@ func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http
func (client ProximityPlacementGroupsClient) GetResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -308,6 +297,11 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Con
result.ppglr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -344,7 +338,6 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http
func (client ProximityPlacementGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -418,6 +411,11 @@ func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Cont
result.ppglr, err = client.ListBySubscriptionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request")
return
}
if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -453,7 +451,6 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.
func (client ProximityPlacementGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -530,6 +527,7 @@ func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourc
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request")
return
}
return
......@@ -569,7 +567,6 @@ func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*h
func (client ProximityPlacementGroupsClient) UpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -72,6 +61,11 @@ func (client ResourceSkusClient) List(ctx context.Context, filter string) (resul
result.rsr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request")
return
}
if result.rsr.hasNextLink() && result.rsr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -110,7 +104,6 @@ func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response,
func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -73,6 +62,7 @@ func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request")
return
}
return
......@@ -112,7 +102,6 @@ func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Respons
func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -151,6 +140,7 @@ func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request")
return
}
return
......@@ -188,7 +178,6 @@ func (client SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Respons
func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
......@@ -228,6 +217,7 @@ func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceG
result, err = client.GenerateKeyPairResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request")
return
}
return
......@@ -265,7 +255,6 @@ func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*htt
func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -304,6 +293,7 @@ func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -341,7 +331,6 @@ func (client SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response,
func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -381,6 +370,11 @@ func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resou
result.spkglr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request")
return
}
if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -417,7 +411,6 @@ func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (
func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -492,6 +485,11 @@ func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (resul
result.spkglr, err = client.ListBySubscriptionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request")
return
}
if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -527,7 +525,6 @@ func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*
func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -604,6 +601,7 @@ func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request")
return
}
return
......@@ -643,7 +641,6 @@ func (client SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Respons
func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -80,6 +69,11 @@ func (client UsageClient) List(ctx context.Context, location string) (result Lis
result.lur, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure responding to request")
return
}
if result.lur.hasNextLink() && result.lur.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -116,7 +110,6 @@ func (client UsageClient) ListSender(req *http.Request) (*http.Response, error)
func (client UsageClient) ListResponder(resp *http.Response) (result ListUsagesResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
......@@ -2,19 +2,8 @@ package compute
import "github.com/Azure/azure-sdk-for-go/version"
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -72,6 +61,7 @@ func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, locat
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -111,7 +101,6 @@ func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (
func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Response) (result VirtualMachineExtensionImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -149,6 +138,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context,
result, err = client.ListTypesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request")
return
}
return
......@@ -186,7 +176,6 @@ func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Requ
func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......@@ -225,6 +214,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Conte
result, err = client.ListVersionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request")
return
}
return
......@@ -272,7 +262,6 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.R
func (client VirtualMachineExtensionImagesClient) ListVersionsResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -67,7 +56,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -106,7 +95,10 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -115,7 +107,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -133,8 +124,8 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -147,7 +138,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -184,7 +175,10 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -193,7 +187,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
func (client VirtualMachineExtensionsClient) 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
......@@ -233,6 +226,7 @@ func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -274,7 +268,6 @@ func (client VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http
func (client VirtualMachineExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -314,6 +307,7 @@ func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceG
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request")
return
}
return
......@@ -354,7 +348,6 @@ func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*htt
func (client VirtualMachineExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -373,8 +366,8 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -387,7 +380,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
return
}
......@@ -426,7 +419,10 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -435,7 +431,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
func (client VirtualMachineExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -76,6 +65,7 @@ func (client VirtualMachineImagesClient) Get(ctx context.Context, location strin
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -116,7 +106,6 @@ func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Res
func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -158,6 +147,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request")
return
}
return
......@@ -206,7 +196,6 @@ func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Re
func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......@@ -245,6 +234,7 @@ func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, locatio
result, err = client.ListOffersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request")
return
}
return
......@@ -282,7 +272,6 @@ func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*h
func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......@@ -320,6 +309,7 @@ func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, loc
result, err = client.ListPublishersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request")
return
}
return
......@@ -356,7 +346,6 @@ func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request)
func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......@@ -396,6 +385,7 @@ func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location
result, err = client.ListSkusResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request")
return
}
return
......@@ -434,7 +424,6 @@ func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*htt
func (client VirtualMachineImagesClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -80,6 +69,7 @@ func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -117,7 +107,6 @@ func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*htt
func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -162,6 +151,11 @@ func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location
result.rclr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request")
return
}
if result.rclr.hasNextLink() && result.rclr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -198,7 +192,6 @@ func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*ht
func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -67,7 +56,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -107,7 +96,10 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -116,7 +108,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -134,8 +125,8 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -148,7 +139,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -185,7 +176,10 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -194,7 +188,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
func (client VirtualMachineScaleSetExtensionsClient) 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
......@@ -234,6 +227,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, re
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -275,7 +269,6 @@ func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request
func (client VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -315,6 +308,11 @@ func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, r
result.vmsselr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request")
return
}
if result.vmsselr.hasNextLink() && result.vmsselr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -352,7 +350,6 @@ func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Reques
func (client VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetExtensionListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -408,8 +405,8 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -422,7 +419,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure sending request")
return
}
......@@ -463,7 +460,10 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Requ
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -472,7 +472,6 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Requ
func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -52,8 +41,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.Cancel")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -66,7 +55,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
result, err = client.CancelSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request")
return
}
......@@ -102,7 +91,10 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -111,7 +103,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
func (client VirtualMachineScaleSetRollingUpgradesClient) 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
......@@ -149,6 +140,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.
result, err = client.GetLatestResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request")
return
}
return
......@@ -186,7 +178,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *h
func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(resp *http.Response) (result RollingUpgradeStatusInfo, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -205,8 +196,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -219,7 +210,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
return
}
......@@ -255,7 +246,10 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -264,7 +258,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(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
......@@ -281,8 +274,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -295,7 +288,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
return
}
......@@ -331,7 +324,10 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -340,7 +336,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(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
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -55,8 +44,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -69,7 +58,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
......@@ -109,7 +98,10 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -118,7 +110,6 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -137,8 +128,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -151,7 +142,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -189,7 +180,10 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Re
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -198,7 +192,6 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Re
func (client VirtualMachineScaleSetVMExtensionsClient) 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
......@@ -239,6 +232,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -281,7 +275,6 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Reque
func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -322,6 +315,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context,
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request")
return
}
return
......@@ -363,7 +357,6 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Requ
func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -383,8 +376,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -397,7 +390,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request")
return
}
......@@ -437,7 +430,10 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Re
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -446,7 +442,6 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Re
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
package compute
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -80,6 +69,7 @@ func (client VirtualMachineSizesClient) List(ctx context.Context, location strin
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
return
}
return
......@@ -116,7 +106,6 @@ func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Res
func (client VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
# Change History
## Additive Changes
### New Funcs
1. ProxyResource.MarshalJSON() ([]byte, error)
1. ReplicationProperties.MarshalJSON() ([]byte, error)
1. Status.MarshalJSON() ([]byte, error)
{
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
"tag": "package-2019-05",
"use": "@microsoft.azure/autorest.go@2.1.183",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
"additional_properties": {
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
......@@ -3,19 +3,8 @@
//
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -70,6 +59,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result.olr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "List", resp, "Failure responding to request")
return
}
if result.olr.hasNextLink() && result.olr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -101,7 +95,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())
......
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client ReplicationsClient) Create(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Create")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -81,7 +70,7 @@ func (client ReplicationsClient) Create(ctx context.Context, resourceGroupName s
result, err = client.CreateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", nil, "Failure sending request")
return
}
......@@ -120,7 +109,10 @@ func (client ReplicationsClient) CreateSender(req *http.Request) (future Replica
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -129,7 +121,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())
......@@ -147,8 +138,8 @@ func (client ReplicationsClient) Delete(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -175,7 +166,7 @@ func (client ReplicationsClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", nil, "Failure sending request")
return
}
......@@ -212,7 +203,10 @@ func (client ReplicationsClient) DeleteSender(req *http.Request) (future Replica
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -221,7 +215,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
......@@ -274,6 +267,7 @@ func (client ReplicationsClient) Get(ctx context.Context, resourceGroupName stri
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -312,7 +306,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())
......@@ -362,6 +355,11 @@ func (client ReplicationsClient) List(ctx context.Context, resourceGroupName str
result.rlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure responding to request")
return
}
if result.rlr.hasNextLink() && result.rlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -399,7 +397,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())
......@@ -455,8 +452,8 @@ func (client ReplicationsClient) Update(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -483,7 +480,7 @@ func (client ReplicationsClient) Update(ctx context.Context, resourceGroupName s
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", nil, "Failure sending request")
return
}
......@@ -522,7 +519,10 @@ func (client ReplicationsClient) UpdateSender(req *http.Request) (future Replica
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -531,7 +531,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())
......
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -52,8 +41,8 @@ func (client RunsClient) Cancel(ctx context.Context, resourceGroupName string, r
ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.Cancel")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -76,7 +65,7 @@ func (client RunsClient) Cancel(ctx context.Context, resourceGroupName string, r
result, err = client.CancelSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", nil, "Failure sending request")
return
}
......@@ -113,7 +102,10 @@ func (client RunsClient) CancelSender(req *http.Request) (future RunsCancelFutur
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -122,7 +114,6 @@ func (client RunsClient) CancelSender(req *http.Request) (future RunsCancelFutur
func (client RunsClient) 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
......@@ -171,6 +162,7 @@ func (client RunsClient) Get(ctx context.Context, resourceGroupName string, regi
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -209,7 +201,6 @@ func (client RunsClient) GetSender(req *http.Request) (*http.Response, error) {
func (client RunsClient) GetResponder(resp *http.Response) (result Run, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -259,6 +250,7 @@ func (client RunsClient) GetLogSasURL(ctx context.Context, resourceGroupName str
result, err = client.GetLogSasURLResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "GetLogSasURL", resp, "Failure responding to request")
return
}
return
......@@ -297,7 +289,6 @@ func (client RunsClient) GetLogSasURLSender(req *http.Request) (*http.Response,
func (client RunsClient) GetLogSasURLResponder(resp *http.Response) (result RunGetLogResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -350,6 +341,11 @@ func (client RunsClient) List(ctx context.Context, resourceGroupName string, reg
result.rlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "List", resp, "Failure responding to request")
return
}
if result.rlr.hasNextLink() && result.rlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -393,7 +389,6 @@ func (client RunsClient) ListSender(req *http.Request) (*http.Response, error) {
func (client RunsClient) ListResponder(resp *http.Response) (result RunListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -449,8 +444,8 @@ func (client RunsClient) Update(ctx context.Context, resourceGroupName string, r
ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -473,7 +468,7 @@ func (client RunsClient) Update(ctx context.Context, resourceGroupName string, r
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", nil, "Failure sending request")
return
}
......@@ -512,7 +507,10 @@ func (client RunsClient) UpdateSender(req *http.Request) (future RunsUpdateFutur
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -521,7 +519,6 @@ func (client RunsClient) UpdateSender(req *http.Request) (future RunsUpdateFutur
func (client RunsClient) UpdateResponder(resp *http.Response) (result Run, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Create")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -77,7 +66,6 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string,
Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil},
{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil},
}},
{Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil},
{Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Trigger.BaseImageTrigger", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Trigger.BaseImageTrigger.Name", Name: validation.Null, Rule: true, Chain: nil}}},
......@@ -94,7 +82,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string,
result, err = client.CreateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", nil, "Failure sending request")
return
}
......@@ -133,7 +121,10 @@ func (client TasksClient) CreateSender(req *http.Request) (future TasksCreateFut
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -142,7 +133,6 @@ func (client TasksClient) CreateSender(req *http.Request) (future TasksCreateFut
func (client TasksClient) CreateResponder(resp *http.Response) (result Task, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -160,8 +150,8 @@ func (client TasksClient) Delete(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -188,7 +178,7 @@ func (client TasksClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", nil, "Failure sending request")
return
}
......@@ -225,7 +215,10 @@ func (client TasksClient) DeleteSender(req *http.Request) (future TasksDeleteFut
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -234,7 +227,6 @@ func (client TasksClient) DeleteSender(req *http.Request) (future TasksDeleteFut
func (client TasksClient) 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
......@@ -287,6 +279,7 @@ func (client TasksClient) Get(ctx context.Context, resourceGroupName string, reg
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -325,7 +318,6 @@ func (client TasksClient) GetSender(req *http.Request) (*http.Response, error) {
func (client TasksClient) GetResponder(resp *http.Response) (result Task, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -379,6 +371,7 @@ func (client TasksClient) GetDetails(ctx context.Context, resourceGroupName stri
result, err = client.GetDetailsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "GetDetails", resp, "Failure responding to request")
return
}
return
......@@ -417,7 +410,6 @@ func (client TasksClient) GetDetailsSender(req *http.Request) (*http.Response, e
func (client TasksClient) GetDetailsResponder(resp *http.Response) (result Task, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -467,6 +459,11 @@ func (client TasksClient) List(ctx context.Context, resourceGroupName string, re
result.tlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "List", resp, "Failure responding to request")
return
}
if result.tlr.hasNextLink() && result.tlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -504,7 +501,6 @@ func (client TasksClient) ListSender(req *http.Request) (*http.Response, error)
func (client TasksClient) ListResponder(resp *http.Response) (result TaskListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......@@ -560,8 +556,8 @@ func (client TasksClient) Update(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -588,7 +584,7 @@ func (client TasksClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", nil, "Failure sending request")
return
}
......@@ -627,7 +623,10 @@ func (client TasksClient) UpdateSender(req *http.Request) (future TasksUpdateFut
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -636,7 +635,6 @@ func (client TasksClient) UpdateSender(req *http.Request) (future TasksUpdateFut
func (client TasksClient) UpdateResponder(resp *http.Response) (result Task, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
......
......@@ -2,19 +2,8 @@ package containerregistry
import "github.com/Azure/azure-sdk-for-go/version"
// 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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
......@@ -53,8 +42,8 @@ func (client WebhooksClient) Create(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Create")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -87,7 +76,7 @@ func (client WebhooksClient) Create(ctx context.Context, resourceGroupName strin
result, err = client.CreateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", nil, "Failure sending request")
return
}
......@@ -126,7 +115,10 @@ func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCre
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -135,7 +127,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())
......@@ -153,8 +144,8 @@ func (client WebhooksClient) Delete(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -181,7 +172,7 @@ func (client WebhooksClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", nil, "Failure sending request")
return
}
......@@ -218,7 +209,10 @@ func (client WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDel
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -227,7 +221,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
......@@ -280,6 +273,7 @@ func (client WebhooksClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", resp, "Failure responding to request")
return
}
return
......@@ -318,7 +312,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())
......@@ -372,6 +365,7 @@ func (client WebhooksClient) GetCallbackConfig(ctx context.Context, resourceGrou
result, err = client.GetCallbackConfigResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", resp, "Failure responding to request")
return
}
return
......@@ -410,7 +404,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())
......@@ -460,6 +453,11 @@ func (client WebhooksClient) List(ctx context.Context, resourceGroupName string,
result.wlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure responding to request")
return
}
if result.wlr.hasNextLink() && result.wlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -497,7 +495,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())
......@@ -589,6 +586,11 @@ func (client WebhooksClient) ListEvents(ctx context.Context, resourceGroupName s
result.elr, err = client.ListEventsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure responding to request")
return
}
if result.elr.hasNextLink() && result.elr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
......@@ -627,7 +629,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())
......@@ -718,6 +719,7 @@ func (client WebhooksClient) Ping(ctx context.Context, resourceGroupName string,
result, err = client.PingResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", resp, "Failure responding to request")
return
}
return
......@@ -756,7 +758,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())
......@@ -775,8 +776,8 @@ func (client WebhooksClient) Update(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
......@@ -803,7 +804,7 @@ func (client WebhooksClient) Update(ctx context.Context, resourceGroupName strin
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", result.Response(), "Failure sending request")
err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", nil, "Failure sending request")
return
}
......@@ -842,7 +843,10 @@ func (client WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpd
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
......@@ -851,7 +855,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())
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment