diff --git a/go.mod b/go.mod
index 85fc2525a5dbf..ab2375452f7a5 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.16
// direct dependencies
require (
- github.com/Azure/azure-sdk-for-go v50.2.0+incompatible
+ github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.17
github.com/Azure/go-autorest/autorest/adal v0.9.13
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7
diff --git a/go.sum b/go.sum
index db0c6634b77c9..54c644f54b6c5 100644
--- a/go.sum
+++ b/go.sum
@@ -22,8 +22,8 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/Azure/azure-sdk-for-go v50.2.0+incompatible h1:w9EF1btRfLLWbNEp6XvkMjeA6nQ3e1GZ2KNDqB/SjOQ=
-github.com/Azure/azure-sdk-for-go v50.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU=
+github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
@@ -1166,7 +1166,6 @@ golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210314195730-07df6a141424/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE
deleted file mode 100644
index 047555ec7e58e..0000000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2020 Microsoft Corporation
-
- 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt
new file mode 100644
index 0000000000000..05b0ebf5bc769
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Microsoft Corporation.
+
+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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE
deleted file mode 100644
index 2d1d72608c287..0000000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Microsoft Azure-SDK-for-Go
-Copyright 2014-2017 Microsoft
-
-This product includes software developed at
-the Microsoft Corporation (https://www.microsoft.com).
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt
new file mode 100644
index 0000000000000..a338672ec53b3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt
@@ -0,0 +1,29 @@
+NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+This software incorporates material from third parties. Microsoft makes certain
+open source code available at https://3rdpartysource.microsoft.com, or you may
+send a check or money order for US $5.00, including the product name, the open
+source component name, and version number, to:
+
+Source Code Compliance Team
+Microsoft Corporation
+One Microsoft Way
+Redmond, WA 98052
+USA
+
+Notwithstanding any other terms, you may reverse engineer this software to the
+extent required to debug changes to any libraries licensed under the GNU Lesser
+General Public License.
+
+------------------------------------------------------------------------------
+
+Azure SDK for Go uses third-party libraries or other resources that may be
+distributed under licenses different than the Azure SDK for Go software.
+
+In the event that we accidentally failed to list a required notice, please
+bring it to our attention. Post an issue or email us:
+
+ azgosdkhelp@microsoft.com
+
+The attached notices are provided for information only.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/CHANGELOG.md
index 6227cfcd70a3a..52911e4cc5e4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/CHANGELOG.md
@@ -1,370 +1,2 @@
-Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82/specification/compute/resource-manager/readme.md tag: `package-2019-07`
+# Change History
-Code generator @microsoft.azure/autorest.go@2.1.168
-
-## Breaking Changes
-
-### Removed Funcs
-
-1. *ContainerServicesCreateOrUpdateFuture.Result(ContainerServicesClient) (ContainerService, error)
-1. *ContainerServicesDeleteFuture.Result(ContainerServicesClient) (autorest.Response, error)
-1. *DedicatedHostsCreateOrUpdateFuture.Result(DedicatedHostsClient) (DedicatedHost, error)
-1. *DedicatedHostsDeleteFuture.Result(DedicatedHostsClient) (autorest.Response, error)
-1. *DedicatedHostsUpdateFuture.Result(DedicatedHostsClient) (DedicatedHost, error)
-1. *DiskEncryptionSetsCreateOrUpdateFuture.Result(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
-1. *DiskEncryptionSetsDeleteFuture.Result(DiskEncryptionSetsClient) (autorest.Response, error)
-1. *DiskEncryptionSetsUpdateFuture.Result(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
-1. *DisksCreateOrUpdateFuture.Result(DisksClient) (Disk, error)
-1. *DisksDeleteFuture.Result(DisksClient) (autorest.Response, error)
-1. *DisksGrantAccessFuture.Result(DisksClient) (AccessURI, error)
-1. *DisksRevokeAccessFuture.Result(DisksClient) (autorest.Response, error)
-1. *DisksUpdateFuture.Result(DisksClient) (Disk, error)
-1. *GalleriesCreateOrUpdateFuture.Result(GalleriesClient) (Gallery, error)
-1. *GalleriesDeleteFuture.Result(GalleriesClient) (autorest.Response, error)
-1. *GalleriesUpdateFuture.Result(GalleriesClient) (Gallery, error)
-1. *GalleryApplicationVersionsCreateOrUpdateFuture.Result(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
-1. *GalleryApplicationVersionsDeleteFuture.Result(GalleryApplicationVersionsClient) (autorest.Response, error)
-1. *GalleryApplicationVersionsUpdateFuture.Result(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
-1. *GalleryApplicationsCreateOrUpdateFuture.Result(GalleryApplicationsClient) (GalleryApplication, error)
-1. *GalleryApplicationsDeleteFuture.Result(GalleryApplicationsClient) (autorest.Response, error)
-1. *GalleryApplicationsUpdateFuture.Result(GalleryApplicationsClient) (GalleryApplication, error)
-1. *GalleryImageVersionsCreateOrUpdateFuture.Result(GalleryImageVersionsClient) (GalleryImageVersion, error)
-1. *GalleryImageVersionsDeleteFuture.Result(GalleryImageVersionsClient) (autorest.Response, error)
-1. *GalleryImageVersionsUpdateFuture.Result(GalleryImageVersionsClient) (GalleryImageVersion, error)
-1. *GalleryImagesCreateOrUpdateFuture.Result(GalleryImagesClient) (GalleryImage, error)
-1. *GalleryImagesDeleteFuture.Result(GalleryImagesClient) (autorest.Response, error)
-1. *GalleryImagesUpdateFuture.Result(GalleryImagesClient) (GalleryImage, error)
-1. *ImagesCreateOrUpdateFuture.Result(ImagesClient) (Image, error)
-1. *ImagesDeleteFuture.Result(ImagesClient) (autorest.Response, error)
-1. *ImagesUpdateFuture.Result(ImagesClient) (Image, error)
-1. *LogAnalyticsExportRequestRateByIntervalFuture.Result(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
-1. *LogAnalyticsExportThrottledRequestsFuture.Result(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
-1. *SnapshotsCreateOrUpdateFuture.Result(SnapshotsClient) (Snapshot, error)
-1. *SnapshotsDeleteFuture.Result(SnapshotsClient) (autorest.Response, error)
-1. *SnapshotsGrantAccessFuture.Result(SnapshotsClient) (AccessURI, error)
-1. *SnapshotsRevokeAccessFuture.Result(SnapshotsClient) (autorest.Response, error)
-1. *SnapshotsUpdateFuture.Result(SnapshotsClient) (Snapshot, error)
-1. *VirtualMachineExtensionsCreateOrUpdateFuture.Result(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
-1. *VirtualMachineExtensionsDeleteFuture.Result(VirtualMachineExtensionsClient) (autorest.Response, error)
-1. *VirtualMachineExtensionsUpdateFuture.Result(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
-1. *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
-1. *VirtualMachineScaleSetExtensionsDeleteFuture.Result(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetExtensionsUpdateFuture.Result(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
-1. *VirtualMachineScaleSetRollingUpgradesCancelFuture.Result(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
-1. *VirtualMachineScaleSetVMExtensionsDeleteFuture.Result(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMExtensionsUpdateFuture.Result(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
-1. *VirtualMachineScaleSetVMsDeallocateFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsDeleteFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsPowerOffFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsRedeployFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsReimageAllFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsReimageFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsRestartFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsRunCommandFuture.Result(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
-1. *VirtualMachineScaleSetVMsStartFuture.Result(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetVMsUpdateFuture.Result(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
-1. *VirtualMachineScaleSetsCreateOrUpdateFuture.Result(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
-1. *VirtualMachineScaleSetsDeallocateFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsDeleteFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsDeleteInstancesFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsPerformMaintenanceFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsPowerOffFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsRedeployFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsReimageAllFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsReimageFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsRestartFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsStartFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachineScaleSetsUpdateFuture.Result(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
-1. *VirtualMachineScaleSetsUpdateInstancesFuture.Result(VirtualMachineScaleSetsClient) (autorest.Response, error)
-1. *VirtualMachinesCaptureFuture.Result(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
-1. *VirtualMachinesConvertToManagedDisksFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesCreateOrUpdateFuture.Result(VirtualMachinesClient) (VirtualMachine, error)
-1. *VirtualMachinesDeallocateFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesDeleteFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesPerformMaintenanceFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesPowerOffFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesReapplyFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesRedeployFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesReimageFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesRestartFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesRunCommandFuture.Result(VirtualMachinesClient) (RunCommandResult, error)
-1. *VirtualMachinesStartFuture.Result(VirtualMachinesClient) (autorest.Response, error)
-1. *VirtualMachinesUpdateFuture.Result(VirtualMachinesClient) (VirtualMachine, error)
-
-## Struct Changes
-
-### Removed Struct Fields
-
-1. ContainerServicesCreateOrUpdateFuture.azure.Future
-1. ContainerServicesDeleteFuture.azure.Future
-1. DedicatedHostsCreateOrUpdateFuture.azure.Future
-1. DedicatedHostsDeleteFuture.azure.Future
-1. DedicatedHostsUpdateFuture.azure.Future
-1. DiskEncryptionSetsCreateOrUpdateFuture.azure.Future
-1. DiskEncryptionSetsDeleteFuture.azure.Future
-1. DiskEncryptionSetsUpdateFuture.azure.Future
-1. DisksCreateOrUpdateFuture.azure.Future
-1. DisksDeleteFuture.azure.Future
-1. DisksGrantAccessFuture.azure.Future
-1. DisksRevokeAccessFuture.azure.Future
-1. DisksUpdateFuture.azure.Future
-1. GalleriesCreateOrUpdateFuture.azure.Future
-1. GalleriesDeleteFuture.azure.Future
-1. GalleriesUpdateFuture.azure.Future
-1. GalleryApplicationVersionsCreateOrUpdateFuture.azure.Future
-1. GalleryApplicationVersionsDeleteFuture.azure.Future
-1. GalleryApplicationVersionsUpdateFuture.azure.Future
-1. GalleryApplicationsCreateOrUpdateFuture.azure.Future
-1. GalleryApplicationsDeleteFuture.azure.Future
-1. GalleryApplicationsUpdateFuture.azure.Future
-1. GalleryImageVersionsCreateOrUpdateFuture.azure.Future
-1. GalleryImageVersionsDeleteFuture.azure.Future
-1. GalleryImageVersionsUpdateFuture.azure.Future
-1. GalleryImagesCreateOrUpdateFuture.azure.Future
-1. GalleryImagesDeleteFuture.azure.Future
-1. GalleryImagesUpdateFuture.azure.Future
-1. ImagesCreateOrUpdateFuture.azure.Future
-1. ImagesDeleteFuture.azure.Future
-1. ImagesUpdateFuture.azure.Future
-1. LogAnalyticsExportRequestRateByIntervalFuture.azure.Future
-1. LogAnalyticsExportThrottledRequestsFuture.azure.Future
-1. SnapshotsCreateOrUpdateFuture.azure.Future
-1. SnapshotsDeleteFuture.azure.Future
-1. SnapshotsGrantAccessFuture.azure.Future
-1. SnapshotsRevokeAccessFuture.azure.Future
-1. SnapshotsUpdateFuture.azure.Future
-1. VirtualMachineExtensionsCreateOrUpdateFuture.azure.Future
-1. VirtualMachineExtensionsDeleteFuture.azure.Future
-1. VirtualMachineExtensionsUpdateFuture.azure.Future
-1. VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.azure.Future
-1. VirtualMachineScaleSetExtensionsDeleteFuture.azure.Future
-1. VirtualMachineScaleSetExtensionsUpdateFuture.azure.Future
-1. VirtualMachineScaleSetRollingUpgradesCancelFuture.azure.Future
-1. VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.azure.Future
-1. VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.azure.Future
-1. VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.azure.Future
-1. VirtualMachineScaleSetVMExtensionsDeleteFuture.azure.Future
-1. VirtualMachineScaleSetVMExtensionsUpdateFuture.azure.Future
-1. VirtualMachineScaleSetVMsDeallocateFuture.azure.Future
-1. VirtualMachineScaleSetVMsDeleteFuture.azure.Future
-1. VirtualMachineScaleSetVMsPerformMaintenanceFuture.azure.Future
-1. VirtualMachineScaleSetVMsPowerOffFuture.azure.Future
-1. VirtualMachineScaleSetVMsRedeployFuture.azure.Future
-1. VirtualMachineScaleSetVMsReimageAllFuture.azure.Future
-1. VirtualMachineScaleSetVMsReimageFuture.azure.Future
-1. VirtualMachineScaleSetVMsRestartFuture.azure.Future
-1. VirtualMachineScaleSetVMsRunCommandFuture.azure.Future
-1. VirtualMachineScaleSetVMsStartFuture.azure.Future
-1. VirtualMachineScaleSetVMsUpdateFuture.azure.Future
-1. VirtualMachineScaleSetsCreateOrUpdateFuture.azure.Future
-1. VirtualMachineScaleSetsDeallocateFuture.azure.Future
-1. VirtualMachineScaleSetsDeleteFuture.azure.Future
-1. VirtualMachineScaleSetsDeleteInstancesFuture.azure.Future
-1. VirtualMachineScaleSetsPerformMaintenanceFuture.azure.Future
-1. VirtualMachineScaleSetsPowerOffFuture.azure.Future
-1. VirtualMachineScaleSetsRedeployFuture.azure.Future
-1. VirtualMachineScaleSetsReimageAllFuture.azure.Future
-1. VirtualMachineScaleSetsReimageFuture.azure.Future
-1. VirtualMachineScaleSetsRestartFuture.azure.Future
-1. VirtualMachineScaleSetsStartFuture.azure.Future
-1. VirtualMachineScaleSetsUpdateFuture.azure.Future
-1. VirtualMachineScaleSetsUpdateInstancesFuture.azure.Future
-1. VirtualMachinesCaptureFuture.azure.Future
-1. VirtualMachinesConvertToManagedDisksFuture.azure.Future
-1. VirtualMachinesCreateOrUpdateFuture.azure.Future
-1. VirtualMachinesDeallocateFuture.azure.Future
-1. VirtualMachinesDeleteFuture.azure.Future
-1. VirtualMachinesPerformMaintenanceFuture.azure.Future
-1. VirtualMachinesPowerOffFuture.azure.Future
-1. VirtualMachinesReapplyFuture.azure.Future
-1. VirtualMachinesRedeployFuture.azure.Future
-1. VirtualMachinesReimageFuture.azure.Future
-1. VirtualMachinesRestartFuture.azure.Future
-1. VirtualMachinesRunCommandFuture.azure.Future
-1. VirtualMachinesStartFuture.azure.Future
-1. VirtualMachinesUpdateFuture.azure.Future
-
-## Struct Changes
-
-### New Struct Fields
-
-1. ContainerServicesCreateOrUpdateFuture.Result
-1. ContainerServicesCreateOrUpdateFuture.azure.FutureAPI
-1. ContainerServicesDeleteFuture.Result
-1. ContainerServicesDeleteFuture.azure.FutureAPI
-1. DedicatedHostsCreateOrUpdateFuture.Result
-1. DedicatedHostsCreateOrUpdateFuture.azure.FutureAPI
-1. DedicatedHostsDeleteFuture.Result
-1. DedicatedHostsDeleteFuture.azure.FutureAPI
-1. DedicatedHostsUpdateFuture.Result
-1. DedicatedHostsUpdateFuture.azure.FutureAPI
-1. DiskEncryptionSetsCreateOrUpdateFuture.Result
-1. DiskEncryptionSetsCreateOrUpdateFuture.azure.FutureAPI
-1. DiskEncryptionSetsDeleteFuture.Result
-1. DiskEncryptionSetsDeleteFuture.azure.FutureAPI
-1. DiskEncryptionSetsUpdateFuture.Result
-1. DiskEncryptionSetsUpdateFuture.azure.FutureAPI
-1. DisksCreateOrUpdateFuture.Result
-1. DisksCreateOrUpdateFuture.azure.FutureAPI
-1. DisksDeleteFuture.Result
-1. DisksDeleteFuture.azure.FutureAPI
-1. DisksGrantAccessFuture.Result
-1. DisksGrantAccessFuture.azure.FutureAPI
-1. DisksRevokeAccessFuture.Result
-1. DisksRevokeAccessFuture.azure.FutureAPI
-1. DisksUpdateFuture.Result
-1. DisksUpdateFuture.azure.FutureAPI
-1. GalleriesCreateOrUpdateFuture.Result
-1. GalleriesCreateOrUpdateFuture.azure.FutureAPI
-1. GalleriesDeleteFuture.Result
-1. GalleriesDeleteFuture.azure.FutureAPI
-1. GalleriesUpdateFuture.Result
-1. GalleriesUpdateFuture.azure.FutureAPI
-1. GalleryApplicationVersionsCreateOrUpdateFuture.Result
-1. GalleryApplicationVersionsCreateOrUpdateFuture.azure.FutureAPI
-1. GalleryApplicationVersionsDeleteFuture.Result
-1. GalleryApplicationVersionsDeleteFuture.azure.FutureAPI
-1. GalleryApplicationVersionsUpdateFuture.Result
-1. GalleryApplicationVersionsUpdateFuture.azure.FutureAPI
-1. GalleryApplicationsCreateOrUpdateFuture.Result
-1. GalleryApplicationsCreateOrUpdateFuture.azure.FutureAPI
-1. GalleryApplicationsDeleteFuture.Result
-1. GalleryApplicationsDeleteFuture.azure.FutureAPI
-1. GalleryApplicationsUpdateFuture.Result
-1. GalleryApplicationsUpdateFuture.azure.FutureAPI
-1. GalleryImageVersionsCreateOrUpdateFuture.Result
-1. GalleryImageVersionsCreateOrUpdateFuture.azure.FutureAPI
-1. GalleryImageVersionsDeleteFuture.Result
-1. GalleryImageVersionsDeleteFuture.azure.FutureAPI
-1. GalleryImageVersionsUpdateFuture.Result
-1. GalleryImageVersionsUpdateFuture.azure.FutureAPI
-1. GalleryImagesCreateOrUpdateFuture.Result
-1. GalleryImagesCreateOrUpdateFuture.azure.FutureAPI
-1. GalleryImagesDeleteFuture.Result
-1. GalleryImagesDeleteFuture.azure.FutureAPI
-1. GalleryImagesUpdateFuture.Result
-1. GalleryImagesUpdateFuture.azure.FutureAPI
-1. ImagesCreateOrUpdateFuture.Result
-1. ImagesCreateOrUpdateFuture.azure.FutureAPI
-1. ImagesDeleteFuture.Result
-1. ImagesDeleteFuture.azure.FutureAPI
-1. ImagesUpdateFuture.Result
-1. ImagesUpdateFuture.azure.FutureAPI
-1. LogAnalyticsExportRequestRateByIntervalFuture.Result
-1. LogAnalyticsExportRequestRateByIntervalFuture.azure.FutureAPI
-1. LogAnalyticsExportThrottledRequestsFuture.Result
-1. LogAnalyticsExportThrottledRequestsFuture.azure.FutureAPI
-1. SnapshotsCreateOrUpdateFuture.Result
-1. SnapshotsCreateOrUpdateFuture.azure.FutureAPI
-1. SnapshotsDeleteFuture.Result
-1. SnapshotsDeleteFuture.azure.FutureAPI
-1. SnapshotsGrantAccessFuture.Result
-1. SnapshotsGrantAccessFuture.azure.FutureAPI
-1. SnapshotsRevokeAccessFuture.Result
-1. SnapshotsRevokeAccessFuture.azure.FutureAPI
-1. SnapshotsUpdateFuture.Result
-1. SnapshotsUpdateFuture.azure.FutureAPI
-1. VirtualMachineExtensionsCreateOrUpdateFuture.Result
-1. VirtualMachineExtensionsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualMachineExtensionsDeleteFuture.Result
-1. VirtualMachineExtensionsDeleteFuture.azure.FutureAPI
-1. VirtualMachineExtensionsUpdateFuture.Result
-1. VirtualMachineExtensionsUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result
-1. VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetExtensionsDeleteFuture.Result
-1. VirtualMachineScaleSetExtensionsDeleteFuture.azure.FutureAPI
-1. VirtualMachineScaleSetExtensionsUpdateFuture.Result
-1. VirtualMachineScaleSetExtensionsUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetRollingUpgradesCancelFuture.Result
-1. VirtualMachineScaleSetRollingUpgradesCancelFuture.azure.FutureAPI
-1. VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result
-1. VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.azure.FutureAPI
-1. VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result
-1. VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result
-1. VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMExtensionsDeleteFuture.Result
-1. VirtualMachineScaleSetVMExtensionsDeleteFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMExtensionsUpdateFuture.Result
-1. VirtualMachineScaleSetVMExtensionsUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsDeallocateFuture.Result
-1. VirtualMachineScaleSetVMsDeallocateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsDeleteFuture.Result
-1. VirtualMachineScaleSetVMsDeleteFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result
-1. VirtualMachineScaleSetVMsPerformMaintenanceFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsPowerOffFuture.Result
-1. VirtualMachineScaleSetVMsPowerOffFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsRedeployFuture.Result
-1. VirtualMachineScaleSetVMsRedeployFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsReimageAllFuture.Result
-1. VirtualMachineScaleSetVMsReimageAllFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsReimageFuture.Result
-1. VirtualMachineScaleSetVMsReimageFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsRestartFuture.Result
-1. VirtualMachineScaleSetVMsRestartFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsRunCommandFuture.Result
-1. VirtualMachineScaleSetVMsRunCommandFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsStartFuture.Result
-1. VirtualMachineScaleSetVMsStartFuture.azure.FutureAPI
-1. VirtualMachineScaleSetVMsUpdateFuture.Result
-1. VirtualMachineScaleSetVMsUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsCreateOrUpdateFuture.Result
-1. VirtualMachineScaleSetsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsDeallocateFuture.Result
-1. VirtualMachineScaleSetsDeallocateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsDeleteFuture.Result
-1. VirtualMachineScaleSetsDeleteFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsDeleteInstancesFuture.Result
-1. VirtualMachineScaleSetsDeleteInstancesFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsPerformMaintenanceFuture.Result
-1. VirtualMachineScaleSetsPerformMaintenanceFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsPowerOffFuture.Result
-1. VirtualMachineScaleSetsPowerOffFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsRedeployFuture.Result
-1. VirtualMachineScaleSetsRedeployFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsReimageAllFuture.Result
-1. VirtualMachineScaleSetsReimageAllFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsReimageFuture.Result
-1. VirtualMachineScaleSetsReimageFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsRestartFuture.Result
-1. VirtualMachineScaleSetsRestartFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsStartFuture.Result
-1. VirtualMachineScaleSetsStartFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsUpdateFuture.Result
-1. VirtualMachineScaleSetsUpdateFuture.azure.FutureAPI
-1. VirtualMachineScaleSetsUpdateInstancesFuture.Result
-1. VirtualMachineScaleSetsUpdateInstancesFuture.azure.FutureAPI
-1. VirtualMachinesCaptureFuture.Result
-1. VirtualMachinesCaptureFuture.azure.FutureAPI
-1. VirtualMachinesConvertToManagedDisksFuture.Result
-1. VirtualMachinesConvertToManagedDisksFuture.azure.FutureAPI
-1. VirtualMachinesCreateOrUpdateFuture.Result
-1. VirtualMachinesCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualMachinesDeallocateFuture.Result
-1. VirtualMachinesDeallocateFuture.azure.FutureAPI
-1. VirtualMachinesDeleteFuture.Result
-1. VirtualMachinesDeleteFuture.azure.FutureAPI
-1. VirtualMachinesPerformMaintenanceFuture.Result
-1. VirtualMachinesPerformMaintenanceFuture.azure.FutureAPI
-1. VirtualMachinesPowerOffFuture.Result
-1. VirtualMachinesPowerOffFuture.azure.FutureAPI
-1. VirtualMachinesReapplyFuture.Result
-1. VirtualMachinesReapplyFuture.azure.FutureAPI
-1. VirtualMachinesRedeployFuture.Result
-1. VirtualMachinesRedeployFuture.azure.FutureAPI
-1. VirtualMachinesReimageFuture.Result
-1. VirtualMachinesReimageFuture.azure.FutureAPI
-1. VirtualMachinesRestartFuture.Result
-1. VirtualMachinesRestartFuture.azure.FutureAPI
-1. VirtualMachinesRunCommandFuture.Result
-1. VirtualMachinesRunCommandFuture.azure.FutureAPI
-1. VirtualMachinesStartFuture.Result
-1. VirtualMachinesStartFuture.azure.FutureAPI
-1. VirtualMachinesUpdateFuture.Result
-1. VirtualMachinesUpdateFuture.azure.FutureAPI
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/_meta.json
new file mode 100644
index 0000000000000..6663f4e2919a1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/_meta.json
@@ -0,0 +1,11 @@
+{
+ "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
+ "readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
+ "tag": "package-2019-07",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --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=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ }
+}
\ No newline at end of file
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
index 1ccd07a06f129..037d43974cb6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
index d9d0430190ead..c7c4543154d51 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
@@ -1,21 +1,12 @@
+// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.
+//
// Package compute implements the Azure ARM Compute service API version .
//
// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
index 47a95e8092dcf..b1c854615c256 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -133,6 +122,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,26 +130,7 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ContainerServicesClient) (cs ContainerService, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
- cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -187,8 +158,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)
}()
@@ -201,7 +172,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -233,6 +204,7 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -240,20 +212,7 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ContainerServicesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
index 45dc08063d1ba..0c27cf4012806 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
index f39318aa56229..7e603beede93a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -114,6 +103,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -121,26 +111,7 @@ func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DedicatedHostsClient) (dh DedicatedHost, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
- dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -166,8 +137,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)
}()
@@ -180,7 +151,7 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -213,6 +184,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -220,20 +192,7 @@ func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future Dedic
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DedicatedHostsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -460,8 +419,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)
}()
@@ -474,7 +433,7 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -509,6 +468,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -516,26 +476,7 @@ func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future Dedic
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DedicatedHostsClient) (dh DedicatedHost, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
- dh, err = client.UpdateResponder(dh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
index e3d04a1d8ae41..614e91345490d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -115,6 +104,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -122,26 +112,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
- desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -168,8 +139,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)
}()
@@ -182,7 +153,7 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -214,6 +185,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -221,20 +193,7 @@ func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future D
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -569,8 +528,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)
}()
@@ -583,7 +542,7 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -617,6 +576,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -624,26 +584,7 @@ func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future D
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
- desVar, err = client.UpdateResponder(desVar.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
index e5cece7058954..ad7cae61bb38b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
@@ -1,18 +1,7 @@
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 DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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 DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -116,6 +105,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -123,26 +113,7 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DisksClient) (d Disk, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
- d, err = client.CreateOrUpdateResponder(d.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -169,8 +140,8 @@ func (client DisksClient) Delete(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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)
}()
@@ -183,7 +154,7 @@ func (client DisksClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DisksClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -340,8 +299,8 @@ func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName str
ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.GrantAccess")
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)
}()
@@ -360,7 +319,7 @@ func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName str
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -394,6 +353,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -401,26 +361,7 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DisksClient) (au AccessURI, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
- au, err = client.GrantAccessResponder(au.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -676,8 +617,8 @@ func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.RevokeAccess")
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)
}()
@@ -690,7 +631,7 @@ func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName st
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -722,6 +663,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -729,20 +671,7 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DisksClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -769,8 +698,8 @@ func (client DisksClient) Update(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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)
}()
@@ -783,7 +712,7 @@ func (client DisksClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -817,6 +746,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -824,26 +754,7 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DisksClient) (d Disk, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
- d, err = client.UpdateResponder(d.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/enums.go
index 41f32fbf684f6..4d6d9707d85b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/enums.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/enums.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
index a8b7ed0ff9f16..44089eca5d9a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleriesClient) (g Gallery, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
- g, err = client.CreateOrUpdateResponder(g.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,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)
}()
@@ -165,7 +136,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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleriesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -548,8 +507,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)
}()
@@ -562,7 +521,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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -596,6 +555,7 @@ func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -603,26 +563,7 @@ func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesU
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleriesClient) (g Gallery, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
- g, err = client.UpdateResponder(g.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
index b18f0adc582c0..073662554d51a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +94,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -112,26 +102,7 @@ func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
- ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -158,8 +129,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)
}()
@@ -172,7 +143,7 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -205,6 +176,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -212,20 +184,7 @@ func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -452,8 +411,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)
}()
@@ -466,7 +425,7 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -501,6 +460,7 @@ func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -508,26 +468,7 @@ func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
- ga, err = client.UpdateResponder(ga.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
index 63f9fd267ac2a..2fa93086ead33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -122,6 +111,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -129,26 +119,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
- gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -176,8 +147,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)
}()
@@ -190,7 +161,7 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -224,6 +195,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -231,20 +203,7 @@ func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -480,8 +439,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)
}()
@@ -494,7 +453,7 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -530,6 +489,7 @@ func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -537,26 +497,7 @@ func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
- gav, err = client.UpdateResponder(gav.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
index a8a4a2943e2d2..b6a600ecbeb0f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -116,6 +105,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -123,26 +113,7 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImagesClient) (gi GalleryImage, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
- gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -168,8 +139,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)
}()
@@ -182,7 +153,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImagesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -459,8 +418,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)
}()
@@ -473,7 +432,7 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -508,6 +467,7 @@ func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -515,26 +475,7 @@ func (client GalleryImagesClient) UpdateSender(req *http.Request) (future Galler
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImagesClient) (gi GalleryImage, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
- gi, err = client.UpdateResponder(gi.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
index 8acc341ca9774..234c932abb2af 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -114,6 +103,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -121,26 +111,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
- giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -167,8 +138,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)
}()
@@ -181,7 +152,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -469,8 +428,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)
}()
@@ -483,7 +442,7 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -519,6 +478,7 @@ func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -526,26 +486,7 @@ func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
- giv, err = client.UpdateResponder(giv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
index 22d2339aa4e74..78493c73df0bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -99,6 +88,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -106,26 +96,7 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ImagesClient) (i Image, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
- i, err = client.CreateOrUpdateResponder(i.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -150,8 +121,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)
}()
@@ -164,7 +135,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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -196,6 +167,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -203,20 +175,7 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ImagesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -551,8 +510,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)
}()
@@ -565,7 +524,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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -599,6 +558,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -606,26 +566,7 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ImagesClient) (i Image, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
- i, err = client.UpdateResponder(i.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
index 1504b13cbf8b2..b99535238f47f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
return
}
@@ -105,6 +94,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -112,26 +102,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
- laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -157,8 +128,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)
}()
@@ -177,7 +148,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
return
}
@@ -210,6 +181,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -217,26 +189,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
- laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
index 013158a6ad6fa..22e9a488220bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
@@ -1,18 +1,7 @@
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.
@@ -38,6 +27,12 @@ type AccessURI struct {
AccessSAS *string `json:"accessSAS,omitempty"`
}
+// MarshalJSON is the custom marshaler for AccessURI.
+func (au AccessURI) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
// set.
type AdditionalCapabilities struct {
@@ -520,6 +515,12 @@ type BootDiagnosticsInstanceView struct {
Status *InstanceViewStatus `json:"status,omitempty"`
}
+// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
+func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// CloudError an error response from the Compute service.
type CloudError struct {
Error *APIError `json:"error,omitempty"`
@@ -925,6 +926,40 @@ type ContainerServicesCreateOrUpdateFuture struct {
Result func(ContainerServicesClient) (ContainerService, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ContainerServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ContainerServicesCreateOrUpdateFuture.Result.
+func (future *ContainerServicesCreateOrUpdateFuture) result(client ContainerServicesClient) (cs ContainerService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cs.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ContainerServicesDeleteFuture struct {
@@ -934,6 +969,34 @@ type ContainerServicesDeleteFuture struct {
Result func(ContainerServicesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ContainerServicesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ContainerServicesDeleteFuture.Result.
+func (future *ContainerServicesDeleteFuture) result(client ContainerServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
// to use for manipulating Azure APIs.
type ContainerServiceServicePrincipalProfile struct {
@@ -1092,6 +1155,12 @@ type DataDiskImage struct {
Lun *int32 `json:"lun,omitempty"`
}
+// MarshalJSON is the custom marshaler for DataDiskImage.
+func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// DedicatedHost specifies information about the Dedicated host.
type DedicatedHost struct {
autorest.Response `json:"-"`
@@ -1805,6 +1874,40 @@ type DedicatedHostsCreateOrUpdateFuture struct {
Result func(DedicatedHostsClient) (DedicatedHost, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
+func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
+ dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DedicatedHostsDeleteFuture struct {
@@ -1814,6 +1917,34 @@ type DedicatedHostsDeleteFuture struct {
Result func(DedicatedHostsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsDeleteFuture.Result.
+func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DedicatedHostsUpdateFuture struct {
@@ -1823,6 +1954,40 @@ type DedicatedHostsUpdateFuture struct {
Result func(DedicatedHostsClient) (DedicatedHost, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsUpdateFuture.Result.
+func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
+ dh, err = client.UpdateResponder(dh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
// licenseType may be updated.
type DedicatedHostUpdate struct {
@@ -2323,6 +2488,40 @@ type DiskEncryptionSetsCreateOrUpdateFuture struct {
Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result.
+func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ desVar.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
+ desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DiskEncryptionSetsDeleteFuture struct {
@@ -2332,6 +2531,34 @@ type DiskEncryptionSetsDeleteFuture struct {
Result func(DiskEncryptionSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result.
+func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DiskEncryptionSetsUpdateFuture struct {
@@ -2341,6 +2568,40 @@ type DiskEncryptionSetsUpdateFuture struct {
Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result.
+func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ desVar.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
+ desVar, err = client.UpdateResponder(desVar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DiskEncryptionSettings describes a Encryption Settings for a Disk
type DiskEncryptionSettings struct {
// DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
@@ -2646,6 +2907,40 @@ type DisksCreateOrUpdateFuture struct {
Result func(DisksClient) (Disk, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksCreateOrUpdateFuture.Result.
+func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ d.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
azure.FutureAPI
@@ -2654,6 +2949,34 @@ type DisksDeleteFuture struct {
Result func(DisksClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksDeleteFuture.Result.
+func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksGrantAccessFuture struct {
@@ -2663,6 +2986,40 @@ type DisksGrantAccessFuture struct {
Result func(DisksClient) (AccessURI, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksGrantAccessFuture.Result.
+func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
type DiskSku struct {
// Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
@@ -2689,6 +3046,34 @@ type DisksRevokeAccessFuture struct {
Result func(DisksClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksRevokeAccessFuture.Result.
+func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
azure.FutureAPI
@@ -2697,6 +3082,40 @@ type DisksUpdateFuture struct {
Result func(DisksClient) (Disk, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksUpdateFuture.Result.
+func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ d.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DiskUpdate disk update resource.
type DiskUpdate struct {
*DiskUpdateProperties `json:"properties,omitempty"`
@@ -2852,6 +3271,40 @@ type GalleriesCreateOrUpdateFuture struct {
Result func(GalleriesClient) (Gallery, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
+func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ g.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
+ g, err = client.CreateOrUpdateResponder(g.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleriesDeleteFuture struct {
@@ -2861,6 +3314,34 @@ type GalleriesDeleteFuture struct {
Result func(GalleriesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesDeleteFuture.Result.
+func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleriesUpdateFuture struct {
@@ -2870,6 +3351,40 @@ type GalleriesUpdateFuture struct {
Result func(GalleriesClient) (Gallery, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesUpdateFuture.Result.
+func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ g.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
+ g, err = client.UpdateResponder(g.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// Gallery specifies information about the Shared Image Gallery that you want to create or update.
type Gallery struct {
autorest.Response `json:"-"`
@@ -3255,6 +3770,40 @@ type GalleryApplicationsCreateOrUpdateFuture struct {
Result func(GalleryApplicationsClient) (GalleryApplication, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
+func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ga.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
+ ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationsDeleteFuture struct {
@@ -3264,6 +3813,34 @@ type GalleryApplicationsDeleteFuture struct {
Result func(GalleryApplicationsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
+func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationsUpdateFuture struct {
@@ -3273,6 +3850,40 @@ type GalleryApplicationsUpdateFuture struct {
Result func(GalleryApplicationsClient) (GalleryApplication, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsUpdateFuture.Result.
+func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ga.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
+ ga, err = client.UpdateResponder(ga.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
// update.
type GalleryApplicationUpdate struct {
@@ -3665,6 +4276,40 @@ type GalleryApplicationVersionsCreateOrUpdateFuture struct {
Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
+func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gav.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
+ gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationVersionsDeleteFuture struct {
@@ -3674,8 +4319,36 @@ type GalleryApplicationVersionsDeleteFuture struct {
Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
}
-// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
+func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryApplicationVersionsUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
@@ -3683,6 +4356,40 @@ type GalleryApplicationVersionsUpdateFuture struct {
Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result.
+func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gav.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
+ gav, err = client.UpdateResponder(gav.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
// want to update.
type GalleryApplicationVersionUpdate struct {
@@ -3837,6 +4544,12 @@ type GalleryIdentifier struct {
UniqueName *string `json:"uniqueName,omitempty"`
}
+// MarshalJSON is the custom marshaler for GalleryIdentifier.
+func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
type GalleryImage struct {
autorest.Response `json:"-"`
@@ -4183,6 +4896,40 @@ type GalleryImagesCreateOrUpdateFuture struct {
Result func(GalleryImagesClient) (GalleryImage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
+func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gi.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
+ gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleryImagesDeleteFuture struct {
@@ -4192,6 +4939,34 @@ type GalleryImagesDeleteFuture struct {
Result func(GalleryImagesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesDeleteFuture.Result.
+func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleryImagesUpdateFuture struct {
@@ -4201,6 +4976,40 @@ type GalleryImagesUpdateFuture struct {
Result func(GalleryImagesClient) (GalleryImage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesUpdateFuture.Result.
+func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gi.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
+ gi, err = client.UpdateResponder(gi.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
type GalleryImageUpdate struct {
*GalleryImageProperties `json:"properties,omitempty"`
@@ -4581,6 +5390,40 @@ type GalleryImageVersionsCreateOrUpdateFuture struct {
Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
+func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ giv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
+ giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryImageVersionsDeleteFuture struct {
@@ -4590,6 +5433,34 @@ type GalleryImageVersionsDeleteFuture struct {
Result func(GalleryImageVersionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
+func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
type GalleryImageVersionStorageProfile struct {
Source *GalleryArtifactVersionSource `json:"source,omitempty"`
@@ -4607,6 +5478,40 @@ type GalleryImageVersionsUpdateFuture struct {
Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsUpdateFuture.Result.
+func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ giv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
+ giv, err = client.UpdateResponder(giv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
type GalleryImageVersionUpdate struct {
*GalleryImageVersionProperties `json:"properties,omitempty"`
@@ -5342,6 +6247,40 @@ type ImagesCreateOrUpdateFuture struct {
Result func(ImagesClient) (Image, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
+func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ i.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
azure.FutureAPI
@@ -5350,6 +6289,34 @@ type ImagesDeleteFuture struct {
Result func(ImagesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesDeleteFuture.Result.
+func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ImageStorageProfile describes a storage profile.
type ImageStorageProfile struct {
// OsDisk - Specifies information about the operating system disk used by the virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
@@ -5368,6 +6335,40 @@ type ImagesUpdateFuture struct {
Result func(ImagesClient) (Image, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesUpdateFuture.Result.
+func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ i.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
type ImageUpdate struct {
*ImageProperties `json:"properties,omitempty"`
@@ -5669,6 +6670,40 @@ type LogAnalyticsExportRequestRateByIntervalFuture struct {
Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
+func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ laor.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type LogAnalyticsExportThrottledRequestsFuture struct {
@@ -5678,6 +6713,40 @@ type LogAnalyticsExportThrottledRequestsFuture struct {
Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
+func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ laor.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// LogAnalyticsInputBase api input base class for LogAnalytics Api.
type LogAnalyticsInputBase struct {
// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
@@ -5701,12 +6770,24 @@ type LogAnalyticsOperationResult struct {
Properties *LogAnalyticsOutput `json:"properties,omitempty"`
}
+// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
+func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// LogAnalyticsOutput logAnalytics output properties
type LogAnalyticsOutput struct {
// Output - READ-ONLY; Output file Uri path to blob container.
Output *string `json:"output,omitempty"`
}
+// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
+func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// MaintenanceRedeployStatus maintenance Operation Status.
type MaintenanceRedeployStatus struct {
// IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
@@ -5812,6 +6893,12 @@ type OperationListResult struct {
Value *[]OperationValue `json:"value,omitempty"`
}
+// MarshalJSON is the custom marshaler for OperationListResult.
+func (olr OperationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// OperationValue describes the properties of a Compute Operation value.
type OperationValue struct {
// Origin - READ-ONLY; The origin of the compute operation.
@@ -5884,6 +6971,12 @@ type OperationValueDisplay struct {
Provider *string `json:"provider,omitempty"`
}
+// MarshalJSON is the custom marshaler for OperationValueDisplay.
+func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// OSDisk specifies information about the operating system disk used by the virtual machine.
For
// more information about disks, see [About disks and VHDs for Azure virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
@@ -6285,6 +7378,12 @@ type RecoveryWalkResponse struct {
NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
}
+// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
+func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RegionalReplicationStatus this is the regional replication status.
type RegionalReplicationStatus struct {
// Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
@@ -6297,6 +7396,12 @@ type RegionalReplicationStatus struct {
Progress *int32 `json:"progress,omitempty"`
}
+// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
+func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ReplicationStatus this is the replication status of the gallery Image Version.
type ReplicationStatus struct {
// AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
@@ -6305,6 +7410,12 @@ type ReplicationStatus struct {
Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
}
+// MarshalJSON is the custom marshaler for ReplicationStatus.
+func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
type RequestRateByIntervalInput struct {
// IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
@@ -6387,6 +7498,12 @@ type ResourceSku struct {
Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSku.
+func (rs ResourceSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuCapabilities describes The SKU capabilities object.
type ResourceSkuCapabilities struct {
// Name - READ-ONLY; An invariant to describe the feature.
@@ -6395,6 +7512,12 @@ type ResourceSkuCapabilities struct {
Value *string `json:"value,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
+func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuCapacity describes scaling information of a SKU.
type ResourceSkuCapacity struct {
// Minimum - READ-ONLY; The minimum capacity.
@@ -6407,6 +7530,12 @@ type ResourceSkuCapacity struct {
ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
+func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuCosts describes metadata for retrieving price info.
type ResourceSkuCosts struct {
// MeterID - READ-ONLY; Used for querying price from commerce.
@@ -6417,6 +7546,12 @@ type ResourceSkuCosts struct {
ExtendedUnit *string `json:"extendedUnit,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuCosts.
+func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuLocationInfo ...
type ResourceSkuLocationInfo struct {
// Location - READ-ONLY; Location of the SKU
@@ -6427,6 +7562,12 @@ type ResourceSkuLocationInfo struct {
ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
+func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuRestrictionInfo ...
type ResourceSkuRestrictionInfo struct {
// Locations - READ-ONLY; Locations where the SKU is restricted
@@ -6435,6 +7576,12 @@ type ResourceSkuRestrictionInfo struct {
Zones *[]string `json:"zones,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
+func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkuRestrictions describes scaling information of a SKU.
type ResourceSkuRestrictions struct {
// Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
@@ -6447,6 +7594,12 @@ type ResourceSkuRestrictions struct {
ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
+func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ResourceSkusResult the List Resource Skus operation response.
type ResourceSkusResult struct {
autorest.Response `json:"-"`
@@ -6614,6 +7767,12 @@ type ResourceSkuZoneDetails struct {
Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
}
+// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
+func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
type RollbackStatusInfo struct {
// SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
@@ -6624,6 +7783,12 @@ type RollbackStatusInfo struct {
RollbackError *APIError `json:"rollbackError,omitempty"`
}
+// MarshalJSON is the custom marshaler for RollbackStatusInfo.
+func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
type RollingUpgradePolicy struct {
// MaxBatchInstancePercent - The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
@@ -6649,6 +7814,12 @@ type RollingUpgradeProgressInfo struct {
PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
}
+// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
+func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
type RollingUpgradeRunningStatus struct {
// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
@@ -6661,6 +7832,12 @@ type RollingUpgradeRunningStatus struct {
LastActionTime *date.Time `json:"lastActionTime,omitempty"`
}
+// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
+func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
type RollingUpgradeStatusInfo struct {
autorest.Response `json:"-"`
@@ -6773,6 +7950,12 @@ type RollingUpgradeStatusInfoProperties struct {
Error *APIError `json:"error,omitempty"`
}
+// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
+func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// RunCommandDocument describes the properties of a Run Command.
type RunCommandDocument struct {
autorest.Response `json:"-"`
@@ -7371,6 +8554,40 @@ type SnapshotsCreateOrUpdateFuture struct {
Result func(SnapshotsClient) (Snapshot, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
+func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsDeleteFuture struct {
@@ -7380,15 +8597,77 @@ type SnapshotsDeleteFuture struct {
Result func(SnapshotsClient) (autorest.Response, error)
}
-// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SnapshotsGrantAccessFuture struct {
- azure.FutureAPI
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsDeleteFuture.Result.
+func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsGrantAccessFuture struct {
+ azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(SnapshotsClient) (AccessURI, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsGrantAccessFuture.Result.
+func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
type SnapshotSku struct {
// Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
@@ -7415,6 +8694,34 @@ type SnapshotsRevokeAccessFuture struct {
Result func(SnapshotsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
+func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsUpdateFuture struct {
@@ -7424,6 +8731,40 @@ type SnapshotsUpdateFuture struct {
Result func(SnapshotsClient) (Snapshot, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsUpdateFuture.Result.
+func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SnapshotUpdate snapshot update resource.
type SnapshotUpdate struct {
*SnapshotUpdateProperties `json:"properties,omitempty"`
@@ -7545,6 +8886,12 @@ type SubResourceReadOnly struct {
ID *string `json:"id,omitempty"`
}
+// MarshalJSON is the custom marshaler for SubResourceReadOnly.
+func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// SubResourceWithColocationStatus ...
type SubResourceWithColocationStatus struct {
// ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
@@ -7612,6 +8959,12 @@ type UpgradeOperationHistoricalStatusInfo struct {
Location *string `json:"location,omitempty"`
}
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
+func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
// Set.
type UpgradeOperationHistoricalStatusInfoProperties struct {
@@ -7629,6 +8982,12 @@ type UpgradeOperationHistoricalStatusInfoProperties struct {
RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
}
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
+func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
type UpgradeOperationHistoryStatus struct {
// Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
@@ -7639,6 +8998,12 @@ type UpgradeOperationHistoryStatus struct {
EndTime *date.Time `json:"endTime,omitempty"`
}
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
+func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
type UpgradePolicy struct {
// Mode - Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'
@@ -8196,6 +9561,40 @@ type VirtualMachineExtensionsCreateOrUpdateFuture struct {
Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineExtensionsDeleteFuture struct {
@@ -8205,6 +9604,34 @@ type VirtualMachineExtensionsDeleteFuture struct {
Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
+func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineExtensionsListResult the List Extension operation response
type VirtualMachineExtensionsListResult struct {
autorest.Response `json:"-"`
@@ -8221,6 +9648,40 @@ type VirtualMachineExtensionsUpdateFuture struct {
Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
+func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
type VirtualMachineExtensionUpdate struct {
*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
@@ -8297,6 +9758,12 @@ type VirtualMachineHealthStatus struct {
Status *InstanceViewStatus `json:"status,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
+func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineIdentity identity for the virtual machine.
type VirtualMachineIdentity struct {
// PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
@@ -8329,6 +9796,12 @@ type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
ClientID *string `json:"clientId,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
+func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineImage describes a Virtual Machine Image.
type VirtualMachineImage struct {
autorest.Response `json:"-"`
@@ -9228,6 +10701,40 @@ type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmsse.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
@@ -9237,6 +10744,34 @@ type VirtualMachineScaleSetExtensionsDeleteFuture struct {
Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualMachineScaleSetExtensionsUpdateFuture struct {
@@ -9246,6 +10781,40 @@ type VirtualMachineScaleSetExtensionsUpdateFuture struct {
Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmsse.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.UpdateResponder(vmsse.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
type VirtualMachineScaleSetExtensionUpdate struct {
// Name - READ-ONLY; The name of the extension.
@@ -9349,6 +10918,12 @@ type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
ClientID *string `json:"clientId,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
+func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
type VirtualMachineScaleSetInstanceView struct {
autorest.Response `json:"-"`
@@ -9376,6 +10951,12 @@ type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
+func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
// configuration.
type VirtualMachineScaleSetIPConfiguration struct {
@@ -10424,6 +12005,34 @@ type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
// retrieving the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
@@ -10433,6 +12042,34 @@ type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
@@ -10442,6 +12079,34 @@ type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
@@ -10451,6 +12116,40 @@ type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmss.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
@@ -10460,6 +12159,34 @@ type VirtualMachineScaleSetsDeallocateFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
+func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeleteFuture struct {
@@ -10469,6 +12196,34 @@ type VirtualMachineScaleSetsDeleteFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
@@ -10478,6 +12233,34 @@ type VirtualMachineScaleSetsDeleteInstancesFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
type VirtualMachineScaleSetSku struct {
// ResourceType - READ-ONLY; The type of resource the sku applies to.
@@ -10488,6 +12271,12 @@ type VirtualMachineScaleSetSku struct {
Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
+func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
type VirtualMachineScaleSetSkuCapacity struct {
// Minimum - READ-ONLY; The minimum capacity.
@@ -10500,6 +12289,12 @@ type VirtualMachineScaleSetSkuCapacity struct {
ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
+func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
@@ -10509,6 +12304,34 @@ type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
+func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
@@ -10518,6 +12341,34 @@ type VirtualMachineScaleSetsPowerOffFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
+func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRedeployFuture struct {
@@ -10527,7 +12378,35 @@ type VirtualMachineScaleSetsRedeployFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
-// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
+func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
azure.FutureAPI
@@ -10536,6 +12415,34 @@ type VirtualMachineScaleSetsReimageAllFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
+func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageFuture struct {
@@ -10545,6 +12452,34 @@ type VirtualMachineScaleSetsReimageFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
+func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRestartFuture struct {
@@ -10554,6 +12489,34 @@ type VirtualMachineScaleSetsRestartFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
+func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsStartFuture struct {
@@ -10563,6 +12526,34 @@ type VirtualMachineScaleSetsStartFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
+func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
type VirtualMachineScaleSetStorageProfile struct {
// ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
@@ -10582,6 +12573,40 @@ type VirtualMachineScaleSetsUpdateFuture struct {
Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmss.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.UpdateResponder(vmss.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
@@ -10591,6 +12616,34 @@ type VirtualMachineScaleSetsUpdateInstancesFuture struct {
Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
type VirtualMachineScaleSetUpdate struct {
// Sku - The virtual machine scale set sku.
@@ -11177,6 +13230,40 @@ type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
@@ -11186,6 +13273,34 @@ type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
// scale set.
type VirtualMachineScaleSetVMExtensionsSummary struct {
@@ -11195,6 +13310,12 @@ type VirtualMachineScaleSetVMExtensionsSummary struct {
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
+func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
@@ -11204,6 +13325,40 @@ type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
// set.
type VirtualMachineScaleSetVMInstanceIDs struct {
@@ -11566,6 +13721,34 @@ type VirtualMachineScaleSetVMsDeallocateFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
@@ -11575,6 +13758,34 @@ type VirtualMachineScaleSetVMsDeleteFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
@@ -11584,6 +13795,34 @@ type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
+func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
@@ -11593,6 +13832,34 @@ type VirtualMachineScaleSetVMsPowerOffFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRedeployFuture struct {
@@ -11602,6 +13869,34 @@ type VirtualMachineScaleSetVMsRedeployFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
+func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
@@ -11611,6 +13906,34 @@ type VirtualMachineScaleSetVMsReimageAllFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
@@ -11620,6 +13943,34 @@ type VirtualMachineScaleSetVMsReimageFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
+func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
@@ -11629,6 +13980,34 @@ type VirtualMachineScaleSetVMsRestartFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
+func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRunCommandFuture struct {
@@ -11638,6 +14017,40 @@ type VirtualMachineScaleSetVMsRunCommandFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
+func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsStartFuture struct {
@@ -11647,6 +14060,34 @@ type VirtualMachineScaleSetVMsStartFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
+func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsUpdateFuture struct {
@@ -11656,6 +14097,40 @@ type VirtualMachineScaleSetVMsUpdateFuture struct {
Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmssv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
+ vmssv, err = client.UpdateResponder(vmssv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesCaptureFuture struct {
@@ -11665,6 +14140,40 @@ type VirtualMachinesCaptureFuture struct {
Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesCaptureFuture.Result.
+func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
@@ -11674,6 +14183,34 @@ type VirtualMachinesConvertToManagedDisksFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
+func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesCreateOrUpdateFuture struct {
@@ -11683,6 +14220,40 @@ type VirtualMachinesCreateOrUpdateFuture struct {
Result func(VirtualMachinesClient) (VirtualMachine, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
+func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ VM.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesDeallocateFuture struct {
@@ -11692,6 +14263,34 @@ type VirtualMachinesDeallocateFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
+func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesDeleteFuture struct {
@@ -11701,6 +14300,34 @@ type VirtualMachinesDeleteFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesDeleteFuture.Result.
+func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineSize describes the properties of a VM size.
type VirtualMachineSize struct {
// Name - The name of the virtual machine size.
@@ -11733,6 +14360,34 @@ type VirtualMachinesPerformMaintenanceFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
+func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesPowerOffFuture struct {
@@ -11742,6 +14397,34 @@ type VirtualMachinesPowerOffFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
+func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesReapplyFuture struct {
@@ -11751,6 +14434,34 @@ type VirtualMachinesReapplyFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesReapplyFuture.Result.
+func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRedeployFuture struct {
@@ -11760,6 +14471,34 @@ type VirtualMachinesRedeployFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRedeployFuture.Result.
+func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesReimageFuture struct {
@@ -11769,6 +14508,34 @@ type VirtualMachinesReimageFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesReimageFuture.Result.
+func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRestartFuture struct {
@@ -11778,6 +14545,34 @@ type VirtualMachinesRestartFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRestartFuture.Result.
+func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesRunCommandFuture struct {
@@ -11787,6 +14582,40 @@ type VirtualMachinesRunCommandFuture struct {
Result func(VirtualMachinesClient) (RunCommandResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
+func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesStartFuture struct {
@@ -11796,6 +14625,34 @@ type VirtualMachinesStartFuture struct {
Result func(VirtualMachinesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesStartFuture.Result.
+func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
// status summary.
type VirtualMachineStatusCodeCount struct {
@@ -11805,6 +14662,12 @@ type VirtualMachineStatusCodeCount struct {
Count *int32 `json:"count,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
+func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesUpdateFuture struct {
@@ -11814,6 +14677,40 @@ type VirtualMachinesUpdateFuture struct {
Result func(VirtualMachinesClient) (VirtualMachine, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesUpdateFuture.Result.
+func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ VM.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.UpdateResponder(VM.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualMachineUpdate describes a Virtual Machine Update.
type VirtualMachineUpdate struct {
// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
index 7e272af4bafc6..6d72041f39c3a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
index 16674d41fd21c..2a2d8856b034b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
index 7bbda330f1e72..9c967d93aa8d9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
index 1c98ce06bf5d6..382b9ae7793d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
@@ -1,18 +1,7 @@
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 SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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)
}()
@@ -80,7 +69,7 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -115,6 +104,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -122,26 +112,7 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SnapshotsClient) (s Snapshot, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.CreateOrUpdateResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -167,8 +138,8 @@ func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName stri
ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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 +152,7 @@ func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -213,6 +184,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -220,20 +192,7 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SnapshotsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -336,8 +295,8 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.GrantAccess")
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)
}()
@@ -356,7 +315,7 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -390,6 +349,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -397,26 +357,7 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SnapshotsClient) (au AccessURI, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
- au, err = client.GrantAccessResponder(au.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -671,8 +612,8 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess")
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)
}()
@@ -685,7 +626,7 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -717,6 +658,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -724,20 +666,7 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SnapshotsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -763,8 +692,8 @@ func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName stri
ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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)
}()
@@ -777,7 +706,7 @@ func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -811,6 +740,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -818,26 +748,7 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SnapshotsClient) (s Snapshot, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.UpdateResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
index 6ff14db4a8b7d..78e2d5c3e48c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go
index cbadbc9459f41..2a7f5ba07e336 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go
@@ -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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
index 98d440bc86def..b320a317ccfa8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
index 898b287312956..ef883f483a0e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
- vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -154,8 +125,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)
}()
@@ -168,7 +139,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -201,6 +172,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -208,20 +180,7 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -409,8 +368,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)
}()
@@ -423,7 +382,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -458,6 +417,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -465,26 +425,7 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
- vme, err = client.UpdateResponder(vme.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
index ffaece0107b47..2300a951ba67e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
index e548f45977bb7..02a46f9d8abb7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
index 97bdaab7f1498..4aff443c3a1a6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
@@ -1,18 +1,7 @@
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 VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Capture")
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)
}()
@@ -75,7 +64,7 @@ func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
result, err = client.CaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
return
}
@@ -109,6 +98,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -116,26 +106,7 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
- vmcr, err = client.CaptureResponder(vmcr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -165,8 +136,8 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ConvertToManagedDisks")
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)
}()
@@ -179,7 +150,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
result, err = client.ConvertToManagedDisksSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
return
}
@@ -211,6 +182,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -218,20 +190,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -257,8 +216,8 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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)
}()
@@ -292,7 +251,7 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -327,6 +286,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -334,26 +294,7 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (VM VirtualMachine, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
- VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -379,8 +320,8 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate")
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)
}()
@@ -393,7 +334,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -425,6 +366,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -432,20 +374,7 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -469,8 +398,8 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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)
}()
@@ -483,7 +412,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -515,6 +444,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,20 +452,7 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1229,8 +1146,8 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PerformMaintenance")
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)
}()
@@ -1243,7 +1160,7 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1275,6 +1192,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1282,20 +1200,7 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1323,8 +1228,8 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff")
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)
}()
@@ -1337,7 +1242,7 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1374,6 +1279,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1381,20 +1287,7 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1418,8 +1311,8 @@ func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reapply")
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)
}()
@@ -1432,7 +1325,7 @@ func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupNa
result, err = client.ReapplySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
return
}
@@ -1464,6 +1357,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1471,20 +1365,7 @@ func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future Vir
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1508,8 +1389,8 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy")
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)
}()
@@ -1522,7 +1403,7 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1554,6 +1435,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1561,20 +1443,7 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1599,8 +1468,8 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage")
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)
}()
@@ -1613,7 +1482,7 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1650,6 +1519,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1657,20 +1527,7 @@ func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future Vir
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1694,8 +1551,8 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart")
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)
}()
@@ -1708,7 +1565,7 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1740,6 +1597,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1747,20 +1605,7 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1785,8 +1630,8 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RunCommand")
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)
}()
@@ -1805,7 +1650,7 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1839,6 +1684,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1846,26 +1692,7 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
- rcr, err = client.RunCommandResponder(rcr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1890,8 +1717,8 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start")
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)
}()
@@ -1904,7 +1731,7 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1936,6 +1763,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1943,20 +1771,7 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1981,8 +1796,8 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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)
}()
@@ -1995,7 +1810,7 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -2029,6 +1844,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -2036,26 +1852,7 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachinesClient) (VM VirtualMachine, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
- VM, err = client.UpdateResponder(VM.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
index 5f1bb8a50170f..5a360beacb76e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +92,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -110,26 +100,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
- vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -155,8 +126,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)
}()
@@ -169,7 +140,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -202,6 +173,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -209,20 +181,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -448,8 +407,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)
}()
@@ -462,7 +421,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -499,6 +458,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -506,26 +466,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
- vmsse, err = client.UpdateResponder(vmsse.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
index 9f6c161f17168..ebaf4581dd6e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
return
}
@@ -98,6 +87,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -105,20 +95,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -220,8 +197,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)
}()
@@ -234,7 +211,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
return
}
@@ -266,6 +243,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -273,20 +251,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -311,8 +276,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)
}()
@@ -325,7 +290,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
return
}
@@ -357,6 +322,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -364,20 +330,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
index 41e61507ceffb..0c9d98a27d922 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
@@ -1,18 +1,7 @@
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.
@@ -132,8 +121,8 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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)
}()
@@ -169,7 +158,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -203,6 +192,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,26 +200,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
- vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -256,8 +227,8 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Deallocate")
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)
}()
@@ -270,7 +241,7 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -307,6 +278,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -314,20 +286,7 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -351,8 +310,8 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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)
}()
@@ -365,7 +324,7 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -397,6 +356,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -404,20 +364,7 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -442,8 +389,8 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances")
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)
}()
@@ -462,7 +409,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
result, err = client.DeleteInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
return
}
@@ -496,6 +443,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -503,20 +451,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1242,8 +1177,8 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance")
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)
}()
@@ -1256,7 +1191,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1293,6 +1228,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1300,20 +1236,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1342,8 +1265,8 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff")
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)
}()
@@ -1356,7 +1279,7 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1398,6 +1321,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1405,20 +1329,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1444,8 +1355,8 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy")
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)
}()
@@ -1458,7 +1369,7 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1495,6 +1406,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1502,20 +1414,7 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1541,8 +1440,8 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage")
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)
}()
@@ -1555,7 +1454,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1592,6 +1491,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1599,20 +1499,7 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1638,8 +1525,8 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll")
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)
}()
@@ -1652,7 +1539,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -1689,6 +1576,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1696,20 +1584,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1734,8 +1609,8 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart")
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)
}()
@@ -1748,7 +1623,7 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1785,6 +1660,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1792,20 +1668,7 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1830,8 +1693,8 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start")
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)
}()
@@ -1844,7 +1707,7 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1881,6 +1744,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1888,20 +1752,7 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1926,8 +1777,8 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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)
}()
@@ -1940,7 +1791,7 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1974,6 +1825,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1981,26 +1833,7 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
- vmss, err = client.UpdateResponder(vmss.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -2026,8 +1859,8 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.UpdateInstances")
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)
}()
@@ -2046,7 +1879,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
result, err = client.UpdateInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
return
}
@@ -2080,6 +1913,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -2087,20 +1921,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
index cf596d65bbf76..d8c46855240cd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
@@ -1,18 +1,7 @@
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", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +94,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -112,26 +102,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
- vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -158,8 +129,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)
}()
@@ -172,7 +143,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -206,6 +177,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -213,20 +185,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -419,8 +378,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)
}()
@@ -433,7 +392,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -469,6 +428,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -476,26 +436,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
- vme, err = client.UpdateResponder(vme.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
index 9fbc15f748832..05e847d9b6900 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
@@ -1,18 +1,7 @@
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 VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Deallocate")
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 VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,20 +99,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -147,8 +124,8 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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 +138,7 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -194,6 +171,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -201,20 +179,7 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -531,8 +496,8 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance")
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)
}()
@@ -545,7 +510,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -578,6 +543,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -585,20 +551,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -627,8 +580,8 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff")
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)
}()
@@ -641,7 +594,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -679,6 +632,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -686,20 +640,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -725,8 +666,8 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy")
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)
}()
@@ -739,7 +680,7 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -772,6 +713,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -779,20 +721,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -818,8 +747,8 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage")
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)
}()
@@ -832,7 +761,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -870,6 +799,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -877,20 +807,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -916,8 +833,8 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll")
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)
}()
@@ -930,7 +847,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -963,6 +880,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -970,20 +888,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1008,8 +913,8 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart")
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)
}()
@@ -1022,7 +927,7 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1055,6 +960,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1062,20 +968,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1101,8 +994,8 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand")
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)
}()
@@ -1121,7 +1014,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1156,6 +1049,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1163,26 +1057,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
- rcr, err = client.RunCommandResponder(rcr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1208,8 +1083,8 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start")
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)
}()
@@ -1222,7 +1097,7 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1255,6 +1130,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1262,20 +1138,7 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1301,8 +1164,8 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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)
}()
@@ -1336,7 +1199,7 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1375,6 +1238,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1382,26 +1246,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
- vmssv, err = client.UpdateResponder(vmssv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
index a7925e7d070eb..63fca1d18433b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
@@ -1,18 +1,7 @@
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/CHANGELOG.md
index 96127a9e8fb54..52911e4cc5e4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/CHANGELOG.md
@@ -1,718 +1,2 @@
-Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82/specification/network/resource-manager/readme.md tag: `package-2019-09`
+# Change History
-Code generator @microsoft.azure/autorest.go@2.1.168
-
-## Breaking Changes
-
-### Removed Funcs
-
-1. *ApplicationGatewaysBackendHealthFuture.Result(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
-1. *ApplicationGatewaysBackendHealthOnDemandFuture.Result(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
-1. *ApplicationGatewaysCreateOrUpdateFuture.Result(ApplicationGatewaysClient) (ApplicationGateway, error)
-1. *ApplicationGatewaysDeleteFuture.Result(ApplicationGatewaysClient) (autorest.Response, error)
-1. *ApplicationGatewaysStartFuture.Result(ApplicationGatewaysClient) (autorest.Response, error)
-1. *ApplicationGatewaysStopFuture.Result(ApplicationGatewaysClient) (autorest.Response, error)
-1. *ApplicationSecurityGroupsCreateOrUpdateFuture.Result(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
-1. *ApplicationSecurityGroupsDeleteFuture.Result(ApplicationSecurityGroupsClient) (autorest.Response, error)
-1. *AzureFirewallsCreateOrUpdateFuture.Result(AzureFirewallsClient) (AzureFirewall, error)
-1. *AzureFirewallsDeleteFuture.Result(AzureFirewallsClient) (autorest.Response, error)
-1. *AzureFirewallsUpdateTagsFuture.Result(AzureFirewallsClient) (AzureFirewall, error)
-1. *BastionHostsCreateOrUpdateFuture.Result(BastionHostsClient) (BastionHost, error)
-1. *BastionHostsDeleteFuture.Result(BastionHostsClient) (autorest.Response, error)
-1. *ConnectionMonitorsCreateOrUpdateFuture.Result(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
-1. *ConnectionMonitorsDeleteFuture.Result(ConnectionMonitorsClient) (autorest.Response, error)
-1. *ConnectionMonitorsQueryFuture.Result(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
-1. *ConnectionMonitorsStartFuture.Result(ConnectionMonitorsClient) (autorest.Response, error)
-1. *ConnectionMonitorsStopFuture.Result(ConnectionMonitorsClient) (autorest.Response, error)
-1. *DdosCustomPoliciesCreateOrUpdateFuture.Result(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
-1. *DdosCustomPoliciesDeleteFuture.Result(DdosCustomPoliciesClient) (autorest.Response, error)
-1. *DdosProtectionPlansCreateOrUpdateFuture.Result(DdosProtectionPlansClient) (DdosProtectionPlan, error)
-1. *DdosProtectionPlansDeleteFuture.Result(DdosProtectionPlansClient) (autorest.Response, error)
-1. *DeleteBastionShareableLinkFuture.Result(BaseClient) (autorest.Response, error)
-1. *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
-1. *ExpressRouteCircuitAuthorizationsDeleteFuture.Result(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
-1. *ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
-1. *ExpressRouteCircuitConnectionsDeleteFuture.Result(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
-1. *ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
-1. *ExpressRouteCircuitPeeringsDeleteFuture.Result(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
-1. *ExpressRouteCircuitsCreateOrUpdateFuture.Result(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
-1. *ExpressRouteCircuitsDeleteFuture.Result(ExpressRouteCircuitsClient) (autorest.Response, error)
-1. *ExpressRouteCircuitsListArpTableFuture.Result(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
-1. *ExpressRouteCircuitsListRoutesTableFuture.Result(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
-1. *ExpressRouteCircuitsListRoutesTableSummaryFuture.Result(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
-1. *ExpressRouteConnectionsCreateOrUpdateFuture.Result(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
-1. *ExpressRouteConnectionsDeleteFuture.Result(ExpressRouteConnectionsClient) (autorest.Response, error)
-1. *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
-1. *ExpressRouteCrossConnectionPeeringsDeleteFuture.Result(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
-1. *ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
-1. *ExpressRouteCrossConnectionsListArpTableFuture.Result(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
-1. *ExpressRouteCrossConnectionsListRoutesTableFuture.Result(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
-1. *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
-1. *ExpressRouteGatewaysCreateOrUpdateFuture.Result(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
-1. *ExpressRouteGatewaysDeleteFuture.Result(ExpressRouteGatewaysClient) (autorest.Response, error)
-1. *ExpressRoutePortsCreateOrUpdateFuture.Result(ExpressRoutePortsClient) (ExpressRoutePort, error)
-1. *ExpressRoutePortsDeleteFuture.Result(ExpressRoutePortsClient) (autorest.Response, error)
-1. *FirewallPoliciesCreateOrUpdateFuture.Result(FirewallPoliciesClient) (FirewallPolicy, error)
-1. *FirewallPoliciesDeleteFuture.Result(FirewallPoliciesClient) (autorest.Response, error)
-1. *FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
-1. *FirewallPolicyRuleGroupsDeleteFuture.Result(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
-1. *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result(BaseClient) (VpnProfileResponse, error)
-1. *GetActiveSessionsAllFuture.Result(BaseClient) (BastionActiveSessionListResultPage, error)
-1. *GetActiveSessionsFuture.Result(BaseClient) (BastionActiveSessionListResultPage, error)
-1. *IPGroupsCreateOrUpdateFuture.Result(IPGroupsClient) (IPGroup, error)
-1. *IPGroupsDeleteFuture.Result(IPGroupsClient) (autorest.Response, error)
-1. *InboundNatRulesCreateOrUpdateFuture.Result(InboundNatRulesClient) (InboundNatRule, error)
-1. *InboundNatRulesDeleteFuture.Result(InboundNatRulesClient) (autorest.Response, error)
-1. *InterfaceTapConfigurationsCreateOrUpdateFuture.Result(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
-1. *InterfaceTapConfigurationsDeleteFuture.Result(InterfaceTapConfigurationsClient) (autorest.Response, error)
-1. *InterfacesCreateOrUpdateFuture.Result(InterfacesClient) (Interface, error)
-1. *InterfacesDeleteFuture.Result(InterfacesClient) (autorest.Response, error)
-1. *InterfacesGetEffectiveRouteTableFuture.Result(InterfacesClient) (EffectiveRouteListResult, error)
-1. *InterfacesListEffectiveNetworkSecurityGroupsFuture.Result(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
-1. *LoadBalancersCreateOrUpdateFuture.Result(LoadBalancersClient) (LoadBalancer, error)
-1. *LoadBalancersDeleteFuture.Result(LoadBalancersClient) (autorest.Response, error)
-1. *LocalNetworkGatewaysCreateOrUpdateFuture.Result(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
-1. *LocalNetworkGatewaysDeleteFuture.Result(LocalNetworkGatewaysClient) (autorest.Response, error)
-1. *NatGatewaysCreateOrUpdateFuture.Result(NatGatewaysClient) (NatGateway, error)
-1. *NatGatewaysDeleteFuture.Result(NatGatewaysClient) (autorest.Response, error)
-1. *P2sVpnGatewaysCreateOrUpdateFuture.Result(P2sVpnGatewaysClient) (P2SVpnGateway, error)
-1. *P2sVpnGatewaysDeleteFuture.Result(P2sVpnGatewaysClient) (autorest.Response, error)
-1. *P2sVpnGatewaysGenerateVpnProfileFuture.Result(P2sVpnGatewaysClient) (VpnProfileResponse, error)
-1. *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
-1. *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result(P2sVpnGatewaysClient) (P2SVpnGateway, error)
-1. *PacketCapturesCreateFuture.Result(PacketCapturesClient) (PacketCaptureResult, error)
-1. *PacketCapturesDeleteFuture.Result(PacketCapturesClient) (autorest.Response, error)
-1. *PacketCapturesGetStatusFuture.Result(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
-1. *PacketCapturesStopFuture.Result(PacketCapturesClient) (autorest.Response, error)
-1. *PrivateEndpointsCreateOrUpdateFuture.Result(PrivateEndpointsClient) (PrivateEndpoint, error)
-1. *PrivateEndpointsDeleteFuture.Result(PrivateEndpointsClient) (autorest.Response, error)
-1. *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
-1. *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
-1. *PrivateLinkServicesCreateOrUpdateFuture.Result(PrivateLinkServicesClient) (PrivateLinkService, error)
-1. *PrivateLinkServicesDeleteFuture.Result(PrivateLinkServicesClient) (autorest.Response, error)
-1. *PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result(PrivateLinkServicesClient) (autorest.Response, error)
-1. *ProfilesDeleteFuture.Result(ProfilesClient) (autorest.Response, error)
-1. *PublicIPAddressesCreateOrUpdateFuture.Result(PublicIPAddressesClient) (PublicIPAddress, error)
-1. *PublicIPAddressesDeleteFuture.Result(PublicIPAddressesClient) (autorest.Response, error)
-1. *PublicIPPrefixesCreateOrUpdateFuture.Result(PublicIPPrefixesClient) (PublicIPPrefix, error)
-1. *PublicIPPrefixesDeleteFuture.Result(PublicIPPrefixesClient) (autorest.Response, error)
-1. *PutBastionShareableLinkAllFuture.Result(BaseClient) (BastionShareableLinkListResultPage, error)
-1. *PutBastionShareableLinkFuture.Result(BaseClient) (BastionShareableLinkListResultPage, error)
-1. *RouteFilterRulesCreateOrUpdateFuture.Result(RouteFilterRulesClient) (RouteFilterRule, error)
-1. *RouteFilterRulesDeleteFuture.Result(RouteFilterRulesClient) (autorest.Response, error)
-1. *RouteFiltersCreateOrUpdateFuture.Result(RouteFiltersClient) (RouteFilter, error)
-1. *RouteFiltersDeleteFuture.Result(RouteFiltersClient) (autorest.Response, error)
-1. *RouteTablesCreateOrUpdateFuture.Result(RouteTablesClient) (RouteTable, error)
-1. *RouteTablesDeleteFuture.Result(RouteTablesClient) (autorest.Response, error)
-1. *RoutesCreateOrUpdateFuture.Result(RoutesClient) (Route, error)
-1. *RoutesDeleteFuture.Result(RoutesClient) (autorest.Response, error)
-1. *SecurityGroupsCreateOrUpdateFuture.Result(SecurityGroupsClient) (SecurityGroup, error)
-1. *SecurityGroupsDeleteFuture.Result(SecurityGroupsClient) (autorest.Response, error)
-1. *SecurityRulesCreateOrUpdateFuture.Result(SecurityRulesClient) (SecurityRule, error)
-1. *SecurityRulesDeleteFuture.Result(SecurityRulesClient) (autorest.Response, error)
-1. *ServiceEndpointPoliciesCreateOrUpdateFuture.Result(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
-1. *ServiceEndpointPoliciesDeleteFuture.Result(ServiceEndpointPoliciesClient) (autorest.Response, error)
-1. *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
-1. *ServiceEndpointPolicyDefinitionsDeleteFuture.Result(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
-1. *SubnetsCreateOrUpdateFuture.Result(SubnetsClient) (Subnet, error)
-1. *SubnetsDeleteFuture.Result(SubnetsClient) (autorest.Response, error)
-1. *SubnetsPrepareNetworkPoliciesFuture.Result(SubnetsClient) (autorest.Response, error)
-1. *SubnetsUnprepareNetworkPoliciesFuture.Result(SubnetsClient) (autorest.Response, error)
-1. *VirtualHubRouteTableV2sCreateOrUpdateFuture.Result(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
-1. *VirtualHubRouteTableV2sDeleteFuture.Result(VirtualHubRouteTableV2sClient) (autorest.Response, error)
-1. *VirtualHubsCreateOrUpdateFuture.Result(VirtualHubsClient) (VirtualHub, error)
-1. *VirtualHubsDeleteFuture.Result(VirtualHubsClient) (autorest.Response, error)
-1. *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
-1. *VirtualNetworkGatewayConnectionsDeleteFuture.Result(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
-1. *VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
-1. *VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
-1. *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result(VirtualNetworkGatewayConnectionsClient) (String, error)
-1. *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result(VirtualNetworkGatewayConnectionsClient) (String, error)
-1. *VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
-1. *VirtualNetworkGatewaysCreateOrUpdateFuture.Result(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
-1. *VirtualNetworkGatewaysDeleteFuture.Result(VirtualNetworkGatewaysClient) (autorest.Response, error)
-1. *VirtualNetworkGatewaysGenerateVpnProfileFuture.Result(VirtualNetworkGatewaysClient) (String, error)
-1. *VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result(VirtualNetworkGatewaysClient) (String, error)
-1. *VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
-1. *VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
-1. *VirtualNetworkGatewaysGetLearnedRoutesFuture.Result(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
-1. *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result(VirtualNetworkGatewaysClient) (String, error)
-1. *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
-1. *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
-1. *VirtualNetworkGatewaysResetFuture.Result(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
-1. *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result(VirtualNetworkGatewaysClient) (autorest.Response, error)
-1. *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
-1. *VirtualNetworkGatewaysStartPacketCaptureFuture.Result(VirtualNetworkGatewaysClient) (String, error)
-1. *VirtualNetworkGatewaysStopPacketCaptureFuture.Result(VirtualNetworkGatewaysClient) (String, error)
-1. *VirtualNetworkGatewaysUpdateTagsFuture.Result(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
-1. *VirtualNetworkPeeringsCreateOrUpdateFuture.Result(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
-1. *VirtualNetworkPeeringsDeleteFuture.Result(VirtualNetworkPeeringsClient) (autorest.Response, error)
-1. *VirtualNetworkTapsCreateOrUpdateFuture.Result(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
-1. *VirtualNetworkTapsDeleteFuture.Result(VirtualNetworkTapsClient) (autorest.Response, error)
-1. *VirtualNetworksCreateOrUpdateFuture.Result(VirtualNetworksClient) (VirtualNetwork, error)
-1. *VirtualNetworksDeleteFuture.Result(VirtualNetworksClient) (autorest.Response, error)
-1. *VirtualRouterPeeringsCreateOrUpdateFuture.Result(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
-1. *VirtualRouterPeeringsDeleteFuture.Result(VirtualRouterPeeringsClient) (autorest.Response, error)
-1. *VirtualRoutersCreateOrUpdateFuture.Result(VirtualRoutersClient) (VirtualRouter, error)
-1. *VirtualRoutersDeleteFuture.Result(VirtualRoutersClient) (autorest.Response, error)
-1. *VirtualWansCreateOrUpdateFuture.Result(VirtualWansClient) (VirtualWAN, error)
-1. *VirtualWansDeleteFuture.Result(VirtualWansClient) (autorest.Response, error)
-1. *VpnConnectionsCreateOrUpdateFuture.Result(VpnConnectionsClient) (VpnConnection, error)
-1. *VpnConnectionsDeleteFuture.Result(VpnConnectionsClient) (autorest.Response, error)
-1. *VpnGatewaysCreateOrUpdateFuture.Result(VpnGatewaysClient) (VpnGateway, error)
-1. *VpnGatewaysDeleteFuture.Result(VpnGatewaysClient) (autorest.Response, error)
-1. *VpnGatewaysResetFuture.Result(VpnGatewaysClient) (VpnGateway, error)
-1. *VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
-1. *VpnServerConfigurationsCreateOrUpdateFuture.Result(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
-1. *VpnServerConfigurationsDeleteFuture.Result(VpnServerConfigurationsClient) (autorest.Response, error)
-1. *VpnSitesConfigurationDownloadFuture.Result(VpnSitesConfigurationClient) (autorest.Response, error)
-1. *VpnSitesCreateOrUpdateFuture.Result(VpnSitesClient) (VpnSite, error)
-1. *VpnSitesDeleteFuture.Result(VpnSitesClient) (autorest.Response, error)
-1. *WatchersCheckConnectivityFuture.Result(WatchersClient) (ConnectivityInformation, error)
-1. *WatchersDeleteFuture.Result(WatchersClient) (autorest.Response, error)
-1. *WatchersGetAzureReachabilityReportFuture.Result(WatchersClient) (AzureReachabilityReport, error)
-1. *WatchersGetFlowLogStatusFuture.Result(WatchersClient) (FlowLogInformation, error)
-1. *WatchersGetNetworkConfigurationDiagnosticFuture.Result(WatchersClient) (ConfigurationDiagnosticResponse, error)
-1. *WatchersGetNextHopFuture.Result(WatchersClient) (NextHopResult, error)
-1. *WatchersGetTroubleshootingFuture.Result(WatchersClient) (TroubleshootingResult, error)
-1. *WatchersGetTroubleshootingResultFuture.Result(WatchersClient) (TroubleshootingResult, error)
-1. *WatchersGetVMSecurityRulesFuture.Result(WatchersClient) (SecurityGroupViewResult, error)
-1. *WatchersListAvailableProvidersFuture.Result(WatchersClient) (AvailableProvidersList, error)
-1. *WatchersSetFlowLogConfigurationFuture.Result(WatchersClient) (FlowLogInformation, error)
-1. *WatchersVerifyIPFlowFuture.Result(WatchersClient) (VerificationIPFlowResult, error)
-1. *WebApplicationFirewallPoliciesDeleteFuture.Result(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
-
-## Struct Changes
-
-### Removed Struct Fields
-
-1. ApplicationGatewaysBackendHealthFuture.azure.Future
-1. ApplicationGatewaysBackendHealthOnDemandFuture.azure.Future
-1. ApplicationGatewaysCreateOrUpdateFuture.azure.Future
-1. ApplicationGatewaysDeleteFuture.azure.Future
-1. ApplicationGatewaysStartFuture.azure.Future
-1. ApplicationGatewaysStopFuture.azure.Future
-1. ApplicationSecurityGroupsCreateOrUpdateFuture.azure.Future
-1. ApplicationSecurityGroupsDeleteFuture.azure.Future
-1. AzureFirewallsCreateOrUpdateFuture.azure.Future
-1. AzureFirewallsDeleteFuture.azure.Future
-1. AzureFirewallsUpdateTagsFuture.azure.Future
-1. BastionHostsCreateOrUpdateFuture.azure.Future
-1. BastionHostsDeleteFuture.azure.Future
-1. ConnectionMonitorsCreateOrUpdateFuture.azure.Future
-1. ConnectionMonitorsDeleteFuture.azure.Future
-1. ConnectionMonitorsQueryFuture.azure.Future
-1. ConnectionMonitorsStartFuture.azure.Future
-1. ConnectionMonitorsStopFuture.azure.Future
-1. DdosCustomPoliciesCreateOrUpdateFuture.azure.Future
-1. DdosCustomPoliciesDeleteFuture.azure.Future
-1. DdosProtectionPlansCreateOrUpdateFuture.azure.Future
-1. DdosProtectionPlansDeleteFuture.azure.Future
-1. DeleteBastionShareableLinkFuture.azure.Future
-1. ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCircuitAuthorizationsDeleteFuture.azure.Future
-1. ExpressRouteCircuitConnectionsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCircuitConnectionsDeleteFuture.azure.Future
-1. ExpressRouteCircuitPeeringsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCircuitPeeringsDeleteFuture.azure.Future
-1. ExpressRouteCircuitsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCircuitsDeleteFuture.azure.Future
-1. ExpressRouteCircuitsListArpTableFuture.azure.Future
-1. ExpressRouteCircuitsListRoutesTableFuture.azure.Future
-1. ExpressRouteCircuitsListRoutesTableSummaryFuture.azure.Future
-1. ExpressRouteConnectionsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteConnectionsDeleteFuture.azure.Future
-1. ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCrossConnectionPeeringsDeleteFuture.azure.Future
-1. ExpressRouteCrossConnectionsCreateOrUpdateFuture.azure.Future
-1. ExpressRouteCrossConnectionsListArpTableFuture.azure.Future
-1. ExpressRouteCrossConnectionsListRoutesTableFuture.azure.Future
-1. ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.azure.Future
-1. ExpressRouteGatewaysCreateOrUpdateFuture.azure.Future
-1. ExpressRouteGatewaysDeleteFuture.azure.Future
-1. ExpressRoutePortsCreateOrUpdateFuture.azure.Future
-1. ExpressRoutePortsDeleteFuture.azure.Future
-1. FirewallPoliciesCreateOrUpdateFuture.azure.Future
-1. FirewallPoliciesDeleteFuture.azure.Future
-1. FirewallPolicyRuleGroupsCreateOrUpdateFuture.azure.Future
-1. FirewallPolicyRuleGroupsDeleteFuture.azure.Future
-1. GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.azure.Future
-1. GetActiveSessionsAllFuture.azure.Future
-1. GetActiveSessionsFuture.azure.Future
-1. IPGroupsCreateOrUpdateFuture.azure.Future
-1. IPGroupsDeleteFuture.azure.Future
-1. InboundNatRulesCreateOrUpdateFuture.azure.Future
-1. InboundNatRulesDeleteFuture.azure.Future
-1. InterfaceTapConfigurationsCreateOrUpdateFuture.azure.Future
-1. InterfaceTapConfigurationsDeleteFuture.azure.Future
-1. InterfacesCreateOrUpdateFuture.azure.Future
-1. InterfacesDeleteFuture.azure.Future
-1. InterfacesGetEffectiveRouteTableFuture.azure.Future
-1. InterfacesListEffectiveNetworkSecurityGroupsFuture.azure.Future
-1. LoadBalancersCreateOrUpdateFuture.azure.Future
-1. LoadBalancersDeleteFuture.azure.Future
-1. LocalNetworkGatewaysCreateOrUpdateFuture.azure.Future
-1. LocalNetworkGatewaysDeleteFuture.azure.Future
-1. NatGatewaysCreateOrUpdateFuture.azure.Future
-1. NatGatewaysDeleteFuture.azure.Future
-1. P2sVpnGatewaysCreateOrUpdateFuture.azure.Future
-1. P2sVpnGatewaysDeleteFuture.azure.Future
-1. P2sVpnGatewaysGenerateVpnProfileFuture.azure.Future
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.azure.Future
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.azure.Future
-1. PacketCapturesCreateFuture.azure.Future
-1. PacketCapturesDeleteFuture.azure.Future
-1. PacketCapturesGetStatusFuture.azure.Future
-1. PacketCapturesStopFuture.azure.Future
-1. PrivateEndpointsCreateOrUpdateFuture.azure.Future
-1. PrivateEndpointsDeleteFuture.azure.Future
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.azure.Future
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.azure.Future
-1. PrivateLinkServicesCreateOrUpdateFuture.azure.Future
-1. PrivateLinkServicesDeleteFuture.azure.Future
-1. PrivateLinkServicesDeletePrivateEndpointConnectionFuture.azure.Future
-1. ProfilesDeleteFuture.azure.Future
-1. PublicIPAddressesCreateOrUpdateFuture.azure.Future
-1. PublicIPAddressesDeleteFuture.azure.Future
-1. PublicIPPrefixesCreateOrUpdateFuture.azure.Future
-1. PublicIPPrefixesDeleteFuture.azure.Future
-1. PutBastionShareableLinkAllFuture.azure.Future
-1. PutBastionShareableLinkFuture.azure.Future
-1. RouteFilterRulesCreateOrUpdateFuture.azure.Future
-1. RouteFilterRulesDeleteFuture.azure.Future
-1. RouteFiltersCreateOrUpdateFuture.azure.Future
-1. RouteFiltersDeleteFuture.azure.Future
-1. RouteTablesCreateOrUpdateFuture.azure.Future
-1. RouteTablesDeleteFuture.azure.Future
-1. RoutesCreateOrUpdateFuture.azure.Future
-1. RoutesDeleteFuture.azure.Future
-1. SecurityGroupsCreateOrUpdateFuture.azure.Future
-1. SecurityGroupsDeleteFuture.azure.Future
-1. SecurityRulesCreateOrUpdateFuture.azure.Future
-1. SecurityRulesDeleteFuture.azure.Future
-1. ServiceEndpointPoliciesCreateOrUpdateFuture.azure.Future
-1. ServiceEndpointPoliciesDeleteFuture.azure.Future
-1. ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.azure.Future
-1. ServiceEndpointPolicyDefinitionsDeleteFuture.azure.Future
-1. SubnetsCreateOrUpdateFuture.azure.Future
-1. SubnetsDeleteFuture.azure.Future
-1. SubnetsPrepareNetworkPoliciesFuture.azure.Future
-1. SubnetsUnprepareNetworkPoliciesFuture.azure.Future
-1. VirtualHubRouteTableV2sCreateOrUpdateFuture.azure.Future
-1. VirtualHubRouteTableV2sDeleteFuture.azure.Future
-1. VirtualHubsCreateOrUpdateFuture.azure.Future
-1. VirtualHubsDeleteFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsDeleteFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsResetSharedKeyFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsSetSharedKeyFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.azure.Future
-1. VirtualNetworkGatewayConnectionsUpdateTagsFuture.azure.Future
-1. VirtualNetworkGatewaysCreateOrUpdateFuture.azure.Future
-1. VirtualNetworkGatewaysDeleteFuture.azure.Future
-1. VirtualNetworkGatewaysGenerateVpnProfileFuture.azure.Future
-1. VirtualNetworkGatewaysGeneratevpnclientpackageFuture.azure.Future
-1. VirtualNetworkGatewaysGetAdvertisedRoutesFuture.azure.Future
-1. VirtualNetworkGatewaysGetBgpPeerStatusFuture.azure.Future
-1. VirtualNetworkGatewaysGetLearnedRoutesFuture.azure.Future
-1. VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.azure.Future
-1. VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.azure.Future
-1. VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.azure.Future
-1. VirtualNetworkGatewaysResetFuture.azure.Future
-1. VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.azure.Future
-1. VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.azure.Future
-1. VirtualNetworkGatewaysStartPacketCaptureFuture.azure.Future
-1. VirtualNetworkGatewaysStopPacketCaptureFuture.azure.Future
-1. VirtualNetworkGatewaysUpdateTagsFuture.azure.Future
-1. VirtualNetworkPeeringsCreateOrUpdateFuture.azure.Future
-1. VirtualNetworkPeeringsDeleteFuture.azure.Future
-1. VirtualNetworkTapsCreateOrUpdateFuture.azure.Future
-1. VirtualNetworkTapsDeleteFuture.azure.Future
-1. VirtualNetworksCreateOrUpdateFuture.azure.Future
-1. VirtualNetworksDeleteFuture.azure.Future
-1. VirtualRouterPeeringsCreateOrUpdateFuture.azure.Future
-1. VirtualRouterPeeringsDeleteFuture.azure.Future
-1. VirtualRoutersCreateOrUpdateFuture.azure.Future
-1. VirtualRoutersDeleteFuture.azure.Future
-1. VirtualWansCreateOrUpdateFuture.azure.Future
-1. VirtualWansDeleteFuture.azure.Future
-1. VpnConnectionsCreateOrUpdateFuture.azure.Future
-1. VpnConnectionsDeleteFuture.azure.Future
-1. VpnGatewaysCreateOrUpdateFuture.azure.Future
-1. VpnGatewaysDeleteFuture.azure.Future
-1. VpnGatewaysResetFuture.azure.Future
-1. VpnServerConfigurationsAssociatedWithVirtualWanListFuture.azure.Future
-1. VpnServerConfigurationsCreateOrUpdateFuture.azure.Future
-1. VpnServerConfigurationsDeleteFuture.azure.Future
-1. VpnSitesConfigurationDownloadFuture.azure.Future
-1. VpnSitesCreateOrUpdateFuture.azure.Future
-1. VpnSitesDeleteFuture.azure.Future
-1. WatchersCheckConnectivityFuture.azure.Future
-1. WatchersDeleteFuture.azure.Future
-1. WatchersGetAzureReachabilityReportFuture.azure.Future
-1. WatchersGetFlowLogStatusFuture.azure.Future
-1. WatchersGetNetworkConfigurationDiagnosticFuture.azure.Future
-1. WatchersGetNextHopFuture.azure.Future
-1. WatchersGetTroubleshootingFuture.azure.Future
-1. WatchersGetTroubleshootingResultFuture.azure.Future
-1. WatchersGetVMSecurityRulesFuture.azure.Future
-1. WatchersListAvailableProvidersFuture.azure.Future
-1. WatchersSetFlowLogConfigurationFuture.azure.Future
-1. WatchersVerifyIPFlowFuture.azure.Future
-1. WebApplicationFirewallPoliciesDeleteFuture.azure.Future
-
-## Struct Changes
-
-### New Struct Fields
-
-1. ApplicationGatewaysBackendHealthFuture.Result
-1. ApplicationGatewaysBackendHealthFuture.azure.FutureAPI
-1. ApplicationGatewaysBackendHealthOnDemandFuture.Result
-1. ApplicationGatewaysBackendHealthOnDemandFuture.azure.FutureAPI
-1. ApplicationGatewaysCreateOrUpdateFuture.Result
-1. ApplicationGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. ApplicationGatewaysDeleteFuture.Result
-1. ApplicationGatewaysDeleteFuture.azure.FutureAPI
-1. ApplicationGatewaysStartFuture.Result
-1. ApplicationGatewaysStartFuture.azure.FutureAPI
-1. ApplicationGatewaysStopFuture.Result
-1. ApplicationGatewaysStopFuture.azure.FutureAPI
-1. ApplicationSecurityGroupsCreateOrUpdateFuture.Result
-1. ApplicationSecurityGroupsCreateOrUpdateFuture.azure.FutureAPI
-1. ApplicationSecurityGroupsDeleteFuture.Result
-1. ApplicationSecurityGroupsDeleteFuture.azure.FutureAPI
-1. AzureFirewallsCreateOrUpdateFuture.Result
-1. AzureFirewallsCreateOrUpdateFuture.azure.FutureAPI
-1. AzureFirewallsDeleteFuture.Result
-1. AzureFirewallsDeleteFuture.azure.FutureAPI
-1. AzureFirewallsUpdateTagsFuture.Result
-1. AzureFirewallsUpdateTagsFuture.azure.FutureAPI
-1. BastionHostsCreateOrUpdateFuture.Result
-1. BastionHostsCreateOrUpdateFuture.azure.FutureAPI
-1. BastionHostsDeleteFuture.Result
-1. BastionHostsDeleteFuture.azure.FutureAPI
-1. ConnectionMonitorsCreateOrUpdateFuture.Result
-1. ConnectionMonitorsCreateOrUpdateFuture.azure.FutureAPI
-1. ConnectionMonitorsDeleteFuture.Result
-1. ConnectionMonitorsDeleteFuture.azure.FutureAPI
-1. ConnectionMonitorsQueryFuture.Result
-1. ConnectionMonitorsQueryFuture.azure.FutureAPI
-1. ConnectionMonitorsStartFuture.Result
-1. ConnectionMonitorsStartFuture.azure.FutureAPI
-1. ConnectionMonitorsStopFuture.Result
-1. ConnectionMonitorsStopFuture.azure.FutureAPI
-1. DdosCustomPoliciesCreateOrUpdateFuture.Result
-1. DdosCustomPoliciesCreateOrUpdateFuture.azure.FutureAPI
-1. DdosCustomPoliciesDeleteFuture.Result
-1. DdosCustomPoliciesDeleteFuture.azure.FutureAPI
-1. DdosProtectionPlansCreateOrUpdateFuture.Result
-1. DdosProtectionPlansCreateOrUpdateFuture.azure.FutureAPI
-1. DdosProtectionPlansDeleteFuture.Result
-1. DdosProtectionPlansDeleteFuture.azure.FutureAPI
-1. DeleteBastionShareableLinkFuture.Result
-1. DeleteBastionShareableLinkFuture.azure.FutureAPI
-1. ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result
-1. ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCircuitAuthorizationsDeleteFuture.Result
-1. ExpressRouteCircuitAuthorizationsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result
-1. ExpressRouteCircuitConnectionsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCircuitConnectionsDeleteFuture.Result
-1. ExpressRouteCircuitConnectionsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result
-1. ExpressRouteCircuitPeeringsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCircuitPeeringsDeleteFuture.Result
-1. ExpressRouteCircuitPeeringsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCircuitsCreateOrUpdateFuture.Result
-1. ExpressRouteCircuitsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCircuitsDeleteFuture.Result
-1. ExpressRouteCircuitsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCircuitsListArpTableFuture.Result
-1. ExpressRouteCircuitsListArpTableFuture.azure.FutureAPI
-1. ExpressRouteCircuitsListRoutesTableFuture.Result
-1. ExpressRouteCircuitsListRoutesTableFuture.azure.FutureAPI
-1. ExpressRouteCircuitsListRoutesTableSummaryFuture.Result
-1. ExpressRouteCircuitsListRoutesTableSummaryFuture.azure.FutureAPI
-1. ExpressRouteConnectionsCreateOrUpdateFuture.Result
-1. ExpressRouteConnectionsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteConnectionsDeleteFuture.Result
-1. ExpressRouteConnectionsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result
-1. ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionPeeringsDeleteFuture.Result
-1. ExpressRouteCrossConnectionPeeringsDeleteFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result
-1. ExpressRouteCrossConnectionsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionsListArpTableFuture.Result
-1. ExpressRouteCrossConnectionsListArpTableFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionsListRoutesTableFuture.Result
-1. ExpressRouteCrossConnectionsListRoutesTableFuture.azure.FutureAPI
-1. ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result
-1. ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.azure.FutureAPI
-1. ExpressRouteGatewaysCreateOrUpdateFuture.Result
-1. ExpressRouteGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRouteGatewaysDeleteFuture.Result
-1. ExpressRouteGatewaysDeleteFuture.azure.FutureAPI
-1. ExpressRoutePortsCreateOrUpdateFuture.Result
-1. ExpressRoutePortsCreateOrUpdateFuture.azure.FutureAPI
-1. ExpressRoutePortsDeleteFuture.Result
-1. ExpressRoutePortsDeleteFuture.azure.FutureAPI
-1. FirewallPoliciesCreateOrUpdateFuture.Result
-1. FirewallPoliciesCreateOrUpdateFuture.azure.FutureAPI
-1. FirewallPoliciesDeleteFuture.Result
-1. FirewallPoliciesDeleteFuture.azure.FutureAPI
-1. FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result
-1. FirewallPolicyRuleGroupsCreateOrUpdateFuture.azure.FutureAPI
-1. FirewallPolicyRuleGroupsDeleteFuture.Result
-1. FirewallPolicyRuleGroupsDeleteFuture.azure.FutureAPI
-1. GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result
-1. GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.azure.FutureAPI
-1. GetActiveSessionsAllFuture.Result
-1. GetActiveSessionsAllFuture.azure.FutureAPI
-1. GetActiveSessionsFuture.Result
-1. GetActiveSessionsFuture.azure.FutureAPI
-1. IPGroupsCreateOrUpdateFuture.Result
-1. IPGroupsCreateOrUpdateFuture.azure.FutureAPI
-1. IPGroupsDeleteFuture.Result
-1. IPGroupsDeleteFuture.azure.FutureAPI
-1. InboundNatRulesCreateOrUpdateFuture.Result
-1. InboundNatRulesCreateOrUpdateFuture.azure.FutureAPI
-1. InboundNatRulesDeleteFuture.Result
-1. InboundNatRulesDeleteFuture.azure.FutureAPI
-1. InterfaceTapConfigurationsCreateOrUpdateFuture.Result
-1. InterfaceTapConfigurationsCreateOrUpdateFuture.azure.FutureAPI
-1. InterfaceTapConfigurationsDeleteFuture.Result
-1. InterfaceTapConfigurationsDeleteFuture.azure.FutureAPI
-1. InterfacesCreateOrUpdateFuture.Result
-1. InterfacesCreateOrUpdateFuture.azure.FutureAPI
-1. InterfacesDeleteFuture.Result
-1. InterfacesDeleteFuture.azure.FutureAPI
-1. InterfacesGetEffectiveRouteTableFuture.Result
-1. InterfacesGetEffectiveRouteTableFuture.azure.FutureAPI
-1. InterfacesListEffectiveNetworkSecurityGroupsFuture.Result
-1. InterfacesListEffectiveNetworkSecurityGroupsFuture.azure.FutureAPI
-1. LoadBalancersCreateOrUpdateFuture.Result
-1. LoadBalancersCreateOrUpdateFuture.azure.FutureAPI
-1. LoadBalancersDeleteFuture.Result
-1. LoadBalancersDeleteFuture.azure.FutureAPI
-1. LocalNetworkGatewaysCreateOrUpdateFuture.Result
-1. LocalNetworkGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. LocalNetworkGatewaysDeleteFuture.Result
-1. LocalNetworkGatewaysDeleteFuture.azure.FutureAPI
-1. NatGatewaysCreateOrUpdateFuture.Result
-1. NatGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. NatGatewaysDeleteFuture.Result
-1. NatGatewaysDeleteFuture.azure.FutureAPI
-1. P2sVpnGatewaysCreateOrUpdateFuture.Result
-1. P2sVpnGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. P2sVpnGatewaysDeleteFuture.Result
-1. P2sVpnGatewaysDeleteFuture.azure.FutureAPI
-1. P2sVpnGatewaysGenerateVpnProfileFuture.Result
-1. P2sVpnGatewaysGenerateVpnProfileFuture.azure.FutureAPI
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.azure.FutureAPI
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result
-1. P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.azure.FutureAPI
-1. PacketCapturesCreateFuture.Result
-1. PacketCapturesCreateFuture.azure.FutureAPI
-1. PacketCapturesDeleteFuture.Result
-1. PacketCapturesDeleteFuture.azure.FutureAPI
-1. PacketCapturesGetStatusFuture.Result
-1. PacketCapturesGetStatusFuture.azure.FutureAPI
-1. PacketCapturesStopFuture.Result
-1. PacketCapturesStopFuture.azure.FutureAPI
-1. PrivateEndpointsCreateOrUpdateFuture.Result
-1. PrivateEndpointsCreateOrUpdateFuture.azure.FutureAPI
-1. PrivateEndpointsDeleteFuture.Result
-1. PrivateEndpointsDeleteFuture.azure.FutureAPI
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.azure.FutureAPI
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result
-1. PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.azure.FutureAPI
-1. PrivateLinkServicesCreateOrUpdateFuture.Result
-1. PrivateLinkServicesCreateOrUpdateFuture.azure.FutureAPI
-1. PrivateLinkServicesDeleteFuture.Result
-1. PrivateLinkServicesDeleteFuture.azure.FutureAPI
-1. PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result
-1. PrivateLinkServicesDeletePrivateEndpointConnectionFuture.azure.FutureAPI
-1. ProfilesDeleteFuture.Result
-1. ProfilesDeleteFuture.azure.FutureAPI
-1. PublicIPAddressesCreateOrUpdateFuture.Result
-1. PublicIPAddressesCreateOrUpdateFuture.azure.FutureAPI
-1. PublicIPAddressesDeleteFuture.Result
-1. PublicIPAddressesDeleteFuture.azure.FutureAPI
-1. PublicIPPrefixesCreateOrUpdateFuture.Result
-1. PublicIPPrefixesCreateOrUpdateFuture.azure.FutureAPI
-1. PublicIPPrefixesDeleteFuture.Result
-1. PublicIPPrefixesDeleteFuture.azure.FutureAPI
-1. PutBastionShareableLinkAllFuture.Result
-1. PutBastionShareableLinkAllFuture.azure.FutureAPI
-1. PutBastionShareableLinkFuture.Result
-1. PutBastionShareableLinkFuture.azure.FutureAPI
-1. RouteFilterRulesCreateOrUpdateFuture.Result
-1. RouteFilterRulesCreateOrUpdateFuture.azure.FutureAPI
-1. RouteFilterRulesDeleteFuture.Result
-1. RouteFilterRulesDeleteFuture.azure.FutureAPI
-1. RouteFiltersCreateOrUpdateFuture.Result
-1. RouteFiltersCreateOrUpdateFuture.azure.FutureAPI
-1. RouteFiltersDeleteFuture.Result
-1. RouteFiltersDeleteFuture.azure.FutureAPI
-1. RouteTablesCreateOrUpdateFuture.Result
-1. RouteTablesCreateOrUpdateFuture.azure.FutureAPI
-1. RouteTablesDeleteFuture.Result
-1. RouteTablesDeleteFuture.azure.FutureAPI
-1. RoutesCreateOrUpdateFuture.Result
-1. RoutesCreateOrUpdateFuture.azure.FutureAPI
-1. RoutesDeleteFuture.Result
-1. RoutesDeleteFuture.azure.FutureAPI
-1. SecurityGroupsCreateOrUpdateFuture.Result
-1. SecurityGroupsCreateOrUpdateFuture.azure.FutureAPI
-1. SecurityGroupsDeleteFuture.Result
-1. SecurityGroupsDeleteFuture.azure.FutureAPI
-1. SecurityRulesCreateOrUpdateFuture.Result
-1. SecurityRulesCreateOrUpdateFuture.azure.FutureAPI
-1. SecurityRulesDeleteFuture.Result
-1. SecurityRulesDeleteFuture.azure.FutureAPI
-1. ServiceEndpointPoliciesCreateOrUpdateFuture.Result
-1. ServiceEndpointPoliciesCreateOrUpdateFuture.azure.FutureAPI
-1. ServiceEndpointPoliciesDeleteFuture.Result
-1. ServiceEndpointPoliciesDeleteFuture.azure.FutureAPI
-1. ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result
-1. ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.azure.FutureAPI
-1. ServiceEndpointPolicyDefinitionsDeleteFuture.Result
-1. ServiceEndpointPolicyDefinitionsDeleteFuture.azure.FutureAPI
-1. SubnetsCreateOrUpdateFuture.Result
-1. SubnetsCreateOrUpdateFuture.azure.FutureAPI
-1. SubnetsDeleteFuture.Result
-1. SubnetsDeleteFuture.azure.FutureAPI
-1. SubnetsPrepareNetworkPoliciesFuture.Result
-1. SubnetsPrepareNetworkPoliciesFuture.azure.FutureAPI
-1. SubnetsUnprepareNetworkPoliciesFuture.Result
-1. SubnetsUnprepareNetworkPoliciesFuture.azure.FutureAPI
-1. VirtualHubRouteTableV2sCreateOrUpdateFuture.Result
-1. VirtualHubRouteTableV2sCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualHubRouteTableV2sDeleteFuture.Result
-1. VirtualHubRouteTableV2sDeleteFuture.azure.FutureAPI
-1. VirtualHubsCreateOrUpdateFuture.Result
-1. VirtualHubsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualHubsDeleteFuture.Result
-1. VirtualHubsDeleteFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result
-1. VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsDeleteFuture.Result
-1. VirtualNetworkGatewayConnectionsDeleteFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result
-1. VirtualNetworkGatewayConnectionsResetSharedKeyFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result
-1. VirtualNetworkGatewayConnectionsSetSharedKeyFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result
-1. VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result
-1. VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.azure.FutureAPI
-1. VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result
-1. VirtualNetworkGatewayConnectionsUpdateTagsFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysCreateOrUpdateFuture.Result
-1. VirtualNetworkGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysDeleteFuture.Result
-1. VirtualNetworkGatewaysDeleteFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGenerateVpnProfileFuture.Result
-1. VirtualNetworkGatewaysGenerateVpnProfileFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result
-1. VirtualNetworkGatewaysGeneratevpnclientpackageFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result
-1. VirtualNetworkGatewaysGetAdvertisedRoutesFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result
-1. VirtualNetworkGatewaysGetBgpPeerStatusFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetLearnedRoutesFuture.Result
-1. VirtualNetworkGatewaysGetLearnedRoutesFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result
-1. VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result
-1. VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result
-1. VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysResetFuture.Result
-1. VirtualNetworkGatewaysResetFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result
-1. VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result
-1. VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysStartPacketCaptureFuture.Result
-1. VirtualNetworkGatewaysStartPacketCaptureFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysStopPacketCaptureFuture.Result
-1. VirtualNetworkGatewaysStopPacketCaptureFuture.azure.FutureAPI
-1. VirtualNetworkGatewaysUpdateTagsFuture.Result
-1. VirtualNetworkGatewaysUpdateTagsFuture.azure.FutureAPI
-1. VirtualNetworkPeeringsCreateOrUpdateFuture.Result
-1. VirtualNetworkPeeringsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualNetworkPeeringsDeleteFuture.Result
-1. VirtualNetworkPeeringsDeleteFuture.azure.FutureAPI
-1. VirtualNetworkTapsCreateOrUpdateFuture.Result
-1. VirtualNetworkTapsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualNetworkTapsDeleteFuture.Result
-1. VirtualNetworkTapsDeleteFuture.azure.FutureAPI
-1. VirtualNetworksCreateOrUpdateFuture.Result
-1. VirtualNetworksCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualNetworksDeleteFuture.Result
-1. VirtualNetworksDeleteFuture.azure.FutureAPI
-1. VirtualRouterPeeringsCreateOrUpdateFuture.Result
-1. VirtualRouterPeeringsCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualRouterPeeringsDeleteFuture.Result
-1. VirtualRouterPeeringsDeleteFuture.azure.FutureAPI
-1. VirtualRoutersCreateOrUpdateFuture.Result
-1. VirtualRoutersCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualRoutersDeleteFuture.Result
-1. VirtualRoutersDeleteFuture.azure.FutureAPI
-1. VirtualWansCreateOrUpdateFuture.Result
-1. VirtualWansCreateOrUpdateFuture.azure.FutureAPI
-1. VirtualWansDeleteFuture.Result
-1. VirtualWansDeleteFuture.azure.FutureAPI
-1. VpnConnectionsCreateOrUpdateFuture.Result
-1. VpnConnectionsCreateOrUpdateFuture.azure.FutureAPI
-1. VpnConnectionsDeleteFuture.Result
-1. VpnConnectionsDeleteFuture.azure.FutureAPI
-1. VpnGatewaysCreateOrUpdateFuture.Result
-1. VpnGatewaysCreateOrUpdateFuture.azure.FutureAPI
-1. VpnGatewaysDeleteFuture.Result
-1. VpnGatewaysDeleteFuture.azure.FutureAPI
-1. VpnGatewaysResetFuture.Result
-1. VpnGatewaysResetFuture.azure.FutureAPI
-1. VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result
-1. VpnServerConfigurationsAssociatedWithVirtualWanListFuture.azure.FutureAPI
-1. VpnServerConfigurationsCreateOrUpdateFuture.Result
-1. VpnServerConfigurationsCreateOrUpdateFuture.azure.FutureAPI
-1. VpnServerConfigurationsDeleteFuture.Result
-1. VpnServerConfigurationsDeleteFuture.azure.FutureAPI
-1. VpnSitesConfigurationDownloadFuture.Result
-1. VpnSitesConfigurationDownloadFuture.azure.FutureAPI
-1. VpnSitesCreateOrUpdateFuture.Result
-1. VpnSitesCreateOrUpdateFuture.azure.FutureAPI
-1. VpnSitesDeleteFuture.Result
-1. VpnSitesDeleteFuture.azure.FutureAPI
-1. WatchersCheckConnectivityFuture.Result
-1. WatchersCheckConnectivityFuture.azure.FutureAPI
-1. WatchersDeleteFuture.Result
-1. WatchersDeleteFuture.azure.FutureAPI
-1. WatchersGetAzureReachabilityReportFuture.Result
-1. WatchersGetAzureReachabilityReportFuture.azure.FutureAPI
-1. WatchersGetFlowLogStatusFuture.Result
-1. WatchersGetFlowLogStatusFuture.azure.FutureAPI
-1. WatchersGetNetworkConfigurationDiagnosticFuture.Result
-1. WatchersGetNetworkConfigurationDiagnosticFuture.azure.FutureAPI
-1. WatchersGetNextHopFuture.Result
-1. WatchersGetNextHopFuture.azure.FutureAPI
-1. WatchersGetTroubleshootingFuture.Result
-1. WatchersGetTroubleshootingFuture.azure.FutureAPI
-1. WatchersGetTroubleshootingResultFuture.Result
-1. WatchersGetTroubleshootingResultFuture.azure.FutureAPI
-1. WatchersGetVMSecurityRulesFuture.Result
-1. WatchersGetVMSecurityRulesFuture.azure.FutureAPI
-1. WatchersListAvailableProvidersFuture.Result
-1. WatchersListAvailableProvidersFuture.azure.FutureAPI
-1. WatchersSetFlowLogConfigurationFuture.Result
-1. WatchersSetFlowLogConfigurationFuture.azure.FutureAPI
-1. WatchersVerifyIPFlowFuture.Result
-1. WatchersVerifyIPFlowFuture.azure.FutureAPI
-1. WebApplicationFirewallPoliciesDeleteFuture.Result
-1. WebApplicationFirewallPoliciesDeleteFuture.azure.FutureAPI
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/_meta.json
new file mode 100644
index 0000000000000..307296d46f28f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/_meta.json
@@ -0,0 +1,11 @@
+{
+ "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
+ "readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
+ "tag": "package-2019-09",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
+ "additional_properties": {
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ }
+}
\ No newline at end of file
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationgateways.go
index ce1a6f3600e79..625bfde177593 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationgateways.go
@@ -1,18 +1,7 @@
package network
-// 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 ApplicationGatewaysClient) BackendHealth(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealth")
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 ApplicationGatewaysClient) BackendHealth(ctx context.Context, resou
result, err = client.BackendHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
- agbh, err = client.BackendHealthResponder(agbh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -156,8 +127,8 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealthOnDemand")
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)
}()
@@ -170,7 +141,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Contex
result, err = client.BackendHealthOnDemandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", result.Response(), "Failure sending request")
return
}
@@ -207,6 +178,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -214,26 +186,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
- agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -259,8 +212,8 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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)
}()
@@ -301,7 +254,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -336,6 +289,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -343,26 +297,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
- ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -387,8 +322,8 @@ func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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)
}()
@@ -401,7 +336,7 @@ func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -433,6 +368,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -440,20 +376,7 @@ func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1324,8 +1247,8 @@ func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Start")
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)
}()
@@ -1338,7 +1261,7 @@ func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroup
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1370,6 +1293,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1377,20 +1301,7 @@ func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future A
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1414,8 +1325,8 @@ func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Stop")
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)
}()
@@ -1428,7 +1339,7 @@ func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupN
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -1460,6 +1371,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1467,20 +1379,7 @@ func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future Ap
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go
index b4d627a2ae489..5c38aeed1230d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go
@@ -1,18 +1,7 @@
package network
-// 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 ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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 ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
- asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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)
}()
@@ -166,7 +137,7 @@ func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availabledelegations.go
index 004e744cd75e8..0c75dd0cbf594 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availabledelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availabledelegations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableendpointservices.go
index 8ed8c1911eb63..81d804fffbaf0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableendpointservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableendpointservices.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go
index 671787e12c036..bea85caa0f3ae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go
index d9f7ee14d7ad6..a2c7707394615 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableservicealiases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableservicealiases.go
index 5c5b126760562..49910d5782dce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableservicealiases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/availableservicealiases.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go
index 71fe6914af545..1db1034f351e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewalls.go
index 6909aa561df97..2af03bcf217ad 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewalls.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/azurefirewalls.go
@@ -1,18 +1,7 @@
package network
-// 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 AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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 AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client AzureFirewallsClient) (af AzureFirewall, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
- af, err = client.CreateOrUpdateResponder(af.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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)
}()
@@ -165,7 +136,7 @@ func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future Azure
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client AzureFirewallsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -547,8 +506,8 @@ func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.UpdateTags")
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)
}()
@@ -561,7 +520,7 @@ func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -595,6 +554,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (future AzureFirewallsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -602,26 +562,7 @@ func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (future A
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client AzureFirewallsClient) (af AzureFirewall, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
- af, err = client.UpdateTagsResponder(af.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bastionhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bastionhosts.go
index 0d9744351e03a..c822230603f1b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bastionhosts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bastionhosts.go
@@ -1,18 +1,7 @@
package network
-// 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 BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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 BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BastionHostsClient) (bh BastionHost, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
- bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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)
}()
@@ -165,7 +136,7 @@ func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client BastionHostsClient) DeleteSender(req *http.Request) (future Bastion
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BastionHostsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go
index f5ab7c63a1f25..50869c6e998d9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/client.go
index 377ccf633b4f0..1cbb0473ef0f3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/client.go
@@ -1,21 +1,12 @@
+// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.
+//
// Package network implements the Azure ARM Network service API version .
//
// Network Client
package network
-// 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.
@@ -142,8 +133,8 @@ func (client BaseClient) DeleteBastionShareableLink(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteBastionShareableLink")
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 BaseClient) DeleteBastionShareableLink(ctx context.Context, resourc
result, err = client.DeleteBastionShareableLinkSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", result.Response(), "Failure sending request")
return
}
@@ -190,6 +181,7 @@ func (client BaseClient) DeleteBastionShareableLinkPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client BaseClient) DeleteBastionShareableLinkSender(req *http.Request) (future DeleteBastionShareableLinkFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -197,20 +189,7 @@ func (client BaseClient) DeleteBastionShareableLinkSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BaseClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -357,8 +336,8 @@ func (client BaseClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx
ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Generatevirtualwanvpnserverconfigurationvpnprofile")
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)
}()
@@ -371,7 +350,7 @@ func (client BaseClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx
result, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", result.Response(), "Failure sending request")
return
}
@@ -405,6 +384,7 @@ func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofilePrepa
// http.Response Body if it receives an error.
func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req *http.Request) (future GeneratevirtualwanvpnserverconfigurationvpnprofileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -412,26 +392,7 @@ func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileSende
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BaseClient) (vpr VpnProfileResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
- vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -456,8 +417,8 @@ func (client BaseClient) GetActiveSessions(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetActiveSessions")
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)
}()
@@ -470,7 +431,7 @@ func (client BaseClient) GetActiveSessions(ctx context.Context, resourceGroupNam
result, err = client.GetActiveSessionsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", result.Response(), "Failure sending request")
return
}
@@ -502,6 +463,7 @@ func (client BaseClient) GetActiveSessionsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client BaseClient) GetActiveSessionsSender(req *http.Request) (future GetActiveSessionsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -509,26 +471,7 @@ func (client BaseClient) GetActiveSessionsSender(req *http.Request) (future GetA
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
- baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -716,8 +659,8 @@ func (client BaseClient) PutBastionShareableLink(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PutBastionShareableLink")
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)
}()
@@ -730,7 +673,7 @@ func (client BaseClient) PutBastionShareableLink(ctx context.Context, resourceGr
result, err = client.PutBastionShareableLinkSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", result.Response(), "Failure sending request")
return
}
@@ -764,6 +707,7 @@ func (client BaseClient) PutBastionShareableLinkPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client BaseClient) PutBastionShareableLinkSender(req *http.Request) (future PutBastionShareableLinkFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -771,26 +715,7 @@ func (client BaseClient) PutBastionShareableLinkSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
- bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/connectionmonitors.go
index 185c25f63f8a0..d0a870c891ed0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/connectionmonitors.go
@@ -1,18 +1,7 @@
package network
-// 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 ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.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 ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -113,6 +102,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -120,26 +110,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
- cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -165,8 +136,8 @@ func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.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)
}()
@@ -179,7 +150,7 @@ func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -212,6 +183,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -219,20 +191,7 @@ func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future C
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -411,8 +370,8 @@ func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Query")
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)
}()
@@ -425,7 +384,7 @@ func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupN
result, err = client.QuerySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request")
return
}
@@ -458,6 +417,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -465,26 +425,7 @@ func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future Co
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
- cmqr, err = client.QueryResponder(cmqr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -510,8 +451,8 @@ func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Start")
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)
}()
@@ -524,7 +465,7 @@ func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupN
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -557,6 +498,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -564,20 +506,7 @@ func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future Co
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -602,8 +531,8 @@ func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Stop")
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)
}()
@@ -616,7 +545,7 @@ func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupNa
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -649,6 +578,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -656,20 +586,7 @@ func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future Con
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go
index cc5f456350e1f..116d64fbe6ad9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go
@@ -1,18 +1,7 @@
package network
-// 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 DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.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 DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
- dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.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)
}()
@@ -166,7 +137,7 @@ func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future D
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go
index ec95dbd7d39e1..99856d21116bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go
@@ -1,18 +1,7 @@
package network
-// 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 DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +93,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -111,26 +101,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
- dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -155,8 +126,8 @@ func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 +140,7 @@ func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -201,6 +172,7 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -208,20 +180,7 @@ func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go
index b4dc4610064a5..44df22c3db815 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/enums.go
index b7c4a379907d0..794349aa4d24e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/enums.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/enums.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go
index adcf33074c572..e80fb7dd4e9d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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 ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +95,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -113,26 +103,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
- erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -158,8 +129,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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)
}()
@@ -172,7 +143,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -205,6 +176,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -212,20 +184,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go
index ec13283b2519f..d27b9f6e10b6b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Co
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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 ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Co
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -107,6 +96,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -114,26 +104,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *htt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
- ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -160,8 +131,8 @@ func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, r
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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)
}()
@@ -174,7 +145,7 @@ func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -208,6 +179,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -215,20 +187,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Reques
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go
index 306dcc3bdfa99..cc77077564905 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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 ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -116,6 +105,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -123,26 +113,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.R
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
- ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -168,8 +139,8 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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)
}()
@@ -182,7 +153,7 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, reso
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuits.go
index 415052908425a..aba5d0d6b8427 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecircuits.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, res
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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 ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
- erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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)
}()
@@ -166,7 +137,7 @@ func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -703,8 +662,8 @@ func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable")
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)
}()
@@ -717,7 +676,7 @@ func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resou
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -751,6 +710,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -758,26 +718,7 @@ func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
- ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -805,8 +746,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, re
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable")
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)
}()
@@ -819,7 +760,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, re
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -853,6 +794,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -860,26 +802,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -907,8 +830,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Cont
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTableSummary")
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)
}()
@@ -921,7 +844,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -955,6 +878,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -962,26 +886,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteconnections.go
index 48b289abdb152..8190054355a05 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteconnections.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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)
}()
@@ -76,7 +65,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -111,6 +100,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -118,26 +108,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Reque
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
- erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -163,8 +134,8 @@ func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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)
}()
@@ -177,7 +148,7 @@ func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -210,6 +181,7 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -217,20 +189,7 @@ func (client ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go
index c35d82f71dc1e..9c76167b5cf1a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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 ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -117,6 +106,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -124,26 +114,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
- erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -169,8 +140,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Conte
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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)
}()
@@ -183,7 +154,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Conte
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -216,6 +187,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -223,20 +195,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.R
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go
index 3b96eb613f3cc..86ad5e34cff3b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Cont
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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 ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Cont
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
- ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -344,8 +315,8 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable")
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)
}()
@@ -358,7 +329,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Contex
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -392,6 +363,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -399,26 +371,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
- ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -562,8 +515,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Con
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTable")
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)
}()
@@ -576,7 +529,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Con
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -610,6 +563,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -617,26 +571,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -664,8 +599,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx cont
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTableSummary")
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)
}()
@@ -678,7 +613,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -712,6 +647,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -719,26 +655,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
- erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutegateways.go
index f8d2a612bbb95..7ab12deb4dc3d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutegateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutegateways.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, res
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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)
}()
@@ -74,7 +63,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -109,6 +98,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -116,26 +106,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
- erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -161,8 +132,8 @@ func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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 +146,7 @@ func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -207,6 +178,7 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -214,20 +186,7 @@ func (client ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutelinks.go
index 46da08c362faf..908bda8b49cb2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutelinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressroutelinks.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteports.go
index 43a8b8880a0c1..930b132664c11 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteports.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteports.go
@@ -1,18 +1,7 @@
package network
-// 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 ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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 ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
- erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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)
}()
@@ -166,7 +137,7 @@ func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future Ex
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go
index 1f5ed619e9ea2..d9f0fea60c72a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go
index 954f1fc09a235..31bde7f770a8c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicies.go
index 1106560304891..0ee8049755020 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicies.go
@@ -1,18 +1,7 @@
package network
-// 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 FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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 FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
- fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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)
}()
@@ -166,7 +137,7 @@ func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future Fir
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client FirewallPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go
index 7471f5ea015e6..ea64165413df2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go
@@ -1,18 +1,7 @@
package network
-// 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 FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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 FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -116,6 +105,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -123,26 +113,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent {
- fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -168,8 +139,8 @@ func (client FirewallPolicyRuleGroupsClient) Delete(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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)
}()
@@ -182,7 +153,7 @@ func (client FirewallPolicyRuleGroupsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go
index cc0d7e52922de..e75ea4e1809ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/inboundnatrules.go
index cc354fc4b49aa..392999d784458 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/inboundnatrules.go
@@ -1,18 +1,7 @@
package network
-// 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 InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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 InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -123,6 +112,7 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -130,26 +120,7 @@ func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InboundNatRulesClient) (inr InboundNatRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
- inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -175,8 +146,8 @@ func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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)
}()
@@ -189,7 +160,7 @@ func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -222,6 +193,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -229,20 +201,7 @@ func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future Inbo
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InboundNatRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go
index bb3363e222608..f888ca2a961e4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go
index bbc3cf755967a..cb755074bc63b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacesgroup.go
index 755f7d14c290d..672224cde05c3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacesgroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacesgroup.go
@@ -1,18 +1,7 @@
package network
-// 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 InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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 InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future I
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfacesClient) (i Interface, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
- i, err = client.CreateOrUpdateResponder(i.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName str
ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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)
}()
@@ -165,7 +136,7 @@ func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client InterfacesClient) DeleteSender(req *http.Request) (future Interface
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfacesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -321,8 +280,8 @@ func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetEffectiveRouteTable")
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)
}()
@@ -335,7 +294,7 @@ func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resou
result, err = client.GetEffectiveRouteTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request")
return
}
@@ -367,6 +326,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -374,26 +334,7 @@ func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
- erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -818,8 +759,8 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Co
ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListEffectiveNetworkSecurityGroups")
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)
}()
@@ -832,7 +773,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Co
result, err = client.ListEffectiveNetworkSecurityGroupsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request")
return
}
@@ -864,6 +805,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -871,26 +813,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *htt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go
index 86150b8c778ba..30ab08878f980 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go
@@ -1,18 +1,7 @@
package network
-// 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 InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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)
}()
@@ -103,7 +92,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -140,6 +129,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,26 +137,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
- itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -192,8 +163,8 @@ func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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)
}()
@@ -206,7 +177,7 @@ func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -239,6 +210,7 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -246,20 +218,7 @@ func (client InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ipgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ipgroups.go
index b865bd96d77c9..70862ce0f450b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ipgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/ipgroups.go
@@ -1,18 +1,7 @@
package network
-// 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 IPGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.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 IPGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client IPGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client IPGroupsClient) CreateOrUpdateSender(req *http.Request) (future IPGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client IPGroupsClient) CreateOrUpdateSender(req *http.Request) (future IPG
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client IPGroupsClient) (ig IPGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent {
- ig, err = client.CreateOrUpdateResponder(ig.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client IPGroupsClient) Delete(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.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)
}()
@@ -165,7 +136,7 @@ func (client IPGroupsClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client IPGroupsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client IPGroupsClient) DeleteSender(req *http.Request) (future IPGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client IPGroupsClient) DeleteSender(req *http.Request) (future IPGroupsDel
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client IPGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go
index fc72bbd3f9fea..a0ab2f38091e3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go
index 31a187c9ed989..6b24bbae046f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go
index 0f5595a65d0d5..3ee9155a2cdd3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go
index c81242bf19332..63e9b6c236bd9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go
index 42480b897c158..be883e83005ef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go
index d5acb826b5b56..cc65a4e07b97a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go
index 05b69e0e21f89..8571cd7f9a70a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go
@@ -1,18 +1,7 @@
package network
-// 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 LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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 LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LoadBalancersClient) (lb LoadBalancer, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
- lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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)
}()
@@ -165,7 +136,7 @@ func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBa
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LoadBalancersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go
index bf762ffa46fb8..0afe3f463cfb6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go
@@ -1,18 +1,7 @@
package network
-// 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 LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, res
ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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)
}()
@@ -75,7 +64,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -110,6 +99,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -117,26 +107,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
- lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -161,8 +132,8 @@ func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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 +152,7 @@ func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -213,6 +184,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -220,20 +192,7 @@ func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go
index 66c7c8171b815..131738782c66c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go
@@ -1,18 +1,7 @@
package network
-// 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.
@@ -2581,6 +2570,40 @@ type ApplicationGatewaysBackendHealthFuture struct {
Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
+func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ agbh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type ApplicationGatewaysBackendHealthOnDemandFuture struct {
@@ -2590,6 +2613,40 @@ type ApplicationGatewaysBackendHealthOnDemandFuture struct {
Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
+func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ agbhod.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
+ agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ApplicationGatewaysCreateOrUpdateFuture struct {
@@ -2599,6 +2656,40 @@ type ApplicationGatewaysCreateOrUpdateFuture struct {
Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
+func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ag.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ApplicationGatewaysDeleteFuture struct {
@@ -2608,6 +2699,34 @@ type ApplicationGatewaysDeleteFuture struct {
Result func(ApplicationGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
+func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ApplicationGatewaySku SKU of an application gateway.
type ApplicationGatewaySku struct {
// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
@@ -2837,6 +2956,34 @@ type ApplicationGatewaysStartFuture struct {
Result func(ApplicationGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysStartFuture.Result.
+func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ApplicationGatewaysStopFuture struct {
@@ -2846,6 +2993,34 @@ type ApplicationGatewaysStopFuture struct {
Result func(ApplicationGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationGatewaysStopFuture.Result.
+func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
type ApplicationGatewayTrustedRootCertificate struct {
// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
@@ -3473,6 +3648,12 @@ type ApplicationSecurityGroupPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
+// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
+func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
@@ -3482,6 +3663,40 @@ type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
+func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ asg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ApplicationSecurityGroupsDeleteFuture struct {
@@ -3491,6 +3706,34 @@ type ApplicationSecurityGroupsDeleteFuture struct {
Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
+func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
// that belongs to an ExpressRouteCircuit.
type AuthorizationListResult struct {
@@ -5008,6 +5251,12 @@ type AzureFirewallFqdnTagPropertiesFormat struct {
FqdnTagName *string `json:"fqdnTagName,omitempty"`
}
+// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
+func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
type AzureFirewallIPConfiguration struct {
// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
@@ -5611,6 +5860,40 @@ type AzureFirewallsCreateOrUpdateFuture struct {
Result func(AzureFirewallsClient) (AzureFirewall, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
+func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ af.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
+ af, err = client.CreateOrUpdateResponder(af.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type AzureFirewallsDeleteFuture struct {
@@ -5620,6 +5903,34 @@ type AzureFirewallsDeleteFuture struct {
Result func(AzureFirewallsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AzureFirewallsDeleteFuture.Result.
+func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// AzureFirewallSku SKU of an Azure Firewall.
type AzureFirewallSku struct {
// Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub'
@@ -5637,6 +5948,40 @@ type AzureFirewallsUpdateTagsFuture struct {
Result func(AzureFirewallsClient) (AzureFirewall, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AzureFirewallsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AzureFirewallsUpdateTagsFuture.Result.
+func (future *AzureFirewallsUpdateTagsFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ af.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
+ af, err = client.UpdateTagsResponder(af.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// AzureReachabilityReport azure reachability report details.
type AzureReachabilityReport struct {
autorest.Response `json:"-"`
@@ -5794,6 +6139,12 @@ type BackendAddressPoolPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
+// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
+func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// BastionActiveSession the session detail for a target.
type BastionActiveSession struct {
// SessionID - READ-ONLY; A unique id for the session.
@@ -5820,6 +6171,12 @@ type BastionActiveSession struct {
SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
}
+// MarshalJSON is the custom marshaler for BastionActiveSession.
+func (bas BastionActiveSession) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// BastionActiveSessionListResult response for GetActiveSessions.
type BastionActiveSessionListResult struct {
autorest.Response `json:"-"`
@@ -6401,6 +6758,40 @@ type BastionHostsCreateOrUpdateFuture struct {
Result func(BastionHostsClient) (BastionHost, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
+func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ bh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
+ bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BastionHostsDeleteFuture struct {
@@ -6410,6 +6801,34 @@ type BastionHostsDeleteFuture struct {
Result func(BastionHostsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for BastionHostsDeleteFuture.Result.
+func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// BastionSessionDeleteResult response for DisconnectActiveSessions.
type BastionSessionDeleteResult struct {
autorest.Response `json:"-"`
@@ -6579,6 +6998,12 @@ type BastionSessionState struct {
State *string `json:"state,omitempty"`
}
+// MarshalJSON is the custom marshaler for BastionSessionState.
+func (bss BastionSessionState) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// BastionShareableLink bastion Shareable Link.
type BastionShareableLink struct {
// VM - Reference of the virtual machine resource.
@@ -6802,6 +7227,12 @@ type BgpPeerStatus struct {
MessagesReceived *int64 `json:"messagesReceived,omitempty"`
}
+// MarshalJSON is the custom marshaler for BgpPeerStatus.
+func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// BgpPeerStatusListResult response for list BGP peer status API service call.
type BgpPeerStatusListResult struct {
autorest.Response `json:"-"`
@@ -7146,6 +7577,12 @@ type ConfigurationDiagnosticResponse struct {
Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
}
+// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
+func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
// query.
type ConfigurationDiagnosticResult struct {
@@ -7402,6 +7839,40 @@ type ConnectionMonitorsCreateOrUpdateFuture struct {
Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
+func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cmr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ConnectionMonitorsDeleteFuture struct {
@@ -7411,6 +7882,34 @@ type ConnectionMonitorsDeleteFuture struct {
Result func(ConnectionMonitorsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
+func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ConnectionMonitorSource describes the source of connection monitor.
type ConnectionMonitorSource struct {
// ResourceID - The ID of the resource used as the source by connection monitor.
@@ -7428,6 +7927,40 @@ type ConnectionMonitorsQueryFuture struct {
Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
+func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cmqr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ConnectionMonitorsStartFuture struct {
@@ -7437,6 +7970,34 @@ type ConnectionMonitorsStartFuture struct {
Result func(ConnectionMonitorsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ConnectionMonitorsStartFuture.Result.
+func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ConnectionMonitorsStopFuture struct {
@@ -7446,6 +8007,34 @@ type ConnectionMonitorsStopFuture struct {
Result func(ConnectionMonitorsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ConnectionMonitorsStopFuture.Result.
+func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ConnectionResetSharedKey the virtual network connection reset shared key.
type ConnectionResetSharedKey struct {
autorest.Response `json:"-"`
@@ -7545,6 +8134,12 @@ type ConnectivityHop struct {
Issues *[]ConnectivityIssue `json:"issues,omitempty"`
}
+// MarshalJSON is the custom marshaler for ConnectivityHop.
+func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ConnectivityInformation information on the connectivity status.
type ConnectivityInformation struct {
autorest.Response `json:"-"`
@@ -7564,6 +8159,12 @@ type ConnectivityInformation struct {
ProbesFailed *int32 `json:"probesFailed,omitempty"`
}
+// MarshalJSON is the custom marshaler for ConnectivityInformation.
+func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
type ConnectivityIssue struct {
// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
@@ -7576,6 +8177,12 @@ type ConnectivityIssue struct {
Context *[]map[string]*string `json:"context,omitempty"`
}
+// MarshalJSON is the custom marshaler for ConnectivityIssue.
+func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ConnectivityParameters parameters that determine how the connectivity check will be performed.
type ConnectivityParameters struct {
// Source - Describes the source of the connection.
@@ -7887,6 +8494,12 @@ type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
+// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
+func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
type ContainerNetworkInterfacePropertiesFormat struct {
// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
@@ -7917,6 +8530,40 @@ type DdosCustomPoliciesCreateOrUpdateFuture struct {
Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
+func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dcp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
+ dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DdosCustomPoliciesDeleteFuture struct {
@@ -7926,6 +8573,34 @@ type DdosCustomPoliciesDeleteFuture struct {
Result func(DdosCustomPoliciesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
+func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DdosCustomPolicy a DDoS custom policy in a resource group.
type DdosCustomPolicy struct {
autorest.Response `json:"-"`
@@ -8352,6 +9027,12 @@ type DdosProtectionPlanPropertiesFormat struct {
VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
}
+// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
+func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DdosProtectionPlansCreateOrUpdateFuture struct {
@@ -8361,6 +9042,40 @@ type DdosProtectionPlansCreateOrUpdateFuture struct {
Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
+func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dpp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
+ dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DdosProtectionPlansDeleteFuture struct {
@@ -8370,6 +9085,34 @@ type DdosProtectionPlansDeleteFuture struct {
Result func(DdosProtectionPlansClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
+func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DdosSettings contains the DDoS protection settings of the public IP.
type DdosSettings struct {
// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
@@ -8465,6 +9208,34 @@ type DeleteBastionShareableLinkFuture struct {
Result func(BaseClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DeleteBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DeleteBastionShareableLinkFuture.Result.
+func (future *DeleteBastionShareableLinkFuture) result(client BaseClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DeviceProperties list of properties of the device.
type DeviceProperties struct {
// DeviceVendor - Name of the device Vendor.
@@ -9102,6 +9873,40 @@ type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erca.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
@@ -9111,6 +9916,34 @@ type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
+func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
// resource.
type ExpressRouteCircuitConnection struct {
@@ -9409,6 +10242,40 @@ type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteCircuitConnectionsDeleteFuture struct {
@@ -9418,6 +10285,34 @@ type ExpressRouteCircuitConnectionsDeleteFuture struct {
Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
+func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
type ExpressRouteCircuitListResult struct {
autorest.Response `json:"-"`
@@ -9982,6 +10877,40 @@ type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteCircuitPeeringsDeleteFuture struct {
@@ -9991,6 +10920,34 @@ type ExpressRouteCircuitPeeringsDeleteFuture struct {
Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
+func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
type ExpressRouteCircuitPropertiesFormat struct {
// AllowClassicOperations - Allow classic operations.
@@ -10118,6 +11075,40 @@ type ExpressRouteCircuitsCreateOrUpdateFuture struct {
Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteCircuitsDeleteFuture struct {
@@ -10127,6 +11118,34 @@ type ExpressRouteCircuitsDeleteFuture struct {
Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
+func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
// ExpressRouteCircuit.
type ExpressRouteCircuitServiceProviderProperties struct {
@@ -10157,6 +11176,40 @@ type ExpressRouteCircuitsListArpTableFuture struct {
Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
+func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercatlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteCircuitsListRoutesTableFuture struct {
@@ -10166,6 +11219,40 @@ type ExpressRouteCircuitsListRoutesTableFuture struct {
Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
+func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercrtlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
@@ -10175,6 +11262,40 @@ type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
+func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercrtslr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
// Circuits API.
type ExpressRouteCircuitsRoutesTableListResult struct {
@@ -10282,6 +11403,12 @@ type ExpressRouteConnectionID struct {
ID *string `json:"id,omitempty"`
}
+// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
+func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ExpressRouteConnectionList expressRouteConnection list.
type ExpressRouteConnectionList struct {
autorest.Response `json:"-"`
@@ -10330,6 +11457,40 @@ type ExpressRouteConnectionsCreateOrUpdateFuture struct {
Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteConnectionsDeleteFuture struct {
@@ -10339,6 +11500,34 @@ type ExpressRouteConnectionsDeleteFuture struct {
Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
+func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCrossConnection expressRouteCrossConnection resource.
type ExpressRouteCrossConnection struct {
autorest.Response `json:"-"`
@@ -10951,6 +12140,40 @@ type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erccp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
+ erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
@@ -10960,6 +12183,34 @@ type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
+func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
type ExpressRouteCrossConnectionProperties struct {
// PrimaryAzurePort - READ-ONLY; The name of the primary port.
@@ -11029,6 +12280,40 @@ type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
+func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
+ ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type ExpressRouteCrossConnectionsListArpTableFuture struct {
@@ -11038,6 +12323,40 @@ type ExpressRouteCrossConnectionsListArpTableFuture struct {
Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
+func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercatlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
@@ -11047,6 +12366,40 @@ type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
+func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ercrtlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
@@ -11056,6 +12409,40 @@ type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
+func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erccrtslr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
// the Express Route Cross Connections.
type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
@@ -11245,6 +12632,40 @@ type ExpressRouteGatewaysCreateOrUpdateFuture struct {
Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
+func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
+ erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ExpressRouteGatewaysDeleteFuture struct {
@@ -11254,6 +12675,34 @@ type ExpressRouteGatewaysDeleteFuture struct {
Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
+func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRouteLink expressRouteLink child resource definition.
type ExpressRouteLink struct {
autorest.Response `json:"-"`
@@ -11875,6 +13324,40 @@ type ExpressRoutePortsCreateOrUpdateFuture struct {
Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
+func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
+ erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ExpressRoutePortsDeleteFuture struct {
@@ -11884,6 +13367,34 @@ type ExpressRoutePortsDeleteFuture struct {
Result func(ExpressRoutePortsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
+func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
type ExpressRoutePortsLocation struct {
autorest.Response `json:"-"`
@@ -11996,6 +13507,12 @@ type ExpressRoutePortsLocationBandwidths struct {
ValueInGbps *int32 `json:"valueInGbps,omitempty"`
}
+// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
+func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
type ExpressRoutePortsLocationListResult struct {
autorest.Response `json:"-"`
@@ -12481,6 +13998,40 @@ type FirewallPoliciesCreateOrUpdateFuture struct {
Result func(FirewallPoliciesClient) (FirewallPolicy, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
+func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ fp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
+ fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type FirewallPoliciesDeleteFuture struct {
@@ -12490,6 +14041,34 @@ type FirewallPoliciesDeleteFuture struct {
Result func(FirewallPoliciesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
+func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// FirewallPolicy firewallPolicy Resource.
type FirewallPolicy struct {
autorest.Response `json:"-"`
@@ -13578,6 +15157,40 @@ type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct {
Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result.
+func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ fprg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent {
+ fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type FirewallPolicyRuleGroupsDeleteFuture struct {
@@ -13587,6 +15200,34 @@ type FirewallPolicyRuleGroupsDeleteFuture struct {
Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *FirewallPolicyRuleGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for FirewallPolicyRuleGroupsDeleteFuture.Result.
+func (future *FirewallPolicyRuleGroupsDeleteFuture) result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// FlowLogFormatParameters parameters that define the flow log format.
type FlowLogFormatParameters struct {
// Type - The file type of flow log. Possible values include: 'JSON'
@@ -13854,6 +15495,12 @@ type GatewayRoute struct {
Weight *int32 `json:"weight,omitempty"`
}
+// MarshalJSON is the custom marshaler for GatewayRoute.
+func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// GatewayRouteListResult list of virtual network gateway routes.
type GatewayRouteListResult struct {
autorest.Response `json:"-"`
@@ -13870,6 +15517,40 @@ type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
Result func(BaseClient) (VpnProfileResponse, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result.
+func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) result(client BaseClient) (vpr VpnProfileResponse, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vpr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
+ vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GetActiveSessionsAllFuture struct {
@@ -13879,6 +15560,40 @@ type GetActiveSessionsAllFuture struct {
Result func(BaseClient) (BastionActiveSessionListResultPage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GetActiveSessionsAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GetActiveSessionsAllFuture.Result.
+func (future *GetActiveSessionsAllFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ baslrp.baslr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsAllFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
+ baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GetActiveSessionsFuture struct {
@@ -13888,6 +15603,40 @@ type GetActiveSessionsFuture struct {
Result func(BaseClient) (BastionActiveSessionListResultPage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GetActiveSessionsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GetActiveSessionsFuture.Result.
+func (future *GetActiveSessionsFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ baslrp.baslr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
+ baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// GetVpnSitesConfigurationRequest list of Vpn-Sites.
type GetVpnSitesConfigurationRequest struct {
// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
@@ -14490,6 +16239,40 @@ type InboundNatRulesCreateOrUpdateFuture struct {
Result func(InboundNatRulesClient) (InboundNatRule, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
+func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ inr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type InboundNatRulesDeleteFuture struct {
@@ -14499,6 +16282,34 @@ type InboundNatRulesDeleteFuture struct {
Result func(InboundNatRulesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InboundNatRulesDeleteFuture.Result.
+func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// IntentPolicy network Intent Policy resource.
type IntentPolicy struct {
// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
@@ -14955,6 +16766,12 @@ type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
Fqdns *[]string `json:"fqdns,omitempty"`
}
+// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties.
+func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
type InterfaceIPConfigurationPropertiesFormat struct {
// VirtualNetworkTaps - The reference to Virtual Network Taps.
@@ -15420,6 +17237,40 @@ type InterfacesCreateOrUpdateFuture struct {
Result func(InterfacesClient) (Interface, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
+func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ i.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type InterfacesDeleteFuture struct {
@@ -15429,6 +17280,34 @@ type InterfacesDeleteFuture struct {
Result func(InterfacesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfacesDeleteFuture.Result.
+func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type InterfacesGetEffectiveRouteTableFuture struct {
@@ -15438,6 +17317,40 @@ type InterfacesGetEffectiveRouteTableFuture struct {
Result func(InterfacesClient) (EffectiveRouteListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
+func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ erlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
@@ -15447,6 +17360,40 @@ type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
+func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ensglr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// InterfaceTapConfiguration tap configuration in a Network Interface.
type InterfaceTapConfiguration struct {
autorest.Response `json:"-"`
@@ -15732,6 +17679,40 @@ type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
+func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ itc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
+ itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type InterfaceTapConfigurationsDeleteFuture struct {
@@ -15741,6 +17722,34 @@ type InterfaceTapConfigurationsDeleteFuture struct {
Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
+func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
type IPAddressAvailabilityResult struct {
autorest.Response `json:"-"`
@@ -16268,6 +18277,40 @@ type IPGroupsCreateOrUpdateFuture struct {
Result func(IPGroupsClient) (IPGroup, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *IPGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for IPGroupsCreateOrUpdateFuture.Result.
+func (future *IPGroupsCreateOrUpdateFuture) result(client IPGroupsClient) (ig IPGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ig.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent {
+ ig, err = client.CreateOrUpdateResponder(ig.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type IPGroupsDeleteFuture struct {
@@ -16277,6 +18320,34 @@ type IPGroupsDeleteFuture struct {
Result func(IPGroupsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *IPGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for IPGroupsDeleteFuture.Result.
+func (future *IPGroupsDeleteFuture) result(client IPGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
type IpsecPolicy struct {
// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
@@ -19287,6 +21358,40 @@ type LoadBalancersCreateOrUpdateFuture struct {
Result func(LoadBalancersClient) (LoadBalancer, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
+func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ lb.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type LoadBalancersDeleteFuture struct {
@@ -19296,6 +21401,34 @@ type LoadBalancersDeleteFuture struct {
Result func(LoadBalancersClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LoadBalancersDeleteFuture.Result.
+func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// LoadBalancerSku SKU of a load balancer.
type LoadBalancerSku struct {
// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
@@ -19781,6 +21914,40 @@ type LocalNetworkGatewaysCreateOrUpdateFuture struct {
Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
+func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ lng.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type LocalNetworkGatewaysDeleteFuture struct {
@@ -19790,6 +21957,34 @@ type LocalNetworkGatewaysDeleteFuture struct {
Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
+func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// LogSpecification description of logging specification.
type LogSpecification struct {
// Name - The name of the specification.
@@ -19866,6 +22061,12 @@ type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
ClientID *string `json:"clientId,omitempty"`
}
+// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
+func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// MatchCondition define match conditions.
type MatchCondition struct {
// MatchVariables - List of match variables.
@@ -20270,6 +22471,40 @@ type NatGatewaysCreateOrUpdateFuture struct {
Result func(NatGatewaysClient) (NatGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
+func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ng.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
+ ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type NatGatewaysDeleteFuture struct {
@@ -20279,6 +22514,34 @@ type NatGatewaysDeleteFuture struct {
Result func(NatGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for NatGatewaysDeleteFuture.Result.
+func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// NatGatewaySku SKU of nat gateway.
type NatGatewaySku struct {
// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
@@ -20985,6 +23248,40 @@ type P2sVpnGatewaysCreateOrUpdateFuture struct {
Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
+func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pvg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
+ pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type P2sVpnGatewaysDeleteFuture struct {
@@ -20994,6 +23291,34 @@ type P2sVpnGatewaysDeleteFuture struct {
Result func(P2sVpnGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
+func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type P2sVpnGatewaysGenerateVpnProfileFuture struct {
@@ -21003,6 +23328,40 @@ type P2sVpnGatewaysGenerateVpnProfileFuture struct {
Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
+func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vpr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
+ vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
@@ -21012,6 +23371,40 @@ type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result.
+func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pvch.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent {
+ pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
@@ -21021,6 +23414,40 @@ type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
+func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pvg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
+ pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// P2SVpnProfileParameters vpn Client Parameters for package generation.
type P2SVpnProfileParameters struct {
// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
@@ -21244,6 +23671,40 @@ type PacketCapturesCreateFuture struct {
Result func(PacketCapturesClient) (PacketCaptureResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PacketCapturesCreateFuture.Result.
+func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PacketCapturesDeleteFuture struct {
@@ -21253,6 +23714,34 @@ type PacketCapturesDeleteFuture struct {
Result func(PacketCapturesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PacketCapturesDeleteFuture.Result.
+func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PacketCapturesGetStatusFuture struct {
@@ -21262,6 +23751,40 @@ type PacketCapturesGetStatusFuture struct {
Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PacketCapturesGetStatusFuture.Result.
+func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pcqsr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PacketCapturesStopFuture struct {
@@ -21271,6 +23794,34 @@ type PacketCapturesStopFuture struct {
Result func(PacketCapturesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PacketCapturesStopFuture.Result.
+func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PacketCaptureStorageLocation describes the storage location for a packet capture session.
type PacketCaptureStorageLocation struct {
// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
@@ -22376,6 +24927,40 @@ type PrivateEndpointsCreateOrUpdateFuture struct {
Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
+func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ peVar.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
+ peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PrivateEndpointsDeleteFuture struct {
@@ -22385,6 +24970,34 @@ type PrivateEndpointsDeleteFuture struct {
Result func(PrivateEndpointsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
+func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PrivateLinkService private link service resource.
type PrivateLinkService struct {
autorest.Response `json:"-"`
@@ -22995,6 +25608,40 @@ type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture s
Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
+func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ plsv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
+ plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
@@ -23004,6 +25651,40 @@ type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
+func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ plsv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
+ plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type PrivateLinkServicesCreateOrUpdateFuture struct {
@@ -23013,6 +25694,40 @@ type PrivateLinkServicesCreateOrUpdateFuture struct {
Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
+func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pls.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
+ pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type PrivateLinkServicesDeleteFuture struct {
@@ -23022,6 +25737,34 @@ type PrivateLinkServicesDeleteFuture struct {
Result func(PrivateLinkServicesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
+func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
@@ -23031,6 +25774,34 @@ type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
Result func(PrivateLinkServicesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
+func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
type PrivateLinkServiceVisibility struct {
autorest.Response `json:"-"`
@@ -23471,6 +26242,34 @@ type ProfilesDeleteFuture struct {
Result func(ProfilesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ProfilesDeleteFuture.Result.
+func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ProtocolConfiguration configuration of the protocol.
type ProtocolConfiguration struct {
// HTTPConfiguration - HTTP configuration of the connectivity check.
@@ -23651,6 +26450,40 @@ type PublicIPAddressesCreateOrUpdateFuture struct {
Result func(PublicIPAddressesClient) (PublicIPAddress, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
+func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pia.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PublicIPAddressesDeleteFuture struct {
@@ -23660,6 +26493,34 @@ type PublicIPAddressesDeleteFuture struct {
Result func(PublicIPAddressesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
+func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
type PublicIPAddressListResult struct {
autorest.Response `json:"-"`
@@ -24033,6 +26894,40 @@ type PublicIPPrefixesCreateOrUpdateFuture struct {
Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
+func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pip.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
+ pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PublicIPPrefixesDeleteFuture struct {
@@ -24042,6 +26937,34 @@ type PublicIPPrefixesDeleteFuture struct {
Result func(PublicIPPrefixesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
+func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
type PublicIPPrefixListResult struct {
autorest.Response `json:"-"`
@@ -24251,6 +27174,40 @@ type PutBastionShareableLinkAllFuture struct {
Result func(BaseClient) (BastionShareableLinkListResultPage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PutBastionShareableLinkAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PutBastionShareableLinkAllFuture.Result.
+func (future *PutBastionShareableLinkAllFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ bsllrp.bsllr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkAllFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
+ bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PutBastionShareableLinkFuture struct {
@@ -24260,6 +27217,40 @@ type PutBastionShareableLinkFuture struct {
Result func(BaseClient) (BastionShareableLinkListResultPage, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PutBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PutBastionShareableLinkFuture.Result.
+func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ bsllrp.bsllr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
+ bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
type QueryTroubleshootingParameters struct {
// TargetResourceID - The target resource ID to query the troubleshooting result.
@@ -25106,6 +28097,40 @@ type RouteFilterRulesCreateOrUpdateFuture struct {
Result func(RouteFilterRulesClient) (RouteFilterRule, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
+func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rfr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type RouteFilterRulesDeleteFuture struct {
@@ -25115,6 +28140,34 @@ type RouteFilterRulesDeleteFuture struct {
Result func(RouteFilterRulesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
+func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type RouteFiltersCreateOrUpdateFuture struct {
@@ -25124,6 +28177,40 @@ type RouteFiltersCreateOrUpdateFuture struct {
Result func(RouteFiltersClient) (RouteFilter, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
+func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rf.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type RouteFiltersDeleteFuture struct {
@@ -25133,6 +28220,34 @@ type RouteFiltersDeleteFuture struct {
Result func(RouteFiltersClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteFiltersDeleteFuture.Result.
+func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// RouteListResult response for the ListRoute API service call.
type RouteListResult struct {
autorest.Response `json:"-"`
@@ -25328,6 +28443,40 @@ type RoutesCreateOrUpdateFuture struct {
Result func(RoutesClient) (Route, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
+func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ r.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type RoutesDeleteFuture struct {
azure.FutureAPI
@@ -25336,6 +28485,34 @@ type RoutesDeleteFuture struct {
Result func(RoutesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RoutesDeleteFuture.Result.
+func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// RouteTable route table resource.
type RouteTable struct {
autorest.Response `json:"-"`
@@ -25643,6 +28820,40 @@ type RouteTablesCreateOrUpdateFuture struct {
Result func(RouteTablesClient) (RouteTable, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
+func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rt.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type RouteTablesDeleteFuture struct {
@@ -25652,6 +28863,34 @@ type RouteTablesDeleteFuture struct {
Result func(RouteTablesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RouteTablesDeleteFuture.Result.
+func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// RuleCondition rule condition of type network.
type RuleCondition struct {
// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
@@ -26051,6 +29290,40 @@ type SecurityGroupsCreateOrUpdateFuture struct {
Result func(SecurityGroupsClient) (SecurityGroup, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
+func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ sg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SecurityGroupsDeleteFuture struct {
@@ -26060,6 +29333,34 @@ type SecurityGroupsDeleteFuture struct {
Result func(SecurityGroupsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SecurityGroupsDeleteFuture.Result.
+func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SecurityGroupViewParameters parameters that define the VM to check security groups for.
type SecurityGroupViewParameters struct {
// TargetResourceID - ID of the target VM.
@@ -26420,6 +29721,40 @@ type SecurityRulesCreateOrUpdateFuture struct {
Result func(SecurityRulesClient) (SecurityRule, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
+func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ sr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SecurityRulesDeleteFuture struct {
@@ -26429,6 +29764,34 @@ type SecurityRulesDeleteFuture struct {
Result func(SecurityRulesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SecurityRulesDeleteFuture.Result.
+func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SecurityRulesEvaluationResult network security rules evaluation result.
type SecurityRulesEvaluationResult struct {
// Name - Name of the network security rule.
@@ -26612,6 +29975,40 @@ type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
+func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ sep.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
+ sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ServiceEndpointPoliciesDeleteFuture struct {
@@ -26621,6 +30018,34 @@ type ServiceEndpointPoliciesDeleteFuture struct {
Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
+func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ServiceEndpointPolicy service End point policy resource.
type ServiceEndpointPolicy struct {
autorest.Response `json:"-"`
@@ -27012,6 +30437,40 @@ type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
+func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ sepd.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
+ sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
@@ -27021,6 +30480,34 @@ type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
+func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
type ServiceEndpointPolicyListResult struct {
autorest.Response `json:"-"`
@@ -27243,6 +30730,12 @@ type ServiceTagInformation struct {
ID *string `json:"id,omitempty"`
}
+// MarshalJSON is the custom marshaler for ServiceTagInformation.
+func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ServiceTagInformationPropertiesFormat properties of the service tag information.
type ServiceTagInformationPropertiesFormat struct {
// ChangeNumber - READ-ONLY; The iteration number of service tag.
@@ -27255,6 +30748,12 @@ type ServiceTagInformationPropertiesFormat struct {
AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
}
+// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
+func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// ServiceTagsListResult response for the ListServiceTags API service call.
type ServiceTagsListResult struct {
autorest.Response `json:"-"`
@@ -27272,6 +30771,12 @@ type ServiceTagsListResult struct {
Values *[]ServiceTagInformation `json:"values,omitempty"`
}
+// MarshalJSON is the custom marshaler for ServiceTagsListResult.
+func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// SessionIds list of session ids.
type SessionIds struct {
// SessionIds - List of session ids
@@ -27623,6 +31128,40 @@ type SubnetsCreateOrUpdateFuture struct {
Result func(SubnetsClient) (Subnet, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
+func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SubnetsDeleteFuture struct {
@@ -27632,6 +31171,34 @@ type SubnetsDeleteFuture struct {
Result func(SubnetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SubnetsDeleteFuture.Result.
+func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type SubnetsPrepareNetworkPoliciesFuture struct {
@@ -27641,6 +31208,34 @@ type SubnetsPrepareNetworkPoliciesFuture struct {
Result func(SubnetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
+func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type SubnetsUnprepareNetworkPoliciesFuture struct {
@@ -27650,6 +31245,34 @@ type SubnetsUnprepareNetworkPoliciesFuture struct {
Result func(SubnetsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result.
+func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// SubResource reference to another subresource.
type SubResource struct {
// ID - Resource ID.
@@ -27867,6 +31490,12 @@ type TunnelConnectionHealth struct {
LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
}
+// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
+func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
type UnprepareNetworkPoliciesRequest struct {
// ServiceName - The name of the service for which subnet is being unprepared for.
@@ -28413,6 +32042,40 @@ type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualHubRouteTableV2sCreateOrUpdateFuture.Result.
+func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vhrtv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent {
+ vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualHubRouteTableV2sDeleteFuture struct {
@@ -28422,6 +32085,34 @@ type VirtualHubRouteTableV2sDeleteFuture struct {
Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualHubRouteTableV2sDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualHubRouteTableV2sDeleteFuture.Result.
+func (future *VirtualHubRouteTableV2sDeleteFuture) result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualHubRouteV2 virtualHubRouteTableV2 route.
type VirtualHubRouteV2 struct {
// DestinationType - The type of destinations.
@@ -28443,6 +32134,40 @@ type VirtualHubsCreateOrUpdateFuture struct {
Result func(VirtualHubsClient) (VirtualHub, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
+func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
+ vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualHubsDeleteFuture struct {
@@ -28452,6 +32177,34 @@ type VirtualHubsDeleteFuture struct {
Result func(VirtualHubsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualHubsDeleteFuture.Result.
+func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetwork virtual Network resource.
type VirtualNetwork struct {
autorest.Response `json:"-"`
@@ -29299,6 +33052,40 @@ type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vngc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
@@ -29308,6 +33095,34 @@ type VirtualNetworkGatewayConnectionsDeleteFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
@@ -29317,6 +33132,40 @@ type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ crsk.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
@@ -29326,6 +33175,40 @@ type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ csk.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
@@ -29335,6 +33218,40 @@ type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.StartPacketCaptureResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
@@ -29344,6 +33261,40 @@ type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.StopPacketCaptureResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
@@ -29353,6 +33304,40 @@ type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
+func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vngc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
type VirtualNetworkGatewayIPConfiguration struct {
// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
@@ -29883,6 +33868,40 @@ type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
+func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vng.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualNetworkGatewaysDeleteFuture struct {
@@ -29892,6 +33911,34 @@ type VirtualNetworkGatewaysDeleteFuture struct {
Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
+func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
@@ -29901,6 +33948,40 @@ type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
Result func(VirtualNetworkGatewaysClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
+func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
@@ -29910,6 +33991,40 @@ type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
Result func(VirtualNetworkGatewaysClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
+func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
@@ -29919,6 +34034,40 @@ type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
+func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ grlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
@@ -29928,6 +34077,40 @@ type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
+func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ bpslr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
@@ -29937,6 +34120,40 @@ type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
+func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ grlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
@@ -29946,6 +34163,40 @@ type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
+func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vcchdlr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
+ vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
@@ -29955,6 +34206,40 @@ type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
+func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vcipp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
@@ -29964,6 +34249,40 @@ type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
Result func(VirtualNetworkGatewaysClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
+func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
type VirtualNetworkGatewaySku struct {
// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
@@ -29995,6 +34314,40 @@ type VirtualNetworkGatewaysResetFuture struct {
Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
+func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vng.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
@@ -30004,6 +34357,34 @@ type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
+func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
@@ -30013,6 +34394,40 @@ type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
+func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vcipp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
+ vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
@@ -30022,6 +34437,40 @@ type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
Result func(VirtualNetworkGatewaysClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result.
+func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.StartPacketCaptureResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
@@ -30031,6 +34480,40 @@ type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
Result func(VirtualNetworkGatewaysClient) (String, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result.
+func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.StopPacketCaptureResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualNetworkGatewaysUpdateTagsFuture struct {
@@ -30040,6 +34523,40 @@ type VirtualNetworkGatewaysUpdateTagsFuture struct {
Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
+func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vng.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
type VirtualNetworkListResult struct {
autorest.Response `json:"-"`
@@ -30664,6 +35181,40 @@ type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
+func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vnp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualNetworkPeeringsDeleteFuture struct {
@@ -30673,6 +35224,34 @@ type VirtualNetworkPeeringsDeleteFuture struct {
Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
+func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkPropertiesFormat properties of the virtual network.
type VirtualNetworkPropertiesFormat struct {
// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
@@ -30736,6 +35315,40 @@ type VirtualNetworksCreateOrUpdateFuture struct {
Result func(VirtualNetworksClient) (VirtualNetwork, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
+func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vn.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualNetworksDeleteFuture struct {
@@ -30745,6 +35358,34 @@ type VirtualNetworksDeleteFuture struct {
Result func(VirtualNetworksClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworksDeleteFuture.Result.
+func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkTap virtual Network Tap resource.
type VirtualNetworkTap struct {
autorest.Response `json:"-"`
@@ -31059,6 +35700,40 @@ type VirtualNetworkTapsCreateOrUpdateFuture struct {
Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
+func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vnt.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
+ vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualNetworkTapsDeleteFuture struct {
@@ -31068,6 +35743,34 @@ type VirtualNetworkTapsDeleteFuture struct {
Result func(VirtualNetworkTapsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
+func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualNetworkUsage usage details for subnet.
type VirtualNetworkUsage struct {
// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
@@ -31082,6 +35785,12 @@ type VirtualNetworkUsage struct {
Unit *string `json:"unit,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
+func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualNetworkUsageName usage strings container.
type VirtualNetworkUsageName struct {
// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
@@ -31090,6 +35799,12 @@ type VirtualNetworkUsageName struct {
Value *string `json:"value,omitempty"`
}
+// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
+func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VirtualRouter virtualRouter Resource.
type VirtualRouter struct {
autorest.Response `json:"-"`
@@ -31645,6 +36360,40 @@ type VirtualRouterPeeringsCreateOrUpdateFuture struct {
Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result.
+func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vrp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
+ vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualRouterPeeringsDeleteFuture struct {
@@ -31654,6 +36403,34 @@ type VirtualRouterPeeringsDeleteFuture struct {
Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result.
+func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualRouterPropertiesFormat virtual Router definition.
type VirtualRouterPropertiesFormat struct {
// VirtualRouterAsn - VirtualRouter ASN.
@@ -31697,6 +36474,40 @@ type VirtualRoutersCreateOrUpdateFuture struct {
Result func(VirtualRoutersClient) (VirtualRouter, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result.
+func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
+ vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualRoutersDeleteFuture struct {
@@ -31706,6 +36517,34 @@ type VirtualRoutersDeleteFuture struct {
Result func(VirtualRoutersClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualRoutersDeleteFuture.Result.
+func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualWAN virtualWAN Resource.
type VirtualWAN struct {
autorest.Response `json:"-"`
@@ -31871,6 +36710,40 @@ type VirtualWansCreateOrUpdateFuture struct {
Result func(VirtualWansClient) (VirtualWAN, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
+func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vw.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
+ vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualWansDeleteFuture struct {
@@ -31880,6 +36753,34 @@ type VirtualWansDeleteFuture struct {
Result func(VirtualWansClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualWansDeleteFuture.Result.
+func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualWanSecurityProvider collection of SecurityProviders.
type VirtualWanSecurityProvider struct {
// Name - Name of the security provider.
@@ -32010,6 +36911,12 @@ type VpnClientConnectionHealthDetail struct {
MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
}
+// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
+func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
type VpnClientConnectionHealthDetailListResult struct {
autorest.Response `json:"-"`
@@ -32410,6 +37317,40 @@ type VpnConnectionsCreateOrUpdateFuture struct {
Result func(VpnConnectionsClient) (VpnConnection, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
+func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
+ vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VpnConnectionsDeleteFuture struct {
@@ -32419,6 +37360,34 @@ type VpnConnectionsDeleteFuture struct {
Result func(VpnConnectionsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnConnectionsDeleteFuture.Result.
+func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VpnDeviceScriptParameters vpn device configuration script generation parameters.
type VpnDeviceScriptParameters struct {
// Vendor - The vendor for the vpn device.
@@ -32585,6 +37554,40 @@ type VpnGatewaysCreateOrUpdateFuture struct {
Result func(VpnGatewaysClient) (VpnGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
+func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
+ vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VpnGatewaysDeleteFuture struct {
@@ -32594,6 +37597,34 @@ type VpnGatewaysDeleteFuture struct {
Result func(VpnGatewaysClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnGatewaysDeleteFuture.Result.
+func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VpnGatewaysResetFuture struct {
@@ -32603,6 +37634,40 @@ type VpnGatewaysResetFuture struct {
Result func(VpnGatewaysClient) (VpnGateway, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnGatewaysResetFuture.Result.
+func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vg.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
+ vg, err = client.ResetResponder(vg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnLinkBgpSettings BGP settings details for a link.
type VpnLinkBgpSettings struct {
// Asn - The BGP speaker's ASN.
@@ -32851,6 +37916,40 @@ type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result.
+func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vscr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent {
+ vscr, err = client.ListResponder(vscr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
// a long-running operation.
type VpnServerConfigurationsCreateOrUpdateFuture struct {
@@ -32860,6 +37959,40 @@ type VpnServerConfigurationsCreateOrUpdateFuture struct {
Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnServerConfigurationsCreateOrUpdateFuture.Result.
+func (future *VpnServerConfigurationsCreateOrUpdateFuture) result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vsc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent {
+ vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VpnServerConfigurationsDeleteFuture struct {
@@ -32869,6 +38002,34 @@ type VpnServerConfigurationsDeleteFuture struct {
Result func(VpnServerConfigurationsClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnServerConfigurationsDeleteFuture.Result.
+func (future *VpnServerConfigurationsDeleteFuture) result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
type VpnServerConfigurationsResponse struct {
autorest.Response `json:"-"`
@@ -33015,6 +38176,12 @@ type VpnSiteID struct {
VpnSite *string `json:"vpnSite,omitempty"`
}
+// MarshalJSON is the custom marshaler for VpnSiteID.
+func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// VpnSiteLink vpnSiteLink Resource.
type VpnSiteLink struct {
autorest.Response `json:"-"`
@@ -33354,6 +38521,34 @@ type VpnSitesConfigurationDownloadFuture struct {
Result func(VpnSitesConfigurationClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
+func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VpnSitesCreateOrUpdateFuture struct {
@@ -33363,6 +38558,40 @@ type VpnSitesCreateOrUpdateFuture struct {
Result func(VpnSitesClient) (VpnSite, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
+func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vs.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
+ vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VpnSitesDeleteFuture struct {
@@ -33372,6 +38601,34 @@ type VpnSitesDeleteFuture struct {
Result func(VpnSitesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VpnSitesDeleteFuture.Result.
+func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// Watcher network watcher in a resource group.
type Watcher struct {
autorest.Response `json:"-"`
@@ -33500,6 +38757,12 @@ type WatcherPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
+// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
+func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersCheckConnectivityFuture struct {
@@ -33509,6 +38772,40 @@ type WatchersCheckConnectivityFuture struct {
Result func(WatchersClient) (ConnectivityInformation, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersCheckConnectivityFuture.Result.
+func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ci.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type WatchersDeleteFuture struct {
@@ -33518,6 +38815,34 @@ type WatchersDeleteFuture struct {
Result func(WatchersClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersDeleteFuture.Result.
+func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersGetAzureReachabilityReportFuture struct {
@@ -33527,6 +38852,40 @@ type WatchersGetAzureReachabilityReportFuture struct {
Result func(WatchersClient) (AzureReachabilityReport, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
+func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ arr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersGetFlowLogStatusFuture struct {
@@ -33536,6 +38895,40 @@ type WatchersGetFlowLogStatusFuture struct {
Result func(WatchersClient) (FlowLogInformation, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
+func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ fli.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type WatchersGetNetworkConfigurationDiagnosticFuture struct {
@@ -33545,6 +38938,40 @@ type WatchersGetNetworkConfigurationDiagnosticFuture struct {
Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
+func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cdr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
+ cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type WatchersGetNextHopFuture struct {
@@ -33554,6 +38981,40 @@ type WatchersGetNextHopFuture struct {
Result func(WatchersClient) (NextHopResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetNextHopFuture.Result.
+func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ nhr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersGetTroubleshootingFuture struct {
@@ -33563,6 +39024,40 @@ type WatchersGetTroubleshootingFuture struct {
Result func(WatchersClient) (TroubleshootingResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
+func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ tr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersGetTroubleshootingResultFuture struct {
@@ -33572,6 +39067,40 @@ type WatchersGetTroubleshootingResultFuture struct {
Result func(WatchersClient) (TroubleshootingResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
+func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ tr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersGetVMSecurityRulesFuture struct {
@@ -33581,6 +39110,40 @@ type WatchersGetVMSecurityRulesFuture struct {
Result func(WatchersClient) (SecurityGroupViewResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
+func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ sgvr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersListAvailableProvidersFuture struct {
@@ -33590,6 +39153,40 @@ type WatchersListAvailableProvidersFuture struct {
Result func(WatchersClient) (AvailableProvidersList, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
+func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ apl.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WatchersSetFlowLogConfigurationFuture struct {
@@ -33599,6 +39196,40 @@ type WatchersSetFlowLogConfigurationFuture struct {
Result func(WatchersClient) (FlowLogInformation, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
+func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ fli.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type WatchersVerifyIPFlowFuture struct {
@@ -33608,6 +39239,40 @@ type WatchersVerifyIPFlowFuture struct {
Result func(WatchersClient) (VerificationIPFlowResult, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
+func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vifr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// WebApplicationFirewallCustomRule defines contents of a web application rule.
type WebApplicationFirewallCustomRule struct {
// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
@@ -33654,6 +39319,34 @@ type WebApplicationFirewallPoliciesDeleteFuture struct {
Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
}
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
+func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// WebApplicationFirewallPolicy defines web application firewall policy.
type WebApplicationFirewallPolicy struct {
autorest.Response `json:"-"`
@@ -33779,6 +39472,12 @@ type WebApplicationFirewallPolicyListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
+// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
+func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
// WebApplicationFirewallPolicy values.
type WebApplicationFirewallPolicyListResultIterator struct {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go
index f5ecf430e55e7..0819256d10447 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go
@@ -1,18 +1,7 @@
package network
-// 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 NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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 NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client NatGatewaysClient) (ng NatGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
- ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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)
}()
@@ -165,7 +136,7 @@ func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatew
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client NatGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go
index d4109cae726ea..93d2f6b04a44a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go
index e43f4374db7e0..2f9553c4cc681 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go
@@ -1,18 +1,7 @@
package network
-// 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 P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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 P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
- pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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)
}()
@@ -165,7 +136,7 @@ func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVp
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -242,8 +201,8 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GenerateVpnProfile")
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)
}()
@@ -256,7 +215,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resou
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -290,6 +249,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -297,26 +257,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
- vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -418,8 +359,8 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context
ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealth")
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)
}()
@@ -432,7 +373,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context
result, err = client.GetP2sVpnConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -464,6 +405,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -471,26 +413,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
- pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -517,8 +440,8 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context
ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealthDetailed")
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)
}()
@@ -531,7 +454,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context
result, err = client.GetP2sVpnConnectionHealthDetailedSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", result.Response(), "Failure sending request")
return
}
@@ -565,6 +488,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedPreparer(ctx
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -572,26 +496,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedSender(req *
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent {
- pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go
index 84a88178c5f51..0c2ceba2827bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go
@@ -1,18 +1,7 @@
package network
-// 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 PacketCapturesClient) Create(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.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)
}()
@@ -76,7 +65,7 @@ func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -111,6 +100,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -118,26 +108,7 @@ func (client PacketCapturesClient) CreateSender(req *http.Request) (future Packe
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
- pcr, err = client.CreateResponder(pcr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -163,8 +134,8 @@ func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.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)
}()
@@ -177,7 +148,7 @@ func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -210,6 +181,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -217,20 +189,7 @@ func (client PacketCapturesClient) DeleteSender(req *http.Request) (future Packe
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PacketCapturesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -333,8 +292,8 @@ func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.GetStatus")
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)
}()
@@ -347,7 +306,7 @@ func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupN
result, err = client.GetStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request")
return
}
@@ -380,6 +339,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -387,26 +347,7 @@ func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future Pa
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
- pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -508,8 +449,8 @@ func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Stop")
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)
}()
@@ -522,7 +463,7 @@ func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName s
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -555,6 +496,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -562,20 +504,7 @@ func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketC
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PacketCapturesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go
index 8e5588b4ab1ec..48344e8e6d311 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go
index 1eb24a8fc2e90..b511000da6c77 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go
@@ -1,18 +1,7 @@
package network
-// 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 PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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 PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
- peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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)
}()
@@ -166,7 +137,7 @@ func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future Pri
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateEndpointsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go
index 684ffc5430262..ea3e249109448 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go
@@ -1,18 +1,7 @@
package network
-// 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 PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx co
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility")
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 PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx co
result, err = client.CheckPrivateLinkServiceVisibilitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", result.Response(), "Failure sending request")
return
}
@@ -98,6 +87,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -105,26 +95,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
- plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup")
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)
}()
@@ -165,7 +136,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", result.Response(), "Failure sending request")
return
}
@@ -199,6 +170,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -206,26 +178,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
- plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -251,8 +204,8 @@ func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, reso
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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)
}()
@@ -265,7 +218,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -300,6 +253,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -307,26 +261,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
- pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -351,8 +286,8 @@ func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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)
}()
@@ -365,7 +300,7 @@ func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -397,6 +332,7 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -404,20 +340,7 @@ func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -442,8 +365,8 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx cont
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.DeletePrivateEndpointConnection")
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)
}()
@@ -456,7 +379,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx cont
result, err = client.DeletePrivateEndpointConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request")
return
}
@@ -489,6 +412,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -496,20 +420,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go
index 6249408133f79..f6bfd39a64d2c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go
@@ -1,18 +1,7 @@
package network
-// 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.
@@ -130,8 +119,8 @@ func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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 +133,7 @@ func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -176,6 +165,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -183,20 +173,7 @@ func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDel
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ProfilesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go
index 6df9516f25fb5..74136cd4b23c2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go
@@ -1,18 +1,7 @@
package network
-// 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 PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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 PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -113,6 +102,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -120,26 +110,7 @@ func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
- pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -164,8 +135,8 @@ func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupN
ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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)
}()
@@ -178,7 +149,7 @@ func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -210,6 +181,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -217,20 +189,7 @@ func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future Pu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PublicIPAddressesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go
index 4d84c10f53261..05d8624bb5d1d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go
@@ -1,18 +1,7 @@
package network
-// 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 PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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 PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
- pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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)
}()
@@ -166,7 +137,7 @@ func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future Pub
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go
index fa2d23fdceab3..041fe89edc0d9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go
index d0e93ae998bac..81234786daa56 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go
@@ -1,18 +1,7 @@
package network
-// 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 RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.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)
}()
@@ -77,7 +66,7 @@ func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -113,6 +102,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -120,26 +110,7 @@ func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
- rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -165,8 +136,8 @@ func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.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)
}()
@@ -179,7 +150,7 @@ func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -212,6 +183,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -219,20 +191,7 @@ func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future Rou
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteFilterRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go
index 746ac27e07fe6..03decffb4841b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go
@@ -1,18 +1,7 @@
package network
-// 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 RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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 RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteFiltersClient) (rf RouteFilter, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
- rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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)
}()
@@ -165,7 +136,7 @@ func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFi
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteFiltersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go
index 9435db2e6b82f..9e1b0d2c33b1b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go
@@ -1,18 +1,7 @@
package network
-// 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 RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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 RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future Route
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RoutesClient) (r Route, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
- r, err = client.CreateOrUpdateResponder(r.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -154,8 +125,8 @@ func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string,
ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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)
}()
@@ -168,7 +139,7 @@ func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -201,6 +172,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -208,20 +180,7 @@ func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteF
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RoutesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go
index b676a74eb03dd..2cfe2b122c384 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go
@@ -1,18 +1,7 @@
package network
-// 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 RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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 RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteTablesClient) (rt RouteTable, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
- rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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)
}()
@@ -165,7 +136,7 @@ func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTab
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client RouteTablesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go
index 70c58254e3df9..093a69a6e9e2e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go
@@ -1,18 +1,7 @@
package network
-// 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 SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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 SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SecurityGroupsClient) (sg SecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
- sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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)
}()
@@ -165,7 +136,7 @@ func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future Secur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SecurityGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go
index d28fbbc2dc641..7c8a1eab0c1bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go
@@ -1,18 +1,7 @@
package network
-// 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 SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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 SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SecurityRulesClient) (sr SecurityRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
- sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -154,8 +125,8 @@ func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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)
}()
@@ -168,7 +139,7 @@ func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -201,6 +172,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -208,20 +180,7 @@ func (client SecurityRulesClient) DeleteSender(req *http.Request) (future Securi
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SecurityRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go
index f5b1573bd3277..83370bd2301d7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go
index 41ac964059952..d595f3df098f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go
@@ -1,18 +1,7 @@
package network
-// 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 ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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 ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +90,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -108,26 +98,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Reque
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
- sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -152,8 +123,8 @@ func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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)
}()
@@ -166,7 +137,7 @@ func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -198,6 +169,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -205,20 +177,7 @@ func (client ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go
index 694ba8d6cb208..469d0bc30c824 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go
@@ -1,18 +1,7 @@
package network
-// 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 ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.
ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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)
}()
@@ -68,7 +57,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +93,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -111,26 +101,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *h
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
- sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -156,8 +127,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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)
}()
@@ -170,7 +141,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -203,6 +174,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,20 +182,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go
index 5bf34cb9c6c49..0003b5e0fa65a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go
index 694b466651101..2073ac89d9959 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go
@@ -1,18 +1,7 @@
package network
-// 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 SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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 SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNam
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future Subn
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SubnetsClient) (s Subnet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.CreateOrUpdateResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -154,8 +125,8 @@ func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string
ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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)
}()
@@ -168,7 +139,7 @@ func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -201,6 +172,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -208,20 +180,7 @@ func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDelet
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SubnetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -448,8 +407,8 @@ func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.PrepareNetworkPolicies")
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)
}()
@@ -462,7 +421,7 @@ func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resource
result, err = client.PrepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -497,6 +456,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -504,20 +464,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SubnetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -544,8 +491,8 @@ func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.UnprepareNetworkPolicies")
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)
}()
@@ -558,7 +505,7 @@ func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resour
result, err = client.UnprepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -593,6 +540,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -600,20 +548,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client SubnetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go
index 82d3f95041d2b..30c44cae61527 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go
index f69a10844d39b..f81f621e4d914 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go
@@ -2,19 +2,8 @@ package network
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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go
index 2517331970493..0e04d3feb9a69 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualHubRouteTableV2sClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.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)
}()
@@ -68,7 +57,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +93,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualHubRouteTableV2sClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -111,26 +101,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdateSender(req *http.Reque
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent {
- vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -156,8 +127,8 @@ func (client VirtualHubRouteTableV2sClient) Delete(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.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)
}()
@@ -170,7 +141,7 @@ func (client VirtualHubRouteTableV2sClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -203,6 +174,7 @@ func (client VirtualHubRouteTableV2sClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualHubRouteTableV2sClient) DeleteSender(req *http.Request) (future VirtualHubRouteTableV2sDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,20 +182,7 @@ func (client VirtualHubRouteTableV2sClient) DeleteSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go
index 054f409534198..fb8dce71fa194 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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 VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualHubsClient) (vh VirtualHub, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
- vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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)
}()
@@ -165,7 +136,7 @@ func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualH
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualHubsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go
index bfcef19fc252a..51776094a4525 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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)
}()
@@ -80,7 +69,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -115,6 +104,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -122,26 +112,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *h
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
- vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -166,8 +137,8 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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 +151,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -212,6 +183,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -219,20 +191,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -530,8 +489,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetSharedKey")
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)
}()
@@ -553,7 +512,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
result, err = client.ResetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -587,6 +546,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -594,26 +554,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *h
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
- crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -642,8 +583,8 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Co
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.SetSharedKey")
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)
}()
@@ -662,7 +603,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Co
result, err = client.SetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -696,6 +637,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -703,26 +645,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *htt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
- csk, err = client.SetSharedKeyResponder(csk.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -749,8 +672,8 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx cont
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.StartPacketCapture")
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)
}()
@@ -763,7 +686,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx cont
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -800,6 +723,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapturePreparer(
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -807,26 +731,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureSender(re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.StartPacketCaptureResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -836,7 +741,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureResponder
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -853,8 +758,8 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx conte
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.StopPacketCapture")
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)
}()
@@ -867,7 +772,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx conte
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -901,6 +806,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapturePreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -908,26 +814,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureSender(req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.StopPacketCaptureResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -937,7 +824,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureResponder(
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -953,8 +840,8 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Cont
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.UpdateTags")
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)
}()
@@ -967,7 +854,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Cont
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1001,6 +888,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1008,26 +896,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
- vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go
index fe732cbf790fb..424495f1fe3e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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)
}()
@@ -73,7 +62,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -108,6 +97,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -115,26 +105,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Reques
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -159,8 +130,8 @@ func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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)
}()
@@ -173,7 +144,7 @@ func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -205,6 +176,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -212,20 +184,7 @@ func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -251,8 +210,8 @@ func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Generatevpnclientpackage")
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)
}()
@@ -265,7 +224,7 @@ func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.
result, err = client.GeneratevpnclientpackageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request")
return
}
@@ -299,6 +258,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -306,26 +266,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *h
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -335,7 +276,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -352,8 +293,8 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GenerateVpnProfile")
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)
}()
@@ -366,7 +307,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Contex
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -400,6 +341,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -407,26 +349,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.GenerateVpnProfileResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -436,7 +359,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *htt
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -529,8 +452,8 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Conte
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetAdvertisedRoutes")
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)
}()
@@ -543,7 +466,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Conte
result, err = client.GetAdvertisedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request")
return
}
@@ -576,6 +499,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -583,26 +507,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.R
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
- grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -628,8 +533,8 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetBgpPeerStatus")
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)
}()
@@ -642,7 +547,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context,
result, err = client.GetBgpPeerStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request")
return
}
@@ -677,6 +582,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -684,26 +590,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
- bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -729,8 +616,8 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetLearnedRoutes")
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)
}()
@@ -743,7 +630,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context,
result, err = client.GetLearnedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request")
return
}
@@ -775,6 +662,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -782,26 +670,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Requ
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
- grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -827,8 +696,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx cont
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth")
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)
}()
@@ -841,7 +710,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx cont
result, err = client.GetVpnclientConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -873,6 +742,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -880,26 +750,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
- vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -926,8 +777,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx conte
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientIpsecParameters")
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)
}()
@@ -940,7 +791,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx conte
result, err = client.GetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -972,6 +823,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -979,26 +831,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
- vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1024,8 +857,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.C
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnProfilePackageURL")
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)
}()
@@ -1038,7 +871,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.C
result, err = client.GetVpnProfilePackageURLSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request")
return
}
@@ -1070,6 +903,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1077,26 +911,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *ht
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1106,7 +921,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1357,8 +1172,8 @@ func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Reset")
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)
}()
@@ -1371,7 +1186,7 @@ func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGr
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -1406,6 +1221,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1413,26 +1229,7 @@ func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.ResetResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1458,8 +1255,8 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.C
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ResetVpnClientSharedKey")
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)
}()
@@ -1472,7 +1269,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.C
result, err = client.ResetVpnClientSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", result.Response(), "Failure sending request")
return
}
@@ -1504,6 +1301,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1511,20 +1309,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *ht
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -1551,8 +1336,8 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx conte
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SetVpnclientIpsecParameters")
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)
}()
@@ -1572,7 +1357,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx conte
result, err = client.SetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -1606,6 +1391,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1613,26 +1399,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
- vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1658,8 +1425,8 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Contex
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.StartPacketCapture")
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)
}()
@@ -1672,7 +1439,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Contex
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -1709,6 +1476,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapturePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1716,26 +1484,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCaptureSender(req *http.Re
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.StartPacketCaptureResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1745,7 +1494,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCaptureResponder(resp *htt
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1761,8 +1510,8 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.StopPacketCapture")
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)
}()
@@ -1775,7 +1524,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -1809,6 +1558,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapturePreparer(ctx context
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1816,26 +1566,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCaptureSender(req *http.Req
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
- s, err = client.StopPacketCaptureResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1845,7 +1576,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCaptureResponder(resp *http
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1937,8 +1668,8 @@ func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.UpdateTags")
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)
}()
@@ -1951,7 +1682,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1985,6 +1716,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1992,26 +1724,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.UpdateTagsResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go
index fe8de9118150e..5368a1faa67d1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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)
}()
@@ -68,7 +57,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +93,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -111,26 +101,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Reques
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
- vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -156,8 +127,8 @@ func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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)
}()
@@ -170,7 +141,7 @@ func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -203,6 +174,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,20 +182,7 @@ func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go
index 5ceaa93eb7553..709d601afe2e8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go
@@ -1,18 +1,7 @@
package network
-// 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.
@@ -130,8 +119,8 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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)
}()
@@ -153,7 +142,7 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -188,6 +177,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -195,26 +185,7 @@ func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
- vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -239,8 +210,8 @@ func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupNam
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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)
}()
@@ -253,7 +224,7 @@ func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -285,6 +256,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -292,20 +264,7 @@ func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future Virt
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworksClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go
index 58baa4b779026..4b3a4150df7db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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)
}()
@@ -98,7 +87,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -133,6 +122,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,26 +130,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
- vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -184,8 +155,8 @@ func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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)
}()
@@ -198,7 +169,7 @@ func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -230,6 +201,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -237,20 +209,7 @@ func (client VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future V
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go
index dd9d39b1db4a3..f3ac10d9396d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.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 VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -116,6 +105,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualRouterPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualRouterPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -123,26 +113,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdateSender(req *http.Request
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
- vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -168,8 +139,8 @@ func (client VirtualRouterPeeringsClient) Delete(ctx context.Context, resourceGr
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.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)
}()
@@ -182,7 +153,7 @@ func (client VirtualRouterPeeringsClient) Delete(ctx context.Context, resourceGr
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -215,6 +186,7 @@ func (client VirtualRouterPeeringsClient) DeletePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualRouterPeeringsClient) DeleteSender(req *http.Request) (future VirtualRouterPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -222,20 +194,7 @@ func (client VirtualRouterPeeringsClient) DeleteSender(req *http.Request) (futur
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go
index b299cb5d984f1..f0f8749ffe7db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.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)
}()
@@ -77,7 +66,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -112,6 +101,7 @@ func (client VirtualRoutersClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualRoutersClient) CreateOrUpdateSender(req *http.Request) (future VirtualRoutersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -119,26 +109,7 @@ func (client VirtualRoutersClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualRoutersClient) (vr VirtualRouter, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
- vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -163,8 +134,8 @@ func (client VirtualRoutersClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.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)
}()
@@ -177,7 +148,7 @@ func (client VirtualRoutersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -209,6 +180,7 @@ func (client VirtualRoutersClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VirtualRoutersClient) DeleteSender(req *http.Request) (future VirtualRoutersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -216,20 +188,7 @@ func (client VirtualRoutersClient) DeleteSender(req *http.Request) (future Virtu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualRoutersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go
index cfaf5abb05a7d..6f06490da13a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go
@@ -1,18 +1,7 @@
package network
-// 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 VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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 VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualWansClient) (vw VirtualWAN, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
- vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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)
}()
@@ -165,7 +136,7 @@ func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client VirtualWansClient) DeleteSender(req *http.Request) (future VirtualW
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VirtualWansClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go
index a16f18f9e1635..80e0c3f414718 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceG
ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.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 VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +92,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -110,26 +100,7 @@ func (client VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (futu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnConnectionsClient) (vc VpnConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
- vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -155,8 +126,8 @@ func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.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 +140,7 @@ func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -202,6 +173,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -209,20 +181,7 @@ func (client VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnCo
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go
index 3b5952dd7efec..fade7fa2e41a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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 VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnGatewaysClient) (vg VpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
- vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName st
ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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)
}()
@@ -165,7 +136,7 @@ func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatew
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -546,8 +505,8 @@ func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName str
ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Reset")
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)
}()
@@ -560,7 +519,7 @@ func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName str
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -592,6 +551,7 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -599,26 +559,7 @@ func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewa
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnGatewaysClient) (vg VpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
- vg, err = client.ResetResponder(vg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go
index 6c92f135ea1ae..4ca5f9d677c27 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go
index a4f42f6f5159a..76275da734404 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context,
ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.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 VpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +91,7 @@ func (client VpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future VpnServerConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -109,26 +99,7 @@ func (client VpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Reque
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent {
- vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -153,8 +124,8 @@ func (client VpnServerConfigurationsClient) Delete(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.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)
}()
@@ -167,7 +138,7 @@ func (client VpnServerConfigurationsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -199,6 +170,7 @@ func (client VpnServerConfigurationsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsClient) DeleteSender(req *http.Request) (future VpnServerConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -206,20 +178,7 @@ func (client VpnServerConfigurationsClient) DeleteSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnServerConfigurationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
index d9b6da8e1d154..69ba10a947b9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnServerConfigurationsAssociatedWithVirtualWanClient) List(ctx con
ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsAssociatedWithVirtualWanClient.List")
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 VpnServerConfigurationsAssociatedWithVirtualWanClient) List(ctx con
result, err = client.ListSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", result.Response(), "Failure sending request")
return
}
@@ -98,6 +87,7 @@ func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListPreparer
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListSender(req *http.Request) (future VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -105,26 +95,7 @@ func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListSender(r
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent {
- vscr, err = client.ListResponder(vscr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go
index adeed0da7b4db..a1a9531626884 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go
index 29df43728f2a5..34d4488cf1e35 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go
@@ -1,18 +1,7 @@
package network
-// 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go
index ed28729947c13..96f2b70fe890a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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 VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +89,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,26 +97,7 @@ func (client VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future Vpn
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnSitesClient) (vs VpnSite, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
- vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -151,8 +122,8 @@ func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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)
}()
@@ -165,7 +136,7 @@ func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -197,6 +168,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -204,20 +176,7 @@ func (client VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDel
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnSitesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go
index 30c10349c6d7e..7bc89c6c4f390 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go
@@ -1,18 +1,7 @@
package network
-// 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 VpnSitesConfigurationClient) Download(ctx context.Context, resource
ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesConfigurationClient.Download")
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)
}()
@@ -73,7 +62,7 @@ func (client VpnSitesConfigurationClient) Download(ctx context.Context, resource
result, err = client.DownloadSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request")
return
}
@@ -107,6 +96,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -114,20 +104,7 @@ func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (fut
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go
index fe267c9937073..0f52fc0ff6c33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go
@@ -1,18 +1,7 @@
package network
-// 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 WatchersClient) CheckConnectivity(ctx context.Context, resourceGrou
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CheckConnectivity")
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)
}()
@@ -75,7 +64,7 @@ func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGrou
result, err = client.CheckConnectivitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request")
return
}
@@ -109,6 +98,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -116,26 +106,7 @@ func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (ci ConnectivityInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
- ci, err = client.CheckConnectivityResponder(ci.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -240,8 +211,8 @@ func (client WatchersClient) Delete(ctx context.Context, resourceGroupName strin
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.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)
}()
@@ -254,7 +225,7 @@ func (client WatchersClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -286,6 +257,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -293,20 +265,7 @@ func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDel
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
@@ -408,8 +367,8 @@ func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, res
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetAzureReachabilityReport")
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)
}()
@@ -431,7 +390,7 @@ func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, res
result, err = client.GetAzureReachabilityReportSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request")
return
}
@@ -465,6 +424,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -472,26 +432,7 @@ func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request)
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (arr AzureReachabilityReport, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
- arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -517,8 +458,8 @@ func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroup
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus")
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)
}()
@@ -537,7 +478,7 @@ func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroup
result, err = client.GetFlowLogStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request")
return
}
@@ -571,6 +512,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -578,26 +520,7 @@ func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future W
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (fli FlowLogInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
- fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -627,8 +550,8 @@ func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Conte
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNetworkConfigurationDiagnostic")
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)
}()
@@ -648,7 +571,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Conte
result, err = client.GetNetworkConfigurationDiagnosticSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", result.Response(), "Failure sending request")
return
}
@@ -682,6 +605,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte
// http.Response Body if it receives an error.
func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -689,26 +613,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.R
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
- cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -734,8 +639,8 @@ func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName s
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNextHop")
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)
}()
@@ -756,7 +661,7 @@ func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName s
result, err = client.GetNextHopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", result.Response(), "Failure sending request")
return
}
@@ -790,6 +695,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -797,26 +703,7 @@ func (client WatchersClient) GetNextHopSender(req *http.Request) (future Watcher
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (nhr NextHopResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
- nhr, err = client.GetNextHopResponder(nhr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -921,8 +808,8 @@ func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshooting")
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)
}()
@@ -945,7 +832,7 @@ func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGro
result, err = client.GetTroubleshootingSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request")
return
}
@@ -979,6 +866,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -986,26 +874,7 @@ func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (tr TroubleshootingResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
- tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1031,8 +900,8 @@ func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resou
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshootingResult")
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)
}()
@@ -1051,7 +920,7 @@ func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resou
result, err = client.GetTroubleshootingResultSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request")
return
}
@@ -1085,6 +954,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1092,26 +962,7 @@ func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (tr TroubleshootingResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
- tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1137,8 +988,8 @@ func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGro
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetVMSecurityRules")
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)
}()
@@ -1157,7 +1008,7 @@ func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGro
result, err = client.GetVMSecurityRulesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request")
return
}
@@ -1191,6 +1042,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1198,26 +1050,7 @@ func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
- sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1388,8 +1221,8 @@ func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourc
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAvailableProviders")
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)
}()
@@ -1402,7 +1235,7 @@ func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourc
result, err = client.ListAvailableProvidersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request")
return
}
@@ -1436,6 +1269,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1443,26 +1277,7 @@ func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (fu
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (apl AvailableProvidersList, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
- apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1488,8 +1303,8 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.SetFlowLogConfiguration")
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)
}()
@@ -1516,7 +1331,7 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
result, err = client.SetFlowLogConfigurationSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request")
return
}
@@ -1550,6 +1365,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1557,26 +1373,7 @@ func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (f
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (fli FlowLogInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
- fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
@@ -1681,8 +1478,8 @@ func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.VerifyIPFlow")
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)
}()
@@ -1705,7 +1502,7 @@ func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName
result, err = client.VerifyIPFlowSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request")
return
}
@@ -1739,6 +1536,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1746,26 +1544,7 @@ func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future Watch
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
- vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
- }
- }
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go
index aee853c3cfc95..6faba79fb8a81 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go
@@ -1,18 +1,7 @@
package network
-// 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.
@@ -151,8 +140,8 @@ func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, r
ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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)
}()
@@ -171,7 +160,7 @@ func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -203,6 +192,7 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,20 +200,7 @@ func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Reques
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
- future.Result = func(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
- }
+ future.Result = future.result
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
index 3911de4df70c8..bcfbb15cce0d3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
@@ -1,21 +1,7 @@
package 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.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
// Number contains the semantic version of this SDK.
-const Number = "v50.2.0"
+const Number = "v68.0.0"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b57cd27bb1073..e294427bb9b6e 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,4 +1,4 @@
-# github.com/Azure/azure-sdk-for-go v50.2.0+incompatible
+# github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
## explicit
github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute
github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network